diff --git a/CHANGES.md b/CHANGES.md index 7580ccb114..55a2764393 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,64 @@ -# Unreleased Version -- Renamed `providers` to `authProviders` in project collection **Breaking Change** +# Version 0.14.0 + +## Features +- **BREAKING CHANGE** New Event Model + - The new Event Model allows you to define events for Webhooks or Functions more granular + - Account and Users events have been merged to just Users + - Examples: + - `database.documents.create` is now `collections.[COLLECTION_ID].documents.[DOCUMENT_ID].create` + - Both placeholders needs to be replaced with either `*` for wildcard or an ID of the respective collection or document + - So you can listen to every document that is created in the `posts` collection with `collections.posts.*.documents.*.create` + - `event` in the Realtime payload has been renamed to `events` and contains all possible events + - `X-Appwrite-Webhook-Event` Webhook header has been renamed to `X-Appwrite-Webhook-Events` and contains all possible events +- **BREAKING CHANGE** Renamed `providers` to `authProviders` in Projects +- **BREAKING CHANGE** Renamed `stdout` to `response` in Execution +- **BREAKING CHANGE** Removed delete endpoint from the Accounts API +- **BREAKING CHANGE** Renamed `name` to `userName` on Membership response model +- **BREAKING CHANGE** Renamed `email` to `userEmail` on Membership response model +- **BREAKING CHANGE** Renamed `event` to `events` on Realtime Response and now is an array of strings +- Added `teamName` to Membership response model +- Added new endpoint to update user's status from the Accounts API +- Deleted users will now free their ID and not reserve it anymore +- Added new endpoint to list all memberships on the Users API +- Increased Execution `response` to 1MB +- Increased Build `stdout` to 1MB +- Added Wildcard support to Platforms +- Added Activity page to Teams console +- Added button to verify/unverify user's e-mail address in the console +- Added Docker log limits to `docker-compose.yaml` +- Renamed `_APP_EXECUTOR_RUNTIME_NETWORK` environment variable to `OPEN_RUNTIMES_NETWORK` +- Added Auth0 OAuth2 provider +- Added Okta Oauth2 provider @tanay1337 in https://github.com/appwrite/appwrite/pull/3139 + +## Bugs +- Fixed issues with `min`, `max` and `default` values for float attributes +- Fixed account created with Magic URL to set a new password +- Fixed Database to respect `null` values +- Fixed missing realtime events from the Users API +- Fixed missing events when all sessions are deleted from the Users and Account API +- Fixed dots in database attributes +- Fixed renewal of SSL certificates +- Fixed errors in the certificates workers +- Fixed HTTPS redirect bug for non GET requests +- Fixed search when a User is updated +- Fixed aspect ratio bug in Avatars API +- Fixed wrong `Fail to Warmup ...` error message in Executor +- Fixed UI when file uploader is covered by jumpt to top button +- Fixed bug that allowed Queries on failed indexes +- Fixed UI when an alert with a lot text disappears too fast by increasing duration +- Fixed issues with cache and case-sensivity on ID's +- Fixed storage stats by upgrading to `BIGINT` +- Fixed `storage.total` stats which now is a sum of `storage.files.total` and `storage.deployments.total` +- Fixed Project logo preview +- Fixed UI for missing icons in Collection attributes +- Fixed UI to allow single-character custom ID's +- Fixed array size validation in the Database Service +- Fixed file preview when file extension is missing +- Fixed `Open an Issue` link in the console +- Fixed missing environment variables on Executor service +- Fixed all endpoints that expect an Array in their params to have not more than 100 items +- Added Executor host variables as a part of infrastructure configuration by @sjke in https://github.com/appwrite/appwrite/pull/3084 +- Added new tab/window for new release link by @Akshay-Rana-Gujjar in https://github.com/appwrite/appwrite/pull/3202 # Version 0.13.4 diff --git a/Dockerfile b/Dockerfile index c464885054..7f5df76148 100755 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN composer install --ignore-platform-reqs --optimize-autoloader \ --no-plugins --no-scripts --prefer-dist \ `if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi` -FROM node:16.13.2-alpine3.15 as node +FROM node:16.14.2-alpine3.15 as node WORKDIR /usr/local/src/ @@ -30,8 +30,8 @@ ARG DEBUG=false ENV DEBUG=$DEBUG ENV PHP_REDIS_VERSION=5.3.7 \ - PHP_MONGODB_VERSION=1.9.1 \ - PHP_SWOOLE_VERSION=v4.8.7 \ + PHP_MONGODB_VERSION=1.13.0 \ + PHP_SWOOLE_VERSION=v4.8.9 \ PHP_IMAGICK_VERSION=3.7.0 \ PHP_YAML_VERSION=2.2.2 \ PHP_MAXMINDDB_VERSION=v1.11.0 diff --git a/README-CN.md b/README-CN.md index cc8457fd55..826163ee2b 100644 --- a/README-CN.md +++ b/README-CN.md @@ -59,7 +59,7 @@ docker run -it --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \ --entrypoint="install" \ - appwrite/appwrite:0.13.4 + appwrite/appwrite:0.14.0 ``` ### Windows @@ -71,7 +71,7 @@ docker run -it --rm ^ --volume //var/run/docker.sock:/var/run/docker.sock ^ --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^ --entrypoint="install" ^ - appwrite/appwrite:0.13.4 + appwrite/appwrite:0.14.0 ``` #### PowerShell @@ -81,7 +81,7 @@ docker run -it --rm , --volume /var/run/docker.sock:/var/run/docker.sock , --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw , --entrypoint="install" , - appwrite/appwrite:0.13.4 + appwrite/appwrite:0.14.0 ``` 运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。 diff --git a/README.md b/README.md index c74b33cc2c..dea890c3a3 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ docker run -it --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \ --entrypoint="install" \ - appwrite/appwrite:0.13.4 + appwrite/appwrite:0.14.0 ``` ### Windows @@ -74,7 +74,7 @@ docker run -it --rm ^ --volume //var/run/docker.sock:/var/run/docker.sock ^ --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^ --entrypoint="install" ^ - appwrite/appwrite:0.13.4 + appwrite/appwrite:0.14.0 ``` #### PowerShell @@ -84,7 +84,7 @@ docker run -it --rm , --volume /var/run/docker.sock:/var/run/docker.sock , --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw , --entrypoint="install" , - appwrite/appwrite:0.13.4 + appwrite/appwrite:0.14.0 ``` Once the Docker installation completes, go to http://localhost to access the Appwrite console from your browser. Please note that on non-Linux native hosts, the server might take a few minutes to start after installation completes. diff --git a/app/cli.php b/app/cli.php index d2c6496dc3..8902aad886 100644 --- a/app/cli.php +++ b/app/cli.php @@ -5,6 +5,9 @@ require_once __DIR__.'/controllers/general.php'; use Utopia\App; use Utopia\CLI\CLI; use Utopia\CLI\Console; +use Utopia\Database\Validator\Authorization; + +Authorization::disable(); $cli = new CLI(); diff --git a/app/config/collections.php b/app/config/collections.php index aa574eb9dd..0e2a558210 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -1054,9 +1054,9 @@ $collections = [ 'size' => 16384, 'signed' => true, 'required' => false, - 'default' => [], - 'array' => true, - 'filters' => ['json'], + 'default' => null, + 'array' => false, + 'filters' => ['subQuerySessions'], ], [ '$id' => 'tokens', @@ -1076,7 +1076,7 @@ $collections = [ 'size' => 16384, 'signed' => true, 'required' => false, - 'default' => [], + 'default' => null, 'array' => false, 'filters' => ['subQueryMemberships'], ], @@ -1090,18 +1090,7 @@ $collections = [ 'default' => null, 'array' => false, 'filters' => [], - ], - [ - '$id' => 'deleted', - 'type' => Database::VAR_BOOLEAN, - 'format' => '', - 'size' => 0, - 'signed' => true, - 'required' => false, - 'default' => null, - 'array' => false, - 'filters' => [], - ], + ] ], 'indexes' => [ [ @@ -1117,14 +1106,7 @@ $collections = [ 'attributes' => ['search'], 'lengths' => [], 'orders' => [], - ], - [ - '$id' => '_key_deleted_email', - 'type' => Database::INDEX_KEY, - 'attributes' => ['deleted', 'email'], - 'lengths' => [0, 320], - 'orders' => [Database::ORDER_ASC, Database::ORDER_ASC], - ], + ] ], ], @@ -1478,6 +1460,13 @@ $collections = [ 'lengths' => [100, 100], 'orders' => [Database::ORDER_ASC, Database::ORDER_ASC], ], + [ + '$id' => '_key_user', + 'type' => Database::INDEX_KEY, + 'attributes' => ['userId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], ], ], @@ -2204,7 +2193,7 @@ $collections = [ 'filters' => [], ], [ - '$id' => 'stdout', + '$id' => 'response', 'type' => Database::VAR_STRING, 'format' => '', 'size' => 1000000, @@ -2508,7 +2497,7 @@ $collections = [ '$id' => 'value', 'type' => Database::VAR_INTEGER, 'format' => '', - 'size' => 0, + 'size' => 8, 'signed' => false, 'required' => true, 'default' => null, diff --git a/app/config/errors.php b/app/config/errors.php index b7b5c1ca31..8dadcf079c 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -78,6 +78,11 @@ return [ 'description' => 'An internal server error occurred.', 'code' => 500, ], + Exception::GENERAL_PROTOCOL_UNSUPPORTED => [ + 'name' => Exception::GENERAL_PROTOCOL_UNSUPPORTED, + 'description' => 'The request cannot be fulfilled with the current protocol. Please check the value of the _APP_OPTIONS_FORCE_HTTPS environment variable.', + 'code' => 500, + ], /** User Errors */ Exception::USER_COUNT_EXCEEDED => [ diff --git a/app/config/events.php b/app/config/events.php index bfb70e2180..2c2ded49d4 100644 --- a/app/config/events.php +++ b/app/config/events.php @@ -7,279 +7,217 @@ use Appwrite\Utopia\Response; return [ - 'account.create' => [ - 'description' => 'This event triggers when the account is created.', - 'model' => Response::MODEL_USER, - 'note' => '', + 'users' => [ + '$model' => Response::MODEL_USER, + '$resource' => true, + '$description' => 'This event triggers on any user\'s event.', + 'sessions' => [ + '$model' => Response::MODEL_SESSION, + '$resource' => true, + '$description' => 'This event triggers on any user\'s sessions event.', + 'create' => [ + '$description' => 'This event triggers when a session for a user is created.', + ], + 'delete' => [ + '$description' => 'This event triggers when a session for a user is deleted.' + ], + ], + 'recovery' => [ + '$model' => Response::MODEL_TOKEN, + '$resource' => true, + '$description' => 'This event triggers on any user\'s recovery token event.', + 'create' => [ + '$description' => 'This event triggers when a recovery token for a user is created.', + ], + 'update' => [ + '$description' => 'This event triggers when a recovery token for a user is validated.' + ], + ], + 'verification' => [ + '$model' => Response::MODEL_TOKEN, + '$resource' => true, + '$description' => 'This event triggers on any user\'s verification token event.', + 'create' => [ + '$description' => 'This event triggers when a verification token for a user is created.', + ], + 'update' => [ + '$description' => 'This event triggers when a verification token for a user is validated.' + ], + ], + 'create' => [ + '$description' => 'This event triggers when a user is created.' + ], + 'delete' => [ + '$description' => 'This event triggers when a user is deleted.', + ], + 'update' => [ + '$description' => 'This event triggers when a user is updated.', + 'email' => [ + '$description' => 'This event triggers when a user\'s email address is updated.', + ], + 'name' => [ + '$description' => 'This event triggers when a user\'s name is updated.', + ], + 'password' => [ + '$description' => 'This event triggers when a user\'s password is updated.', + ], + 'status' => [ + '$description' => 'This event triggers when a user\'s status is updated.', + ], + 'prefs' => [ + '$description' => 'This event triggers when a user\'s preferences is updated.', + ], + ] ], - 'account.update.email' => [ - 'description' => 'This event triggers when the account email address is updated.', - 'model' => Response::MODEL_USER, - 'note' => '', + 'collections' => [ + '$model' => Response::MODEL_COLLECTION, + '$resource' => true, + '$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 collection is created.' + ], + 'delete' => [ + '$description' => 'This event triggers when a collection is deleted.', + ], + 'update' => [ + '$description' => 'This event triggers when a collection is updated.', + ] ], - 'account.update.name' => [ - 'description' => 'This event triggers when the account name is updated.', - 'model' => Response::MODEL_USER, - 'note' => '', + 'buckets' => [ + '$model' => Response::MODEL_BUCKET, + '$resource' => true, + '$description' => 'This event triggers on any buckets event.', + 'files' => [ + '$model' => Response::MODEL_FILE, + '$resource' => true, + '$description' => 'This event triggers on any files event.', + 'create' => [ + '$description' => 'This event triggers when a file is created.', + ], + 'delete' => [ + '$description' => 'This event triggers when a file is deleted.' + ], + 'update' => [ + '$description' => 'This event triggers when a file is updated.' + ], + ], + 'create' => [ + '$description' => 'This event triggers when a bucket is created.' + ], + 'delete' => [ + '$description' => 'This event triggers when a bucket is deleted.', + ], + 'update' => [ + '$description' => 'This event triggers when a bucket is updated.', + ] ], - 'account.update.password' => [ - 'description' => 'This event triggers when the account password is updated.', - 'model' => Response::MODEL_USER, - 'note' => '', - ], - 'users.update.email' => [ - 'description' => 'This event triggers when the user email address is updated.', - 'model' => Response::MODEL_USER, - 'note' => '', - ], - 'users.update.name' => [ - 'description' => 'This event triggers when the user name is updated.', - 'model' => Response::MODEL_USER, - 'note' => '', - ], - 'users.update.password' => [ - 'description' => 'This event triggers when the user password is updated.', - 'model' => Response::MODEL_USER, - 'note' => '', - ], - 'account.update.prefs' => [ - 'description' => 'This event triggers when the account preferences are updated.', - 'model' => Response::MODEL_USER, - 'note' => '', - ], - 'account.recovery.create' => [ - 'description' => 'This event triggers when the account recovery token is created.', - 'model' => Response::MODEL_TOKEN, - 'note' => 'version >= 0.7', - ], - 'account.recovery.update' => [ - 'description' => 'This event triggers when the account recovery token is validated.', - 'model' => Response::MODEL_TOKEN, - 'note' => 'version >= 0.7', - ], - 'account.verification.create' => [ - 'description' => 'This event triggers when the account verification token is created.', - 'model' => Response::MODEL_TOKEN, - 'note' => 'version >= 0.7', - ], - 'account.verification.update' => [ - 'description' => 'This event triggers when the account verification token is validated.', - 'model' => Response::MODEL_TOKEN, - 'note' => 'version >= 0.7', - ], - 'account.delete' => [ - 'description' => 'This event triggers when the account is deleted.', - 'model' => Response::MODEL_USER, - 'note' => '', - ], - 'account.sessions.create' => [ - 'description' => 'This event triggers when the account session is created.', - 'model' => Response::MODEL_SESSION, - 'note' => '', - ], - 'account.sessions.delete' => [ - 'description' => 'This event triggers when the account session is deleted.', - 'model' => Response::MODEL_SESSION, - 'note' => '', - ], - 'account.sessions.update' => [ - 'description' => 'This event triggers when the account session is updated.', - 'model' => Response::MODEL_SESSION, - 'note' => '', - ], - 'database.collections.create' => [ - 'description' => 'This event triggers when a database collection is created.', - 'model' => Response::MODEL_COLLECTION, - 'note' => '', - ], - 'database.collections.update' => [ - 'description' => 'This event triggers when a database collection is updated.', - 'model' => Response::MODEL_COLLECTION, - 'note' => '', - ], - 'database.collections.delete' => [ - 'description' => 'This event triggers when a database collection is deleted.', - 'model' => Response::MODEL_COLLECTION, - 'note' => '', - ], - 'database.attributes.create' => [ - 'description' => 'This event triggers when a collection attribute is created.', - 'model' => Response::MODEL_ATTRIBUTE, - 'note' => '', - ], - 'database.attributes.delete' => [ - 'description' => 'This event triggers when a collection attribute is deleted.', - 'model' => Response::MODEL_ATTRIBUTE, - 'note' => '', - ], - 'database.indexes.create' => [ - 'description' => 'This event triggers when a collection index is created.', - 'model' => Response::MODEL_INDEX, - 'note' => '', - ], - 'database.indexes.delete' => [ - 'description' => 'This event triggers when a collection index is deleted.', - 'model' => Response::MODEL_INDEX, - 'note' => '', - ], - 'database.documents.create' => [ - 'description' => 'This event triggers when a database document is created.', - 'model' => Response::MODEL_DOCUMENT, - 'note' => '', - ], - 'database.documents.update' => [ - 'description' => 'This event triggers when a database document is updated.', - 'model' => Response::MODEL_DOCUMENT, - 'note' => '', - ], - 'database.documents.delete' => [ - 'description' => 'This event triggers when a database document is deleted.', - 'model' => Response::MODEL_DOCUMENT, - 'note' => '', - ], - 'functions.create' => [ - 'description' => 'This event triggers when a function is created.', - 'model' => Response::MODEL_FUNCTION, - 'note' => 'version >= 0.7', - ], - 'functions.update' => [ - 'description' => 'This event triggers when a function is updated.', - 'model' => Response::MODEL_FUNCTION, - 'note' => 'version >= 0.7', - ], - 'functions.delete' => [ - 'description' => 'This event triggers when a function is deleted.', - 'model' => Response::MODEL_ANY, - 'note' => 'version >= 0.7', - ], - 'functions.deployments.create' => [ - 'description' => 'This event triggers when a function delpoyment is created.', - 'model' => Response::MODEL_DEPLOYMENT, - 'note' => 'version >= 0.7', - ], - 'functions.deployments.update' => [ - 'description' => 'This event triggers when a function delpoyment is updated.', - 'model' => Response::MODEL_FUNCTION, - 'note' => 'version >= 0.7', - ], - 'functions.deployments.delete' => [ - 'description' => 'This event triggers when a function delpoyment is deleted.', - 'model' => Response::MODEL_ANY, - 'note' => 'version >= 0.7', - ], - 'functions.executions.create' => [ - 'description' => 'This event triggers when a function execution is created.', - 'model' => Response::MODEL_EXECUTION, - 'note' => 'version >= 0.7', - ], - 'functions.executions.update' => [ - 'description' => 'This event triggers when a function execution is updated.', - 'model' => Response::MODEL_EXECUTION, - 'note' => 'version >= 0.7', - ], - 'storage.files.create' => [ - 'description' => 'This event triggers when a storage file is created.', - 'model' => Response::MODEL_FILE, - 'note' => '', - ], - 'storage.files.update' => [ - 'description' => 'This event triggers when a storage file is updated.', - 'model' => Response::MODEL_FILE, - 'note' => '', - ], - 'storage.files.delete' => [ - 'description' => 'This event triggers when a storage file is deleted.', - 'model' => Response::MODEL_FILE, - 'note' => '', - ], - 'storage.buckets.create' => [ - 'description' => 'This event triggers when a storage bucket is created.', - 'model' => Response::MODEL_BUCKET, - 'note' => '', - ], - 'storage.buckets.update' => [ - 'description' => 'This event triggers when a storage bucket is updated.', - 'model' => Response::MODEL_BUCKET, - 'note' => '', - ], - 'storage.buckets.delete' => [ - 'description' => 'This event triggers when a storage bucket is deleted.', - 'model' => Response::MODEL_BUCKET, - 'note' => '', - ], - 'users.create' => [ - 'description' => 'This event triggers when a user is created from the users API.', - 'model' => Response::MODEL_USER, - 'note' => 'version >= 0.7', - ], - 'users.update.prefs' => [ - 'description' => 'This event triggers when a user preference is updated from the users API.', - 'model' => Response::MODEL_ANY, - 'note' => 'version >= 0.7', - ], - 'users.update.email' => [ - 'description' => 'This event triggers when the user email address is updated.', - 'model' => Response::MODEL_USER, - 'note' => 'version >= 0.10', - ], - 'users.update.name' => [ - 'description' => 'This event triggers when the user name is updated.', - 'model' => Response::MODEL_USER, - 'note' => 'version >= 0.10', - ], - 'users.update.password' => [ - 'description' => 'This event triggers when the user password is updated.', - 'model' => Response::MODEL_USER, - 'note' => 'version >= 0.10', - ], - 'users.update.status' => [ - 'description' => 'This event triggers when a user status is updated from the users API.', - 'model' => Response::MODEL_USER, - 'note' => 'version >= 0.7', - ], - 'users.delete' => [ - 'description' => 'This event triggers when a user is deleted from users API.', - 'model' => Response::MODEL_USER, - 'note' => 'version >= 0.7', - ], - 'users.sessions.delete' => [ - 'description' => 'This event triggers when a user session is deleted from users API.', - 'model' => Response::MODEL_SESSION, - 'note' => 'version >= 0.7', - ], - 'teams.create' => [ - 'description' => 'This event triggers when a team is created.', - 'model' => Response::MODEL_TEAM, - 'note' => 'version >= 0.7', - ], - 'teams.update' => [ - 'description' => 'This event triggers when a team is updated.', - 'model' => Response::MODEL_TEAM, - 'note' => 'version >= 0.7', - ], - 'teams.delete' => [ - 'description' => 'This event triggers when a team is deleted.', - 'model' => Response::MODEL_TEAM, - 'note' => 'version >= 0.7', - ], - 'teams.memberships.create' => [ - 'description' => 'This event triggers when a team memberships is created.', - 'model' => Response::MODEL_MEMBERSHIP, - 'note' => 'version >= 0.7', - ], - 'teams.memberships.update' => [ - 'description' => 'This event triggers when a team membership is updated.', - 'model' => Response::MODEL_MEMBERSHIP, - 'note' => 'version >= 0.8', - ], - 'teams.memberships.update.status' => [ - 'description' => 'This event triggers when a team memberships status is updated.', - 'model' => Response::MODEL_MEMBERSHIP, - 'note' => 'version >= 0.7', - ], - 'teams.memberships.delete' => [ - 'description' => 'This event triggers when a team memberships is deleted.', - 'model' => Response::MODEL_MEMBERSHIP, - 'note' => 'version >= 0.7', + 'teams' => [ + '$model' => Response::MODEL_TEAM, + '$resource' => true, + '$description' => 'This event triggers on any teams event.', + 'memberships' => [ + '$model' => Response::MODEL_MEMBERSHIP, + '$resource' => true, + '$description' => 'This event triggers on any team memberships event.', + 'create' => [ + '$description' => 'This event triggers when a membership is created.', + ], + 'delete' => [ + '$description' => 'This event triggers when a membership is deleted.' + ], + 'update' => [ + '$description' => 'This event triggers when a membership is updated.', + 'status' => [ + '$description' => 'This event triggers when a team memberships status is updated.' + ] + ], + ], + 'create' => [ + '$description' => 'This event triggers when a bucket is created.' + ], + 'delete' => [ + '$description' => 'This event triggers when a bucket is deleted.', + ], + 'update' => [ + '$description' => 'This event triggers when a bucket is updated.', + ] ], + 'functions' => [ + '$model' => Response::MODEL_FUNCTION, + '$resource' => true, + '$description' => 'This event triggers on any functions event.', + 'deployments' => [ + '$model' => Response::MODEL_DEPLOYMENT, + '$resource' => true, + '$description' => 'This event triggers on any deployments event.', + 'create' => [ + '$description' => 'This event triggers when a deployment is created.', + ], + 'delete' => [ + '$description' => 'This event triggers when a deployment is deleted.' + ], + 'update' => [ + '$description' => 'This event triggers when a deployment is updated.' + ], + ], + 'executions' => [ + '$model' => Response::MODEL_EXECUTION, + '$resource' => true, + '$description' => 'This event triggers on any executions event.', + 'create' => [ + '$description' => 'This event triggers when an execution is created.', + ], + 'delete' => [ + '$description' => 'This event triggers when an execution is deleted.' + ], + 'update' => [ + '$description' => 'This event triggers when an execution is updated.' + ], + ], + 'create' => [ + '$description' => 'This event triggers when a function is created.' + ], + 'delete' => [ + '$description' => 'This event triggers when a function is deleted.', + ], + 'update' => [ + '$description' => 'This event triggers when a function is updated.', + ] + ] ]; diff --git a/app/config/locale/translations/en.json b/app/config/locale/translations/en.json index c00740b130..ab765fe47e 100644 --- a/app/config/locale/translations/en.json +++ b/app/config/locale/translations/en.json @@ -27,6 +27,12 @@ "emails.invitation.footer": "If you are not interested, you can ignore this message.", "emails.invitation.thanks": "Thanks", "emails.invitation.signature": "{{project}} team", + "emails.certificate.subject": "Certificate failure for %s", + "emails.certificate.hello": "Hello", + "emails.certificate.body": "Certificate for your domain '{{domain}}' could not be generated. This is attempt no. {{attempt}}, and the failure was caused by: {{error}}", + "emails.certificate.footer": "Your previous certificate willl be valid for 30 days since the first failure. We highly recommend investigating this case, otherwise your domain will end up without a valid SSL communication.", + "emails.certificate.thanks": "Thanks", + "emails.certificate.signature": "{{project}} team", "locale.country.unknown": "Unknown", "countries.af": "Afghanistan", "countries.ao": "Angola", diff --git a/app/config/locale/translations/es.json b/app/config/locale/translations/es.json index 6310d8fe76..d0138bdde8 100644 --- a/app/config/locale/translations/es.json +++ b/app/config/locale/translations/es.json @@ -17,13 +17,13 @@ "emails.magicSession.signature": "Equipo de {{project}}", "emails.recovery.subject": "Restablecer contraseña", "emails.recovery.hello": "Hola {{name}}", - "emails.recovery.body": "Haz clic en este enlace para restablecer la contraseña de tu proyecto {{project}}.", + "emails.recovery.body": "Haz clic en este enlace para restablecer la contraseña de {{project}}.", "emails.recovery.footer": "Si no has solicitado restablecer la contraseña, puedes ignorar este mensaje.", "emails.recovery.thanks": "Gracias", "emails.recovery.signature": "Equipo de {{project}}", "emails.invitation.subject": "Invitación al equipo %s en %s", "emails.invitation.hello": "Hola", - "emails.invitation.body": "Este correo ha sido enviado a petición de {{owner}} quien quiere invitarte a formar parte del equipo {{team}} en el proyecto {{project}}.", + "emails.invitation.body": "Este correo ha sido enviado a petición de {{owner}} quien quiere invitarte a formar parte del equipo {{team}} en {{project}}.", "emails.invitation.footer": "Si no estas interesado, puedes ignorar este mensaje.", "emails.invitation.thanks": "Gracias", "emails.invitation.signature": "Equipo de {{project}}", diff --git a/app/config/platforms.php b/app/config/platforms.php index 5d363ab55c..fd630f536d 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -15,7 +15,7 @@ return [ [ 'key' => 'web', 'name' => 'Web', - 'version' => '7.0.0', + 'version' => '8.0.0', 'url' => 'https://github.com/appwrite/sdk-for-web', 'package' => 'https://www.npmjs.com/package/appwrite', 'enabled' => true, @@ -63,7 +63,7 @@ return [ [ 'key' => 'flutter', 'name' => 'Flutter', - 'version' => '4.0.2', + 'version' => '5.0.0', 'url' => 'https://github.com/appwrite/sdk-for-flutter', 'package' => 'https://pub.dev/packages/appwrite', 'enabled' => true, @@ -81,7 +81,7 @@ return [ [ 'key' => 'apple', 'name' => 'Apple', - 'version' => '0.4.0', + 'version' => '0.5.0', 'url' => 'https://github.com/appwrite/sdk-for-apple', 'package' => 'https://github.com/appwrite/sdk-for-apple', 'enabled' => true, @@ -116,7 +116,7 @@ return [ [ 'key' => 'android', 'name' => 'Android', - 'version' => '0.5.0', + 'version' => '0.6.0', 'url' => 'https://github.com/appwrite/sdk-for-android', 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-android', 'enabled' => true, @@ -180,7 +180,7 @@ return [ [ 'key' => 'cli', 'name' => 'Command Line', - 'version' => '0.16.0', + 'version' => '0.17.0', 'url' => 'https://github.com/appwrite/sdk-for-cli', 'package' => 'https://www.npmjs.com/package/appwrite-cli', 'enabled' => true, @@ -193,7 +193,7 @@ return [ 'gitUrl' => 'git@github.com:appwrite/sdk-for-cli.git', 'gitRepoName' => 'sdk-for-cli', 'gitUserName' => 'appwrite', - 'gitBranch' => 'main', + 'gitBranch' => 'master', ], ], ], @@ -208,7 +208,7 @@ return [ [ 'key' => 'nodejs', 'name' => 'Node.js', - 'version' => '5.1.0', + 'version' => '6.0.0', 'url' => 'https://github.com/appwrite/sdk-for-node', 'package' => 'https://www.npmjs.com/package/node-appwrite', 'enabled' => true, @@ -226,7 +226,7 @@ return [ [ 'key' => 'deno', 'name' => 'Deno', - 'version' => '3.1.0', + 'version' => '4.0.0', 'url' => 'https://github.com/appwrite/sdk-for-deno', 'package' => 'https://deno.land/x/appwrite', 'enabled' => true, @@ -244,7 +244,7 @@ return [ [ 'key' => 'php', 'name' => 'PHP', - 'version' => '4.1.0', + 'version' => '5.0.0', 'url' => 'https://github.com/appwrite/sdk-for-php', 'package' => 'https://packagist.org/packages/appwrite/appwrite', 'enabled' => true, @@ -262,7 +262,7 @@ return [ [ 'key' => 'python', 'name' => 'Python', - 'version' => '0.8.0', + 'version' => '0.9.0', 'url' => 'https://github.com/appwrite/sdk-for-python', 'package' => 'https://pypi.org/project/appwrite/', 'enabled' => true, @@ -280,7 +280,7 @@ return [ [ 'key' => 'ruby', 'name' => 'Ruby', - 'version' => '4.1.0', + 'version' => '5.0.0', 'url' => 'https://github.com/appwrite/sdk-for-ruby', 'package' => 'https://rubygems.org/gems/appwrite', 'enabled' => true, @@ -352,7 +352,7 @@ return [ [ 'key' => 'dart', 'name' => 'Dart', - 'version' => '4.0.2', + 'version' => '5.0.0', 'url' => 'https://github.com/appwrite/sdk-for-dart', 'package' => 'https://pub.dev/packages/dart_appwrite', 'enabled' => true, @@ -370,7 +370,7 @@ return [ [ 'key' => 'kotlin', 'name' => 'Kotlin', - 'version' => '0.4.0', + 'version' => '0.5.0', 'url' => 'https://github.com/appwrite/sdk-for-kotlin', 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin', 'enabled' => true, @@ -392,7 +392,7 @@ return [ [ 'key' => 'swift', 'name' => 'Swift', - 'version' => '0.4.0', + 'version' => '0.5.0', 'url' => 'https://github.com/appwrite/sdk-for-swift', 'package' => 'https://github.com/appwrite/sdk-for-swift', 'enabled' => true, diff --git a/app/config/providers.php b/app/config/providers.php index 1d364a3fcf..c0acceb0fc 100644 --- a/app/config/providers.php +++ b/app/config/providers.php @@ -241,16 +241,6 @@ return [ // Ordered by ABC. 'beta' => false, 'mock' => false, ], - 'vk' => [ - 'name' => 'VK', - 'developers' => 'https://vk.com/dev', - 'icon' => 'icon-vk', - 'enabled' => true, - 'sandbox' => false, - 'form' => false, - 'beta' => false, - 'mock' => false, - ], 'zoom' => [ 'name' => 'Zoom', 'developers' => 'https://marketplace.zoom.us/docs/guides/auth/oauth/', diff --git a/app/config/runtimes.php b/app/config/runtimes.php index 294c346e29..9002016aa0 100644 --- a/app/config/runtimes.php +++ b/app/config/runtimes.php @@ -6,7 +6,7 @@ use Appwrite\Runtimes\Runtimes; /** * List of Appwrite Cloud Functions supported runtimes */ -$runtimes = new Runtimes(); +$runtimes = new Runtimes('v1'); $allowList = empty(App::getEnv('_APP_FUNCTIONS_RUNTIMES')) ? [] : \explode(',', App::getEnv('_APP_FUNCTIONS_RUNTIMES')); diff --git a/app/config/specs/open-api3-0.14.x-client.json b/app/config/specs/open-api3-0.14.x-client.json new file mode 100644 index 0000000000..ac5bd8a8ae --- /dev/null +++ b/app/config/specs/open-api3-0.14.x-client.json @@ -0,0 +1 @@ +{"openapi":"3.0.0","info":{"version":"0.14.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":49,"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":56,"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":48,"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":10,"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":52,"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":54,"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":55,"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\/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":50,"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":57,"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":62,"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":63,"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":51,"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":[]}]},"post":{"summary":"Create Account Session","operationId":"accountCreateSession","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":"createSession","weight":40,"cookies":false,"type":"","demo":"account\/create-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":{"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"]}}}}},"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":61,"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":47,"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\/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, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, zoom, yahoo, yammer, yandex, wordpress, stripe.","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\/{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":53,"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":60,"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":59,"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":58,"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#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":64,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":65,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-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"]}}}}}},"\/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":67,"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":66,"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":70,"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":68,"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":69,"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":72,"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":71,"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":97,"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":96,"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":98,"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":100,"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":101,"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":210,"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":208,"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":207,"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":209,"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":102,"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":106,"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":103,"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":104,"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":105,"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":107,"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":108,"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":157,"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":156,"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":158,"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":162,"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":163,"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":160,"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":159,"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":161,"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":167,"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":166,"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":168,"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":169,"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":170,"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":172,"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":171,"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":173,"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":174,"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":176,"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":175,"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"},"$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","$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"},"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"},"emailVerification":{"type":"boolean","description":"Email 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","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"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","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"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"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"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","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"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","$read","functionId","dateCreated","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.14.x-console.json b/app/config/specs/open-api3-0.14.x-console.json new file mode 100644 index 0000000000..9abd49d7fe --- /dev/null +++ b/app/config/specs/open-api3-0.14.x-console.json @@ -0,0 +1 @@ +{"openapi":"3.0.0","info":{"version":"0.14.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":49,"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":56,"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":48,"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":10,"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":52,"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":54,"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":55,"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\/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":50,"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":57,"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":62,"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":63,"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":51,"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":[]}]},"post":{"summary":"Create Account Session","operationId":"accountCreateSession","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":"createSession","weight":40,"cookies":false,"type":"","demo":"account\/create-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":{"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"]}}}}},"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":61,"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":47,"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\/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, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, zoom, yahoo, yammer, yandex, wordpress, stripe.","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\/{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":53,"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":60,"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":59,"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":58,"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#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":64,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":65,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-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"]}}}}}},"\/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":67,"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":66,"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":70,"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":68,"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":69,"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":72,"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":71,"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":74,"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":73,"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":75,"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":79,"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":80,"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":89,"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":88,"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":82,"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":83,"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":87,"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":86,"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":84,"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":81,"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":85,"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":90,"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":91,"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":97,"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":96,"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":98,"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":100,"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":101,"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":99,"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":93,"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":92,"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":94,"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":95,"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":78,"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":76,"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":77,"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":196,"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":195,"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":197,"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":198,"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":200,"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":202,"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":204,"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":203,"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":205,"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":201,"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":206,"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":210,"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":208,"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":207,"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":209,"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":199,"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":109,"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":119,"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":112,"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":111,"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":116,"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":117,"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":115,"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":114,"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":118,"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":113,"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":102,"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":106,"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":103,"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":104,"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":105,"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":107,"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":108,"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":122,"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":121,"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":123,"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":125,"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":130,"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":128,"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":129,"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":147,"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":146,"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":148,"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":150,"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":149,"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":137,"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":136,"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"}}},"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":138,"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":139,"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"}}},"required":["name","scopes"]}}}}},"delete":{"summary":"Delete Key","operationId":"projectsDeleteKey","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","weight":140,"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":127,"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":142,"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":141,"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":143,"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":144,"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":145,"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":126,"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":124,"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":132,"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":131,"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":133,"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":134,"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":135,"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"}]}},"\/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":152,"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":151,"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":153,"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":154,"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":155,"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":157,"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":156,"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":158,"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":162,"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":163,"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":160,"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":159,"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":161,"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":164,"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":165,"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":167,"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":166,"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":168,"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":169,"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":170,"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":177,"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":172,"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":171,"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":173,"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":174,"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":176,"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":175,"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":179,"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":178,"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":194,"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":180,"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":193,"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":189,"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":184,"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":183,"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":187,"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":188,"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}\/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":181,"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":190,"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":182,"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":192,"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":191,"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":185,"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":"usersUpdateVerification","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":"updateVerification","weight":186,"cookies":false,"type":"","demo":"users\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-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"]}}}}}}},"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"},"$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","$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"},"$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","$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"},"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"},"emailVerification":{"type":"boolean","description":"Email 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","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"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","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"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"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":["role:all"]},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":["user:608f9da25e7e1"]},"permission":{"type":"string","description":"Bucket permission model. Possible values: `bucket` or `file`","x-example":"file"},"dateCreated":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Bucket name.","x-example":"Documents"},"enabled":{"type":"boolean","description":"Bucket enabled.","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size supported.","x-example":100,"format":"int32"},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions.","items":{"type":"string"},"x-example":["jpg","png"]},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$read","$write","permission","dateCreated","dateUpdated","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"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","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"dateCreated":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981257,"format":"int32"},"status":{"type":"string","description":"Function status. Possible values: `disabled`, `enabled`","x-example":"enabled"},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"object","description":"Function environment variables.","x-example":{"key":"value"}},"events":{"type":"array","description":"Function trigger events.","items":{"type":"string"},"x-example":"account.create"},"schedule":{"type":"string","description":"Function execution schedult in CRON format.","x-example":"5 4 * * *"},"scheduleNext":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981292,"format":"int32"},"schedulePrevious":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981237,"format":"int32"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","execute","name","dateCreated","dateUpdated","status","runtime","deployment","vars","events","schedule","scheduleNext","schedulePrevious","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"dateCreated":{"type":"integer","description":"The deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status.","x-example":"enabled"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"}},"required":["$id","resourceId","resourceType","dateCreated","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"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","$read","functionId","dateCreated","trigger","status","statusCode","response","stderr","time"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"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..."},"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..."},"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..."},"providerZoomAppid":{"type":"string","description":"Zoom OAuth app ID.","x-example":"123247283472834787438"},"providerZoomSecret":{"type":"string","description":"Zoom 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..."},"providerWordpressAppid":{"type":"string","description":"WordPress OAuth app ID.","x-example":"123247283472834787438"},"providerWordpressSecret":{"type":"string","description":"WordPress 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..."},"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","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","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","providerTradeshiftAppid","providerTradeshiftSecret","providerTradeshiftBoxAppid","providerTradeshiftBoxSecret","providerTwitchAppid","providerTwitchSecret","providerZoomAppid","providerZoomSecret","providerYahooAppid","providerYahooSecret","providerYammerAppid","providerYammerSecret","providerYandexAppid","providerYandexSecret","providerWordpressAppid","providerWordpressSecret","providerStripeAppid","providerStripeSecret","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"},"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"}},"required":["$id","name","url","events","security","httpUser","httpPass"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"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","name","scopes","secret"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"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","domain","registerable","tld","verification","certificateId"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"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","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 diff --git a/app/config/specs/open-api3-0.14.x-server.json b/app/config/specs/open-api3-0.14.x-server.json new file mode 100644 index 0000000000..7d5dccc48f --- /dev/null +++ b/app/config/specs/open-api3-0.14.x-server.json @@ -0,0 +1 @@ +{"openapi":"3.0.0","info":{"version":"0.14.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":49,"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":56,"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":52,"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":54,"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":55,"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\/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":50,"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":57,"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":62,"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":63,"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":51,"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":61,"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":53,"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":60,"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":59,"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":58,"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#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":64,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":65,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-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"]}}}}}},"\/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":67,"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":66,"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":70,"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":68,"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":69,"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":72,"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":71,"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":74,"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":73,"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":75,"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":79,"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":80,"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":89,"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":88,"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":82,"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":83,"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":87,"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":86,"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":84,"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":81,"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":85,"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":90,"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":91,"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":97,"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":96,"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":98,"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":100,"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":101,"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":93,"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":92,"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":94,"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":95,"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":196,"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":195,"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":197,"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":198,"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":200,"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":202,"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":204,"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":203,"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":205,"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":201,"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":206,"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":210,"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":208,"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":207,"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":209,"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":109,"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":119,"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":112,"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":111,"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":116,"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":117,"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":115,"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":114,"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":118,"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":113,"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":102,"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":106,"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":103,"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":104,"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":105,"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":107,"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":108,"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":152,"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":151,"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":153,"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":154,"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":155,"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":157,"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":156,"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":158,"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":162,"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":163,"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":160,"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":159,"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":161,"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":167,"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":166,"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":168,"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":169,"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":170,"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":172,"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":171,"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":173,"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":174,"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":176,"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":175,"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":179,"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":178,"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":180,"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":193,"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":189,"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":184,"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":183,"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":187,"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":188,"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}\/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":181,"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":190,"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":182,"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":192,"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":191,"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":185,"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":"usersUpdateVerification","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":"updateVerification","weight":186,"cookies":false,"type":"","demo":"users\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-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"]}}}}}}},"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"},"$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","$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"},"$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","$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"},"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"},"emailVerification":{"type":"boolean","description":"Email 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","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"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","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the Europian Union.","x-example":false},"currency":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format","x-example":"USD"}},"required":["ip","countryCode","country","continentCode","continent","eu","currency"]},"file":{"description":"File","type":"object","properties":{"$id":{"type":"string","description":"File ID.","x-example":"5e5ea5c16897e"},"bucketId":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":["role:all"]},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":["user:608f9da25e7e1"]},"permission":{"type":"string","description":"Bucket permission model. Possible values: `bucket` or `file`","x-example":"file"},"dateCreated":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Bucket name.","x-example":"Documents"},"enabled":{"type":"boolean","description":"Bucket enabled.","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size supported.","x-example":100,"format":"int32"},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions.","items":{"type":"string"},"x-example":["jpg","png"]},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$read","$write","permission","dateCreated","dateUpdated","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"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","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"dateCreated":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981257,"format":"int32"},"status":{"type":"string","description":"Function status. Possible values: `disabled`, `enabled`","x-example":"enabled"},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"object","description":"Function environment variables.","x-example":{"key":"value"}},"events":{"type":"array","description":"Function trigger events.","items":{"type":"string"},"x-example":"account.create"},"schedule":{"type":"string","description":"Function execution schedult in CRON format.","x-example":"5 4 * * *"},"scheduleNext":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981292,"format":"int32"},"schedulePrevious":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981237,"format":"int32"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","execute","name","dateCreated","dateUpdated","status","runtime","deployment","vars","events","schedule","scheduleNext","schedulePrevious","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"dateCreated":{"type":"integer","description":"The deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status.","x-example":"enabled"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"}},"required":["$id","resourceId","resourceType","dateCreated","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"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","$read","functionId","dateCreated","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 9bb535fcbf..ac5bd8a8ae 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.13.4","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":47,"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":37,"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"]}}}}},"delete":{"summary":"Delete Account","operationId":"accountDelete","tags":["account"],"description":"Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":56,"cookies":false,"type":"","demo":"account\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.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\/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":54,"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":46,"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":10,"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":50,"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":52,"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 and Team Invites, oldPassword is optional.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":53,"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\/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":48,"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":55,"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":60,"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":61,"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":49,"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":[]}]},"post":{"summary":"Create Account Session","operationId":"accountCreateSession","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":"createSession","weight":38,"cookies":false,"type":"","demo":"account\/create-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":{"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"]}}}}},"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":59,"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":45,"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\/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":43,"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":44,"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":39,"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, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, zoom, yahoo, yammer, yandex, wordpress, stripe.","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.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/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":51,"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":"","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":58,"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":57,"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\/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#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":62,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":63,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-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"]}}}}}},"\/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 \/account\/sessions endpoint. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":65,"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":64,"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":68,"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":66,"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":67,"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.","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.","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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":70,"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":69,"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 0 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"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":95,"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).","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.","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.","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":94,"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":96,"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":98,"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":99,"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":207,"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":205,"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":204,"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":206,"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":100,"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":104,"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":101,"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":102,"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":103,"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":105,"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":106,"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":156,"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":155,"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":157,"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":161,"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":162,"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":159,"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":158,"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":160,"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":166,"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":165,"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). Max length for each role is 32 chars.","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":167,"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":168,"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":169,"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":171,"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":170,"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). Max length for each role is 32 chars.","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":172,"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":173,"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). Max length for each role is 32 chars.","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":175,"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":174,"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"},"$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","$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"},"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"},"emailVerification":{"type":"boolean","description":"Email 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","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"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","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"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"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"VIP"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"invited":{"type":"integer","description":"Date, the user has been invited to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"joined":{"type":"integer","description":"Date, the user has accepted the invitation to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"confirm":{"type":"boolean","description":"User confirmation status, true if the user has joined the team or false otherwise.","x-example":false},"roles":{"type":"array","description":"User list of roles","items":{"type":"string"},"x-example":"admin"}},"required":["$id","userId","teamId","name","email","invited","joined","confirm","roles"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output","x-example":""},"time":{"type":"number","description":"The script execution time in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$read","functionId","dateCreated","trigger","status","statusCode","stdout","stderr","time"]},"country":{"description":"Country","type":"object","properties":{"name":{"type":"string","description":"Country name.","x-example":"United States"},"code":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"}},"required":["name","code"]},"continent":{"description":"Continent","type":"object","properties":{"name":{"type":"string","description":"Continent name.","x-example":"Europe"},"code":{"type":"string","description":"Continent two letter code.","x-example":"EU"}},"required":["name","code"]},"language":{"description":"Language","type":"object","properties":{"name":{"type":"string","description":"Language name.","x-example":"Italian"},"code":{"type":"string","description":"Language two-character ISO 639-1 codes.","x-example":"it"},"nativeName":{"type":"string","description":"Language native name.","x-example":"Italiano"}},"required":["name","code","nativeName"]},"currency":{"description":"Currency","type":"object","properties":{"symbol":{"type":"string","description":"Currency symbol.","x-example":"$"},"name":{"type":"string","description":"Currency name.","x-example":"US dollar"},"symbolNative":{"type":"string","description":"Currency native symbol.","x-example":"$"},"decimalDigits":{"type":"integer","description":"Number of decimal digits.","x-example":2,"format":"int32"},"rounding":{"type":"number","description":"Currency digit rounding.","x-example":0,"format":"double"},"code":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.","x-example":"USD"},"namePlural":{"type":"string","description":"Currency plural name","x-example":"US dollars"}},"required":["symbol","name","symbolNative","decimalDigits","rounding","code","namePlural"]},"phone":{"description":"Phone","type":"object","properties":{"code":{"type":"string","description":"Phone code.","x-example":"+1"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["code","countryCode","countryName"]}},"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.14.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":49,"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":56,"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":48,"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":10,"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":52,"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":54,"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":55,"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\/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":50,"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":57,"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":62,"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":63,"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":51,"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":[]}]},"post":{"summary":"Create Account Session","operationId":"accountCreateSession","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":"createSession","weight":40,"cookies":false,"type":"","demo":"account\/create-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":{"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"]}}}}},"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":61,"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":47,"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\/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, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, zoom, yahoo, yammer, yandex, wordpress, stripe.","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\/{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":53,"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":60,"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":59,"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":58,"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#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":64,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":65,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-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"]}}}}}},"\/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":67,"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":66,"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":70,"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":68,"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":69,"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":72,"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":71,"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":97,"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":96,"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":98,"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":100,"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":101,"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":210,"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":208,"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":207,"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":209,"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":102,"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":106,"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":103,"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":104,"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":105,"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":107,"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":108,"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":157,"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":156,"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":158,"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":162,"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":163,"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":160,"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":159,"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":161,"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":167,"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":166,"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":168,"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":169,"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":170,"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":172,"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":171,"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":173,"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":174,"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":176,"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":175,"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"},"$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","$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"},"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"},"emailVerification":{"type":"boolean","description":"Email 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","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"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","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"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"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"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","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"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","$read","functionId","dateCreated","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 82aee91ffe..9abd49d7fe 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.13.4","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":47,"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":37,"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"]}}}}},"delete":{"summary":"Delete Account","operationId":"accountDelete","tags":["account"],"description":"Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":56,"cookies":false,"type":"","demo":"account\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.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\/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":54,"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":46,"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":10,"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":50,"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":52,"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 and Team Invites, oldPassword is optional.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":53,"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\/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":48,"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":55,"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":60,"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":61,"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":49,"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":[]}]},"post":{"summary":"Create Account Session","operationId":"accountCreateSession","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":"createSession","weight":38,"cookies":false,"type":"","demo":"account\/create-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":{"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"]}}}}},"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":59,"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":45,"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\/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":43,"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":44,"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":39,"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, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, zoom, yahoo, yammer, yandex, wordpress, stripe.","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.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/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":51,"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":"","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":58,"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":57,"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\/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#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":62,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":63,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-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"]}}}}}},"\/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 \/account\/sessions endpoint. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":65,"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":64,"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":68,"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":66,"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":67,"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.","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.","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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":70,"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":69,"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 0 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"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":72,"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":71,"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":"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 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":73,"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":77,"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":78,"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":87,"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":86,"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":80,"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":81,"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.","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":85,"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":84,"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":82,"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":79,"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":83,"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":88,"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":89,"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":95,"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).","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.","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.","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":94,"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":96,"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":98,"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":99,"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":97,"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":91,"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":90,"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.","x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders.","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":92,"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":93,"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":76,"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":74,"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":75,"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":193,"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":192,"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.","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.","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":194,"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":195,"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":197,"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.","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.","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":199,"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":201,"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":200,"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":202,"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":198,"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":203,"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":207,"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":205,"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":204,"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":206,"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":196,"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":107,"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":118,"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":110,"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":109,"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":115,"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":116,"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":113,"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\/usage":{"get":{"summary":"Get Usage Queue","operationId":"healthGetQueueUsage","tags":["health"],"description":"Get the number of usage stats 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":"getQueueUsage","weight":114,"cookies":false,"type":"","demo":"health\/get-queue-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage.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":112,"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":117,"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":111,"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":100,"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":104,"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":101,"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":102,"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":103,"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":105,"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":106,"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":121,"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":120,"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":122,"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":124,"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":129,"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":127,"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":128,"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":146,"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":145,"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":147,"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":149,"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":148,"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":136,"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":135,"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.","x-example":null,"items":{"type":"string"}}},"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":137,"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":138,"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","x-example":null,"items":{"type":"string"}}},"required":["name","scopes"]}}}}},"delete":{"summary":"Delete Key","operationId":"projectsDeleteKey","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","weight":139,"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":126,"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":141,"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":140,"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":"[HOSTNAME]"}},"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":142,"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":143,"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":"[HOSTNAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","weight":144,"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":125,"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":123,"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":131,"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":130,"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.","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":132,"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":133,"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.","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":134,"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"}]}},"\/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":151,"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":150,"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":null},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions","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":152,"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":153,"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":null},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions","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":154,"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":156,"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":155,"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":157,"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":161,"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":162,"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":159,"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":158,"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":160,"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":163,"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":164,"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":166,"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":165,"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). Max length for each role is 32 chars.","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":167,"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":168,"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":169,"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}\/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":171,"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":170,"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). Max length for each role is 32 chars.","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":172,"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":173,"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). Max length for each role is 32 chars.","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":175,"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":174,"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":177,"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":176,"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":191,"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":178,"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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":190,"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":186,"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":181,"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}\/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":184,"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":185,"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}\/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":179,"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":187,"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":180,"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":189,"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":188,"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.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":182,"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":"usersUpdateVerification","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":"updateVerification","weight":183,"cookies":false,"type":"","demo":"users\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-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"]}}}}}}},"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"},"$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","$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"},"$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","$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"},"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"},"emailVerification":{"type":"boolean","description":"Email 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","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"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","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"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"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":["role:all"]},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":["user:608f9da25e7e1"]},"permission":{"type":"string","description":"Bucket permission model. Possible values: `bucket` or `file`","x-example":"file"},"dateCreated":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Bucket name.","x-example":"Documents"},"enabled":{"type":"boolean","description":"Bucket enabled.","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size supported.","x-example":100,"format":"int32"},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions.","items":{"type":"string"},"x-example":["jpg","png"]},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$read","$write","permission","dateCreated","dateUpdated","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"VIP"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"invited":{"type":"integer","description":"Date, the user has been invited to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"joined":{"type":"integer","description":"Date, the user has accepted the invitation to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"confirm":{"type":"boolean","description":"User confirmation status, true if the user has joined the team or false otherwise.","x-example":false},"roles":{"type":"array","description":"User list of roles","items":{"type":"string"},"x-example":"admin"}},"required":["$id","userId","teamId","name","email","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"dateCreated":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981257,"format":"int32"},"status":{"type":"string","description":"Function status. Possible values: `disabled`, `enabled`","x-example":"enabled"},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"object","description":"Function environment variables.","x-example":{"key":"value"}},"events":{"type":"array","description":"Function trigger events.","items":{"type":"string"},"x-example":"account.create"},"schedule":{"type":"string","description":"Function execution schedult in CRON format.","x-example":"5 4 * * *"},"scheduleNext":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981292,"format":"int32"},"schedulePrevious":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981237,"format":"int32"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","execute","name","dateCreated","dateUpdated","status","runtime","deployment","vars","events","schedule","scheduleNext","schedulePrevious","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"dateCreated":{"type":"integer","description":"The deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status.","x-example":"enabled"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"}},"required":["$id","resourceId","resourceType","dateCreated","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output","x-example":""},"time":{"type":"number","description":"The script execution time in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$read","functionId","dateCreated","trigger","status","statusCode","stdout","stderr","time"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"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..."},"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..."},"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..."},"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..."},"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..."},"providerVkAppid":{"type":"string","description":"VK OAuth app ID.","x-example":"123247283472834787438"},"providerVkSecret":{"type":"string","description":"VK 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..."},"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..."},"providerWordpressAppid":{"type":"string","description":"WordPress OAuth app ID.","x-example":"123247283472834787438"},"providerWordpressSecret":{"type":"string","description":"WordPress 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..."},"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","name","description","teamId","logo","url","legalName","legalCountry","legalState","legalCity","legalAddress","legalTaxId","authLimit","platforms","webhooks","keys","domains","providerAmazonAppid","providerAmazonSecret","providerAppleAppid","providerAppleSecret","providerBitbucketAppid","providerBitbucketSecret","providerBitlyAppid","providerBitlySecret","providerBoxAppid","providerBoxSecret","providerDiscordAppid","providerDiscordSecret","providerDropboxAppid","providerDropboxSecret","providerFacebookAppid","providerFacebookSecret","providerGithubAppid","providerGithubSecret","providerGitlabAppid","providerGitlabSecret","providerGoogleAppid","providerGoogleSecret","providerLinkedinAppid","providerLinkedinSecret","providerMicrosoftAppid","providerMicrosoftSecret","providerNotionAppid","providerNotionSecret","providerPaypalAppid","providerPaypalSecret","providerPaypalSandboxAppid","providerPaypalSandboxSecret","providerSalesforceAppid","providerSalesforceSecret","providerSlackAppid","providerSlackSecret","providerSpotifyAppid","providerSpotifySecret","providerTradeshiftAppid","providerTradeshiftSecret","providerTradeshiftBoxAppid","providerTradeshiftBoxSecret","providerTwitchAppid","providerTwitchSecret","providerVkAppid","providerVkSecret","providerZoomAppid","providerZoomSecret","providerYahooAppid","providerYahooSecret","providerYammerAppid","providerYammerSecret","providerYandexAppid","providerYandexSecret","providerWordpressAppid","providerWordpressSecret","providerStripeAppid","providerStripeSecret","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"},"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"}},"required":["$id","name","url","events","security","httpUser","httpPass"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"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","name","scopes","secret"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"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","domain","registerable","tld","verification","certificateId"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"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","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.14.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":49,"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":56,"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":48,"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":10,"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":52,"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":54,"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":55,"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\/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":50,"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":57,"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":62,"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":63,"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":51,"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":[]}]},"post":{"summary":"Create Account Session","operationId":"accountCreateSession","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":"createSession","weight":40,"cookies":false,"type":"","demo":"account\/create-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":{"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"]}}}}},"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":61,"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":47,"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\/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, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, zoom, yahoo, yammer, yandex, wordpress, stripe.","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\/{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":53,"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":60,"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":59,"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":58,"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#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":64,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":65,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-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"]}}}}}},"\/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":67,"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":66,"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":70,"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":68,"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":69,"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":72,"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":71,"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":74,"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":73,"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":75,"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":79,"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":80,"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":89,"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":88,"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":82,"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":83,"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":87,"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":86,"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":84,"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":81,"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":85,"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":90,"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":91,"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":97,"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":96,"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":98,"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":100,"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":101,"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":99,"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":93,"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":92,"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":94,"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":95,"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":78,"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":76,"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":77,"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":196,"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":195,"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":197,"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":198,"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":200,"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":202,"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":204,"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":203,"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":205,"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":201,"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":206,"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":210,"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":208,"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":207,"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":209,"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":199,"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":109,"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":119,"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":112,"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":111,"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":116,"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":117,"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":115,"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":114,"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":118,"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":113,"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":102,"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":106,"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":103,"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":104,"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":105,"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":107,"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":108,"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":122,"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":121,"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":123,"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":125,"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":130,"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":128,"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":129,"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":147,"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":146,"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":148,"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":150,"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":149,"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":137,"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":136,"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"}}},"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":138,"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":139,"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"}}},"required":["name","scopes"]}}}}},"delete":{"summary":"Delete Key","operationId":"projectsDeleteKey","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","weight":140,"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":127,"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":142,"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":141,"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":143,"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":144,"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":145,"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":126,"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":124,"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":132,"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":131,"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":133,"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":134,"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":135,"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"}]}},"\/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":152,"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":151,"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":153,"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":154,"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":155,"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":157,"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":156,"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":158,"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":162,"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":163,"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":160,"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":159,"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":161,"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":164,"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":165,"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":167,"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":166,"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":168,"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":169,"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":170,"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":177,"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":172,"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":171,"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":173,"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":174,"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":176,"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":175,"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":179,"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":178,"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":194,"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":180,"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":193,"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":189,"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":184,"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":183,"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":187,"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":188,"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}\/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":181,"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":190,"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":182,"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":192,"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":191,"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":185,"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":"usersUpdateVerification","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":"updateVerification","weight":186,"cookies":false,"type":"","demo":"users\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-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"]}}}}}}},"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"},"$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","$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"},"$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","$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"},"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"},"emailVerification":{"type":"boolean","description":"Email 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","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"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","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"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"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":["role:all"]},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":["user:608f9da25e7e1"]},"permission":{"type":"string","description":"Bucket permission model. Possible values: `bucket` or `file`","x-example":"file"},"dateCreated":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Bucket name.","x-example":"Documents"},"enabled":{"type":"boolean","description":"Bucket enabled.","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size supported.","x-example":100,"format":"int32"},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions.","items":{"type":"string"},"x-example":["jpg","png"]},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$read","$write","permission","dateCreated","dateUpdated","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"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","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"dateCreated":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981257,"format":"int32"},"status":{"type":"string","description":"Function status. Possible values: `disabled`, `enabled`","x-example":"enabled"},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"object","description":"Function environment variables.","x-example":{"key":"value"}},"events":{"type":"array","description":"Function trigger events.","items":{"type":"string"},"x-example":"account.create"},"schedule":{"type":"string","description":"Function execution schedult in CRON format.","x-example":"5 4 * * *"},"scheduleNext":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981292,"format":"int32"},"schedulePrevious":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981237,"format":"int32"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","execute","name","dateCreated","dateUpdated","status","runtime","deployment","vars","events","schedule","scheduleNext","schedulePrevious","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"dateCreated":{"type":"integer","description":"The deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status.","x-example":"enabled"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"}},"required":["$id","resourceId","resourceType","dateCreated","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"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","$read","functionId","dateCreated","trigger","status","statusCode","response","stderr","time"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"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..."},"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..."},"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..."},"providerZoomAppid":{"type":"string","description":"Zoom OAuth app ID.","x-example":"123247283472834787438"},"providerZoomSecret":{"type":"string","description":"Zoom 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..."},"providerWordpressAppid":{"type":"string","description":"WordPress OAuth app ID.","x-example":"123247283472834787438"},"providerWordpressSecret":{"type":"string","description":"WordPress 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..."},"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","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","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","providerTradeshiftAppid","providerTradeshiftSecret","providerTradeshiftBoxAppid","providerTradeshiftBoxSecret","providerTwitchAppid","providerTwitchSecret","providerZoomAppid","providerZoomSecret","providerYahooAppid","providerYahooSecret","providerYammerAppid","providerYammerSecret","providerYandexAppid","providerYandexSecret","providerWordpressAppid","providerWordpressSecret","providerStripeAppid","providerStripeSecret","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"},"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"}},"required":["$id","name","url","events","security","httpUser","httpPass"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"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","name","scopes","secret"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"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","domain","registerable","tld","verification","certificateId"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"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","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 diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 1f6d0f99e1..7d5dccc48f 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.13.4","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":47,"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":[]}]},"delete":{"summary":"Delete Account","operationId":"accountDelete","tags":["account"],"description":"Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":56,"cookies":false,"type":"","demo":"account\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.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":54,"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":50,"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":52,"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 and Team Invites, oldPassword is optional.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":53,"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\/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":48,"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":55,"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":60,"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":61,"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":49,"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":59,"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":51,"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":"","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":58,"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":57,"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\/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#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":62,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":63,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-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"]}}}}}},"\/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 \/account\/sessions endpoint. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":65,"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":64,"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":68,"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":66,"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":67,"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.","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.","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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":70,"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":69,"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 0 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"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":72,"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":71,"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":"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 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":73,"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":77,"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":78,"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":87,"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":86,"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":80,"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":81,"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.","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":85,"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":84,"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":82,"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":79,"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":83,"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":88,"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":89,"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":95,"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).","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.","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.","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":94,"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":96,"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":98,"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":99,"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":91,"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":90,"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.","x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders.","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":92,"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":93,"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":193,"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":192,"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.","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.","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":194,"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":195,"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":197,"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.","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.","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":199,"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":201,"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":200,"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":202,"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":198,"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":203,"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":207,"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":205,"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":204,"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":206,"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":107,"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":118,"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":110,"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":109,"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":115,"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":116,"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":113,"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\/usage":{"get":{"summary":"Get Usage Queue","operationId":"healthGetQueueUsage","tags":["health"],"description":"Get the number of usage stats 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":"getQueueUsage","weight":114,"cookies":false,"type":"","demo":"health\/get-queue-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage.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":112,"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":117,"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":111,"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":100,"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":104,"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":101,"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":102,"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":103,"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":105,"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":106,"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":151,"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":150,"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":null},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions","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":152,"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":153,"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":null},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions","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":154,"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":156,"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":155,"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":157,"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":161,"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":162,"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":159,"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":158,"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":160,"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":166,"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":165,"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). Max length for each role is 32 chars.","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":167,"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":168,"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":169,"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":171,"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":170,"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). Max length for each role is 32 chars.","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":172,"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":173,"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). Max length for each role is 32 chars.","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":175,"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":174,"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":177,"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":176,"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":178,"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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":190,"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":186,"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":181,"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}\/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":184,"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":185,"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}\/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":179,"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":187,"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":180,"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":189,"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":188,"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.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":182,"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":"usersUpdateVerification","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":"updateVerification","weight":183,"cookies":false,"type":"","demo":"users\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-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"]}}}}}}},"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"},"$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","$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"},"$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","$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"},"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"},"emailVerification":{"type":"boolean","description":"Email 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","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"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","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the Europian Union.","x-example":false},"currency":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format","x-example":"USD"}},"required":["ip","countryCode","country","continentCode","continent","eu","currency"]},"file":{"description":"File","type":"object","properties":{"$id":{"type":"string","description":"File ID.","x-example":"5e5ea5c16897e"},"bucketId":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":["role:all"]},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":["user:608f9da25e7e1"]},"permission":{"type":"string","description":"Bucket permission model. Possible values: `bucket` or `file`","x-example":"file"},"dateCreated":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Bucket name.","x-example":"Documents"},"enabled":{"type":"boolean","description":"Bucket enabled.","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size supported.","x-example":100,"format":"int32"},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions.","items":{"type":"string"},"x-example":["jpg","png"]},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$read","$write","permission","dateCreated","dateUpdated","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"VIP"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"invited":{"type":"integer","description":"Date, the user has been invited to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"joined":{"type":"integer","description":"Date, the user has accepted the invitation to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"confirm":{"type":"boolean","description":"User confirmation status, true if the user has joined the team or false otherwise.","x-example":false},"roles":{"type":"array","description":"User list of roles","items":{"type":"string"},"x-example":"admin"}},"required":["$id","userId","teamId","name","email","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"dateCreated":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981257,"format":"int32"},"status":{"type":"string","description":"Function status. Possible values: `disabled`, `enabled`","x-example":"enabled"},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"object","description":"Function environment variables.","x-example":{"key":"value"}},"events":{"type":"array","description":"Function trigger events.","items":{"type":"string"},"x-example":"account.create"},"schedule":{"type":"string","description":"Function execution schedult in CRON format.","x-example":"5 4 * * *"},"scheduleNext":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981292,"format":"int32"},"schedulePrevious":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981237,"format":"int32"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","execute","name","dateCreated","dateUpdated","status","runtime","deployment","vars","events","schedule","scheduleNext","schedulePrevious","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"dateCreated":{"type":"integer","description":"The deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status.","x-example":"enabled"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"}},"required":["$id","resourceId","resourceType","dateCreated","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output","x-example":""},"time":{"type":"number","description":"The script execution time in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$read","functionId","dateCreated","trigger","status","statusCode","stdout","stderr","time"]},"country":{"description":"Country","type":"object","properties":{"name":{"type":"string","description":"Country name.","x-example":"United States"},"code":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"}},"required":["name","code"]},"continent":{"description":"Continent","type":"object","properties":{"name":{"type":"string","description":"Continent name.","x-example":"Europe"},"code":{"type":"string","description":"Continent two letter code.","x-example":"EU"}},"required":["name","code"]},"language":{"description":"Language","type":"object","properties":{"name":{"type":"string","description":"Language name.","x-example":"Italian"},"code":{"type":"string","description":"Language two-character ISO 639-1 codes.","x-example":"it"},"nativeName":{"type":"string","description":"Language native name.","x-example":"Italiano"}},"required":["name","code","nativeName"]},"currency":{"description":"Currency","type":"object","properties":{"symbol":{"type":"string","description":"Currency symbol.","x-example":"$"},"name":{"type":"string","description":"Currency name.","x-example":"US dollar"},"symbolNative":{"type":"string","description":"Currency native symbol.","x-example":"$"},"decimalDigits":{"type":"integer","description":"Number of decimal digits.","x-example":2,"format":"int32"},"rounding":{"type":"number","description":"Currency digit rounding.","x-example":0,"format":"double"},"code":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.","x-example":"USD"},"namePlural":{"type":"string","description":"Currency plural name","x-example":"US dollars"}},"required":["symbol","name","symbolNative","decimalDigits","rounding","code","namePlural"]},"phone":{"description":"Phone","type":"object","properties":{"code":{"type":"string","description":"Phone code.","x-example":"+1"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["code","countryCode","countryName"]},"healthAntivirus":{"description":"Health Antivirus","type":"object","properties":{"version":{"type":"string","description":"Antivirus version.","x-example":"1.0.0"},"status":{"type":"string","description":"Antivirus status. Possible values can are: `disabled`, `offline`, `online`","x-example":"online"}},"required":["version","status"]},"healthQueue":{"description":"Health Queue","type":"object","properties":{"size":{"type":"integer","description":"Amount of actions in the queue.","x-example":8,"format":"int32"}},"required":["size"]},"healthStatus":{"description":"Health Status","type":"object","properties":{"ping":{"type":"integer","description":"Duration in milliseconds how long the health check took.","x-example":128,"format":"int32"},"status":{"type":"string","description":"Service status. Possible values can are: `pass`, `fail`","x-example":"pass"}},"required":["ping","status"]},"healthTime":{"description":"Health Time","type":"object","properties":{"remoteTime":{"type":"integer","description":"Current unix timestamp on trustful remote server.","x-example":1639490751,"format":"int32"},"localTime":{"type":"integer","description":"Current unix timestamp of local server where Appwrite runs.","x-example":1639490844,"format":"int32"},"diff":{"type":"integer","description":"Difference of unix remote and local timestamps in milliseconds.","x-example":93,"format":"int32"}},"required":["remoteTime","localTime","diff"]}},"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.14.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":49,"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":56,"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":52,"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":54,"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":55,"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\/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":50,"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":57,"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":62,"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":63,"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":51,"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":61,"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":53,"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":60,"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":59,"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":58,"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#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":64,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":65,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-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"]}}}}}},"\/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":67,"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":66,"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":70,"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":68,"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":69,"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":72,"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":71,"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":74,"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":73,"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":75,"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":79,"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":80,"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":89,"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":88,"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":82,"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":83,"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":87,"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":86,"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":84,"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":81,"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":85,"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":90,"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":91,"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":97,"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":96,"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":98,"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":100,"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":101,"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":93,"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":92,"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":94,"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":95,"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":196,"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":195,"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":197,"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":198,"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":200,"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":202,"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":204,"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":203,"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":205,"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":201,"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":206,"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":210,"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":208,"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":207,"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":209,"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":109,"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":119,"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":112,"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":111,"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":116,"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":117,"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":115,"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":114,"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":118,"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":113,"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":102,"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":106,"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":103,"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":104,"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":105,"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":107,"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":108,"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":152,"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":151,"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":153,"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":154,"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":155,"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":157,"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":156,"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":158,"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":162,"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":163,"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":160,"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":159,"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":161,"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":167,"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":166,"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":168,"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":169,"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":170,"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":172,"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":171,"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":173,"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":174,"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":176,"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":175,"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":179,"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":178,"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":180,"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":193,"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":189,"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":184,"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":183,"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":187,"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":188,"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}\/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":181,"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":190,"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":182,"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":192,"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":191,"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":185,"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":"usersUpdateVerification","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":"updateVerification","weight":186,"cookies":false,"type":"","demo":"users\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-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"]}}}}}}},"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"},"$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","$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"},"$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","$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"},"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"},"emailVerification":{"type":"boolean","description":"Email 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","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"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","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the Europian Union.","x-example":false},"currency":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format","x-example":"USD"}},"required":["ip","countryCode","country","continentCode","continent","eu","currency"]},"file":{"description":"File","type":"object","properties":{"$id":{"type":"string","description":"File ID.","x-example":"5e5ea5c16897e"},"bucketId":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":["role:all"]},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":["user:608f9da25e7e1"]},"permission":{"type":"string","description":"Bucket permission model. Possible values: `bucket` or `file`","x-example":"file"},"dateCreated":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Bucket name.","x-example":"Documents"},"enabled":{"type":"boolean","description":"Bucket enabled.","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size supported.","x-example":100,"format":"int32"},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions.","items":{"type":"string"},"x-example":["jpg","png"]},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$read","$write","permission","dateCreated","dateUpdated","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"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","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"dateCreated":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981257,"format":"int32"},"status":{"type":"string","description":"Function status. Possible values: `disabled`, `enabled`","x-example":"enabled"},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"object","description":"Function environment variables.","x-example":{"key":"value"}},"events":{"type":"array","description":"Function trigger events.","items":{"type":"string"},"x-example":"account.create"},"schedule":{"type":"string","description":"Function execution schedult in CRON format.","x-example":"5 4 * * *"},"scheduleNext":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981292,"format":"int32"},"schedulePrevious":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981237,"format":"int32"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","execute","name","dateCreated","dateUpdated","status","runtime","deployment","vars","events","schedule","scheduleNext","schedulePrevious","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"dateCreated":{"type":"integer","description":"The deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status.","x-example":"enabled"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"}},"required":["$id","resourceId","resourceType","dateCreated","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"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","$read","functionId","dateCreated","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.14.x-client.json b/app/config/specs/swagger2-0.14.x-client.json new file mode 100644 index 0000000000..56785596fe --- /dev/null +++ b/app/config/specs/swagger2-0.14.x-client.json @@ -0,0 +1 @@ +{"swagger":"2.0","info":{"version":"0.14.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":49,"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":56,"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":48,"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":10,"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":52,"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":54,"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":55,"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\/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":50,"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":57,"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":62,"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":63,"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":51,"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":[]}]},"post":{"summary":"Create Account Session","operationId":"accountCreateSession","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":"createSession","weight":40,"cookies":false,"type":"","demo":"account\/create-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":{"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"]}}]},"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":61,"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":47,"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\/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, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, zoom, yahoo, yammer, yandex, wordpress, stripe.","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\/{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":53,"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":60,"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":59,"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":58,"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#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":64,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":65,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-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"]}}]}},"\/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":67,"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":66,"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":70,"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":68,"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":69,"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":72,"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":71,"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":97,"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":96,"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":98,"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":100,"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":101,"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":210,"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":208,"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":207,"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":209,"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":102,"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":106,"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":103,"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":104,"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":105,"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":107,"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":108,"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":157,"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":156,"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":158,"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":162,"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":163,"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":160,"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":159,"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":161,"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":167,"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":166,"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":168,"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":169,"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":170,"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":172,"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":171,"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":173,"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":174,"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":176,"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":175,"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"},"$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","$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"},"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"},"emailVerification":{"type":"boolean","description":"Email 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","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"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","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"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"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"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","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"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","$read","functionId","dateCreated","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.14.x-console.json b/app/config/specs/swagger2-0.14.x-console.json new file mode 100644 index 0000000000..efac7e049c --- /dev/null +++ b/app/config/specs/swagger2-0.14.x-console.json @@ -0,0 +1 @@ +{"swagger":"2.0","info":{"version":"0.14.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":49,"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":56,"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":48,"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":10,"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":52,"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":54,"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":55,"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\/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":50,"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":57,"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":62,"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":63,"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":51,"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":[]}]},"post":{"summary":"Create Account Session","operationId":"accountCreateSession","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":"createSession","weight":40,"cookies":false,"type":"","demo":"account\/create-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":{"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"]}}]},"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":61,"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":47,"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\/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, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, zoom, yahoo, yammer, yandex, wordpress, stripe.","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\/{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":53,"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":60,"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":59,"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":58,"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#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":64,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":65,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-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"]}}]}},"\/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":67,"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":66,"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":70,"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":68,"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":69,"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":72,"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":71,"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":74,"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":73,"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":75,"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":79,"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":80,"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":89,"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":88,"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":82,"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":83,"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":87,"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":86,"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":84,"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":81,"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":85,"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":90,"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":91,"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":97,"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":96,"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":98,"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":100,"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":101,"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":99,"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":93,"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":92,"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":94,"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":95,"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":78,"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":76,"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":77,"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":196,"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":195,"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":197,"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":198,"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":200,"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":202,"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":204,"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":203,"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":205,"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":201,"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":206,"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":210,"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":208,"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":207,"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":209,"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":199,"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":109,"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":119,"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":112,"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":111,"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":116,"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":117,"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":115,"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":114,"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":118,"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":113,"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":102,"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":106,"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":103,"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":104,"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":105,"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":107,"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":108,"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":122,"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":121,"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":123,"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":125,"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":130,"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":128,"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":129,"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":147,"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":146,"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":148,"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":150,"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":149,"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":137,"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":136,"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"}}},"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":138,"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":139,"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"}}},"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":140,"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":127,"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":142,"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":141,"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":143,"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":144,"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":145,"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":126,"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":124,"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":132,"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":131,"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":133,"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":134,"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":135,"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"}]}},"\/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":152,"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":151,"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":153,"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":154,"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":155,"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":157,"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":156,"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":158,"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":162,"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":163,"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":160,"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":159,"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":161,"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":164,"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":165,"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":167,"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":166,"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":168,"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":169,"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":170,"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":177,"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":172,"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":171,"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":173,"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":174,"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":176,"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":175,"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":179,"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":178,"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":194,"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":180,"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":193,"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":189,"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":184,"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":183,"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":187,"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":188,"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}\/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":181,"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":190,"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":182,"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":192,"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":191,"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":185,"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":"usersUpdateVerification","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":"updateVerification","weight":186,"cookies":false,"type":"","demo":"users\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-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"]}}]}}},"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"},"$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","$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"},"$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","$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"},"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"},"emailVerification":{"type":"boolean","description":"Email 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","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"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","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"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"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":["role:all"]},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":["user:608f9da25e7e1"]},"permission":{"type":"string","description":"Bucket permission model. Possible values: `bucket` or `file`","x-example":"file"},"dateCreated":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Bucket name.","x-example":"Documents"},"enabled":{"type":"boolean","description":"Bucket enabled.","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size supported.","x-example":100,"format":"int32"},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions.","items":{"type":"string"},"x-example":["jpg","png"]},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$read","$write","permission","dateCreated","dateUpdated","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"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","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"dateCreated":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981257,"format":"int32"},"status":{"type":"string","description":"Function status. Possible values: `disabled`, `enabled`","x-example":"enabled"},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"object","additionalProperties":true,"description":"Function environment variables.","x-example":{"key":"value"}},"events":{"type":"array","description":"Function trigger events.","items":{"type":"string"},"x-example":"account.create"},"schedule":{"type":"string","description":"Function execution schedult in CRON format.","x-example":"5 4 * * *"},"scheduleNext":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981292,"format":"int32"},"schedulePrevious":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981237,"format":"int32"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","execute","name","dateCreated","dateUpdated","status","runtime","deployment","vars","events","schedule","scheduleNext","schedulePrevious","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"dateCreated":{"type":"integer","description":"The deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status.","x-example":"enabled"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"}},"required":["$id","resourceId","resourceType","dateCreated","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"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","$read","functionId","dateCreated","trigger","status","statusCode","response","stderr","time"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"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..."},"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..."},"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..."},"providerZoomAppid":{"type":"string","description":"Zoom OAuth app ID.","x-example":"123247283472834787438"},"providerZoomSecret":{"type":"string","description":"Zoom 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..."},"providerWordpressAppid":{"type":"string","description":"WordPress OAuth app ID.","x-example":"123247283472834787438"},"providerWordpressSecret":{"type":"string","description":"WordPress 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..."},"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","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","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","providerTradeshiftAppid","providerTradeshiftSecret","providerTradeshiftBoxAppid","providerTradeshiftBoxSecret","providerTwitchAppid","providerTwitchSecret","providerZoomAppid","providerZoomSecret","providerYahooAppid","providerYahooSecret","providerYammerAppid","providerYammerSecret","providerYandexAppid","providerYandexSecret","providerWordpressAppid","providerWordpressSecret","providerStripeAppid","providerStripeSecret","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"},"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"}},"required":["$id","name","url","events","security","httpUser","httpPass"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"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","name","scopes","secret"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"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","domain","registerable","tld","verification","certificateId"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"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","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 diff --git a/app/config/specs/swagger2-0.14.x-server.json b/app/config/specs/swagger2-0.14.x-server.json new file mode 100644 index 0000000000..7bb8189e18 --- /dev/null +++ b/app/config/specs/swagger2-0.14.x-server.json @@ -0,0 +1 @@ +{"swagger":"2.0","info":{"version":"0.14.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":49,"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":56,"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":52,"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":54,"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":55,"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\/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":50,"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":57,"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":62,"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":63,"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":51,"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":61,"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":53,"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":60,"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":59,"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":58,"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#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":64,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":65,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-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"]}}]}},"\/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":67,"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":66,"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":70,"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":68,"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":69,"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":72,"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":71,"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":74,"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":73,"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":75,"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":79,"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":80,"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":89,"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":88,"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":82,"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":83,"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":87,"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":86,"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":84,"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":81,"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":85,"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":90,"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":91,"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":97,"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":96,"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":98,"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":100,"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":101,"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":93,"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":92,"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":94,"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":95,"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":196,"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":195,"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":197,"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":198,"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":200,"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":202,"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":204,"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":203,"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":205,"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":201,"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":206,"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":210,"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":208,"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":207,"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":209,"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":109,"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":119,"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":112,"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":111,"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":116,"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":117,"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":115,"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":114,"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":118,"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":113,"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":102,"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":106,"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":103,"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":104,"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":105,"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":107,"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":108,"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":152,"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":151,"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":153,"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":154,"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":155,"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":157,"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":156,"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":158,"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":162,"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":163,"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":160,"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":159,"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":161,"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":167,"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":166,"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":168,"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":169,"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":170,"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":172,"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":171,"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":173,"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":174,"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":176,"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":175,"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":179,"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":178,"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":180,"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":193,"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":189,"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":184,"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":183,"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":187,"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":188,"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}\/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":181,"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":190,"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":182,"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":192,"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":191,"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":185,"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":"usersUpdateVerification","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":"updateVerification","weight":186,"cookies":false,"type":"","demo":"users\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-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"]}}]}}},"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"},"$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","$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"},"$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","$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"},"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"},"emailVerification":{"type":"boolean","description":"Email 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","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"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","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the Europian Union.","x-example":false},"currency":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format","x-example":"USD"}},"required":["ip","countryCode","country","continentCode","continent","eu","currency"]},"file":{"description":"File","type":"object","properties":{"$id":{"type":"string","description":"File ID.","x-example":"5e5ea5c16897e"},"bucketId":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":["role:all"]},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":["user:608f9da25e7e1"]},"permission":{"type":"string","description":"Bucket permission model. Possible values: `bucket` or `file`","x-example":"file"},"dateCreated":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Bucket name.","x-example":"Documents"},"enabled":{"type":"boolean","description":"Bucket enabled.","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size supported.","x-example":100,"format":"int32"},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions.","items":{"type":"string"},"x-example":["jpg","png"]},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$read","$write","permission","dateCreated","dateUpdated","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"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","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"dateCreated":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981257,"format":"int32"},"status":{"type":"string","description":"Function status. Possible values: `disabled`, `enabled`","x-example":"enabled"},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"object","additionalProperties":true,"description":"Function environment variables.","x-example":{"key":"value"}},"events":{"type":"array","description":"Function trigger events.","items":{"type":"string"},"x-example":"account.create"},"schedule":{"type":"string","description":"Function execution schedult in CRON format.","x-example":"5 4 * * *"},"scheduleNext":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981292,"format":"int32"},"schedulePrevious":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981237,"format":"int32"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","execute","name","dateCreated","dateUpdated","status","runtime","deployment","vars","events","schedule","scheduleNext","schedulePrevious","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"dateCreated":{"type":"integer","description":"The deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status.","x-example":"enabled"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"}},"required":["$id","resourceId","resourceType","dateCreated","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"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","$read","functionId","dateCreated","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 076683e6d0..56785596fe 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -1,4848 +1 @@ -{ - "swagger": "2.0", - "info": { - "version": "0.13.4", - "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": 47, - "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": 37, - "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"] - } - } - ] - }, - "delete": { - "summary": "Delete Account", - "operationId": "accountDelete", - "consumes": ["application/json"], - "produces": [], - "tags": ["account"], - "description": "Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "delete", - "weight": 56, - "cookies": false, - "type": "", - "demo": "account/delete.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete.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/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": 54, - "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": 46, - "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": 10, - "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": 50, - "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": 52, - "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 and Team Invites, oldPassword is optional.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updatePassword", - "weight": 53, - "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/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": 48, - "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": 55, - "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": 60, - "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": 61, - "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": 49, - "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": [] }] - }, - "post": { - "summary": "Create Account Session", - "operationId": "accountCreateSession", - "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": "createSession", - "weight": 38, - "cookies": false, - "type": "", - "demo": "account/create-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-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": { - "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"] - } - } - ] - }, - "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": 59, - "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": 45, - "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/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": 43, - "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": 44, - "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": 39, - "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, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, zoom, yahoo, yammer, yandex, wordpress, stripe.", - "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.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "default": [], - "in": "query" - } - ] - } - }, - "/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": 51, - "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": "", - "responses": { - "200": { - "description": "Session", - "schema": { "$ref": "#/definitions/session" } - } - }, - "x-appwrite": { - "method": "updateSession", - "weight": 58, - "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": 57, - "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/verification": { - "post": { - "summary": "Create Email Verification", - "operationId": "accountCreateVerification", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "responses": { - "201": { - "description": "Token", - "schema": { "$ref": "#/definitions/token" } - } - }, - "x-appwrite": { - "method": "createVerification", - "weight": 62, - "cookies": false, - "type": "", - "demo": "account/create-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-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": 63, - "cookies": false, - "type": "", - "demo": "account/update-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-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"] - } - } - ] - } - }, - "/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 /account/sessions endpoint. Use width, height and quality arguments to change the output settings.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getBrowser", - "weight": 65, - "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.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getCreditCard", - "weight": 64, - "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": 68, - "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.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getFlag", - "weight": 66, - "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.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getImage", - "weight": 67, - "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.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - }, - { - "name": "height", - "description": "Resize preview image height, Pass an integer between 0 to 2000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - } - ] - } - }, - "/avatars/initials": { - "get": { - "summary": "Get User Initials", - "operationId": "avatarsGetInitials", - "consumes": ["application/json"], - "produces": ["image/png"], - "tags": ["avatars"], - "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getInitials", - "weight": 70, - "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.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getQR", - "weight": 69, - "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 0 to 1000. Defaults to 400.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - }, - { - "name": "margin", - "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 1, - "in": "query" - }, - { - "name": "download", - "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", - "required": false, - "type": "boolean", - "x-example": false, - "default": false, - "in": "query" - } - ] - } - }, - "/database/collections/{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": 95, - "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).", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "default": [], - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderAttributes", - "description": "Array of attributes used to sort results.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "default": [], - "in": "query" - }, - { - "name": "orderTypes", - "description": "Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create Document", - "operationId": "databaseCreateDocument", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](/docs/server/database#databaseCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { "$ref": "#/definitions/document" } - } - }, - "x-appwrite": { - "method": "createDocument", - "weight": 94, - "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": 96, - "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": 98, - "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": 99, - "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": 207, - "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": 205, - "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": 204, - "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": 206, - "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": 100, - "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": 104, - "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": 101, - "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": 102, - "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": 103, - "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": 105, - "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": 106, - "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": 156, - "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": 155, - "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": 157, - "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": 161, - "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": 162, - "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": 159, - "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": 158, - "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": 160, - "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": 166, - "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": 165, - "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). Max length for each role is 32 chars.", - "default": ["owner"], - "x-example": null, - "items": { "type": "string" } - } - }, - "required": ["teamId", "name"] - } - } - ] - } - }, - "/teams/{teamId}": { - "get": { - "summary": "Get Team", - "operationId": "teamsGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Get a team by its ID. All team members have read access for this resource.", - "responses": { - "200": { - "description": "Team", - "schema": { "$ref": "#/definitions/team" } - } - }, - "x-appwrite": { - "method": "get", - "weight": 167, - "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": 168, - "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": 169, - "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": 171, - "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": 170, - "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). Max length for each role is 32 chars.", - "default": null, - "x-example": null, - "items": { "type": "string" } - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": null, - "x-example": "https://example.com" - }, - "name": { - "type": "string", - "description": "Name of the new team member. Max length: 128 chars.", - "default": "", - "x-example": "[NAME]" - } - }, - "required": ["email", "roles", "url"] - } - } - ] - } - }, - "/teams/{teamId}/memberships/{membershipId}": { - "get": { - "summary": "Get Team Membership", - "operationId": "teamsGetMembership", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Get a team member by the membership unique id. All team members have read access for this resource.", - "responses": { - "200": { - "description": "Memberships List", - "schema": { "$ref": "#/definitions/membershipList" } - } - }, - "x-appwrite": { - "method": "getMembership", - "weight": 172, - "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": 173, - "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). Max length for each role is 32 chars.", - "default": null, - "x-example": null, - "items": { "type": "string" } - } - }, - "required": ["roles"] - } - } - ] - }, - "delete": { - "summary": "Delete Team Membership", - "operationId": "teamsDeleteMembership", - "consumes": ["application/json"], - "produces": [], - "tags": ["teams"], - "description": "This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteMembership", - "weight": 175, - "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": 174, - "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" - }, - "$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", "$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" - }, - "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" - }, - "emailVerification": { - "type": "boolean", - "description": "Email 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", - "name", - "registration", - "status", - "passwordUpdate", - "email", - "emailVerification", - "prefs" - ] - }, - "preferences": { - "description": "Preferences", - "type": "object", - "additionalProperties": true - }, - "session": { - "description": "Session", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Session ID.", - "x-example": "5e5ea5c16897e" - }, - "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", - "userId", - "expire", - "provider", - "providerUid", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken", - "ip", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName", - "current" - ] - }, - "token": { - "description": "Token", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" - }, - "secret": { - "type": "string", - "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "expire": { - "type": "integer", - "description": "Token expiration date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - } - }, - "required": ["$id", "userId", "secret", "expire"] - }, - "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" - }, - "$read": { - "type": "array", - "description": "File read permissions.", - "items": { "type": "string" }, - "x-example": "role:all" - }, - "$write": { - "type": "array", - "description": "File write permissions.", - "items": { "type": "string" }, - "x-example": "user:608f9da25e7e1" - }, - "name": { - "type": "string", - "description": "File name.", - "x-example": "Pink.png" - }, - "dateCreated": { - "type": "integer", - "description": "File creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "signature": { - "type": "string", - "description": "File MD5 signature.", - "x-example": "5d529fd02b544198ae075bd57c1762bb" - }, - "mimeType": { - "type": "string", - "description": "File mime type.", - "x-example": "image/png" - }, - "sizeOriginal": { - "type": "integer", - "description": "File original size in bytes.", - "x-example": 17890, - "format": "int32" - }, - "chunksTotal": { - "type": "integer", - "description": "Total number of chunks available", - "x-example": 17890, - "format": "int32" - }, - "chunksUploaded": { - "type": "integer", - "description": "Total number of chunks uploaded", - "x-example": 17890, - "format": "int32" - } - }, - "required": [ - "$id", - "bucketId", - "$read", - "$write", - "name", - "dateCreated", - "signature", - "mimeType", - "sizeOriginal", - "chunksTotal", - "chunksUploaded" - ] - }, - "team": { - "description": "Team", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "dateCreated": { - "type": "integer", - "description": "Team creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "total": { - "type": "integer", - "description": "Total number of team members.", - "x-example": 7, - "format": "int32" - } - }, - "required": ["$id", "name", "dateCreated", "total"] - }, - "membership": { - "description": "Membership", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Membership ID.", - "x-example": "5e5ea5c16897e" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "teamId": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "User name.", - "x-example": "VIP" - }, - "email": { - "type": "string", - "description": "User email address.", - "x-example": "john@appwrite.io" - }, - "invited": { - "type": "integer", - "description": "Date, the user has been invited to join the team in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "joined": { - "type": "integer", - "description": "Date, the user has accepted the invitation to join the team in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "confirm": { - "type": "boolean", - "description": "User confirmation status, true if the user has joined the team or false otherwise.", - "x-example": false - }, - "roles": { - "type": "array", - "description": "User list of roles", - "items": { "type": "string" }, - "x-example": "admin" - } - }, - "required": [ - "$id", - "userId", - "teamId", - "name", - "email", - "invited", - "joined", - "confirm", - "roles" - ] - }, - "execution": { - "description": "Execution", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Execution ID.", - "x-example": "5e5ea5c16897e" - }, - "$read": { - "type": "array", - "description": "Execution read permissions.", - "items": { "type": "string" }, - "x-example": "role:all" - }, - "functionId": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea6g16897e" - }, - "dateCreated": { - "type": "integer", - "description": "The execution creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "trigger": { - "type": "string", - "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" - }, - "status": { - "type": "string", - "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" - }, - "statusCode": { - "type": "integer", - "description": "The script status code.", - "x-example": 0, - "format": "int32" - }, - "stdout": { - "type": "string", - "description": "The script stdout output string. Logs the last 4,000 characters of the execution stdout output.", - "x-example": "" - }, - "stderr": { - "type": "string", - "description": "The script stderr output string. Logs the last 4,000 characters of the execution stderr output", - "x-example": "" - }, - "time": { - "type": "number", - "description": "The script execution time in seconds.", - "x-example": 0.4, - "format": "double" - } - }, - "required": [ - "$id", - "$read", - "functionId", - "dateCreated", - "trigger", - "status", - "statusCode", - "stdout", - "stderr", - "time" - ] - }, - "country": { - "description": "Country", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - }, - "code": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - } - }, - "required": ["name", "code"] - }, - "continent": { - "description": "Continent", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Continent name.", - "x-example": "Europe" - }, - "code": { - "type": "string", - "description": "Continent two letter code.", - "x-example": "EU" - } - }, - "required": ["name", "code"] - }, - "language": { - "description": "Language", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Language name.", - "x-example": "Italian" - }, - "code": { - "type": "string", - "description": "Language two-character ISO 639-1 codes.", - "x-example": "it" - }, - "nativeName": { - "type": "string", - "description": "Language native name.", - "x-example": "Italiano" - } - }, - "required": ["name", "code", "nativeName"] - }, - "currency": { - "description": "Currency", - "type": "object", - "properties": { - "symbol": { - "type": "string", - "description": "Currency symbol.", - "x-example": "$" - }, - "name": { - "type": "string", - "description": "Currency name.", - "x-example": "US dollar" - }, - "symbolNative": { - "type": "string", - "description": "Currency native symbol.", - "x-example": "$" - }, - "decimalDigits": { - "type": "integer", - "description": "Number of decimal digits.", - "x-example": 2, - "format": "int32" - }, - "rounding": { - "type": "number", - "description": "Currency digit rounding.", - "x-example": 0, - "format": "double" - }, - "code": { - "type": "string", - "description": "Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format.", - "x-example": "USD" - }, - "namePlural": { - "type": "string", - "description": "Currency plural name", - "x-example": "US dollars" - } - }, - "required": [ - "symbol", - "name", - "symbolNative", - "decimalDigits", - "rounding", - "code", - "namePlural" - ] - }, - "phone": { - "description": "Phone", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Phone code.", - "x-example": "+1" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": ["code", "countryCode", "countryName"] - } - }, - "externalDocs": { - "description": "Full API docs, specs and tutorials", - "url": "https://appwrite.io/docs" - } -} +{"swagger":"2.0","info":{"version":"0.14.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":49,"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":56,"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":48,"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":10,"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":52,"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":54,"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":55,"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\/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":50,"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":57,"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":62,"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":63,"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":51,"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":[]}]},"post":{"summary":"Create Account Session","operationId":"accountCreateSession","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":"createSession","weight":40,"cookies":false,"type":"","demo":"account\/create-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":{"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"]}}]},"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":61,"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":47,"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\/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, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, zoom, yahoo, yammer, yandex, wordpress, stripe.","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\/{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":53,"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":60,"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":59,"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":58,"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#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":64,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":65,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-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"]}}]}},"\/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":67,"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":66,"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":70,"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":68,"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":69,"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":72,"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":71,"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":97,"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":96,"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":98,"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":100,"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":101,"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":210,"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":208,"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":207,"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":209,"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":102,"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":106,"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":103,"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":104,"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":105,"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":107,"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":108,"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":157,"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":156,"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":158,"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":162,"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":163,"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":160,"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":159,"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":161,"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":167,"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":166,"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":168,"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":169,"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":170,"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":172,"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":171,"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":173,"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":174,"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":176,"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":175,"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"},"$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","$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"},"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"},"emailVerification":{"type":"boolean","description":"Email 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","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"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","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"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"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"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","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"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","$read","functionId","dateCreated","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 e7b42a6314..efac7e049c 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -1,13010 +1 @@ -{ - "swagger": "2.0", - "info": { - "version": "0.13.4", - "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": 47, - "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": 37, - "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"] - } - } - ] - }, - "delete": { - "summary": "Delete Account", - "operationId": "accountDelete", - "consumes": ["application/json"], - "produces": [], - "tags": ["account"], - "description": "Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "delete", - "weight": 56, - "cookies": false, - "type": "", - "demo": "account/delete.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete.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/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": 54, - "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": 46, - "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": 10, - "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": 50, - "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": 52, - "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 and Team Invites, oldPassword is optional.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updatePassword", - "weight": 53, - "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/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": 48, - "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": 55, - "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": 60, - "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": 61, - "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": 49, - "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": [] }] - }, - "post": { - "summary": "Create Account Session", - "operationId": "accountCreateSession", - "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": "createSession", - "weight": 38, - "cookies": false, - "type": "", - "demo": "account/create-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-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": { - "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"] - } - } - ] - }, - "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": 59, - "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": 45, - "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/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": 43, - "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": 44, - "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": 39, - "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, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, zoom, yahoo, yammer, yandex, wordpress, stripe.", - "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.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "default": [], - "in": "query" - } - ] - } - }, - "/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": 51, - "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": "", - "responses": { - "200": { - "description": "Session", - "schema": { "$ref": "#/definitions/session" } - } - }, - "x-appwrite": { - "method": "updateSession", - "weight": 58, - "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": 57, - "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/verification": { - "post": { - "summary": "Create Email Verification", - "operationId": "accountCreateVerification", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "responses": { - "201": { - "description": "Token", - "schema": { "$ref": "#/definitions/token" } - } - }, - "x-appwrite": { - "method": "createVerification", - "weight": 62, - "cookies": false, - "type": "", - "demo": "account/create-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-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": 63, - "cookies": false, - "type": "", - "demo": "account/update-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-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"] - } - } - ] - } - }, - "/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 /account/sessions endpoint. Use width, height and quality arguments to change the output settings.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getBrowser", - "weight": 65, - "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.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getCreditCard", - "weight": 64, - "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": 68, - "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.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getFlag", - "weight": 66, - "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.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getImage", - "weight": 67, - "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.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - }, - { - "name": "height", - "description": "Resize preview image height, Pass an integer between 0 to 2000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - } - ] - } - }, - "/avatars/initials": { - "get": { - "summary": "Get User Initials", - "operationId": "avatarsGetInitials", - "consumes": ["application/json"], - "produces": ["image/png"], - "tags": ["avatars"], - "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getInitials", - "weight": 70, - "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.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getQR", - "weight": 69, - "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 0 to 1000. Defaults to 400.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - }, - { - "name": "margin", - "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 1, - "in": "query" - }, - { - "name": "download", - "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", - "required": false, - "type": "boolean", - "x-example": false, - "default": false, - "in": "query" - } - ] - } - }, - "/database/collections": { - "get": { - "summary": "List Collections", - "operationId": "databaseListCollections", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Get a list of all the user collections. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's collections. [Learn more about different API modes](/docs/admin).", - "responses": { - "200": { - "description": "Collections List", - "schema": { "$ref": "#/definitions/collectionList" } - } - }, - "x-appwrite": { - "method": "listCollections", - "weight": 72, - "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": 71, - "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": "Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "document" - }, - "read": { - "type": "array", - "description": "An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "write": { - "type": "array", - "description": "An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - } - }, - "required": [ - "collectionId", - "name", - "permission", - "read", - "write" - ] - } - } - ] - } - }, - "/database/collections/{collectionId}": { - "get": { - "summary": "Get Collection", - "operationId": "databaseGetCollection", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", - "responses": { - "200": { - "description": "Collection", - "schema": { "$ref": "#/definitions/collection" } - } - }, - "x-appwrite": { - "method": "getCollection", - "weight": 73, - "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": 77, - "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": 78, - "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": 87, - "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": 86, - "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": 80, - "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": 81, - "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.", - "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": 85, - "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": 84, - "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": 82, - "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": 79, - "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": 83, - "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": 88, - "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": 89, - "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": 95, - "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).", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "default": [], - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderAttributes", - "description": "Array of attributes used to sort results.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "default": [], - "in": "query" - }, - { - "name": "orderTypes", - "description": "Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create Document", - "operationId": "databaseCreateDocument", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](/docs/server/database#databaseCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { "$ref": "#/definitions/document" } - } - }, - "x-appwrite": { - "method": "createDocument", - "weight": 94, - "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": 96, - "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": 98, - "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": 99, - "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": 97, - "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": 91, - "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": 90, - "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.", - "default": null, - "x-example": null, - "items": { "type": "string" } - }, - "orders": { - "type": "array", - "description": "Array of index orders.", - "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": 92, - "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": 93, - "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": 76, - "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": 74, - "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": 75, - "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": 193, - "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": 192, - "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.", - "default": null, - "x-example": null, - "items": { "type": "string" } - }, - "runtime": { - "type": "string", - "description": "Execution runtime.", - "default": null, - "x-example": "node-14.5" - }, - "vars": { - "type": "object", - "description": "Key-value JSON object that will be passed to the function as environment variables.", - "default": [], - "x-example": "{}" - }, - "events": { - "type": "array", - "description": "Events list.", - "default": [], - "x-example": null, - "items": { "type": "string" } - }, - "schedule": { - "type": "string", - "description": "Schedule CRON syntax.", - "default": "", - "x-example": null - }, - "timeout": { - "type": "integer", - "description": "Function maximum execution time in seconds.", - "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": 194, - "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": 195, - "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": 197, - "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.", - "default": null, - "x-example": null, - "items": { "type": "string" } - }, - "vars": { - "type": "object", - "description": "Key-value JSON object that will be passed to the function as environment variables.", - "default": [], - "x-example": "{}" - }, - "events": { - "type": "array", - "description": "Events list.", - "default": [], - "x-example": null, - "items": { "type": "string" } - }, - "schedule": { - "type": "string", - "description": "Schedule CRON syntax.", - "default": "", - "x-example": null - }, - "timeout": { - "type": "integer", - "description": "Maximum execution time in seconds.", - "default": 15, - "x-example": 1 - } - }, - "required": ["name", "execute"] - } - } - ] - }, - "delete": { - "summary": "Delete Function", - "operationId": "functionsDelete", - "consumes": ["application/json"], - "produces": [], - "tags": ["functions"], - "description": "Delete a function by its unique ID.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "delete", - "weight": 199, - "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": 201, - "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": 200, - "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": 202, - "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": 198, - "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": 203, - "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": 207, - "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": 205, - "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": 204, - "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": 206, - "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": 196, - "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": 107, - "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": 118, - "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": 110, - "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": 109, - "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": 115, - "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": 116, - "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": 113, - "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/usage": { - "get": { - "summary": "Get Usage Queue", - "operationId": "healthGetQueueUsage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of usage stats that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { "$ref": "#/definitions/healthQueue" } - } - }, - "x-appwrite": { - "method": "getQueueUsage", - "weight": 114, - "cookies": false, - "type": "", - "demo": "health/get-queue-usage.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-usage.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": 112, - "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": 117, - "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": 111, - "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": 100, - "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": 104, - "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": 101, - "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": 102, - "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": 103, - "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": 105, - "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": 106, - "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": 121, - "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": 120, - "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": 122, - "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": 124, - "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": 129, - "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": 127, - "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": 128, - "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": 146, - "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": 145, - "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": 147, - "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": 149, - "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": 148, - "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": 136, - "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": 135, - "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.", - "default": null, - "x-example": null, - "items": { "type": "string" } - } - }, - "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": 137, - "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": 138, - "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", - "default": null, - "x-example": null, - "items": { "type": "string" } - } - }, - "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": 139, - "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": 126, - "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": 141, - "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": 140, - "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": "[HOSTNAME]" - } - }, - "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": 142, - "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": 143, - "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": "[HOSTNAME]" - } - }, - "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": 144, - "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": 125, - "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": 123, - "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": 131, - "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": 130, - "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.", - "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": 132, - "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": 133, - "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.", - "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": 134, - "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" - } - ] - } - }, - "/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": 151, - "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": 150, - "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": null - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions", - "default": [], - "x-example": null, - "items": { "type": "string" } - }, - "encryption": { - "type": "boolean", - "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", - "default": true, - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", - "default": true, - "x-example": false - } - }, - "required": ["bucketId", "name", "permission"] - } - } - ] - } - }, - "/storage/buckets/{bucketId}": { - "get": { - "summary": "Get Bucket", - "operationId": "storageGetBucket", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.", - "responses": { - "200": { - "description": "Bucket", - "schema": { "$ref": "#/definitions/bucket" } - } - }, - "x-appwrite": { - "method": "getBucket", - "weight": 152, - "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": 153, - "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": null - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions", - "default": [], - "x-example": null, - "items": { "type": "string" } - }, - "encryption": { - "type": "boolean", - "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", - "default": true, - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", - "default": true, - "x-example": false - } - }, - "required": ["name", "permission"] - } - } - ] - }, - "delete": { - "summary": "Delete Bucket", - "operationId": "storageDeleteBucket", - "consumes": ["application/json"], - "produces": [], - "tags": ["storage"], - "description": "Delete a storage bucket by its unique ID.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteBucket", - "weight": 154, - "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": 156, - "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": 155, - "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": 157, - "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": 161, - "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": 162, - "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": 159, - "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": 158, - "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": 160, - "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": 163, - "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": 164, - "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": 166, - "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": 165, - "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). Max length for each role is 32 chars.", - "default": ["owner"], - "x-example": null, - "items": { "type": "string" } - } - }, - "required": ["teamId", "name"] - } - } - ] - } - }, - "/teams/{teamId}": { - "get": { - "summary": "Get Team", - "operationId": "teamsGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Get a team by its ID. All team members have read access for this resource.", - "responses": { - "200": { - "description": "Team", - "schema": { "$ref": "#/definitions/team" } - } - }, - "x-appwrite": { - "method": "get", - "weight": 167, - "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": 168, - "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": 169, - "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}/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": 171, - "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": 170, - "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). Max length for each role is 32 chars.", - "default": null, - "x-example": null, - "items": { "type": "string" } - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": null, - "x-example": "https://example.com" - }, - "name": { - "type": "string", - "description": "Name of the new team member. Max length: 128 chars.", - "default": "", - "x-example": "[NAME]" - } - }, - "required": ["email", "roles", "url"] - } - } - ] - } - }, - "/teams/{teamId}/memberships/{membershipId}": { - "get": { - "summary": "Get Team Membership", - "operationId": "teamsGetMembership", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Get a team member by the membership unique id. All team members have read access for this resource.", - "responses": { - "200": { - "description": "Memberships List", - "schema": { "$ref": "#/definitions/membershipList" } - } - }, - "x-appwrite": { - "method": "getMembership", - "weight": 172, - "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": 173, - "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). Max length for each role is 32 chars.", - "default": null, - "x-example": null, - "items": { "type": "string" } - } - }, - "required": ["roles"] - } - } - ] - }, - "delete": { - "summary": "Delete Team Membership", - "operationId": "teamsDeleteMembership", - "consumes": ["application/json"], - "produces": [], - "tags": ["teams"], - "description": "This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteMembership", - "weight": 175, - "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": 174, - "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": 177, - "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": 176, - "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": 191, - "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": 178, - "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.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "delete", - "weight": 190, - "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": 186, - "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": 181, - "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}/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": 184, - "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": 185, - "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}/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": 179, - "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": 187, - "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": 180, - "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": 189, - "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": 188, - "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.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updateStatus", - "weight": 182, - "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": "usersUpdateVerification", - "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": "updateVerification", - "weight": 183, - "cookies": false, - "type": "", - "demo": "users/update-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-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"] - } - } - ] - } - } - }, - "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" - }, - "$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", - "$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" - }, - "$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", "$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" - }, - "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" - }, - "emailVerification": { - "type": "boolean", - "description": "Email 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", - "name", - "registration", - "status", - "passwordUpdate", - "email", - "emailVerification", - "prefs" - ] - }, - "preferences": { - "description": "Preferences", - "type": "object", - "additionalProperties": true - }, - "session": { - "description": "Session", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Session ID.", - "x-example": "5e5ea5c16897e" - }, - "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", - "userId", - "expire", - "provider", - "providerUid", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken", - "ip", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName", - "current" - ] - }, - "token": { - "description": "Token", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" - }, - "secret": { - "type": "string", - "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "expire": { - "type": "integer", - "description": "Token expiration date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - } - }, - "required": ["$id", "userId", "secret", "expire"] - }, - "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" - }, - "$read": { - "type": "array", - "description": "File read permissions.", - "items": { "type": "string" }, - "x-example": "role:all" - }, - "$write": { - "type": "array", - "description": "File write permissions.", - "items": { "type": "string" }, - "x-example": "user:608f9da25e7e1" - }, - "name": { - "type": "string", - "description": "File name.", - "x-example": "Pink.png" - }, - "dateCreated": { - "type": "integer", - "description": "File creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "signature": { - "type": "string", - "description": "File MD5 signature.", - "x-example": "5d529fd02b544198ae075bd57c1762bb" - }, - "mimeType": { - "type": "string", - "description": "File mime type.", - "x-example": "image/png" - }, - "sizeOriginal": { - "type": "integer", - "description": "File original size in bytes.", - "x-example": 17890, - "format": "int32" - }, - "chunksTotal": { - "type": "integer", - "description": "Total number of chunks available", - "x-example": 17890, - "format": "int32" - }, - "chunksUploaded": { - "type": "integer", - "description": "Total number of chunks uploaded", - "x-example": 17890, - "format": "int32" - } - }, - "required": [ - "$id", - "bucketId", - "$read", - "$write", - "name", - "dateCreated", - "signature", - "mimeType", - "sizeOriginal", - "chunksTotal", - "chunksUploaded" - ] - }, - "bucket": { - "description": "Bucket", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$read": { - "type": "array", - "description": "File read permissions.", - "items": { "type": "string" }, - "x-example": ["role:all"] - }, - "$write": { - "type": "array", - "description": "File write permissions.", - "items": { "type": "string" }, - "x-example": ["user:608f9da25e7e1"] - }, - "permission": { - "type": "string", - "description": "Bucket permission model. Possible values: `bucket` or `file`", - "x-example": "file" - }, - "dateCreated": { - "type": "integer", - "description": "Bucket creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "dateUpdated": { - "type": "integer", - "description": "Bucket update date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "name": { - "type": "string", - "description": "Bucket name.", - "x-example": "Documents" - }, - "enabled": { - "type": "boolean", - "description": "Bucket enabled.", - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size supported.", - "x-example": 100, - "format": "int32" - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions.", - "items": { "type": "string" }, - "x-example": ["jpg", "png"] - }, - "encryption": { - "type": "boolean", - "description": "Bucket is encrypted.", - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Virus scanning is enabled.", - "x-example": false - } - }, - "required": [ - "$id", - "$read", - "$write", - "permission", - "dateCreated", - "dateUpdated", - "name", - "enabled", - "maximumFileSize", - "allowedFileExtensions", - "encryption", - "antivirus" - ] - }, - "team": { - "description": "Team", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "dateCreated": { - "type": "integer", - "description": "Team creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "total": { - "type": "integer", - "description": "Total number of team members.", - "x-example": 7, - "format": "int32" - } - }, - "required": ["$id", "name", "dateCreated", "total"] - }, - "membership": { - "description": "Membership", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Membership ID.", - "x-example": "5e5ea5c16897e" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "teamId": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "User name.", - "x-example": "VIP" - }, - "email": { - "type": "string", - "description": "User email address.", - "x-example": "john@appwrite.io" - }, - "invited": { - "type": "integer", - "description": "Date, the user has been invited to join the team in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "joined": { - "type": "integer", - "description": "Date, the user has accepted the invitation to join the team in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "confirm": { - "type": "boolean", - "description": "User confirmation status, true if the user has joined the team or false otherwise.", - "x-example": false - }, - "roles": { - "type": "array", - "description": "User list of roles", - "items": { "type": "string" }, - "x-example": "admin" - } - }, - "required": [ - "$id", - "userId", - "teamId", - "name", - "email", - "invited", - "joined", - "confirm", - "roles" - ] - }, - "function": { - "description": "Function", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea5c16897e" - }, - "execute": { - "type": "array", - "description": "Execution permissions.", - "items": { "type": "string" }, - "x-example": "role:member" - }, - "name": { - "type": "string", - "description": "Function name.", - "x-example": "My Function" - }, - "dateCreated": { - "type": "integer", - "description": "Function creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "dateUpdated": { - "type": "integer", - "description": "Function update date in Unix timestamp.", - "x-example": 1592981257, - "format": "int32" - }, - "status": { - "type": "string", - "description": "Function status. Possible values: `disabled`, `enabled`", - "x-example": "enabled" - }, - "runtime": { - "type": "string", - "description": "Function execution runtime.", - "x-example": "python-3.8" - }, - "deployment": { - "type": "string", - "description": "Function's active deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "vars": { - "type": "object", - "additionalProperties": true, - "description": "Function environment variables.", - "x-example": { "key": "value" } - }, - "events": { - "type": "array", - "description": "Function trigger events.", - "items": { "type": "string" }, - "x-example": "account.create" - }, - "schedule": { - "type": "string", - "description": "Function execution schedult in CRON format.", - "x-example": "5 4 * * *" - }, - "scheduleNext": { - "type": "integer", - "description": "Function next scheduled execution date in Unix timestamp.", - "x-example": 1592981292, - "format": "int32" - }, - "schedulePrevious": { - "type": "integer", - "description": "Function next scheduled execution date in Unix timestamp.", - "x-example": 1592981237, - "format": "int32" - }, - "timeout": { - "type": "integer", - "description": "Function execution timeout in seconds.", - "x-example": 1592981237, - "format": "int32" - } - }, - "required": [ - "$id", - "execute", - "name", - "dateCreated", - "dateUpdated", - "status", - "runtime", - "deployment", - "vars", - "events", - "schedule", - "scheduleNext", - "schedulePrevious", - "timeout" - ] - }, - "runtime": { - "description": "Runtime", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Runtime ID.", - "x-example": "python-3.8" - }, - "name": { - "type": "string", - "description": "Runtime Name.", - "x-example": "Python" - }, - "version": { - "type": "string", - "description": "Runtime version.", - "x-example": "3.8" - }, - "base": { - "type": "string", - "description": "Base Docker image used to build the runtime.", - "x-example": "python:3.8-alpine" - }, - "image": { - "type": "string", - "description": "Image name of Docker Hub.", - "x-example": "appwrite\\/runtime-for-python:3.8" - }, - "logo": { - "type": "string", - "description": "Name of the logo image.", - "x-example": "python.png" - }, - "supports": { - "type": "array", - "description": "List of supported architectures.", - "items": { "type": "string" }, - "x-example": "amd64" - } - }, - "required": [ - "$id", - "name", - "version", - "base", - "image", - "logo", - "supports" - ] - }, - "deployment": { - "description": "Deployment", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "resourceId": { - "type": "string", - "description": "Resource ID.", - "x-example": "5e5ea6g16897e" - }, - "resourceType": { - "type": "string", - "description": "Resource type.", - "x-example": "functions" - }, - "dateCreated": { - "type": "integer", - "description": "The deployment creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "entrypoint": { - "type": "string", - "description": "The entrypoint file to use to execute the deployment code.", - "x-example": "enabled" - }, - "size": { - "type": "integer", - "description": "The code size in bytes.", - "x-example": 128, - "format": "int32" - }, - "buildId": { - "type": "string", - "description": "The current build ID.", - "x-example": "5e5ea5c16897e" - }, - "activate": { - "type": "boolean", - "description": "Whether the deployment should be automatically activated.", - "x-example": true - }, - "status": { - "type": "string", - "description": "The deployment status.", - "x-example": "enabled" - }, - "buildStdout": { - "type": "string", - "description": "The build stdout.", - "x-example": "enabled" - }, - "buildStderr": { - "type": "string", - "description": "The build stderr.", - "x-example": "enabled" - } - }, - "required": [ - "$id", - "resourceId", - "resourceType", - "dateCreated", - "entrypoint", - "size", - "buildId", - "activate", - "status", - "buildStdout", - "buildStderr" - ] - }, - "execution": { - "description": "Execution", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Execution ID.", - "x-example": "5e5ea5c16897e" - }, - "$read": { - "type": "array", - "description": "Execution read permissions.", - "items": { "type": "string" }, - "x-example": "role:all" - }, - "functionId": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea6g16897e" - }, - "dateCreated": { - "type": "integer", - "description": "The execution creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "trigger": { - "type": "string", - "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" - }, - "status": { - "type": "string", - "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" - }, - "statusCode": { - "type": "integer", - "description": "The script status code.", - "x-example": 0, - "format": "int32" - }, - "stdout": { - "type": "string", - "description": "The script stdout output string. Logs the last 4,000 characters of the execution stdout output.", - "x-example": "" - }, - "stderr": { - "type": "string", - "description": "The script stderr output string. Logs the last 4,000 characters of the execution stderr output", - "x-example": "" - }, - "time": { - "type": "number", - "description": "The script execution time in seconds.", - "x-example": 0.4, - "format": "double" - } - }, - "required": [ - "$id", - "$read", - "functionId", - "dateCreated", - "trigger", - "status", - "statusCode", - "stdout", - "stderr", - "time" - ] - }, - "project": { - "description": "Project", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Project ID.", - "x-example": "5e5ea5c16897e" - }, - "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..." - }, - "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..." - }, - "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..." - }, - "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..." - }, - "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..." - }, - "providerVkAppid": { - "type": "string", - "description": "VK OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerVkSecret": { - "type": "string", - "description": "VK 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..." - }, - "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..." - }, - "providerWordpressAppid": { - "type": "string", - "description": "WordPress OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerWordpressSecret": { - "type": "string", - "description": "WordPress 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..." - }, - "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", - "name", - "description", - "teamId", - "logo", - "url", - "legalName", - "legalCountry", - "legalState", - "legalCity", - "legalAddress", - "legalTaxId", - "authLimit", - "platforms", - "webhooks", - "keys", - "domains", - "providerAmazonAppid", - "providerAmazonSecret", - "providerAppleAppid", - "providerAppleSecret", - "providerBitbucketAppid", - "providerBitbucketSecret", - "providerBitlyAppid", - "providerBitlySecret", - "providerBoxAppid", - "providerBoxSecret", - "providerDiscordAppid", - "providerDiscordSecret", - "providerDropboxAppid", - "providerDropboxSecret", - "providerFacebookAppid", - "providerFacebookSecret", - "providerGithubAppid", - "providerGithubSecret", - "providerGitlabAppid", - "providerGitlabSecret", - "providerGoogleAppid", - "providerGoogleSecret", - "providerLinkedinAppid", - "providerLinkedinSecret", - "providerMicrosoftAppid", - "providerMicrosoftSecret", - "providerNotionAppid", - "providerNotionSecret", - "providerPaypalAppid", - "providerPaypalSecret", - "providerPaypalSandboxAppid", - "providerPaypalSandboxSecret", - "providerSalesforceAppid", - "providerSalesforceSecret", - "providerSlackAppid", - "providerSlackSecret", - "providerSpotifyAppid", - "providerSpotifySecret", - "providerTradeshiftAppid", - "providerTradeshiftSecret", - "providerTradeshiftBoxAppid", - "providerTradeshiftBoxSecret", - "providerTwitchAppid", - "providerTwitchSecret", - "providerVkAppid", - "providerVkSecret", - "providerZoomAppid", - "providerZoomSecret", - "providerYahooAppid", - "providerYahooSecret", - "providerYammerAppid", - "providerYammerSecret", - "providerYandexAppid", - "providerYandexSecret", - "providerWordpressAppid", - "providerWordpressSecret", - "providerStripeAppid", - "providerStripeSecret", - "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" - }, - "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" - } - }, - "required": [ - "$id", - "name", - "url", - "events", - "security", - "httpUser", - "httpPass" - ] - }, - "key": { - "description": "Key", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Key ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Key name.", - "x-example": "My API Key" - }, - "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", "name", "scopes", "secret"] - }, - "domain": { - "description": "Domain", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Domain ID.", - "x-example": "5e5ea5c16897e" - }, - "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", - "domain", - "registerable", - "tld", - "verification", - "certificateId" - ] - }, - "platform": { - "description": "Platform", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" - }, - "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", - "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" - } -} +{"swagger":"2.0","info":{"version":"0.14.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":49,"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":56,"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":48,"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":10,"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":52,"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":54,"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":55,"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\/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":50,"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":57,"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":62,"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":63,"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":51,"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":[]}]},"post":{"summary":"Create Account Session","operationId":"accountCreateSession","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":"createSession","weight":40,"cookies":false,"type":"","demo":"account\/create-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":{"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"]}}]},"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":61,"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":47,"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\/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, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, zoom, yahoo, yammer, yandex, wordpress, stripe.","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\/{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":53,"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":60,"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":59,"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":58,"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#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":64,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":65,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-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"]}}]}},"\/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":67,"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":66,"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":70,"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":68,"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":69,"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":72,"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":71,"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":74,"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":73,"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":75,"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":79,"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":80,"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":89,"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":88,"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":82,"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":83,"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":87,"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":86,"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":84,"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":81,"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":85,"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":90,"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":91,"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":97,"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":96,"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":98,"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":100,"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":101,"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":99,"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":93,"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":92,"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":94,"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":95,"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":78,"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":76,"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":77,"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":196,"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":195,"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":197,"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":198,"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":200,"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":202,"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":204,"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":203,"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":205,"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":201,"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":206,"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":210,"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":208,"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":207,"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":209,"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":199,"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":109,"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":119,"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":112,"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":111,"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":116,"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":117,"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":115,"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":114,"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":118,"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":113,"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":102,"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":106,"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":103,"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":104,"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":105,"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":107,"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":108,"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":122,"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":121,"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":123,"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":125,"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":130,"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":128,"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":129,"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":147,"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":146,"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":148,"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":150,"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":149,"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":137,"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":136,"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"}}},"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":138,"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":139,"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"}}},"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":140,"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":127,"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":142,"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":141,"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":143,"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":144,"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":145,"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":126,"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":124,"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":132,"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":131,"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":133,"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":134,"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":135,"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"}]}},"\/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":152,"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":151,"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":153,"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":154,"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":155,"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":157,"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":156,"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":158,"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":162,"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":163,"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":160,"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":159,"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":161,"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":164,"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":165,"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":167,"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":166,"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":168,"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":169,"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":170,"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":177,"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":172,"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":171,"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":173,"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":174,"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":176,"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":175,"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":179,"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":178,"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":194,"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":180,"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":193,"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":189,"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":184,"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":183,"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":187,"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":188,"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}\/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":181,"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":190,"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":182,"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":192,"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":191,"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":185,"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":"usersUpdateVerification","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":"updateVerification","weight":186,"cookies":false,"type":"","demo":"users\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-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"]}}]}}},"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"},"$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","$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"},"$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","$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"},"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"},"emailVerification":{"type":"boolean","description":"Email 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","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"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","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"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"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":["role:all"]},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":["user:608f9da25e7e1"]},"permission":{"type":"string","description":"Bucket permission model. Possible values: `bucket` or `file`","x-example":"file"},"dateCreated":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Bucket name.","x-example":"Documents"},"enabled":{"type":"boolean","description":"Bucket enabled.","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size supported.","x-example":100,"format":"int32"},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions.","items":{"type":"string"},"x-example":["jpg","png"]},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$read","$write","permission","dateCreated","dateUpdated","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"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","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"dateCreated":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981257,"format":"int32"},"status":{"type":"string","description":"Function status. Possible values: `disabled`, `enabled`","x-example":"enabled"},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"object","additionalProperties":true,"description":"Function environment variables.","x-example":{"key":"value"}},"events":{"type":"array","description":"Function trigger events.","items":{"type":"string"},"x-example":"account.create"},"schedule":{"type":"string","description":"Function execution schedult in CRON format.","x-example":"5 4 * * *"},"scheduleNext":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981292,"format":"int32"},"schedulePrevious":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981237,"format":"int32"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","execute","name","dateCreated","dateUpdated","status","runtime","deployment","vars","events","schedule","scheduleNext","schedulePrevious","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"dateCreated":{"type":"integer","description":"The deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status.","x-example":"enabled"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"}},"required":["$id","resourceId","resourceType","dateCreated","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"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","$read","functionId","dateCreated","trigger","status","statusCode","response","stderr","time"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"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..."},"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..."},"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..."},"providerZoomAppid":{"type":"string","description":"Zoom OAuth app ID.","x-example":"123247283472834787438"},"providerZoomSecret":{"type":"string","description":"Zoom 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..."},"providerWordpressAppid":{"type":"string","description":"WordPress OAuth app ID.","x-example":"123247283472834787438"},"providerWordpressSecret":{"type":"string","description":"WordPress 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..."},"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","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","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","providerTradeshiftAppid","providerTradeshiftSecret","providerTradeshiftBoxAppid","providerTradeshiftBoxSecret","providerTwitchAppid","providerTwitchSecret","providerZoomAppid","providerZoomSecret","providerYahooAppid","providerYahooSecret","providerYammerAppid","providerYammerSecret","providerYandexAppid","providerYandexSecret","providerWordpressAppid","providerWordpressSecret","providerStripeAppid","providerStripeSecret","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"},"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"}},"required":["$id","name","url","events","security","httpUser","httpPass"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"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","name","scopes","secret"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"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","domain","registerable","tld","verification","certificateId"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"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","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 diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 1a3b0de6bc..7bb8189e18 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -1,9048 +1 @@ -{ - "swagger": "2.0", - "info": { - "version": "0.13.4", - "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": 47, - "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": [] }] - }, - "delete": { - "summary": "Delete Account", - "operationId": "accountDelete", - "consumes": ["application/json"], - "produces": [], - "tags": ["account"], - "description": "Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "delete", - "weight": 56, - "cookies": false, - "type": "", - "demo": "account/delete.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete.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": 54, - "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": 50, - "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": 52, - "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 and Team Invites, oldPassword is optional.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updatePassword", - "weight": 53, - "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/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": 48, - "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": 55, - "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": 60, - "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": 61, - "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": 49, - "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": 59, - "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": 51, - "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": "", - "responses": { - "200": { - "description": "Session", - "schema": { "$ref": "#/definitions/session" } - } - }, - "x-appwrite": { - "method": "updateSession", - "weight": 58, - "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": 57, - "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/verification": { - "post": { - "summary": "Create Email Verification", - "operationId": "accountCreateVerification", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "responses": { - "201": { - "description": "Token", - "schema": { "$ref": "#/definitions/token" } - } - }, - "x-appwrite": { - "method": "createVerification", - "weight": 62, - "cookies": false, - "type": "", - "demo": "account/create-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-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": 63, - "cookies": false, - "type": "", - "demo": "account/update-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-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"] - } - } - ] - } - }, - "/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 /account/sessions endpoint. Use width, height and quality arguments to change the output settings.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getBrowser", - "weight": 65, - "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.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getCreditCard", - "weight": 64, - "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": 68, - "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.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getFlag", - "weight": 66, - "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.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getImage", - "weight": 67, - "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.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - }, - { - "name": "height", - "description": "Resize preview image height, Pass an integer between 0 to 2000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - } - ] - } - }, - "/avatars/initials": { - "get": { - "summary": "Get User Initials", - "operationId": "avatarsGetInitials", - "consumes": ["application/json"], - "produces": ["image/png"], - "tags": ["avatars"], - "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getInitials", - "weight": 70, - "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.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getQR", - "weight": 69, - "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 0 to 1000. Defaults to 400.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - }, - { - "name": "margin", - "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 1, - "in": "query" - }, - { - "name": "download", - "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", - "required": false, - "type": "boolean", - "x-example": false, - "default": false, - "in": "query" - } - ] - } - }, - "/database/collections": { - "get": { - "summary": "List Collections", - "operationId": "databaseListCollections", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Get a list of all the user collections. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's collections. [Learn more about different API modes](/docs/admin).", - "responses": { - "200": { - "description": "Collections List", - "schema": { "$ref": "#/definitions/collectionList" } - } - }, - "x-appwrite": { - "method": "listCollections", - "weight": 72, - "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": 71, - "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": "Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "document" - }, - "read": { - "type": "array", - "description": "An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "write": { - "type": "array", - "description": "An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - } - }, - "required": [ - "collectionId", - "name", - "permission", - "read", - "write" - ] - } - } - ] - } - }, - "/database/collections/{collectionId}": { - "get": { - "summary": "Get Collection", - "operationId": "databaseGetCollection", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", - "responses": { - "200": { - "description": "Collection", - "schema": { "$ref": "#/definitions/collection" } - } - }, - "x-appwrite": { - "method": "getCollection", - "weight": 73, - "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": 77, - "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": 78, - "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": 87, - "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": 86, - "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": 80, - "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": 81, - "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.", - "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": 85, - "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": 84, - "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": 82, - "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": 79, - "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": 83, - "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": 88, - "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": 89, - "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": 95, - "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).", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "default": [], - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderAttributes", - "description": "Array of attributes used to sort results.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "default": [], - "in": "query" - }, - { - "name": "orderTypes", - "description": "Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create Document", - "operationId": "databaseCreateDocument", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](/docs/server/database#databaseCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { "$ref": "#/definitions/document" } - } - }, - "x-appwrite": { - "method": "createDocument", - "weight": 94, - "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": 96, - "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": 98, - "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": 99, - "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": 91, - "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": 90, - "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.", - "default": null, - "x-example": null, - "items": { "type": "string" } - }, - "orders": { - "type": "array", - "description": "Array of index orders.", - "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": 92, - "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": 93, - "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": 193, - "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": 192, - "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.", - "default": null, - "x-example": null, - "items": { "type": "string" } - }, - "runtime": { - "type": "string", - "description": "Execution runtime.", - "default": null, - "x-example": "node-14.5" - }, - "vars": { - "type": "object", - "description": "Key-value JSON object that will be passed to the function as environment variables.", - "default": [], - "x-example": "{}" - }, - "events": { - "type": "array", - "description": "Events list.", - "default": [], - "x-example": null, - "items": { "type": "string" } - }, - "schedule": { - "type": "string", - "description": "Schedule CRON syntax.", - "default": "", - "x-example": null - }, - "timeout": { - "type": "integer", - "description": "Function maximum execution time in seconds.", - "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": 194, - "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": 195, - "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": 197, - "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.", - "default": null, - "x-example": null, - "items": { "type": "string" } - }, - "vars": { - "type": "object", - "description": "Key-value JSON object that will be passed to the function as environment variables.", - "default": [], - "x-example": "{}" - }, - "events": { - "type": "array", - "description": "Events list.", - "default": [], - "x-example": null, - "items": { "type": "string" } - }, - "schedule": { - "type": "string", - "description": "Schedule CRON syntax.", - "default": "", - "x-example": null - }, - "timeout": { - "type": "integer", - "description": "Maximum execution time in seconds.", - "default": 15, - "x-example": 1 - } - }, - "required": ["name", "execute"] - } - } - ] - }, - "delete": { - "summary": "Delete Function", - "operationId": "functionsDelete", - "consumes": ["application/json"], - "produces": [], - "tags": ["functions"], - "description": "Delete a function by its unique ID.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "delete", - "weight": 199, - "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": 201, - "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": 200, - "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": 202, - "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": 198, - "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": 203, - "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": 207, - "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": 205, - "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": 204, - "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": 206, - "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": 107, - "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": 118, - "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": 110, - "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": 109, - "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": 115, - "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": 116, - "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": 113, - "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/usage": { - "get": { - "summary": "Get Usage Queue", - "operationId": "healthGetQueueUsage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of usage stats that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { "$ref": "#/definitions/healthQueue" } - } - }, - "x-appwrite": { - "method": "getQueueUsage", - "weight": 114, - "cookies": false, - "type": "", - "demo": "health/get-queue-usage.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-usage.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": 112, - "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": 117, - "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": 111, - "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": 100, - "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": 104, - "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": 101, - "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": 102, - "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": 103, - "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": 105, - "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": 106, - "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": 151, - "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": 150, - "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": null - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions", - "default": [], - "x-example": null, - "items": { "type": "string" } - }, - "encryption": { - "type": "boolean", - "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", - "default": true, - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", - "default": true, - "x-example": false - } - }, - "required": ["bucketId", "name", "permission"] - } - } - ] - } - }, - "/storage/buckets/{bucketId}": { - "get": { - "summary": "Get Bucket", - "operationId": "storageGetBucket", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.", - "responses": { - "200": { - "description": "Bucket", - "schema": { "$ref": "#/definitions/bucket" } - } - }, - "x-appwrite": { - "method": "getBucket", - "weight": 152, - "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": 153, - "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": null - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions", - "default": [], - "x-example": null, - "items": { "type": "string" } - }, - "encryption": { - "type": "boolean", - "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", - "default": true, - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", - "default": true, - "x-example": false - } - }, - "required": ["name", "permission"] - } - } - ] - }, - "delete": { - "summary": "Delete Bucket", - "operationId": "storageDeleteBucket", - "consumes": ["application/json"], - "produces": [], - "tags": ["storage"], - "description": "Delete a storage bucket by its unique ID.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteBucket", - "weight": 154, - "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": 156, - "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": 155, - "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": 157, - "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": 161, - "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": 162, - "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": 159, - "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": 158, - "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": 160, - "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": 166, - "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": 165, - "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). Max length for each role is 32 chars.", - "default": ["owner"], - "x-example": null, - "items": { "type": "string" } - } - }, - "required": ["teamId", "name"] - } - } - ] - } - }, - "/teams/{teamId}": { - "get": { - "summary": "Get Team", - "operationId": "teamsGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Get a team by its ID. All team members have read access for this resource.", - "responses": { - "200": { - "description": "Team", - "schema": { "$ref": "#/definitions/team" } - } - }, - "x-appwrite": { - "method": "get", - "weight": 167, - "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": 168, - "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": 169, - "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": 171, - "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": 170, - "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). Max length for each role is 32 chars.", - "default": null, - "x-example": null, - "items": { "type": "string" } - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": null, - "x-example": "https://example.com" - }, - "name": { - "type": "string", - "description": "Name of the new team member. Max length: 128 chars.", - "default": "", - "x-example": "[NAME]" - } - }, - "required": ["email", "roles", "url"] - } - } - ] - } - }, - "/teams/{teamId}/memberships/{membershipId}": { - "get": { - "summary": "Get Team Membership", - "operationId": "teamsGetMembership", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Get a team member by the membership unique id. All team members have read access for this resource.", - "responses": { - "200": { - "description": "Memberships List", - "schema": { "$ref": "#/definitions/membershipList" } - } - }, - "x-appwrite": { - "method": "getMembership", - "weight": 172, - "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": 173, - "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). Max length for each role is 32 chars.", - "default": null, - "x-example": null, - "items": { "type": "string" } - } - }, - "required": ["roles"] - } - } - ] - }, - "delete": { - "summary": "Delete Team Membership", - "operationId": "teamsDeleteMembership", - "consumes": ["application/json"], - "produces": [], - "tags": ["teams"], - "description": "This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteMembership", - "weight": 175, - "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": 174, - "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": 177, - "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": 176, - "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": 178, - "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.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "delete", - "weight": 190, - "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": 186, - "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": 181, - "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}/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": 184, - "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": 185, - "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}/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": 179, - "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": 187, - "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": 180, - "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": 189, - "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": 188, - "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.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updateStatus", - "weight": 182, - "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": "usersUpdateVerification", - "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": "updateVerification", - "weight": 183, - "cookies": false, - "type": "", - "demo": "users/update-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-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"] - } - } - ] - } - } - }, - "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" - }, - "$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", - "$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" - }, - "$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", "$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" - }, - "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" - }, - "emailVerification": { - "type": "boolean", - "description": "Email 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", - "name", - "registration", - "status", - "passwordUpdate", - "email", - "emailVerification", - "prefs" - ] - }, - "preferences": { - "description": "Preferences", - "type": "object", - "additionalProperties": true - }, - "session": { - "description": "Session", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Session ID.", - "x-example": "5e5ea5c16897e" - }, - "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", - "userId", - "expire", - "provider", - "providerUid", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken", - "ip", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName", - "current" - ] - }, - "token": { - "description": "Token", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" - }, - "secret": { - "type": "string", - "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "expire": { - "type": "integer", - "description": "Token expiration date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - } - }, - "required": ["$id", "userId", "secret", "expire"] - }, - "locale": { - "description": "Locale", - "type": "object", - "properties": { - "ip": { - "type": "string", - "description": "User IP address.", - "x-example": "127.0.0.1" - }, - "countryCode": { - "type": "string", - "description": "Country code in [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) two-character format", - "x-example": "US" - }, - "country": { - "type": "string", - "description": "Country name. This field support localization.", - "x-example": "United States" - }, - "continentCode": { - "type": "string", - "description": "Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.", - "x-example": "NA" - }, - "continent": { - "type": "string", - "description": "Continent name. This field support localization.", - "x-example": "North America" - }, - "eu": { - "type": "boolean", - "description": "True if country is part of the Europian Union.", - "x-example": false - }, - "currency": { - "type": "string", - "description": "Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format", - "x-example": "USD" - } - }, - "required": [ - "ip", - "countryCode", - "country", - "continentCode", - "continent", - "eu", - "currency" - ] - }, - "file": { - "description": "File", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "File ID.", - "x-example": "5e5ea5c16897e" - }, - "bucketId": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$read": { - "type": "array", - "description": "File read permissions.", - "items": { "type": "string" }, - "x-example": "role:all" - }, - "$write": { - "type": "array", - "description": "File write permissions.", - "items": { "type": "string" }, - "x-example": "user:608f9da25e7e1" - }, - "name": { - "type": "string", - "description": "File name.", - "x-example": "Pink.png" - }, - "dateCreated": { - "type": "integer", - "description": "File creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "signature": { - "type": "string", - "description": "File MD5 signature.", - "x-example": "5d529fd02b544198ae075bd57c1762bb" - }, - "mimeType": { - "type": "string", - "description": "File mime type.", - "x-example": "image/png" - }, - "sizeOriginal": { - "type": "integer", - "description": "File original size in bytes.", - "x-example": 17890, - "format": "int32" - }, - "chunksTotal": { - "type": "integer", - "description": "Total number of chunks available", - "x-example": 17890, - "format": "int32" - }, - "chunksUploaded": { - "type": "integer", - "description": "Total number of chunks uploaded", - "x-example": 17890, - "format": "int32" - } - }, - "required": [ - "$id", - "bucketId", - "$read", - "$write", - "name", - "dateCreated", - "signature", - "mimeType", - "sizeOriginal", - "chunksTotal", - "chunksUploaded" - ] - }, - "bucket": { - "description": "Bucket", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$read": { - "type": "array", - "description": "File read permissions.", - "items": { "type": "string" }, - "x-example": ["role:all"] - }, - "$write": { - "type": "array", - "description": "File write permissions.", - "items": { "type": "string" }, - "x-example": ["user:608f9da25e7e1"] - }, - "permission": { - "type": "string", - "description": "Bucket permission model. Possible values: `bucket` or `file`", - "x-example": "file" - }, - "dateCreated": { - "type": "integer", - "description": "Bucket creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "dateUpdated": { - "type": "integer", - "description": "Bucket update date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "name": { - "type": "string", - "description": "Bucket name.", - "x-example": "Documents" - }, - "enabled": { - "type": "boolean", - "description": "Bucket enabled.", - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size supported.", - "x-example": 100, - "format": "int32" - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions.", - "items": { "type": "string" }, - "x-example": ["jpg", "png"] - }, - "encryption": { - "type": "boolean", - "description": "Bucket is encrypted.", - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Virus scanning is enabled.", - "x-example": false - } - }, - "required": [ - "$id", - "$read", - "$write", - "permission", - "dateCreated", - "dateUpdated", - "name", - "enabled", - "maximumFileSize", - "allowedFileExtensions", - "encryption", - "antivirus" - ] - }, - "team": { - "description": "Team", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "dateCreated": { - "type": "integer", - "description": "Team creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "total": { - "type": "integer", - "description": "Total number of team members.", - "x-example": 7, - "format": "int32" - } - }, - "required": ["$id", "name", "dateCreated", "total"] - }, - "membership": { - "description": "Membership", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Membership ID.", - "x-example": "5e5ea5c16897e" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "teamId": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "User name.", - "x-example": "VIP" - }, - "email": { - "type": "string", - "description": "User email address.", - "x-example": "john@appwrite.io" - }, - "invited": { - "type": "integer", - "description": "Date, the user has been invited to join the team in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "joined": { - "type": "integer", - "description": "Date, the user has accepted the invitation to join the team in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "confirm": { - "type": "boolean", - "description": "User confirmation status, true if the user has joined the team or false otherwise.", - "x-example": false - }, - "roles": { - "type": "array", - "description": "User list of roles", - "items": { "type": "string" }, - "x-example": "admin" - } - }, - "required": [ - "$id", - "userId", - "teamId", - "name", - "email", - "invited", - "joined", - "confirm", - "roles" - ] - }, - "function": { - "description": "Function", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea5c16897e" - }, - "execute": { - "type": "array", - "description": "Execution permissions.", - "items": { "type": "string" }, - "x-example": "role:member" - }, - "name": { - "type": "string", - "description": "Function name.", - "x-example": "My Function" - }, - "dateCreated": { - "type": "integer", - "description": "Function creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "dateUpdated": { - "type": "integer", - "description": "Function update date in Unix timestamp.", - "x-example": 1592981257, - "format": "int32" - }, - "status": { - "type": "string", - "description": "Function status. Possible values: `disabled`, `enabled`", - "x-example": "enabled" - }, - "runtime": { - "type": "string", - "description": "Function execution runtime.", - "x-example": "python-3.8" - }, - "deployment": { - "type": "string", - "description": "Function's active deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "vars": { - "type": "object", - "additionalProperties": true, - "description": "Function environment variables.", - "x-example": { "key": "value" } - }, - "events": { - "type": "array", - "description": "Function trigger events.", - "items": { "type": "string" }, - "x-example": "account.create" - }, - "schedule": { - "type": "string", - "description": "Function execution schedult in CRON format.", - "x-example": "5 4 * * *" - }, - "scheduleNext": { - "type": "integer", - "description": "Function next scheduled execution date in Unix timestamp.", - "x-example": 1592981292, - "format": "int32" - }, - "schedulePrevious": { - "type": "integer", - "description": "Function next scheduled execution date in Unix timestamp.", - "x-example": 1592981237, - "format": "int32" - }, - "timeout": { - "type": "integer", - "description": "Function execution timeout in seconds.", - "x-example": 1592981237, - "format": "int32" - } - }, - "required": [ - "$id", - "execute", - "name", - "dateCreated", - "dateUpdated", - "status", - "runtime", - "deployment", - "vars", - "events", - "schedule", - "scheduleNext", - "schedulePrevious", - "timeout" - ] - }, - "runtime": { - "description": "Runtime", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Runtime ID.", - "x-example": "python-3.8" - }, - "name": { - "type": "string", - "description": "Runtime Name.", - "x-example": "Python" - }, - "version": { - "type": "string", - "description": "Runtime version.", - "x-example": "3.8" - }, - "base": { - "type": "string", - "description": "Base Docker image used to build the runtime.", - "x-example": "python:3.8-alpine" - }, - "image": { - "type": "string", - "description": "Image name of Docker Hub.", - "x-example": "appwrite\\/runtime-for-python:3.8" - }, - "logo": { - "type": "string", - "description": "Name of the logo image.", - "x-example": "python.png" - }, - "supports": { - "type": "array", - "description": "List of supported architectures.", - "items": { "type": "string" }, - "x-example": "amd64" - } - }, - "required": [ - "$id", - "name", - "version", - "base", - "image", - "logo", - "supports" - ] - }, - "deployment": { - "description": "Deployment", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "resourceId": { - "type": "string", - "description": "Resource ID.", - "x-example": "5e5ea6g16897e" - }, - "resourceType": { - "type": "string", - "description": "Resource type.", - "x-example": "functions" - }, - "dateCreated": { - "type": "integer", - "description": "The deployment creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "entrypoint": { - "type": "string", - "description": "The entrypoint file to use to execute the deployment code.", - "x-example": "enabled" - }, - "size": { - "type": "integer", - "description": "The code size in bytes.", - "x-example": 128, - "format": "int32" - }, - "buildId": { - "type": "string", - "description": "The current build ID.", - "x-example": "5e5ea5c16897e" - }, - "activate": { - "type": "boolean", - "description": "Whether the deployment should be automatically activated.", - "x-example": true - }, - "status": { - "type": "string", - "description": "The deployment status.", - "x-example": "enabled" - }, - "buildStdout": { - "type": "string", - "description": "The build stdout.", - "x-example": "enabled" - }, - "buildStderr": { - "type": "string", - "description": "The build stderr.", - "x-example": "enabled" - } - }, - "required": [ - "$id", - "resourceId", - "resourceType", - "dateCreated", - "entrypoint", - "size", - "buildId", - "activate", - "status", - "buildStdout", - "buildStderr" - ] - }, - "execution": { - "description": "Execution", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Execution ID.", - "x-example": "5e5ea5c16897e" - }, - "$read": { - "type": "array", - "description": "Execution read permissions.", - "items": { "type": "string" }, - "x-example": "role:all" - }, - "functionId": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea6g16897e" - }, - "dateCreated": { - "type": "integer", - "description": "The execution creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "trigger": { - "type": "string", - "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" - }, - "status": { - "type": "string", - "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" - }, - "statusCode": { - "type": "integer", - "description": "The script status code.", - "x-example": 0, - "format": "int32" - }, - "stdout": { - "type": "string", - "description": "The script stdout output string. Logs the last 4,000 characters of the execution stdout output.", - "x-example": "" - }, - "stderr": { - "type": "string", - "description": "The script stderr output string. Logs the last 4,000 characters of the execution stderr output", - "x-example": "" - }, - "time": { - "type": "number", - "description": "The script execution time in seconds.", - "x-example": 0.4, - "format": "double" - } - }, - "required": [ - "$id", - "$read", - "functionId", - "dateCreated", - "trigger", - "status", - "statusCode", - "stdout", - "stderr", - "time" - ] - }, - "country": { - "description": "Country", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - }, - "code": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - } - }, - "required": ["name", "code"] - }, - "continent": { - "description": "Continent", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Continent name.", - "x-example": "Europe" - }, - "code": { - "type": "string", - "description": "Continent two letter code.", - "x-example": "EU" - } - }, - "required": ["name", "code"] - }, - "language": { - "description": "Language", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Language name.", - "x-example": "Italian" - }, - "code": { - "type": "string", - "description": "Language two-character ISO 639-1 codes.", - "x-example": "it" - }, - "nativeName": { - "type": "string", - "description": "Language native name.", - "x-example": "Italiano" - } - }, - "required": ["name", "code", "nativeName"] - }, - "currency": { - "description": "Currency", - "type": "object", - "properties": { - "symbol": { - "type": "string", - "description": "Currency symbol.", - "x-example": "$" - }, - "name": { - "type": "string", - "description": "Currency name.", - "x-example": "US dollar" - }, - "symbolNative": { - "type": "string", - "description": "Currency native symbol.", - "x-example": "$" - }, - "decimalDigits": { - "type": "integer", - "description": "Number of decimal digits.", - "x-example": 2, - "format": "int32" - }, - "rounding": { - "type": "number", - "description": "Currency digit rounding.", - "x-example": 0, - "format": "double" - }, - "code": { - "type": "string", - "description": "Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format.", - "x-example": "USD" - }, - "namePlural": { - "type": "string", - "description": "Currency plural name", - "x-example": "US dollars" - } - }, - "required": [ - "symbol", - "name", - "symbolNative", - "decimalDigits", - "rounding", - "code", - "namePlural" - ] - }, - "phone": { - "description": "Phone", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Phone code.", - "x-example": "+1" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": ["code", "countryCode", "countryName"] - }, - "healthAntivirus": { - "description": "Health Antivirus", - "type": "object", - "properties": { - "version": { - "type": "string", - "description": "Antivirus version.", - "x-example": "1.0.0" - }, - "status": { - "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" - } - }, - "required": ["version", "status"] - }, - "healthQueue": { - "description": "Health Queue", - "type": "object", - "properties": { - "size": { - "type": "integer", - "description": "Amount of actions in the queue.", - "x-example": 8, - "format": "int32" - } - }, - "required": ["size"] - }, - "healthStatus": { - "description": "Health Status", - "type": "object", - "properties": { - "ping": { - "type": "integer", - "description": "Duration in milliseconds how long the health check took.", - "x-example": 128, - "format": "int32" - }, - "status": { - "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" - } - }, - "required": ["ping", "status"] - }, - "healthTime": { - "description": "Health Time", - "type": "object", - "properties": { - "remoteTime": { - "type": "integer", - "description": "Current unix timestamp on trustful remote server.", - "x-example": 1639490751, - "format": "int32" - }, - "localTime": { - "type": "integer", - "description": "Current unix timestamp of local server where Appwrite runs.", - "x-example": 1639490844, - "format": "int32" - }, - "diff": { - "type": "integer", - "description": "Difference of unix remote and local timestamps in milliseconds.", - "x-example": 93, - "format": "int32" - } - }, - "required": ["remoteTime", "localTime", "diff"] - } - }, - "externalDocs": { - "description": "Full API docs, specs and tutorials", - "url": "https://appwrite.io/docs" - } -} +{"swagger":"2.0","info":{"version":"0.14.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":49,"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":56,"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":52,"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":54,"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":55,"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\/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":50,"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":57,"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":62,"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":63,"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":51,"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":61,"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":53,"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":60,"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":59,"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":58,"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#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":64,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-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":65,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-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"]}}]}},"\/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":67,"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":66,"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":70,"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":68,"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":69,"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":72,"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":71,"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":74,"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":73,"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":75,"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":79,"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":80,"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":89,"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":88,"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":82,"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":83,"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":87,"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":86,"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":84,"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":81,"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":85,"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":90,"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":91,"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":97,"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":96,"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":98,"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":100,"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":101,"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":93,"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":92,"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":94,"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":95,"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":196,"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":195,"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":197,"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":198,"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":200,"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":202,"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":204,"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":203,"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":205,"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":201,"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":206,"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":210,"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":208,"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":207,"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":209,"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":109,"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":119,"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":112,"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":111,"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":116,"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":117,"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":115,"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":114,"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":118,"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":113,"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":102,"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":106,"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":103,"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":104,"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":105,"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":107,"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":108,"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":152,"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":151,"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":153,"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":154,"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":155,"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":157,"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":156,"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":158,"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":162,"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":163,"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":160,"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":159,"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":161,"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":167,"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":166,"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":168,"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":169,"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":170,"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":172,"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":171,"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":173,"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":174,"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":176,"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":175,"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":179,"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":178,"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":180,"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":193,"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":189,"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":184,"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":183,"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":187,"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":188,"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}\/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":181,"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":190,"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":182,"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":192,"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":191,"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":185,"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":"usersUpdateVerification","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":"updateVerification","weight":186,"cookies":false,"type":"","demo":"users\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-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"]}}]}}},"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"},"$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","$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"},"$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","$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"},"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"},"emailVerification":{"type":"boolean","description":"Email 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","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"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","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the Europian Union.","x-example":false},"currency":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format","x-example":"USD"}},"required":["ip","countryCode","country","continentCode","continent","eu","currency"]},"file":{"description":"File","type":"object","properties":{"$id":{"type":"string","description":"File ID.","x-example":"5e5ea5c16897e"},"bucketId":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":["role:all"]},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":["user:608f9da25e7e1"]},"permission":{"type":"string","description":"Bucket permission model. Possible values: `bucket` or `file`","x-example":"file"},"dateCreated":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Bucket name.","x-example":"Documents"},"enabled":{"type":"boolean","description":"Bucket enabled.","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size supported.","x-example":100,"format":"int32"},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions.","items":{"type":"string"},"x-example":["jpg","png"]},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$read","$write","permission","dateCreated","dateUpdated","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"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","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"dateCreated":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981257,"format":"int32"},"status":{"type":"string","description":"Function status. Possible values: `disabled`, `enabled`","x-example":"enabled"},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"object","additionalProperties":true,"description":"Function environment variables.","x-example":{"key":"value"}},"events":{"type":"array","description":"Function trigger events.","items":{"type":"string"},"x-example":"account.create"},"schedule":{"type":"string","description":"Function execution schedult in CRON format.","x-example":"5 4 * * *"},"scheduleNext":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981292,"format":"int32"},"schedulePrevious":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981237,"format":"int32"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","execute","name","dateCreated","dateUpdated","status","runtime","deployment","vars","events","schedule","scheduleNext","schedulePrevious","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"dateCreated":{"type":"integer","description":"The deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status.","x-example":"enabled"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"}},"required":["$id","resourceId","resourceType","dateCreated","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"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","$read","functionId","dateCreated","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/variables.php b/app/config/variables.php index 5449c9ba93..49f2d7cfee 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -1,7 +1,6 @@ 'General', diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 56bcf1a3e7..29d0ccc8a5 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -23,7 +23,6 @@ use Utopia\Database\Validator\UID; use Appwrite\Extend\Exception; use Utopia\Validator\ArrayList; use Utopia\Validator\Assoc; -use Utopia\Validator\Boolean; use Utopia\Validator\Range; use Utopia\Validator\Text; use Utopia\Validator\WhiteList; @@ -34,7 +33,7 @@ $oauthDefaultFailure = '/v1/auth/oauth2/failure'; App::post('/v1/account') ->desc('Create Account') ->groups(['api', 'account', 'auth']) - ->label('event', 'account.create') + ->label('event', 'users.[userId].create') ->label('scope', 'public') ->label('auth.type', 'emailPassword') ->label('sdk.auth', []) @@ -55,13 +54,15 @@ App::post('/v1/account') ->inject('dbForProject') ->inject('audits') ->inject('usage') - ->action(function ($userId, $email, $password, $name, $request, $response, $project, $dbForProject, $audits, $usage) { + ->inject('events') + ->action(function ($userId, $email, $password, $name, $request, $response, $project, $dbForProject, $audits, $usage, $events) { /** @var Appwrite\Utopia\Request $request */ /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Document $project */ /** @var Utopia\Database\Database $dbForProject */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ + /** @var Appwrite\Event\Event $events */ $email = \strtolower($email); if ('console' === $project->getId()) { @@ -80,9 +81,7 @@ App::post('/v1/account') $limit = $project->getAttribute('auths', [])['limit'] ?? 0; if ($limit !== 0) { - $total = $dbForProject->count('users', [ - new Query('deleted', Query::TYPE_EQUAL, [false]), - ], APP_LIMIT_USERS); + $total = $dbForProject->count('users', max: APP_LIMIT_USERS); if ($total >= $limit) { throw new Exception('Project registration is restricted. Contact your administrator for more information.', 501, Exception::USER_COUNT_EXCEEDED); @@ -104,11 +103,10 @@ App::post('/v1/account') 'reset' => false, 'name' => $name, 'prefs' => new \stdClass(), - 'sessions' => [], + 'sessions' => null, 'tokens' => null, 'memberships' => null, - 'search' => implode(' ', [$userId, $email, $name]), - 'deleted' => false + 'search' => implode(' ', [$userId, $email, $name]) ]))); } catch (Duplicate $th) { throw new Exception('Account already exists', 409, Exception::USER_ALREADY_EXISTS); @@ -119,14 +117,13 @@ App::post('/v1/account') Authorization::setRole('role:' . Auth::USER_ROLE_MEMBER); $audits - ->setParam('userId', $user->getId()) - ->setParam('event', 'account.create') - ->setParam('resource', 'user/' . $user->getId()) + ->setResource('user/'.$user->getId()) + ->setUser($user) ; - $usage - ->setParam('users.create', 1) - ; + $usage->setParam('users.create', 1); + $events->setParam('userId', $user->getId()); + $response->setStatusCode(Response::STATUS_CODE_CREATED); $response->dynamic($user, Response::MODEL_USER); }); @@ -134,7 +131,7 @@ App::post('/v1/account') App::post('/v1/account/sessions') ->desc('Create Account Session') ->groups(['api', 'account', 'auth']) - ->label('event', 'account.sessions.create') + ->label('event', 'users.[userId].sessions.[sessionId].create') ->label('scope', 'public') ->label('auth.type', 'emailPassword') ->label('sdk.auth', []) @@ -155,27 +152,25 @@ App::post('/v1/account/sessions') ->inject('geodb') ->inject('audits') ->inject('usage') - ->action(function ($email, $password, $request, $response, $dbForProject, $locale, $geodb, $audits, $usage) { + ->inject('events') + ->action(function ($email, $password, $request, $response, $dbForProject, $locale, $geodb, $audits, $usage, $events) { /** @var Appwrite\Utopia\Request $request */ /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ /** @var Utopia\Locale\Locale $locale */ /** @var MaxMind\Db\Reader $geodb */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ + /** @var Appwrite\Event\Event $events */ $email = \strtolower($email); $protocol = $request->getProtocol(); - $profile = $dbForProject->findOne('users', [new Query('deleted', Query::TYPE_EQUAL, [false]), new Query('email', Query::TYPE_EQUAL, [$email])]); // Get user by email address + $profile = $dbForProject->findOne('users', [ + new Query('email', Query::TYPE_EQUAL, [$email])] + ); if (!$profile || !Auth::passwordVerify($password, $profile->getAttribute('password'))) { - $audits - //->setParam('userId', $profile->getId()) - ->setParam('event', 'account.sessions.failed') - ->setParam('resource', 'user/'.($profile ? $profile->getId() : '')) - ; - throw new Exception('Invalid credentials', 401, Exception::USER_INVALID_CREDENTIALS); // Wrong password or username } @@ -208,15 +203,11 @@ App::post('/v1/account/sessions') ->setAttribute('$write', ['user:' . $profile->getId()]) ); - $profile->setAttribute('sessions', $session, Document::SET_TYPE_APPEND); - $profile = $dbForProject->updateDocument('users', $profile->getId(), $profile); + $dbForProject->deleteCachedDocument('users', $profile->getId()); $audits - ->setParam('userId', $profile->getId()) - ->setParam('event', 'account.sessions.create') - ->setParam('resource', 'user/' . $profile->getId()) - ->setParam('userEmail', $profile->getAttribute('email', '')) - ->setParam('userName', $profile->getAttribute('name', '')) + ->setResource('user/'.$profile->getId()) + ->setUser($profile) ; if (!Config::getParam('domainVerification')) { @@ -243,6 +234,12 @@ App::post('/v1/account/sessions') ->setParam('users.sessions.create', 1) ->setParam('provider', 'email') ; + + $events + ->setParam('userId', $profile->getId()) + ->setParam('sessionId', $session->getId()) + ; + $response->dynamic($session, Response::MODEL_SESSION); }); @@ -365,7 +362,7 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') ->desc('OAuth2 Redirect') ->groups(['api', 'account']) ->label('error', __DIR__ . '/../../views/general/error.phtml') - ->label('event', 'account.sessions.create') + ->label('event', 'users.[userId].sessions.[sessionId].create') ->label('scope', 'public') ->label('abuse-limit', 50) ->label('abuse-key', 'ip:{ip}') @@ -389,7 +386,8 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') /** @var Utopia\Database\Document $user */ /** @var Utopia\Database\Database $dbForProject */ /** @var MaxMind\Db\Reader $geodb */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ + /** @var Appwrite\Event\Event $events */ /** @var Appwrite\Stats\Stats $usage */ $protocol = $request->getProtocol(); @@ -458,13 +456,10 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') $current = Auth::sessionVerify($sessions, Auth::$secret); if ($current) { // Delete current session of new one. - foreach ($sessions as $key => $session) {/** @var Document $session */ - if ($current === $session['$id']) { - unset($sessions[$key]); - - $dbForProject->deleteDocument('sessions', $session->getId()); - $dbForProject->updateDocument('users', $user->getId(), $user->setAttribute('sessions', $sessions)); - } + $currentDocument = $dbForProject->getDocument('sessions', $current); + if(!$currentDocument->isEmpty()) { + $dbForProject->deleteDocument('sessions', $currentDocument->getId()); + $dbForProject->deleteCachedDocument('users', $user->getId()); } } @@ -477,13 +472,20 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') $name = $oauth2->getUserName($accessToken); $email = $oauth2->getUserEmail($accessToken); - $user = $dbForProject->findOne('users', [new Query('deleted', Query::TYPE_EQUAL, [false]), new Query('email', Query::TYPE_EQUAL, [$email])]); // Get user by email address + /** + * Is verified is not used yet, since we don't know after an accout is created anymore if it was verified or not. + */ + $isVerified = $oauth2->isEmailVerified($accessToken); + + $user = $dbForProject->findOne('users', [ + new Query('email', Query::TYPE_EQUAL, [$email])] + ); if ($user === false || $user->isEmpty()) { // Last option -> create the user, generate random password $limit = $project->getAttribute('auths', [])['limit'] ?? 0; if ($limit !== 0) { - $total = $dbForProject->count('users', [ new Query('deleted', Query::TYPE_EQUAL, [false]),], APP_LIMIT_USERS); + $total = $dbForProject->count('users', max: APP_LIMIT_USERS); if ($total >= $limit) { throw new Exception('Project registration is restricted. Contact your administrator for more information.', 501, Exception::USER_COUNT_EXCEEDED); @@ -505,11 +507,10 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') 'reset' => false, 'name' => $name, 'prefs' => new \stdClass(), - 'sessions' => [], + 'sessions' => null, 'tokens' => null, 'memberships' => null, - 'search' => implode(' ', [$userId, $email, $name]), - 'deleted' => false + 'search' => implode(' ', [$userId, $email, $name]) ]))); } catch (Duplicate $th) { throw new Exception('Account already exists', 409, Exception::USER_ALREADY_EXISTS); @@ -522,7 +523,6 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') } // Create session token, verify user account and update OAuth2 ID and Access Token - $detector = new Detector($request->getUserAgent('UNKNOWN')); $record = $geodb->get($request->getIP()); $secret = Auth::tokenGenerator(); @@ -553,36 +553,38 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') $user ->setAttribute('status', true) - ->setAttribute('sessions', $session, Document::SET_TYPE_APPEND) ; Authorization::setRole('user:' . $user->getId()); + $dbForProject->updateDocument('users', $user->getId(), $user); + $session = $dbForProject->createDocument('sessions', $session ->setAttribute('$read', ['user:' . $user->getId()]) ->setAttribute('$write', ['user:' . $user->getId()]) ); - $user = $dbForProject->updateDocument('users', $user->getId(), $user); + $dbForProject->deleteCachedDocument('users', $user->getId()); $audits - ->setParam('userId', $user->getId()) - ->setParam('event', 'account.sessions.create') - ->setParam('resource', 'user/' . $user->getId()) - ->setParam('data', ['provider' => $provider]) + ->setResource('user/'.$user->getId()) + ->setUser($user) ; - $events->setParam('eventData', $response->output($session, Response::MODEL_SESSION)); - $usage ->setParam('users.sessions.create', 1) ->setParam('projectId', $project->getId()) ->setParam('provider', 'oauth2-'.$provider) ; + + $events + ->setParam('userId', $user->getId()) + ->setParam('sessionId', $session->getId()) + ->setPayload($response->output($session, Response::MODEL_SESSION)) + ; + if (!Config::getParam('domainVerification')) { - $response - ->addHeader('X-Fallback-Cookies', \json_encode([Auth::$cookieName => Auth::encodeSession($user->getId(), $secret)])) - ; + $response->addHeader('X-Fallback-Cookies', \json_encode([Auth::$cookieName => Auth::encodeSession($user->getId(), $secret)])); } // Add keys for non-web platforms - TODO - add verification phase to aviod session sniffing @@ -638,9 +640,9 @@ App::post('/v1/account/sessions/magic-url') /** @var Utopia\Database\Document $project */ /** @var Utopia\Database\Database $dbForProject */ /** @var Utopia\Locale\Locale $locale */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Event\Event $events */ - /** @var Appwrite\Event\Event $mails */ + /** @var Appwrite\Event\Mail $mails */ if(empty(App::getEnv('_APP_SMTP_HOST'))) { throw new Exception('SMTP Disabled', 503, Exception::GENERAL_SMTP_DISABLED); @@ -656,9 +658,7 @@ App::post('/v1/account/sessions/magic-url') $limit = $project->getAttribute('auths', [])['limit'] ?? 0; if ($limit !== 0) { - $total = $dbForProject->count('users', [ - new Query('deleted', Query::TYPE_EQUAL, [false]), - ], APP_LIMIT_USERS); + $total = $dbForProject->count('users', max: APP_LIMIT_USERS); if ($total >= $limit) { throw new Exception('Project registration is restricted. Contact your administrator for more information.', 501, Exception::USER_COUNT_EXCEEDED); @@ -679,15 +679,11 @@ App::post('/v1/account/sessions/magic-url') 'registration' => \time(), 'reset' => false, 'prefs' => new \stdClass(), - 'sessions' => [], + 'sessions' => null, 'tokens' => null, 'memberships' => null, - 'search' => implode(' ', [$userId, $email]), - 'deleted' => false + 'search' => implode(' ', [$userId, $email]) ]))); - - $mails->setParam('event', 'users.create'); - $audits->setParam('event', 'users.create'); } $loginSecret = Auth::tokenGenerator(); @@ -722,29 +718,26 @@ App::post('/v1/account/sessions/magic-url') $url = Template::unParseURL($url); $mails - ->setParam('from', $project->getId()) - ->setParam('recipient', $user->getAttribute('email')) - ->setParam('url', $url) - ->setParam('locale', $locale->default) - ->setParam('project', $project->getAttribute('name', ['[APP-NAME]'])) - ->setParam('type', MAIL_TYPE_MAGIC_SESSION) + ->setType(MAIL_TYPE_MAGIC_SESSION) + ->setRecipient($user->getAttribute('email')) + ->setUrl($url) + ->setLocale($locale->default) ->trigger() ; - $events - ->setParam('eventData', - $response->output($token->setAttribute('secret', $loginSecret), + $events->setPayload( + $response->output( + $token->setAttribute('secret', $loginSecret), Response::MODEL_TOKEN - )) - ; + ) + ); - $token // Hide secret for clients - ->setAttribute('secret', - ($isPrivilegedUser || $isAppUser) ? $loginSecret : ''); + // Hide secret for clients + $token->setAttribute('secret', ($isPrivilegedUser || $isAppUser) ? $loginSecret : ''); $audits - ->setParam('userId', $user->getId()) - ->setParam('resource', 'users/'.$user->getId()) + ->setResource('user/'.$user->getId()) + ->setUser($user) ; $response @@ -757,7 +750,7 @@ App::put('/v1/account/sessions/magic-url') ->desc('Create Magic URL session (confirmation)') ->groups(['api', 'account']) ->label('scope', 'public') - ->label('event', 'account.sessions.create') + ->label('event', 'users.[userId].sessions.[sessionId].create') ->label('sdk.auth', []) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updateMagicURLSession') @@ -775,7 +768,8 @@ App::put('/v1/account/sessions/magic-url') ->inject('locale') ->inject('geodb') ->inject('audits') - ->action(function ($userId, $secret, $request, $response, $dbForProject, $locale, $geodb, $audits) { + ->inject('events') + ->action(function ($userId, $secret, $request, $response, $dbForProject, $locale, $geodb, $audits, $events) { /** @var string $userId */ /** @var string $secret */ /** @var Appwrite\Utopia\Request $request */ @@ -783,11 +777,12 @@ App::put('/v1/account/sessions/magic-url') /** @var Utopia\Database\Database $dbForProject */ /** @var Utopia\Locale\Locale $locale */ /** @var MaxMind\Db\Reader $geodb */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ + /** @var Appwrite\Event\Event $events */ $user = Authorization::skip(fn() => $dbForProject->getDocument('users', $userId)); - if ($user->isEmpty() || $user->getAttribute('deleted')) { + if ($user->isEmpty()) { throw new Exception('User not found', 404, Exception::USER_NOT_FOUND); } @@ -824,6 +819,10 @@ App::put('/v1/account/sessions/magic-url') ->setAttribute('$write', ['user:' . $user->getId()]) ); + $dbForProject->deleteCachedDocument('users', $user->getId()); + + $tokens = $user->getAttribute('tokens', []); + /** * We act like we're updating and validating * the recovery token but actually we don't need it anymore. @@ -831,22 +830,23 @@ App::put('/v1/account/sessions/magic-url') $dbForProject->deleteDocument('tokens', $token); $dbForProject->deleteCachedDocument('users', $user->getId()); - $user = $dbForProject->updateDocument('users', $user->getId(), $user->setAttribute('sessions', $session, Document::SET_TYPE_APPEND)); + $user->setAttribute('emailVerification', true); + + $user = $dbForProject->updateDocument('users', $user->getId(), $user); if (false === $user) { throw new Exception('Failed saving user to DB', 500, Exception::GENERAL_SERVER_ERROR); } - $audits + $audits->setResource('user/'.$user->getId()); + + $events ->setParam('userId', $user->getId()) - ->setParam('event', 'account.sessions.create') - ->setParam('resource', 'users/'.$user->getId()) + ->setParam('sessionId', $session->getId()) ; if (!Config::getParam('domainVerification')) { - $response - ->addHeader('X-Fallback-Cookies', \json_encode([Auth::$cookieName => Auth::encodeSession($user->getId(), $secret)])) - ; + $response->addHeader('X-Fallback-Cookies', \json_encode([Auth::$cookieName => Auth::encodeSession($user->getId(), $secret)])); } $protocol = $request->getProtocol(); @@ -857,9 +857,7 @@ App::put('/v1/account/sessions/magic-url') ->setStatusCode(Response::STATUS_CODE_CREATED) ; - $countryName = (isset($countries[strtoupper($session->getAttribute('countryCode'))])) - ? $countries[strtoupper($session->getAttribute('countryCode'))] - : $locale->getText('locale.country.unknown'); + $countryName = $locale->getText('countries.'.strtolower($session->getAttribute('countryCode')), $locale->getText('locale.country.unknown')); $session ->setAttribute('current', true) @@ -872,7 +870,7 @@ App::put('/v1/account/sessions/magic-url') App::post('/v1/account/sessions/anonymous') ->desc('Create Anonymous Session') ->groups(['api', 'account', 'auth']) - ->label('event', 'account.sessions.create') + ->label('event', 'users.[userId].sessions.[sessionId].create') ->label('scope', 'public') ->label('auth.type', 'anonymous') ->label('sdk.auth', []) @@ -893,7 +891,8 @@ App::post('/v1/account/sessions/anonymous') ->inject('geodb') ->inject('audits') ->inject('usage') - ->action(function ($request, $response, $locale, $user, $project, $dbForProject, $geodb, $audits, $usage) { + ->inject('events') + ->action(function ($request, $response, $locale, $user, $project, $dbForProject, $geodb, $audits, $usage, $events) { /** @var Appwrite\Utopia\Request $request */ /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Locale\Locale $locale */ @@ -901,8 +900,9 @@ App::post('/v1/account/sessions/anonymous') /** @var Utopia\Database\Document $project */ /** @var Utopia\Database\Database $dbForProject */ /** @var MaxMind\Db\Reader $geodb */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ + /** @var Appwrite\Stats\Stats $events */ $protocol = $request->getProtocol(); @@ -917,9 +917,7 @@ App::post('/v1/account/sessions/anonymous') $limit = $project->getAttribute('auths', [])['limit'] ?? 0; if ($limit !== 0) { - $total = $dbForProject->count('users', [ - new Query('deleted', Query::TYPE_EQUAL, [false]), - ], APP_LIMIT_USERS); + $total = $dbForProject->count('users', max: APP_LIMIT_USERS); if ($total >= $limit) { throw new Exception('Project registration is restricted. Contact your administrator for more information.', 501, Exception::USER_COUNT_EXCEEDED); @@ -940,11 +938,10 @@ App::post('/v1/account/sessions/anonymous') 'reset' => false, 'name' => null, 'prefs' => new \stdClass(), - 'sessions' => [], + 'sessions' => null, 'tokens' => null, 'memberships' => null, - 'search' => $userId, - 'deleted' => false + 'search' => $userId ]))); // Create session token @@ -976,24 +973,22 @@ App::post('/v1/account/sessions/anonymous') ->setAttribute('$write', ['user:' . $user->getId()]) ); - $user = $dbForProject->updateDocument('users', $user->getId(), - $user->setAttribute('sessions', $session, Document::SET_TYPE_APPEND)); + $dbForProject->deleteCachedDocument('users', $user->getId()); - $audits - ->setParam('userId', $user->getId()) - ->setParam('event', 'account.sessions.create') - ->setParam('resource', 'user/' . $user->getId()) - ; + $audits->setResource('user/'.$user->getId()); $usage ->setParam('users.sessions.create', 1) ->setParam('provider', 'anonymous') ; + $events + ->setParam('userId', $user->getId()) + ->setParam('sessionId', $session->getId()) + ; + if (!Config::getParam('domainVerification')) { - $response - ->addHeader('X-Fallback-Cookies', \json_encode([Auth::$cookieName => Auth::encodeSession($user->getId(), $secret)])) - ; + $response->addHeader('X-Fallback-Cookies', \json_encode([Auth::$cookieName => Auth::encodeSession($user->getId(), $secret)])); } $response @@ -1002,9 +997,7 @@ App::post('/v1/account/sessions/anonymous') ->setStatusCode(Response::STATUS_CODE_CREATED) ; - $countryName = (isset($countries[strtoupper($session->getAttribute('countryCode'))])) - ? $countries[strtoupper($session->getAttribute('countryCode'))] - : $locale->getText('locale.country.unknown'); + $countryName = $locale->getText('countries.'.strtolower($session->getAttribute('countryCode')), $locale->getText('locale.country.unknown')); $session ->setAttribute('current', true) @@ -1030,16 +1023,17 @@ App::post('/v1/account/jwt') ->label('abuse-key', 'url:{url},userId:{userId}') ->inject('response') ->inject('user') - ->action(function ($response, $user) { + ->inject('dbForProject') + ->action(function ($response, $user, $dbForProject) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Document $user */ + /** @var Utopia\Database\Database $dbForProject */ + $sessions = $user->getAttribute('sessions', []); $current = new Document(); - foreach ($sessions as $session) { - /** @var Utopia\Database\Document $session */ - + foreach ($sessions as $session) { /** @var Utopia\Database\Document $session */ if ($session->getAttribute('secret') == Auth::hash(Auth::$secret)) { // If current session delete the cookies too $current = $session; } @@ -1081,9 +1075,8 @@ App::get('/v1/account') /** @var Utopia\Database\Document $user */ /** @var Appwrite\Stats\Stats $usage */ - $usage - ->setParam('users.read', 1) - ; + $usage->setParam('users.read', 1); + $response->dynamic($user, Response::MODEL_USER); }); @@ -1108,9 +1101,8 @@ App::get('/v1/account/prefs') $prefs = $user->getAttribute('prefs', new \stdClass()); - $usage - ->setParam('users.read', 1) - ; + $usage->setParam('users.read', 1); + $response->dynamic(new Document($prefs), Response::MODEL_PREFERENCES); }); @@ -1147,9 +1139,8 @@ App::get('/v1/account/sessions') $sessions[$key] = $session; } - $usage - ->setParam('users.read', 1) - ; + $usage->setParam('users.read', 1); + $response->dynamic(new Document([ 'sessions' => $sessions, 'total' => count($sessions), @@ -1185,26 +1176,8 @@ App::get('/v1/account/logs') /** @var Appwrite\Stats\Stats $usage */ $audit = new Audit($dbForProject); - $auditEvents = [ - 'account.create', - 'account.delete', - 'account.update.name', - 'account.update.email', - 'account.update.password', - 'account.update.prefs', - 'account.sessions.create', - 'account.sessions.update', - 'account.sessions.delete', - 'account.recovery.create', - 'account.recovery.update', - 'account.verification.create', - 'account.verification.update', - 'teams.membership.create', - 'teams.membership.update', - 'teams.membership.delete', - ]; - $logs = $audit->getLogsByUserAndEvents($user->getId(), $auditEvents, $limit, $offset); + $logs = $audit->getLogsByUser($user->getId(), $limit, $offset); $output = []; @@ -1233,12 +1206,10 @@ App::get('/v1/account/logs') } - $usage - ->setParam('users.read', 1) - ; + $usage->setParam('users.read', 1); $response->dynamic(new Document([ - 'total' => $audit->countLogsByUserAndEvents($user->getId(), $auditEvents), + 'total' => $audit->countLogsByUser($user->getId()), 'logs' => $output, ]), Response::MODEL_LOG_LIST); }); @@ -1269,24 +1240,19 @@ App::get('/v1/account/sessions/:sessionId') $sessions = $user->getAttribute('sessions', []); $sessionId = ($sessionId === 'current') - ? Auth::sessionVerify($user->getAttribute('sessions'), Auth::$secret) - : $sessionId; + ? Auth::sessionVerify($user->getAttribute('sessions'), Auth::$secret) + : $sessionId; foreach ($sessions as $session) {/** @var Document $session */ if ($sessionId == $session->getId()) { - - $countryName = (isset($countries[strtoupper($session->getAttribute('countryCode'))])) - ? $countries[strtoupper($session->getAttribute('countryCode'))] - : $locale->getText('locale.country.unknown'); + $countryName = $locale->getText('countries.'.strtolower($session->getAttribute('countryCode')), $locale->getText('locale.country.unknown')); $session ->setAttribute('current', ($session->getAttribute('secret') == Auth::hash(Auth::$secret))) ->setAttribute('countryName', $countryName) ; - $usage - ->setParam('users.read', 1) - ; + $usage->setParam('users.read', 1); return $response->dynamic($session, Response::MODEL_SESSION); } @@ -1298,7 +1264,7 @@ App::get('/v1/account/sessions/:sessionId') App::patch('/v1/account/name') ->desc('Update Account Name') ->groups(['api', 'account']) - ->label('event', 'account.update.name') + ->label('event', 'users.[userId].update.name') ->label('scope', 'account') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') @@ -1313,12 +1279,14 @@ App::patch('/v1/account/name') ->inject('dbForProject') ->inject('audits') ->inject('usage') - ->action(function ($name, $response, $user, $dbForProject, $audits, $usage) { + ->inject('events') + ->action(function ($name, $response, $user, $dbForProject, $audits, $usage, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Document $user */ /** @var Utopia\Database\Database $dbForProject */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ + /** @var Appwrite\Stats\Stats $events */ $user = $dbForProject->updateDocument('users', $user->getId(), $user ->setAttribute('name', $name) @@ -1326,14 +1294,12 @@ App::patch('/v1/account/name') ); $audits - ->setParam('userId', $user->getId()) - ->setParam('event', 'account.update.name') - ->setParam('resource', 'user/' . $user->getId()) + ->setResource('user/'.$user->getId()) + ->setUser($user) ; - $usage - ->setParam('users.update', 1) - ; + $usage->setParam('users.update', 1); + $events->setParam('userId', $user->getId()); $response->dynamic($user, Response::MODEL_USER); }); @@ -1341,7 +1307,7 @@ App::patch('/v1/account/name') App::patch('/v1/account/password') ->desc('Update Account Password') ->groups(['api', 'account']) - ->label('event', 'account.update.password') + ->label('event', 'users.[userId].update.password') ->label('scope', 'account') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') @@ -1357,39 +1323,43 @@ App::patch('/v1/account/password') ->inject('dbForProject') ->inject('audits') ->inject('usage') - ->action(function ($password, $oldPassword, $response, $user, $dbForProject, $audits, $usage) { + ->inject('events') + ->action(function ($password, $oldPassword, $response, $user, $dbForProject, $audits, $usage, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Document $user */ /** @var Utopia\Database\Database $dbForProject */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ + /** @var Appwrite\Stats\Stats $events */ // Check old password only if its an existing user. if ($user->getAttribute('passwordUpdate') !== 0 && !Auth::passwordVerify($oldPassword, $user->getAttribute('password'))) { // Double check user password throw new Exception('Invalid credentials', 401, Exception::USER_INVALID_CREDENTIALS); } - $user = $dbForProject->updateDocument('users', $user->getId(), $user + $user = $dbForProject->updateDocument( + 'users', + $user->getId(), + $user ->setAttribute('password', Auth::passwordHash($password)) ->setAttribute('passwordUpdate', \time()) ); $audits - ->setParam('userId', $user->getId()) - ->setParam('event', 'account.update.password') - ->setParam('resource', 'user/' . $user->getId()) + ->setResource('user/'.$user->getId()) + ->setUser($user) ; - $usage - ->setParam('users.update', 1) - ; + $usage->setParam('users.update', 1); + $events->setParam('userId', $user->getId()); + $response->dynamic($user, Response::MODEL_USER); }); App::patch('/v1/account/email') ->desc('Update Account Email') ->groups(['api', 'account']) - ->label('event', 'account.update.email') + ->label('event', 'users.[userId].update.email') ->label('scope', 'account') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') @@ -1405,12 +1375,14 @@ App::patch('/v1/account/email') ->inject('dbForProject') ->inject('audits') ->inject('usage') - ->action(function ($email, $password, $response, $user, $dbForProject, $audits, $usage) { + ->inject('events') + ->action(function ($email, $password, $response, $user, $dbForProject, $audits, $usage, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Document $user */ /** @var Utopia\Database\Database $dbForProject */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ + /** @var Appwrite\Stats\Stats $events */ $isAnonymousUser = is_null($user->getAttribute('email')) && is_null($user->getAttribute('password')); // Check if request is from an anonymous account for converting @@ -1440,21 +1412,20 @@ App::patch('/v1/account/email') } $audits - ->setParam('userId', $user->getId()) - ->setParam('event', 'account.update.email') - ->setParam('resource', 'user/' . $user->getId()) + ->setResource('user/'.$user->getId()) + ->setUser($user) ; - $usage - ->setParam('users.update', 1) - ; + $usage->setParam('users.update', 1); + $events->setParam('userId', $user->getId()); + $response->dynamic($user, Response::MODEL_USER); }); App::patch('/v1/account/prefs') ->desc('Update Account Preferences') ->groups(['api', 'account']) - ->label('event', 'account.update.prefs') + ->label('event', 'users.[userId].update.prefs') ->label('scope', 'account') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') @@ -1469,37 +1440,36 @@ App::patch('/v1/account/prefs') ->inject('dbForProject') ->inject('audits') ->inject('usage') - ->action(function ($prefs, $response, $user, $dbForProject, $audits, $usage) { + ->inject('events') + ->action(function ($prefs, $response, $user, $dbForProject, $audits, $usage, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Document $user */ /** @var Utopia\Database\Database $dbForProject */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ + /** @var Appwrite\Event\Event $events */ $user = $dbForProject->updateDocument('users', $user->getId(), $user->setAttribute('prefs', $prefs)); - $audits - ->setParam('event', 'account.update.prefs') - ->setParam('resource', 'user/' . $user->getId()) - ; + $audits->setResource('user/'.$user->getId()); + $usage->setParam('users.update', 1); + $events->setParam('userId', $user->getId()); - $usage - ->setParam('users.update', 1) - ; $response->dynamic($user, Response::MODEL_USER); }); -App::delete('/v1/account') - ->desc('Delete Account') +App::patch('/v1/account/status') + ->desc('Update Account Status') ->groups(['api', 'account']) - ->label('event', 'account.delete') + ->label('event', 'users.[userId].update.status') ->label('scope', 'account') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') - ->label('sdk.method', 'delete') - ->label('sdk.description', '/docs/references/account/delete.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk.method', 'updateStatus') + ->label('sdk.description', '/docs/references/account/update-status.md') + ->label('sdk.response.code', Response::STATUS_CODE_OK) + ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) + ->label('sdk.response.model', Response::MODEL_USER) ->inject('request') ->inject('response') ->inject('user') @@ -1512,55 +1482,34 @@ App::delete('/v1/account') /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Document $user */ /** @var Utopia\Database\Database $dbForProject */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Event\Event $events */ /** @var Appwrite\Stats\Stats $usage */ - $protocol = $request->getProtocol(); $user = $dbForProject->updateDocument('users', $user->getId(), $user->setAttribute('status', false)); - // TODO Seems to be related to users.php/App::delete('/v1/users/:userId'). Can we share code between these two? Do todos below apply to users.php? - - // TODO delete all tokens or only current session? - // TODO delete all user data according to GDPR. Make sure everything is backed up and backups are deleted later - /* - * Data to delete - * * Tokens - * * Memberships - */ - $audits - ->setParam('userId', $user->getId()) - ->setParam('event', 'account.delete') - ->setParam('resource', 'user/' . $user->getId()) - ->setParam('data', $user->getArrayCopy()) - ; + ->setResource('user/' . $user->getId()) + ->setPayload($response->output($user, Response::MODEL_USER)); $events - ->setParam('eventData', $response->output($user, Response::MODEL_USER)) - ; + ->setParam('userId', $user->getId()) + ->setPayload($response->output($user, Response::MODEL_USER)); if (!Config::getParam('domainVerification')) { - $response - ->addHeader('X-Fallback-Cookies', \json_encode([])) - ; + $response->addHeader('X-Fallback-Cookies', \json_encode([])); } - $usage - ->setParam('users.delete', 1) - ; - $response - ->addCookie(Auth::$cookieName . '_legacy', '', \time() - 3600, '/', Config::getParam('cookieDomain'), ('https' == $protocol), true, null) - ->addCookie(Auth::$cookieName, '', \time() - 3600, '/', Config::getParam('cookieDomain'), ('https' == $protocol), true, Config::getParam('cookieSamesite')) - ->noContent() - ; + $usage->setParam('users.delete', 1); + + $response->dynamic($user, Response::MODEL_USER); }); App::delete('/v1/account/sessions/:sessionId') ->desc('Delete Account Session') ->groups(['api', 'account']) ->label('scope', 'account') - ->label('event', 'account.sessions.delete') + ->label('event', 'users.[userId].sessions.[sessionId].delete') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'deleteSession') @@ -1583,7 +1532,7 @@ App::delete('/v1/account/sessions/:sessionId') /** @var Utopia\Database\Document $user */ /** @var Utopia\Database\Database $dbForProject */ /** @var Utopia\Locale\Locale $locale */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Event\Event $events */ /** @var Appwrite\Stats\Stats $usage */ @@ -1600,18 +1549,14 @@ App::delete('/v1/account/sessions/:sessionId') $dbForProject->deleteDocument('sessions', $session->getId()); - $audits - ->setParam('userId', $user->getId()) - ->setParam('event', 'account.sessions.delete') - ->setParam('resource', 'user/' . $user->getId()) - ; + $audits->setResource('user/' . $user->getId()); $session->setAttribute('current', false); if ($session->getAttribute('secret') == Auth::hash(Auth::$secret)) { // If current session delete the cookies too $session ->setAttribute('current', true) - ->setAttribute('countryName', (isset($countries[strtoupper($session->getAttribute('countryCode'))])) ? $countries[strtoupper($session->getAttribute('countryCode'))] : $locale->getText('locale.country.unknown')) + ->setAttribute('countryName', $locale->getText('countries.'.strtolower($session->getAttribute('countryCode')), $locale->getText('locale.country.unknown'))) ; if (!Config::getParam('domainVerification')) { @@ -1625,11 +1570,13 @@ App::delete('/v1/account/sessions/:sessionId') ->addCookie(Auth::$cookieName, '', \time() - 3600, '/', Config::getParam('cookieDomain'), ('https' == $protocol), true, Config::getParam('cookieSamesite')) ; } - - $dbForProject->updateDocument('users', $user->getId(), $user->setAttribute('sessions', $sessions)); + + $dbForProject->deleteCachedDocument('users', $user->getId()); $events - ->setParam('eventData', $response->output($session, Response::MODEL_SESSION)) + ->setParam('userId', $user->getId()) + ->setParam('sessionId', $session->getId()) + ->setPayload($response->output($session, Response::MODEL_SESSION)) ; $usage @@ -1647,7 +1594,7 @@ App::patch('/v1/account/sessions/:sessionId') ->desc('Update Session (Refresh Tokens)') ->groups(['api', 'account']) ->label('scope', 'account') - ->label('event', 'account.sessions.update') + ->label('event', 'users.[userId].sessions.[sessionId].update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updateSession') @@ -1674,7 +1621,7 @@ App::patch('/v1/account/sessions/:sessionId') /** @var Utopia\Database\Database $dbForProject */ /** @var Utopia\Database\Document $project */ /** @var Utopia\Locale\Locale $locale */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Event\Event $events */ /** @var Appwrite\Stats\Stats $usage */ @@ -1703,7 +1650,7 @@ App::patch('/v1/account/sessions/:sessionId') $appSecret = $project->getAttribute('authProviders', [])[$provider.'Secret'] ?? '{}'; $className = 'Appwrite\\Auth\\OAuth2\\'.\ucfirst($provider); - + if (!\class_exists($className)) { throw new Exception('Provider is not supported', 501, Exception::PROJECT_PROVIDER_UNSUPPORTED); } @@ -1720,17 +1667,14 @@ App::patch('/v1/account/sessions/:sessionId') $dbForProject->updateDocument('sessions', $sessionId, $session); - $user->setAttribute("sessions", $sessions); - $user = $dbForProject->updateDocument('users', $user->getId(), $user); + $dbForProject->deleteCachedDocument('users', $user->getId()); - $audits - ->setParam('userId', $user->getId()) - ->setParam('event', 'account.sessions.update') - ->setParam('resource', 'user/' . $user->getId()) - ; + $audits->setResource('user/' . $user->getId()); $events - ->setParam('eventData', $response->output($session, Response::MODEL_SESSION)) + ->setParam('userId', $user->getId()) + ->setParam('sessionId', $session->getId()) + ->setPayload($response->output($session, Response::MODEL_SESSION)) ; $usage @@ -1749,7 +1693,7 @@ App::delete('/v1/account/sessions') ->desc('Delete All Account Sessions') ->groups(['api', 'account']) ->label('scope', 'account') - ->label('event', 'account.sessions.delete') + ->label('event', 'users.[userId].sessions.[sessionId].delete') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'deleteSessions') @@ -1771,7 +1715,7 @@ App::delete('/v1/account/sessions') /** @var Utopia\Database\Document $user */ /** @var Utopia\Database\Database $dbForProject */ /** @var Utopia\Locale\Locale $locale */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Event\Event $events */ /** @var Appwrite\Stats\Stats $usage */ @@ -1781,47 +1725,43 @@ App::delete('/v1/account/sessions') foreach ($sessions as $session) {/** @var Document $session */ $dbForProject->deleteDocument('sessions', $session->getId()); - $audits - ->setParam('userId', $user->getId()) - ->setParam('event', 'account.sessions.delete') - ->setParam('resource', 'user/' . $user->getId()) - ; + $audits->setResource('user/' . $user->getId()); if (!Config::getParam('domainVerification')) { - $response - ->addHeader('X-Fallback-Cookies', \json_encode([])) - ; + $response->addHeader('X-Fallback-Cookies', \json_encode([])); } $session ->setAttribute('current', false) - ->setAttribute('countryName', (isset($countries[strtoupper($session->getAttribute('countryCode'))])) ? $countries[strtoupper($session->getAttribute('countryCode'))] : $locale->getText('locale.country.unknown')) + ->setAttribute('countryName', $locale->getText('countries.'.strtolower($session->getAttribute('countryCode')), $locale->getText('locale.country.unknown'))) ; - if ($session->getAttribute('secret') == Auth::hash(Auth::$secret)) { // If current session delete the cookies too + if ($session->getAttribute('secret') == Auth::hash(Auth::$secret)) { $session->setAttribute('current', true); + + // If current session delete the cookies too $response ->addCookie(Auth::$cookieName . '_legacy', '', \time() - 3600, '/', Config::getParam('cookieDomain'), ('https' == $protocol), true, null) - ->addCookie(Auth::$cookieName, '', \time() - 3600, '/', Config::getParam('cookieDomain'), ('https' == $protocol), true, Config::getParam('cookieSamesite')) - ; + ->addCookie(Auth::$cookieName, '', \time() - 3600, '/', Config::getParam('cookieDomain'), ('https' == $protocol), true, Config::getParam('cookieSamesite')); + + // Use current session for events. + $events->setPayload($response->output($session, Response::MODEL_SESSION)); } } - $dbForProject->updateDocument('users', $user->getId(), $user->setAttribute('sessions', [])); + $dbForProject->deleteCachedDocument('users', $user->getId()); $numOfSessions = count($sessions); $events - ->setParam('eventData', $response->output(new Document([ - 'sessions' => $sessions, - 'total' => $numOfSessions, - ]), Response::MODEL_SESSION_LIST)) - ; + ->setParam('userId', $user->getId()) + ->setParam('sessionId', $session->getId()); $usage ->setParam('users.sessions.delete', $numOfSessions) ->setParam('users.update', 1) ; + $response->noContent(); }); @@ -1829,7 +1769,7 @@ App::post('/v1/account/recovery') ->desc('Create Password Recovery') ->groups(['api', 'account']) ->label('scope', 'public') - ->label('event', 'account.recovery.create') + ->label('event', 'users.[userId].recovery.[tokenId].create') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'createRecovery') @@ -1856,8 +1796,8 @@ App::post('/v1/account/recovery') /** @var Utopia\Database\Database $dbForProject */ /** @var Utopia\Database\Document $project */ /** @var Utopia\Locale\Locale $locale */ - /** @var Appwrite\Event\Event $mails */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Mail $mails */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Event\Event $events */ /** @var Appwrite\Stats\Stats $usage */ @@ -1870,7 +1810,10 @@ App::post('/v1/account/recovery') $isAppUser = Auth::isAppUser($roles); $email = \strtolower($email); - $profile = $dbForProject->findOne('users', [new Query('deleted', Query::TYPE_EQUAL, [false]), new Query('email', Query::TYPE_EQUAL, [$email])]); // Get user by email address + + $profile = $dbForProject->findOne('users', [ + new Query('email', Query::TYPE_EQUAL, [$email]) + ]); if (!$profile) { throw new Exception('User not found', 404, Exception::USER_NOT_FOUND); @@ -1907,37 +1850,30 @@ App::post('/v1/account/recovery') $url = Template::unParseURL($url); $mails - ->setParam('event', 'account.recovery.create') - ->setParam('from', $project->getId()) - ->setParam('recipient', $profile->getAttribute('email', '')) - ->setParam('name', $profile->getAttribute('name', '')) - ->setParam('url', $url) - ->setParam('locale', $locale->default) - ->setParam('project', $project->getAttribute('name', ['[APP-NAME]'])) - ->setParam('type', MAIL_TYPE_RECOVERY) + ->setType(MAIL_TYPE_RECOVERY) + ->setRecipient($profile->getAttribute('email', '')) + ->setUrl($url) + ->setLocale($locale->default) + ->setName($profile->getAttribute('name')) ->trigger(); ; $events - ->setParam('eventData', - $response->output($recovery->setAttribute('secret', $secret), - Response::MODEL_TOKEN - )) - ; - - $recovery // Hide secret for clients, sp - ->setAttribute('secret', - ($isPrivilegedUser || $isAppUser) ? $secret : ''); - - $audits ->setParam('userId', $profile->getId()) - ->setParam('event', 'account.recovery.create') - ->setParam('resource', 'user/' . $profile->getId()) + ->setParam('tokenId', $recovery->getId()) + ->setUser($profile) + ->setPayload($response->output( + $recovery->setAttribute('secret', $secret), + Response::MODEL_TOKEN + )) ; - $usage - ->setParam('users.update', 1) - ; + // Hide secret for clients + $recovery->setAttribute('secret', ($isPrivilegedUser || $isAppUser) ? $secret : ''); + + $audits->setResource('user/' . $profile->getId()); + $usage->setParam('users.update', 1); + $response->setStatusCode(Response::STATUS_CODE_CREATED); $response->dynamic($recovery, Response::MODEL_TOKEN); }); @@ -1946,7 +1882,7 @@ App::put('/v1/account/recovery') ->desc('Create Password Recovery (confirmation)') ->groups(['api', 'account']) ->label('scope', 'public') - ->label('event', 'account.recovery.update') + ->label('event', 'users.[userId].recovery.[tokenId].update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updateRecovery') @@ -1964,11 +1900,13 @@ App::put('/v1/account/recovery') ->inject('dbForProject') ->inject('audits') ->inject('usage') - ->action(function ($userId, $secret, $password, $passwordAgain, $response, $dbForProject, $audits, $usage) { + ->inject('events') + ->action(function ($userId, $secret, $password, $passwordAgain, $response, $dbForProject, $audits, $usage, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ + /** @var Appwrite\Event\Event $events */ if ($password !== $passwordAgain) { throw new Exception('Passwords must match', 400, Exception::USER_PASSWORD_MISMATCH); @@ -1976,7 +1914,7 @@ App::put('/v1/account/recovery') $profile = $dbForProject->getDocument('users', $userId); - if ($profile->isEmpty() || $profile->getAttribute('deleted')) { + if ($profile->isEmpty()) { throw new Exception('User not found', 404, Exception::USER_NOT_FOUND); } @@ -2004,15 +1942,15 @@ App::put('/v1/account/recovery') $dbForProject->deleteDocument('tokens', $recovery); $dbForProject->deleteCachedDocument('users', $profile->getId()); - $audits + $audits->setResource('user/' . $profile->getId()); + + $usage->setParam('users.update', 1); + + $events ->setParam('userId', $profile->getId()) - ->setParam('event', 'account.recovery.update') - ->setParam('resource', 'user/' . $profile->getId()) + ->setParam('tokenId', $recoveryDocument->getId()) ; - $usage - ->setParam('users.update', 1) - ; $response->dynamic($recoveryDocument, Response::MODEL_TOKEN); }); @@ -2020,7 +1958,7 @@ App::post('/v1/account/verification') ->desc('Create Email Verification') ->groups(['api', 'account']) ->label('scope', 'account') - ->label('event', 'account.verification.create') + ->label('event', 'users.[userId].verification.[tokenId].create') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'createVerification') @@ -2048,9 +1986,9 @@ App::post('/v1/account/verification') /** @var Utopia\Database\Document $user */ /** @var Utopia\Database\Database $dbForProject */ /** @var Utopia\Locale\Locale $locale */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Event\Event $events */ - /** @var Appwrite\Event\Event $mails */ + /** @var Appwrite\Event\Mail $mails */ /** @var Appwrite\Stats\Stats $usage */ if(empty(App::getEnv('_APP_SMTP_HOST'))) { @@ -2089,37 +2027,29 @@ App::post('/v1/account/verification') $url = Template::unParseURL($url); $mails - ->setParam('event', 'account.verification.create') - ->setParam('from', $project->getId()) - ->setParam('recipient', $user->getAttribute('email')) - ->setParam('name', $user->getAttribute('name')) - ->setParam('url', $url) - ->setParam('locale', $locale->default) - ->setParam('project', $project->getAttribute('name', ['[APP-NAME]'])) - ->setParam('type', MAIL_TYPE_VERIFICATION) + ->setType(MAIL_TYPE_VERIFICATION) + ->setRecipient($user->getAttribute('email')) + ->setUrl($url) + ->setLocale($locale->default) + ->setName($user->getAttribute('name')) ->trigger() ; $events - ->setParam('eventData', - $response->output($verification->setAttribute('secret', $verificationSecret), - Response::MODEL_TOKEN - )) - ; - - $verification // Hide secret for clients, sp - ->setAttribute('secret', - ($isPrivilegedUser || $isAppUser) ? $verificationSecret : ''); - - $audits ->setParam('userId', $user->getId()) - ->setParam('event', 'account.verification.create') - ->setParam('resource', 'user/' . $user->getId()) + ->setParam('tokenId', $verification->getId()) + ->setPayload($response->output( + $verification->setAttribute('secret', $verificationSecret), + Response::MODEL_TOKEN + )) ; - $usage - ->setParam('users.update', 1) - ; + // Hide secret for clients + $verification->setAttribute('secret', ($isPrivilegedUser || $isAppUser) ? $verificationSecret : ''); + + $audits->setResource('user/' . $user->getId()); + $usage->setParam('users.update', 1); + $response->setStatusCode(Response::STATUS_CODE_CREATED); $response->dynamic($verification, Response::MODEL_TOKEN); }); @@ -2128,7 +2058,7 @@ App::put('/v1/account/verification') ->desc('Create Email Verification (confirmation)') ->groups(['api', 'account']) ->label('scope', 'public') - ->label('event', 'account.verification.update') + ->label('event', 'users.[userId].verification.[tokenId].update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updateVerification') @@ -2145,12 +2075,14 @@ App::put('/v1/account/verification') ->inject('dbForProject') ->inject('audits') ->inject('usage') - ->action(function ($userId, $secret, $response, $user, $dbForProject, $audits, $usage) { + ->inject('events') + ->action(function ($userId, $secret, $response, $user, $dbForProject, $audits, $usage, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Document $user */ /** @var Utopia\Database\Database $dbForProject */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ + /** @var Appwrite\Event\Event $events */ $profile = Authorization::skip(fn() => $dbForProject->getDocument('users', $userId)); @@ -2168,7 +2100,7 @@ App::put('/v1/account/verification') Authorization::setRole('user:' . $profile->getId()); $profile = $dbForProject->updateDocument('users', $profile->getId(), $profile->setAttribute('emailVerification', true)); - + $verificationDocument = $dbForProject->getDocument('tokens', $verification); /** @@ -2178,14 +2110,14 @@ App::put('/v1/account/verification') $dbForProject->deleteDocument('tokens', $verification); $dbForProject->deleteCachedDocument('users', $profile->getId()); - $audits - ->setParam('userId', $profile->getId()) - ->setParam('event', 'account.verification.update') - ->setParam('resource', 'user/' . $user->getId()) + $audits->setResource('user/' . $user->getId()); + + $usage->setParam('users.update', 1); + + $events + ->setParam('userId', $user->getId()) + ->setParam('tokenId', $verificationDocument->getId()) ; - $usage - ->setParam('users.update', 1) - ; $response->dynamic($verificationDocument, Response::MODEL_TOKEN); }); diff --git a/app/controllers/api/avatars.php b/app/controllers/api/avatars.php index 198f379171..d9ff247911 100644 --- a/app/controllers/api/avatars.php +++ b/app/controllers/api/avatars.php @@ -144,8 +144,8 @@ App::get('/v1/avatars/image') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_IMAGE) ->param('url', '', new URL(['http', 'https']), 'Image URL which you want to crop.') - ->param('width', 400, new Range(0, 2000), 'Resize preview image width, Pass an integer between 0 to 2000.', true) - ->param('height', 400, new Range(0, 2000), 'Resize preview image height, Pass an integer between 0 to 2000.', true) + ->param('width', 400, new Range(0, 2000), 'Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.', true) + ->param('height', 400, new Range(0, 2000), 'Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.', true) ->inject('response') ->action(function (string $url, int $width, int $height, Response $response) { @@ -361,7 +361,7 @@ App::get('/v1/avatars/qr') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_IMAGE_PNG) ->param('text', '', new Text(512), 'Plain text to be converted to QR code image.') - ->param('size', 400, new Range(0, 1000), 'QR code size. Pass an integer between 0 to 1000. Defaults to 400.', true) + ->param('size', 400, new Range(1, 1000), 'QR code size. Pass an integer between 1 to 1000. Defaults to 400.', true) ->param('margin', 1, new Range(0, 10), 'Margin from edge. Pass an integer between 0 to 10. Defaults to 1.', true) ->param('download', false, new Boolean(true), '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.', true) ->inject('response') diff --git a/app/controllers/api/database.php b/app/controllers/api/database.php index 82b5444ae8..ae24466da1 100644 --- a/app/controllers/api/database.php +++ b/app/controllers/api/database.php @@ -20,7 +20,6 @@ use Utopia\Database\Validator\Key; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\QueryValidator; use Utopia\Database\Validator\OrderAttributes; -use Utopia\Database\Validator\Queries as QueriesValidator; use Utopia\Database\Validator\Structure; use Utopia\Database\Validator\UID; use Utopia\Database\Exception\Authorization as AuthorizationException; @@ -32,8 +31,12 @@ use Appwrite\Network\Validator\Email; use Appwrite\Network\Validator\IP; use Appwrite\Network\Validator\URL; use Appwrite\Utopia\Database\Validator\CustomId; +use Appwrite\Utopia\Database\Validator\Queries as QueriesValidator; +use Appwrite\Utopia\Database\Validator\OrderAttributes as OrderAttributesValidator; use Appwrite\Utopia\Response; use Appwrite\Detector\Detector; +use Appwrite\Event\Audit as EventAudit; +use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; use Appwrite\Stats\Stats; @@ -44,13 +47,13 @@ use Appwrite\Stats\Stats; * @param Utopia\Database\Document $attribute * @param Appwrite\Utopia\Response $response * @param Utopia\Database\Database $dbForProject - * @param Appwrite\Event\Event $database - * @param Appwrite\Event\Event $audits + * @param Appwrite\Event\Database $database + * @param Appwrite\Event\Audit $audits * @param Appwrite\Stats\Stats $usage * * @return Document Newly created attribute document */ -function createAttribute(string $collectionId, Document $attribute, Response $response, Database $dbForProject, Event $database, Event $audits, Stats $usage): Document +function createAttribute(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', ''); @@ -114,22 +117,23 @@ function createAttribute(string $collectionId, Document $attribute, Response $re $dbForProject->deleteCachedDocument('collections', $collectionId); $dbForProject->deleteCachedCollection('collection_' . $collection->getInternalId()); - // Pass clone of $attribute object to workers - // so we can later modify Document to fit response model - $clone = clone $attribute; - - $database - ->setParam('type', DATABASE_TYPE_CREATE_ATTRIBUTE) - ->setParam('collection', $collection) - ->setParam('document', $clone) - ; - $usage->setParam('database.collections.update', 1); + $database + ->setType(DATABASE_TYPE_CREATE_ATTRIBUTE) + ->setCollection($collection) + ->setDocument($attribute) + ; + + $events + ->setContext($collection) + ->setParam('collectionId', $collection->getId()) + ->setParam('attributeId', $attribute->getId()) + ; + $audits - ->setParam('event', 'database.attributes.create') - ->setParam('resource', 'collection/'.$collectionId) - ->setParam('data', $clone) + ->setResource('collection/'.$collectionId) + ->setPayload($attribute->getArrayCopy()) ; $response->setStatusCode(Response::STATUS_CODE_CREATED); @@ -140,7 +144,7 @@ function createAttribute(string $collectionId, Document $attribute, Response $re App::post('/v1/database/collections') ->desc('Create Collection') ->groups(['api', 'database']) - ->label('event', 'database.collections.create') + ->label('event', 'collections.[collectionId].create') ->label('scope', 'collections.write') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'database') @@ -158,11 +162,13 @@ App::post('/v1/database/collections') ->inject('dbForProject') ->inject('audits') ->inject('usage') - ->action(function ($collectionId, $name, $permission, $read, $write, $response, $dbForProject, $audits, $usage) { + ->inject('events') + ->action(function ($collectionId, $name, $permission, $read, $write, $response, $dbForProject, $audits, $usage, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject*/ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ + /** @var Appwrite\Event\Event $events */ $collectionId = $collectionId == 'unique()' ? $dbForProject->getId() : $collectionId; @@ -188,11 +194,11 @@ App::post('/v1/database/collections') } $audits - ->setParam('event', 'database.collections.create') - ->setParam('resource', 'collection/'.$collectionId) - ->setParam('data', $collection->getArrayCopy()) + ->setResource('collection/'.$collectionId) + ->setPayload($collection->getArrayCopy()) ; + $events->setParam('collectionId', $collection->getId()); $usage->setParam('database.collections.create', 1); $response->setStatusCode(Response::STATUS_CODE_CREATED); @@ -582,7 +588,7 @@ App::put('/v1/database/collections/:collectionId') ->desc('Update Collection') ->groups(['api', 'database']) ->label('scope', 'collections.write') - ->label('event', 'database.collections.update') + ->label('event', 'collections.[collectionId].update') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'database') ->label('sdk.method', 'updateCollection') @@ -600,11 +606,13 @@ App::put('/v1/database/collections/:collectionId') ->inject('dbForProject') ->inject('audits') ->inject('usage') - ->action(function ($collectionId, $name, $permission, $read, $write, $enabled, $response, $dbForProject, $audits, $usage) { + ->inject('events') + ->action(function ($collectionId, $name, $permission, $read, $write, $enabled, $response, $dbForProject, $audits, $usage, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ + /** @var Appwrite\Event\Event $events */ $collection = $dbForProject->getDocument('collections', $collectionId); @@ -634,14 +642,14 @@ App::put('/v1/database/collections/:collectionId') throw new Exception('Bad structure. '.$exception->getMessage(), 400, Exception::DOCUMENT_INVALID_STRUCTURE); } - $usage->setParam('database.collections.update', 1); - $audits - ->setParam('event', 'database.collections.update') - ->setParam('resource', 'collection/'.$collectionId) - ->setParam('data', $collection->getArrayCopy()) + ->setResource('collection/'.$collectionId) + ->setPayload($collection->getArrayCopy()) ; + $usage->setParam('database.collections.update', 1); + $events->setParam('collectionId', $collection->getId()); + $response->dynamic($collection, Response::MODEL_COLLECTION); }); @@ -649,7 +657,7 @@ App::delete('/v1/database/collections/:collectionId') ->desc('Delete Collection') ->groups(['api', 'database']) ->label('scope', 'collections.write') - ->label('event', 'database.collections.delete') + ->label('event', 'collections.[collectionId].delete') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'database') ->label('sdk.method', 'deleteCollection') @@ -667,8 +675,9 @@ App::delete('/v1/database/collections/:collectionId') /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ /** @var Appwrite\Event\Event $events */ - /** @var Appwrite\Event\Event $audits */ - /** @var Appwrite\Stats\Stats $audits */ + /** @var Appwrite\Event\Audit $audits */ + /** @var Appwrite\Event\Delete $deletes */ + /** @var Appwrite\Stats\Stats $usage */ $collection = $dbForProject->getDocument('collections', $collectionId); @@ -683,29 +692,29 @@ App::delete('/v1/database/collections/:collectionId') $dbForProject->deleteCachedCollection('collection_' . $collection->getInternalId()); $deletes - ->setParam('type', DELETE_TYPE_DOCUMENT) - ->setParam('document', $collection) + ->setType(DELETE_TYPE_DOCUMENT) + ->setDocument($collection) ; - $usage->setParam('database.collections.delete', 1); - $events - ->setParam('eventData', $response->output($collection, Response::MODEL_COLLECTION)) + ->setParam('collectionId', $collection->getId()) + ->setPayload($response->output($collection, Response::MODEL_COLLECTION)) ; $audits - ->setParam('event', 'database.collections.delete') - ->setParam('resource', 'collection/'.$collectionId) - ->setParam('data', $collection->getArrayCopy()) + ->setResource('collection/'.$collectionId) + ->setPayload($collection->getArrayCopy()) ; + $usage->setParam('database.collections.delete', 1); + $response->noContent(); }); App::post('/v1/database/collections/:collectionId/attributes/string') ->desc('Create String Attribute') ->groups(['api', 'database']) - ->label('event', 'database.attributes.create') + ->label('event', 'collections.[collectionId].attributes.[attributeId].create') ->label('scope', 'collections.write') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'database') @@ -725,12 +734,14 @@ App::post('/v1/database/collections/:collectionId/attributes/string') ->inject('database') ->inject('audits') ->inject('usage') - ->action(function ($collectionId, $key, $size, $required, $default, $array, $response, $dbForProject, $database, $audits, $usage) { + ->inject('events') + ->action(function ($collectionId, $key, $size, $required, $default, $array, $response, $dbForProject, $database, $audits, $usage, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject*/ - /** @var Appwrite\Event\Event $database */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Database $database */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ + /** @var Appwrite\Event\Event $events */ // Ensure attribute default is within required size $validator = new Text($size); @@ -745,7 +756,7 @@ App::post('/v1/database/collections/:collectionId/attributes/string') 'required' => $required, 'default' => $default, 'array' => $array, - ]), $response, $dbForProject, $database, $audits, $usage); + ]), $response, $dbForProject, $database, $audits, $events, $usage); $response->dynamic($attribute, Response::MODEL_ATTRIBUTE_STRING); }); @@ -753,7 +764,7 @@ App::post('/v1/database/collections/:collectionId/attributes/string') App::post('/v1/database/collections/:collectionId/attributes/email') ->desc('Create Email Attribute') ->groups(['api', 'database']) - ->label('event', 'database.attributes.create') + ->label('event', 'collections.[collectionId].attributes.[attributeId].create') ->label('scope', 'collections.write') ->label('sdk.namespace', 'database') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) @@ -772,11 +783,12 @@ App::post('/v1/database/collections/:collectionId/attributes/email') ->inject('database') ->inject('audits') ->inject('usage') - ->action(function ($collectionId, $key, $required, $default, $array, $response, $dbForProject, $database, $audits, $usage) { + ->inject('events') + ->action(function ($collectionId, $key, $required, $default, $array, $response, $dbForProject, $database, $audits, $usage, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject*/ - /** @var Appwrite\Event\Event $database */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Database $database */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ $attribute = createAttribute($collectionId, new Document([ @@ -787,7 +799,7 @@ App::post('/v1/database/collections/:collectionId/attributes/email') 'default' => $default, 'array' => $array, 'format' => APP_DATABASE_ATTRIBUTE_EMAIL, - ]), $response, $dbForProject, $database, $audits, $usage); + ]), $response, $dbForProject, $database, $audits, $events, $usage); $response->dynamic($attribute, Response::MODEL_ATTRIBUTE_EMAIL); }); @@ -795,7 +807,7 @@ App::post('/v1/database/collections/:collectionId/attributes/email') App::post('/v1/database/collections/:collectionId/attributes/enum') ->desc('Create Enum Attribute') ->groups(['api', 'database']) - ->label('event', 'database.attributes.create') + ->label('event', 'collections.[collectionId].attributes.[attributeId].create') ->label('scope', 'collections.write') ->label('sdk.namespace', 'database') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) @@ -815,12 +827,14 @@ App::post('/v1/database/collections/:collectionId/attributes/enum') ->inject('database') ->inject('audits') ->inject('usage') - ->action(function ($collectionId, $key, $elements, $required, $default, $array, $response, $dbForProject, $database, $audits, $usage) { + ->inject('events') + ->action(function ($collectionId, $key, $elements, $required, $default, $array, $response, $dbForProject, $database, $audits, $usage, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject*/ - /** @var Appwrite\Event\Event $database */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Database $database */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ + /** @var Appwrite\Event\Event $events */ // use length of longest string as attribute size $size = 0; @@ -846,7 +860,7 @@ App::post('/v1/database/collections/:collectionId/attributes/enum') 'array' => $array, 'format' => APP_DATABASE_ATTRIBUTE_ENUM, 'formatOptions' => ['elements' => $elements], - ]), $response, $dbForProject, $database, $audits, $usage); + ]), $response, $dbForProject, $database, $audits, $events, $usage); $response->dynamic($attribute, Response::MODEL_ATTRIBUTE_ENUM); }); @@ -854,7 +868,7 @@ App::post('/v1/database/collections/:collectionId/attributes/enum') App::post('/v1/database/collections/:collectionId/attributes/ip') ->desc('Create IP Address Attribute') ->groups(['api', 'database']) - ->label('event', 'database.attributes.create') + ->label('event', 'collections.[collectionId].attributes.[attributeId].create') ->label('scope', 'collections.write') ->label('sdk.namespace', 'database') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) @@ -873,11 +887,12 @@ App::post('/v1/database/collections/:collectionId/attributes/ip') ->inject('database') ->inject('audits') ->inject('usage') - ->action(function ($collectionId, $key, $required, $default, $array, $response, $dbForProject, $database, $audits, $usage) { + ->inject('events') + ->action(function ($collectionId, $key, $required, $default, $array, $response, $dbForProject, $database, $audits, $usage, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject*/ - /** @var Appwrite\Event\Event $database */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Database $database */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ $attribute = createAttribute($collectionId, new Document([ @@ -888,7 +903,7 @@ App::post('/v1/database/collections/:collectionId/attributes/ip') 'default' => $default, 'array' => $array, 'format' => APP_DATABASE_ATTRIBUTE_IP, - ]), $response, $dbForProject, $database, $audits, $usage); + ]), $response, $dbForProject, $database, $audits, $events, $usage); $response->dynamic($attribute, Response::MODEL_ATTRIBUTE_IP); }); @@ -896,7 +911,7 @@ App::post('/v1/database/collections/:collectionId/attributes/ip') App::post('/v1/database/collections/:collectionId/attributes/url') ->desc('Create URL Attribute') ->groups(['api', 'database']) - ->label('event', 'database.attributes.create') + ->label('event', 'collections.[collectionId].attributes.[attributeId].create') ->label('scope', 'collections.write') ->label('sdk.namespace', 'database') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) @@ -915,11 +930,13 @@ App::post('/v1/database/collections/:collectionId/attributes/url') ->inject('database') ->inject('audits') ->inject('usage') - ->action(function ($collectionId, $key, $required, $default, $array, $response, $dbForProject, $database, $audits, $usage) { + ->inject('events') + ->action(function ($collectionId, $key, $required, $default, $array, $response, $dbForProject, $database, $audits, $usage, $events) { /** @var Appwrite\Utopia\Response $response */ - /** @var Appwrite\Event\Event $database */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Database $database */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ + /** @var Appwrite\Event\Event $events */ $attribute = createAttribute($collectionId, new Document([ 'key' => $key, @@ -929,7 +946,7 @@ App::post('/v1/database/collections/:collectionId/attributes/url') 'default' => $default, 'array' => $array, 'format' => APP_DATABASE_ATTRIBUTE_URL, - ]), $response, $dbForProject, $database, $audits, $usage); + ]), $response, $dbForProject, $database, $audits, $events, $usage); $response->dynamic($attribute, Response::MODEL_ATTRIBUTE_URL); }); @@ -937,7 +954,7 @@ App::post('/v1/database/collections/:collectionId/attributes/url') App::post('/v1/database/collections/:collectionId/attributes/integer') ->desc('Create Integer Attribute') ->groups(['api', 'database']) - ->label('event', 'database.attributes.create') + ->label('event', 'collections.[collectionId].attributes.[attributeId].create') ->label('scope', 'collections.write') ->label('sdk.namespace', 'database') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) @@ -958,12 +975,14 @@ App::post('/v1/database/collections/:collectionId/attributes/integer') ->inject('database') ->inject('audits') ->inject('usage') - ->action(function ($collectionId, $key, $required, $min, $max, $default, $array, $response, $dbForProject, $database, $audits, $usage) { + ->inject('events') + ->action(function ($collectionId, $key, $required, $min, $max, $default, $array, $response, $dbForProject, $database, $audits, $usage, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject*/ - /** @var Appwrite\Event\Event $database */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Database $database */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ + /** @var Appwrite\Event\Event $events */ // Ensure attribute default is within range $min = (is_null($min)) ? PHP_INT_MIN : \intval($min); @@ -993,7 +1012,7 @@ App::post('/v1/database/collections/:collectionId/attributes/integer') 'min' => $min, 'max' => $max, ], - ]), $response, $dbForProject, $database, $audits, $usage); + ]), $response, $dbForProject, $database, $audits, $events, $usage); $formatOptions = $attribute->getAttribute('formatOptions', []); @@ -1008,7 +1027,7 @@ App::post('/v1/database/collections/:collectionId/attributes/integer') App::post('/v1/database/collections/:collectionId/attributes/float') ->desc('Create Float Attribute') ->groups(['api', 'database']) - ->label('event', 'database.attributes.create') + ->label('event', 'collections.[collectionId].attributes.[attributeId].create') ->label('scope', 'collections.write') ->label('sdk.namespace', 'database') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) @@ -1028,13 +1047,15 @@ App::post('/v1/database/collections/:collectionId/attributes/float') ->inject('dbForProject') ->inject('database') ->inject('audits') + ->inject('events') ->inject('usage') - ->action(function ($collectionId, $key, $required, $min, $max, $default, $array, $response, $dbForProject, $database, $audits, $usage) { + ->action(function ($collectionId, $key, $required, $min, $max, $default, $array, $response, $dbForProject, $database, $audits, $events, $usage) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject*/ - /** @var Appwrite\Event\Event $database */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Database $database */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ + /** @var Appwrite\Event\Event $events */ // Ensure attribute default is within range $min = (is_null($min)) ? -PHP_FLOAT_MAX : \floatval($min); @@ -1067,7 +1088,7 @@ App::post('/v1/database/collections/:collectionId/attributes/float') 'min' => $min, 'max' => $max, ], - ]), $response, $dbForProject, $database, $audits, $usage); + ]), $response, $dbForProject, $database, $audits, $events, $usage); $formatOptions = $attribute->getAttribute('formatOptions', []); @@ -1082,7 +1103,7 @@ App::post('/v1/database/collections/:collectionId/attributes/float') App::post('/v1/database/collections/:collectionId/attributes/boolean') ->desc('Create Boolean Attribute') ->groups(['api', 'database']) - ->label('event', 'database.attributes.create') + ->label('event', 'collections.[collectionId].attributes.[attributeId].create') ->label('scope', 'collections.write') ->label('sdk.namespace', 'database') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) @@ -1101,12 +1122,14 @@ App::post('/v1/database/collections/:collectionId/attributes/boolean') ->inject('database') ->inject('audits') ->inject('usage') - ->action(function ($collectionId, $key, $required, $default, $array, $response, $dbForProject, $database, $audits, $usage) { + ->inject('events') + ->action(function ($collectionId, $key, $required, $default, $array, $response, $dbForProject, $database, $audits, $usage, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject*/ - /** @var Appwrite\Event\Event $database */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Database $database */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ + /** @var Appwrite\Event\Event $events */ $attribute = createAttribute($collectionId, new Document([ 'key' => $key, @@ -1115,7 +1138,7 @@ App::post('/v1/database/collections/:collectionId/attributes/boolean') 'required' => $required, 'default' => $default, 'array' => $array, - ]), $response, $dbForProject, $database, $audits, $usage); + ]), $response, $dbForProject, $database, $audits, $events, $usage); $response->dynamic($attribute, Response::MODEL_ATTRIBUTE_BOOLEAN); }); @@ -1222,7 +1245,7 @@ App::delete('/v1/database/collections/:collectionId/attributes/:key') ->desc('Delete Attribute') ->groups(['api', 'database']) ->label('scope', 'collections.write') - ->label('event', 'database.attributes.delete') + ->label('event', 'collections.[collectionId].attributes.[attributeId].delete') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'database') ->label('sdk.method', 'deleteAttribute') @@ -1240,9 +1263,9 @@ App::delete('/v1/database/collections/:collectionId/attributes/:key') ->action(function ($collectionId, $key, $response, $dbForProject, $database, $events, $audits, $usage) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ - /** @var Appwrite\Event\Event $database */ + /** @var Appwrite\Event\Database $database */ /** @var Appwrite\Event\Event $events */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ $collection = $dbForProject->getDocument('collections', $collectionId); @@ -1266,9 +1289,9 @@ App::delete('/v1/database/collections/:collectionId/attributes/:key') $dbForProject->deleteCachedCollection('collection_' . $collection->getInternalId()); $database - ->setParam('type', DATABASE_TYPE_DELETE_ATTRIBUTE) - ->setParam('collection', $collection) - ->setParam('document', $attribute) + ->setType(DATABASE_TYPE_DELETE_ATTRIBUTE) + ->setCollection($collection) + ->setDocument($attribute) ; $usage->setParam('database.collections.update', 1); @@ -1292,13 +1315,15 @@ App::delete('/v1/database/collections/:collectionId/attributes/:key') }; $events - ->setParam('payload', $response->output($attribute, $model)) + ->setParam('collectionId', $collection->getId()) + ->setParam('attributeId', $attribute->getId()) + ->setContext($collection) + ->setPayload($response->output($attribute, $model)) ; $audits - ->setParam('event', 'database.attributes.delete') - ->setParam('resource', 'collection/'.$collectionId) - ->setParam('data', $attribute->getArrayCopy()) + ->setResource('collection/'.$collectionId) + ->setPayload($attribute->getArrayCopy()) ; $response->noContent(); @@ -1307,7 +1332,7 @@ App::delete('/v1/database/collections/:collectionId/attributes/:key') App::post('/v1/database/collections/:collectionId/indexes') ->desc('Create Index') ->groups(['api', 'database']) - ->label('event', 'database.indexes.create') + ->label('event', 'collections.[collectionId].indexes.[indexId].create') ->label('scope', 'collections.write') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'database') @@ -1326,12 +1351,14 @@ App::post('/v1/database/collections/:collectionId/indexes') ->inject('database') ->inject('audits') ->inject('usage') - ->action(function ($collectionId, $key, $type, $attributes, $orders, $response, $dbForProject, $database, $audits, $usage) { + ->inject('events') + ->action(function ($collectionId, $key, $type, $attributes, $orders, $response, $dbForProject, $database, $audits, $usage, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ - /** @var Appwrite\Event\Event $database */ - /** @var Appwrite\Event\Event $audits */ - /** @var Appwrite\Stats\Stats $audits */ + /** @var Appwrite\Event\Database $database */ + /** @var Appwrite\Event\Audit $audits */ + /** @var Appwrite\Stats\Stats $usage */ + /** @var Appwrite\Event\Event $events */ $collection = $dbForProject->getDocument('collections', $collectionId); @@ -1394,17 +1421,22 @@ App::post('/v1/database/collections/:collectionId/indexes') $dbForProject->deleteCachedDocument('collections', $collectionId); $database - ->setParam('type', DATABASE_TYPE_CREATE_INDEX) - ->setParam('collection', $collection) - ->setParam('document', $index) + ->setType(DATABASE_TYPE_CREATE_INDEX) + ->setCollection($collection) + ->setDocument($index) ; $usage->setParam('database.collections.update', 1); + $events + ->setParam('collectionId', $collection->getId()) + ->setParam('indexId', $index->getId()) + ->setContext($collection) + ; + $audits - ->setParam('event', 'database.indexes.create') - ->setParam('resource', 'collection/'.$collectionId) - ->setParam('data', $index->getArrayCopy()) + ->setResource('collection/'.$collection->getId()) + ->setPayload($index->getArrayCopy()) ; $response->setStatusCode(Response::STATUS_CODE_CREATED); @@ -1494,7 +1526,7 @@ App::delete('/v1/database/collections/:collectionId/indexes/:key') ->desc('Delete Index') ->groups(['api', 'database']) ->label('scope', 'collections.write') - ->label('event', 'database.indexes.delete') + ->label('event', 'collections.[collectionId].indexes.[indexId].delete') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'database') ->label('sdk.method', 'deleteIndex') @@ -1512,9 +1544,9 @@ App::delete('/v1/database/collections/:collectionId/indexes/:key') ->action(function ($collectionId, $key, $response, $dbForProject, $database, $events, $audits, $usage) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ - /** @var Appwrite\Event\Event $database */ + /** @var Appwrite\Event\Database $database */ /** @var Appwrite\Event\Event $events */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ $collection = $dbForProject->getDocument('collections', $collectionId); @@ -1537,21 +1569,23 @@ App::delete('/v1/database/collections/:collectionId/indexes/:key') $dbForProject->deleteCachedDocument('collections', $collectionId); $database - ->setParam('type', DATABASE_TYPE_DELETE_INDEX) - ->setParam('collection', $collection) - ->setParam('document', $index) + ->setType(DATABASE_TYPE_DELETE_INDEX) + ->setCollection($collection) + ->setDocument($index) ; $usage->setParam('database.collections.update', 1); $events - ->setParam('payload', $response->output($index, Response::MODEL_INDEX)) + ->setParam('collectionId', $collection->getId()) + ->setParam('indexId', $index->getId()) + ->setContext($collection) + ->setPayload($response->output($index, Response::MODEL_INDEX)) ; $audits - ->setParam('event', 'database.indexes.delete') - ->setParam('resource', 'collection/'.$collectionId) - ->setParam('data', $index->getArrayCopy()) + ->setResource('collection/'.$collection->getId()) + ->setPayload($index->getArrayCopy()) ; $response->noContent(); @@ -1560,7 +1594,7 @@ App::delete('/v1/database/collections/:collectionId/indexes/:key') App::post('/v1/database/collections/:collectionId/documents') ->desc('Create Document') ->groups(['api', 'database']) - ->label('event', 'database.documents.create') + ->label('event', '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') @@ -1585,7 +1619,7 @@ App::post('/v1/database/collections/:collectionId/documents') /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ /** @var Utopia\Database\Document $user */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ /** @var Appwrite\Event\Event $events */ /** @var string $mode */ @@ -1659,7 +1693,11 @@ App::post('/v1/database/collections/:collectionId/documents') throw new Exception('Document already exists', 409, Exception::DOCUMENT_ALREADY_EXISTS); } - $events->setParam('collection', $collection->getArrayCopy()); + $events + ->setParam('collectionId', $collection->getId()) + ->setParam('documentId', $document->getId()) + ->setContext($collection) + ; $usage ->setParam('database.documents.create', 1) @@ -1667,9 +1705,8 @@ App::post('/v1/database/collections/:collectionId/documents') ; $audits - ->setParam('event', 'database.documents.create') - ->setParam('resource', 'document/'.$document->getId()) - ->setParam('data', $document->getArrayCopy()) + ->setResource('document/'.$document->getId()) + ->setPayload($document->getArrayCopy()) ; $response->setStatusCode(Response::STATUS_CODE_CREATED); @@ -1750,6 +1787,13 @@ App::get('/v1/database/collections/:collectionId/documents') } } + if(!empty($orderAttributes)) { + $validator = new OrderAttributesValidator($collection->getAttribute('attributes', []), $collection->getAttribute('indexes', []), true); + if (!$validator->isValid($orderAttributes)) { + throw new Exception($validator->getDescription(), 400, Exception::GENERAL_QUERY_INVALID); + } + } + $cursorDocument = null; if (!empty($cursor)) { $cursorDocument = $collection->getAttribute('permission') === 'collection' @@ -1946,7 +1990,7 @@ App::get('/v1/database/collections/:collectionId/documents/:documentId/logs') App::patch('/v1/database/collections/:collectionId/documents/:documentId') ->desc('Update Document') ->groups(['api', 'database']) - ->label('event', 'database.documents.update') + ->label('event', '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') @@ -1969,7 +2013,7 @@ App::patch('/v1/database/collections/:collectionId/documents/:documentId') ->action(function ($collectionId, $documentId, $data, $read, $write, $response, $dbForProject, $audits, $usage, $events, $mode) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ /** @var Appwrite\Event\Event $events */ /** @var string $mode */ @@ -2007,7 +2051,7 @@ App::patch('/v1/database/collections/:collectionId/documents/:documentId') if (empty($data)) { throw new Exception('Missing payload', 400, Exception::DOCUMENT_MISSING_PAYLOAD); } - + if (!\is_array($data)) { throw new Exception('Data param should be a valid JSON object', 400, Exception::DOCUMENT_INVALID_STRUCTURE); } @@ -2061,17 +2105,20 @@ App::patch('/v1/database/collections/:collectionId/documents/:documentId') throw new Exception($exception->getMessage(), 400, Exception::DOCUMENT_INVALID_STRUCTURE); } - $events->setParam('collection', $collection->getArrayCopy()); + $events + ->setParam('collectionId', $collection->getId()) + ->setParam('documentId', $document->getId()) + ->setContext($collection) + ; $usage ->setParam('database.documents.update', 1) ->setParam('collectionId', $collectionId) - ; + ; $audits - ->setParam('event', 'database.documents.update') - ->setParam('resource', 'document/'.$document->getId()) - ->setParam('data', $document->getArrayCopy()) + ->setResource('document/'.$document->getId()) + ->setPayload($document->getArrayCopy()) ; $response->dynamic($document, Response::MODEL_DOCUMENT); @@ -2081,7 +2128,7 @@ App::delete('/v1/database/collections/:collectionId/documents/:documentId') ->desc('Delete Document') ->groups(['api', 'database']) ->label('scope', 'documents.write') - ->label('event', 'database.documents.delete') + ->label('event', '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.method', 'deleteDocument') @@ -2101,8 +2148,8 @@ App::delete('/v1/database/collections/:collectionId/documents/:documentId') /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ /** @var Appwrite\Event\Event $events */ - /** @var Appwrite\Event\Event $audits */ - /** @var Appwrite\Event\Event $deletes */ + /** @var Appwrite\Event\Audit $audits */ + /** @var Appwrite\Event\Delete $deletes */ /** @var Appwrite\Stats\Stats $usage */ /** @var string $mode */ @@ -2150,24 +2197,25 @@ App::delete('/v1/database/collections/:collectionId/documents/:documentId') $document->setAttribute('$collection', $collectionId); $deletes - ->setParam('type', DELETE_TYPE_AUDIT) - ->setParam('document', $document) + ->setType(DELETE_TYPE_AUDIT) + ->setDocument($document) ; $usage ->setParam('database.documents.delete', 1) ->setParam('collectionId', $collectionId) - ; + ; $events - ->setParam('eventData', $response->output($document, Response::MODEL_DOCUMENT)) - ->setParam('collection', $collection->getArrayCopy()); + ->setParam('collectionId', $collection->getId()) + ->setParam('documentId', $document->getId()) + ->setContext($collection) + ->setPayload($response->output($document, Response::MODEL_DOCUMENT)) ; $audits - ->setParam('event', 'database.documents.delete') - ->setParam('resource', 'document/'.$document->getId()) - ->setParam('data', $document->getArrayCopy()) // Audit document in case of malicious or disastrous action + ->setResource('document/'.$document->getId()) + ->setPayload($document->getArrayCopy()) ; $response->noContent(); diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index e2229e7698..069a576e12 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -2,7 +2,9 @@ use Ahc\Jwt\JWT; use Appwrite\Auth\Auth; -use Appwrite\Event\Event; +use Appwrite\Event\Build; +use Appwrite\Event\Func; +use Appwrite\Event\Validator\Event as ValidatorEvent; use Appwrite\Extend\Exception; use Appwrite\Utopia\Database\Validator\CustomId; use Utopia\Database\Validator\UID; @@ -34,7 +36,7 @@ App::post('/v1/functions') ->groups(['api', 'functions']) ->desc('Create Function') ->label('scope', 'functions.write') - ->label('event', 'functions.create') + ->label('event', 'functions.[functionId].create') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'functions') ->label('sdk.method', 'create') @@ -47,14 +49,16 @@ App::post('/v1/functions') ->param('execute', [], new ArrayList(new Text(64), APP_LIMIT_ARRAY_PARAMS_SIZE), '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 ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' scopes are allowed, each 64 characters long.') ->param('runtime', '', new WhiteList(array_keys(Config::getParam('runtimes')), true), 'Execution runtime.') ->param('vars', [], new Assoc(), 'Key-value JSON object that will be passed to the function as environment variables.', true) - ->param('events', [], new ArrayList(new WhiteList(array_keys(Config::getParam('events')), true), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Events list. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' events are allowed.', true) + ->param('events', [], new ArrayList(new ValidatorEvent(), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Events list. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' events are allowed.', true) ->param('schedule', '', new Cron(), 'Schedule CRON syntax.', true) ->param('timeout', 15, new Range(1, (int) App::getEnv('_APP_FUNCTIONS_TIMEOUT', 900)), 'Function maximum execution time in seconds.', true) ->inject('response') ->inject('dbForProject') - ->action(function ($functionId, $name, $execute, $runtime, $vars, $events, $schedule, $timeout, $response, $dbForProject) { + ->inject('events') + ->action(function ($functionId, $name, $execute, $runtime, $vars, $events, $schedule, $timeout, $response, $dbForProject, $eventsInstance) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ + /** @var Appwrite\Event\Event $eventsInstance */ $functionId = ($functionId == 'unique()') ? $dbForProject->getId() : $functionId; $function = $dbForProject->createDocument('functions', new Document([ @@ -75,6 +79,8 @@ App::post('/v1/functions') 'search' => implode(' ', [$functionId, $name, $runtime]), ])); + $eventsInstance->setParam('functionId', $function->getId()); + $response->setStatusCode(Response::STATUS_CODE_CREATED); $response->dynamic($function, Response::MODEL_FUNCTION); }); @@ -144,7 +150,7 @@ App::get('/v1/functions/runtimes') return $runtimes[$key]; }, array_keys($runtimes)); - $response->dynamic(new Document([ + $response->dynamic(new Document([ 'total' => count($runtimes), 'runtimes' => $runtimes ]), Response::MODEL_RUNTIME_LIST); @@ -202,9 +208,9 @@ App::get('/v1/functions/:functionId/usage') if ($function->isEmpty()) { throw new Exception('Function not found', 404, Exception::FUNCTION_NOT_FOUND); } - + $usage = []; - if(App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { + if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { $periods = [ '24h' => [ 'period' => '30m', @@ -223,16 +229,16 @@ App::get('/v1/functions/:functionId/usage') 'limit' => 90, ], ]; - + $metrics = [ - "functions.$functionId.executions", - "functions.$functionId.failures", + "functions.$functionId.executions", + "functions.$functionId.failures", "functions.$functionId.compute" ]; $stats = []; - Authorization::skip(function() use ($dbForProject, $periods, $range, $metrics, &$stats) { + Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { foreach ($metrics as $metric) { $limit = $periods[$range]['limit']; $period = $periods[$range]['period']; @@ -241,7 +247,7 @@ App::get('/v1/functions/:functionId/usage') 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][] = [ @@ -254,7 +260,7 @@ App::get('/v1/functions/:functionId/usage') $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 + $diff = match ($period) { // convert period to seconds for unix timestamp math '30m' => 1800, '1d' => 86400, }; @@ -265,7 +271,7 @@ App::get('/v1/functions/:functionId/usage') $backfill--; } $stats[$metric] = array_reverse($stats[$metric]); - } + } }); $usage = new Document([ @@ -283,7 +289,7 @@ App::put('/v1/functions/:functionId') ->groups(['api', 'functions']) ->desc('Update Function') ->label('scope', 'functions.write') - ->label('event', 'functions.update') + ->label('event', 'functions.[functionId].update') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'functions') ->label('sdk.method', 'update') @@ -295,18 +301,20 @@ App::put('/v1/functions/:functionId') ->param('name', '', new Text(128), 'Function name. Max length: 128 chars.') ->param('execute', [], new ArrayList(new Text(64), APP_LIMIT_ARRAY_PARAMS_SIZE), '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 ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' scopes are allowed, each 64 characters long.') ->param('vars', [], new Assoc(), 'Key-value JSON object that will be passed to the function as environment variables.', true) - ->param('events', [], new ArrayList(new WhiteList(array_keys(Config::getParam('events')), true), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Events list. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' events are allowed.', true) + ->param('events', [], new ArrayList(new ValidatorEvent(), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Events list. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' events are allowed.', true) ->param('schedule', '', new Cron(), 'Schedule CRON syntax.', true) ->param('timeout', 15, new Range(1, (int) App::getEnv('_APP_FUNCTIONS_TIMEOUT', 900)), 'Maximum execution time in seconds.', true) ->inject('response') ->inject('dbForProject') ->inject('project') ->inject('user') - ->action(function ($functionId, $name, $execute, $vars, $events, $schedule, $timeout, $response, $dbForProject, $project, $user) { + ->inject('events') + ->action(function ($functionId, $name, $execute, $vars, $events, $schedule, $timeout, $response, $dbForProject, $project, $user, $eventsInstance) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ /** @var Utopia\Database\Document $project */ - /** @var Appwrite\Auth\User $user */ + /** @var Utopia\Database\Document $user */ + /** @var Appwrite\Event\Event $eventsInstance */ $function = $dbForProject->getDocument('functions', $functionId); @@ -331,16 +339,19 @@ App::put('/v1/functions/:functionId') ]))); if ($next && $schedule !== $original) { - ResqueScheduler::enqueueAt($next, Event::FUNCTIONS_QUEUE_NAME, Event::FUNCTIONS_CLASS_NAME, [ - 'projectId' => $project->getId(), - 'webhooks' => $project->getAttribute('webhooks', []), - 'functionId' => $function->getId(), - 'userId' => $user->getId(), - 'executionId' => null, - 'trigger' => 'schedule', - ]); // Async task rescheduale + // Async task reschedule + $functionEvent = new Func(); + $functionEvent + ->setFunction($function) + ->setType('schedule') + ->setUser($user) + ->setProject($project); + + $functionEvent->schedule($next); } + $eventsInstance->setParam('functionId', $function->getId()); + $response->dynamic($function, Response::MODEL_FUNCTION); }); @@ -348,7 +359,7 @@ App::patch('/v1/functions/:functionId/deployments/:deploymentId') ->groups(['api', 'functions']) ->desc('Update Function Deployment') ->label('scope', 'functions.write') - ->label('event', 'functions.deployments.update') + ->label('event', 'functions.[functionId].deployments.[deploymentId].update') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'functions') ->label('sdk.method', 'updateDeployment') @@ -361,10 +372,12 @@ App::patch('/v1/functions/:functionId/deployments/:deploymentId') ->inject('response') ->inject('dbForProject') ->inject('project') - ->action(function ($functionId, $deploymentId, $response, $dbForProject, $project) { + ->inject('events') + ->action(function ($functionId, $deploymentId, $response, $dbForProject, $project, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ /** @var Utopia\Database\Document $project */ + /** @var Appwrite\Event\Event $events */ $function = $dbForProject->getDocument('functions', $functionId); $deployment = $dbForProject->getDocument('deployments', $deploymentId); @@ -396,14 +409,18 @@ App::patch('/v1/functions/:functionId/deployments/:deploymentId') ]))); if ($next) { // Init first schedule - ResqueScheduler::enqueueAt($next, 'v1-functions', 'FunctionsV1', [ - 'projectId' => $project->getId(), - 'webhooks' => $project->getAttribute('webhooks', []), - 'functionId' => $function->getId(), - 'executionId' => null, - 'trigger' => 'schedule', - ]); // Async task rescheduale + $functionEvent = new Func(); + $functionEvent + ->setType('schedule') + ->setFunction($function) + ->setProject($project); + $functionEvent->schedule($next); } + + $events + ->setParam('functionId', $function->getId()) + ->setParam('deploymentId', $deployment->getId()); + $response->dynamic($function, Response::MODEL_FUNCTION); }); @@ -411,7 +428,7 @@ App::delete('/v1/functions/:functionId') ->groups(['api', 'functions']) ->desc('Delete Function') ->label('scope', 'functions.write') - ->label('event', 'functions.delete') + ->label('event', 'functions.[functionId].delete') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'functions') ->label('sdk.method', 'delete') @@ -422,10 +439,12 @@ App::delete('/v1/functions/:functionId') ->inject('response') ->inject('dbForProject') ->inject('deletes') - ->action(function ($functionId, $response, $dbForProject, $deletes) { + ->inject('events') + ->action(function ($functionId, $response, $dbForProject, $deletes, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ - /** @var Appwrite\Event\Event $deletes */ + /** @var Appwrite\Event\Delete $deletes */ + /** @var Appwrite\Event\Event $events */ $function = $dbForProject->getDocument('functions', $functionId); @@ -438,9 +457,10 @@ App::delete('/v1/functions/:functionId') } $deletes - ->setParam('type', DELETE_TYPE_DOCUMENT) - ->setParam('document', $function) - ; + ->setType(DELETE_TYPE_DOCUMENT) + ->setDocument($function); + + $events->setParam('functionId', $function->getId()); $response->noContent(); }); @@ -449,7 +469,7 @@ App::post('/v1/functions/:functionId/deployments') ->groups(['api', 'functions']) ->desc('Create Deployment') ->label('scope', 'functions.write') - ->label('event', 'functions.deployments.create') + ->label('event', 'functions.[functionId].deployments.[deploymentId].create') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'functions') ->label('sdk.method', 'createDeployment') @@ -467,17 +487,17 @@ App::post('/v1/functions/:functionId/deployments') ->inject('response') ->inject('dbForProject') ->inject('usage') - ->inject('user') + ->inject('events') ->inject('project') ->inject('deviceFunctions') ->inject('deviceLocal') - ->action(function ($functionId, $entrypoint, $file, $activate, $request, $response, $dbForProject, $usage, $user, $project, $deviceFunctions, $deviceLocal) { + ->action(function ($functionId, $entrypoint, $file, $activate, $request, $response, $dbForProject, $usage, $events, $project, $deviceFunctions, $deviceLocal) { /** @var Utopia\Swoole\Request $request */ /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ /** @var Appwrite\Event\Event $usage */ - /** @var Appwrite\Auth\User $user */ - /** @var Appwrite\Database\Document $project */ + /** @var Appwrite\Event\Event $events */ + /** @var Utopia\Database\Document $project */ /** @var Utopia\Storage\Device $deviceFunctions */ /** @var Utopia\Storage\Device $deviceLocal */ @@ -515,7 +535,7 @@ App::post('/v1/functions/:functionId/deployments') $end = $request->getContentRangeEnd(); $fileSize = $request->getContentRangeSize(); $deploymentId = $request->getHeader('x-appwrite-id', $deploymentId); - if(is_null($start) || is_null($end) || is_null($fileSize)) { + if (is_null($start) || is_null($end) || is_null($fileSize)) { throw new Exception('Invalid content-range header', 400, Exception::STORAGE_INVALID_CONTENT_RANGE); } @@ -539,8 +559,8 @@ App::post('/v1/functions/:functionId/deployments') // Save to storage $fileSize ??= $deviceLocal->getFileSize($fileTmpName); - $path = $deviceFunctions->getPath($deploymentId.'.'.\pathinfo($fileName, PATHINFO_EXTENSION)); - + $path = $deviceFunctions->getPath($deploymentId . '.' . \pathinfo($fileName, PATHINFO_EXTENSION)); + $deployment = $dbForProject->getDocument('deployments', $deploymentId); $metadata = ['content_type' => $deviceLocal->getFileMimeType($fileTmpName)]; @@ -560,7 +580,7 @@ App::post('/v1/functions/:functionId/deployments') $activate = (bool) filter_var($activate, FILTER_VALIDATE_BOOLEAN); - if($chunksUploaded === $chunks) { + if ($chunksUploaded === $chunks) { if ($activate) { // Remove deploy for all other deployments. $activeDeployments = $dbForProject->find('deployments', [ @@ -574,7 +594,7 @@ App::post('/v1/functions/:functionId/deployments') $dbForProject->updateDocument('deployments', $activeDeployment->getId(), $activeDeployment); } } - + $fileSize = $deviceFunctions->getFileSize($path); if ($deployment->isEmpty()) { @@ -596,19 +616,18 @@ App::post('/v1/functions/:functionId/deployments') $deployment = $dbForProject->updateDocument('deployments', $deploymentId, $deployment->setAttribute('size', $fileSize)->setAttribute('metadata', $metadata)); } - // Enqueue a message to start the build - Resque::enqueue(Event::BUILDS_QUEUE_NAME, Event::BUILDS_CLASS_NAME, [ - 'projectId' => $project->getId(), - 'resourceId' => $function->getId(), - 'deploymentId' => $deploymentId, - 'type' => BUILD_TYPE_DEPLOYMENT - ]); + // Start the build + $buildEvent = new Build(); + $buildEvent + ->setType(BUILD_TYPE_DEPLOYMENT) + ->setResource($function) + ->setDeployment($deployment) + ->setProject($project) + ->trigger(); - $usage - ->setParam('storage', $deployment->getAttribute('size', 0)) - ; + $usage->setParam('storage', $deployment->getAttribute('size', 0)); } else { - if($deployment->isEmpty()) { + if ($deployment->isEmpty()) { $deployment = $dbForProject->createDocument('deployments', new Document([ '$id' => $deploymentId, '$read' => ['role:all'], @@ -632,6 +651,10 @@ App::post('/v1/functions/:functionId/deployments') $metadata = null; + $events + ->setParam('functionId', $function->getId()) + ->setParam('deploymentId', $deployment->getId()); + $response->setStatusCode(Response::STATUS_CODE_CREATED); $response->dynamic($deployment, Response::MODEL_DEPLOYMENT); }); @@ -670,7 +693,6 @@ App::get('/v1/functions/:functionId/deployments') $cursorDeployment = $dbForProject->getDocument('deployments', $cursor); if ($cursorDeployment->isEmpty()) { - // TODO: Shouldn't this be a 404 error ? throw new Exception("Tag '{$cursor}' for the 'cursor' value not found.", 400, Exception::GENERAL_CURSOR_NOT_FOUND); } } @@ -742,7 +764,7 @@ App::delete('/v1/functions/:functionId/deployments/:deploymentId') ->groups(['api', 'functions']) ->desc('Delete Deployment') ->label('scope', 'functions.write') - ->label('event', 'functions.deployments.delete') + ->label('event', 'functions.[functionId].deployments.[deploymentId].delete') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'functions') ->label('sdk.method', 'deleteDeployment') @@ -755,19 +777,21 @@ App::delete('/v1/functions/:functionId/deployments/:deploymentId') ->inject('dbForProject') ->inject('usage') ->inject('deletes') + ->inject('events') ->inject('deviceFunctions') - ->action(function ($functionId, $deploymentId, $response, $dbForProject, $usage, $deletes, $deviceFunctions) { + ->action(function ($functionId, $deploymentId, $response, $dbForProject, $usage, $deletes, $events, $deviceFunctions) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ /** @var Appwrite\Event\Event $usage */ - /** @var Appwrite\Event\Event $deletes */ + /** @var Appwrite\Event\Delete $deletes */ + /** @var Appwrite\Event\Event $events */ /** @var Utopia\Storage\Device $deviceFunctions */ $function = $dbForProject->getDocument('functions', $functionId); if ($function->isEmpty()) { throw new Exception('Function not found', 404, Exception::FUNCTION_NOT_FOUND); } - + $deployment = $dbForProject->getDocument('deployments', $deploymentId); if ($deployment->isEmpty()) { throw new Exception('Deployment not found', 404, Exception::DEPLOYMENT_NOT_FOUND); @@ -783,20 +807,22 @@ App::delete('/v1/functions/:functionId/deployments/:deploymentId') } } - if($function->getAttribute('deployment') === $deployment->getId()) { // Reset function deployment + if ($function->getAttribute('deployment') === $deployment->getId()) { // Reset function deployment $function = $dbForProject->updateDocument('functions', $function->getId(), new Document(array_merge($function->getArrayCopy(), [ 'deployment' => '', ]))); } $usage - ->setParam('storage', $deployment->getAttribute('size', 0) * -1) - ; + ->setParam('storage', $deployment->getAttribute('size', 0) * -1); + + $events + ->setParam('functionId', $function->getId()) + ->setParam('deploymentId', $deployment->getId()); $deletes - ->setParam('type', DELETE_TYPE_DOCUMENT) - ->setParam('document', $deployment) - ; + ->setType(DELETE_TYPE_DOCUMENT) + ->setDocument($deployment); $response->noContent(); }); @@ -805,7 +831,7 @@ App::post('/v1/functions/:functionId/executions') ->groups(['api', 'functions']) ->desc('Create Execution') ->label('scope', 'execution.write') - ->label('event', 'functions.executions.create') + ->label('event', 'functions.[functionId].executions.[executionId].create') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'functions') ->label('sdk.method', 'createExecution') @@ -822,13 +848,15 @@ App::post('/v1/functions/:functionId/executions') ->inject('project') ->inject('dbForProject') ->inject('user') - ->action(function ($functionId, $data, $async, $response, $project, $dbForProject, $user) { + ->inject('events') + ->action(function ($functionId, $data, $async, $response, $project, $dbForProject, $user, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Document $project */ /** @var Utopia\Database\Database $dbForProject */ /** @var Utopia\Database\Document $user */ + /** @var Appwrite\Event\Event $events */ - $function = Authorization::skip(fn() => $dbForProject->getDocument('functions', $functionId)); + $function = Authorization::skip(fn () => $dbForProject->getDocument('functions', $functionId)); if ($function->isEmpty()) { throw new Exception('Function not found', 404, Exception::FUNCTION_NOT_FOUND); @@ -842,7 +870,7 @@ App::post('/v1/functions/:functionId/executions') throw new Exception('Runtime "' . $function->getAttribute('runtime', '') . '" is not supported', 400, Exception::FUNCTION_RUNTIME_UNSUPPORTED); } - $deployment = Authorization::skip(fn() => $dbForProject->getDocument('deployments', $function->getAttribute('deployment', ''))); + $deployment = Authorization::skip(fn () => $dbForProject->getDocument('deployments', $function->getAttribute('deployment', ''))); if ($deployment->getAttribute('resourceId') !== $function->getId()) { throw new Exception('Deployment not found. Create a deployment before trying to execute a function', 404, Exception::DEPLOYMENT_NOT_FOUND); @@ -853,7 +881,7 @@ App::post('/v1/functions/:functionId/executions') } /** Check if build has completed */ - $build = Authorization::skip(fn() => $dbForProject->getDocument('builds', $deployment->getAttribute('buildId', ''))); + $build = Authorization::skip(fn () => $dbForProject->getDocument('builds', $deployment->getAttribute('buildId', ''))); if ($build->isEmpty()) { throw new Exception('Build not found', 404, Exception::BUILD_NOT_FOUND); } @@ -870,7 +898,7 @@ App::post('/v1/functions/:functionId/executions') $executionId = $dbForProject->getId(); - $execution = Authorization::skip(fn() => $dbForProject->createDocument('executions', new Document([ + $execution = Authorization::skip(fn () => $dbForProject->createDocument('executions', new Document([ '$id' => $executionId, '$read' => (!$user->isEmpty()) ? ['user:' . $user->getId()] : [], '$write' => [], @@ -880,7 +908,7 @@ App::post('/v1/functions/:functionId/executions') 'trigger' => 'http', // http / schedule / event 'status' => 'waiting', // waiting / processing / completed / failed 'statusCode' => 0, - 'stdout' => '', + 'response' => '', 'stderr' => '', 'time' => 0.0, 'search' => implode(' ', [$functionId, $executionId]), @@ -892,13 +920,14 @@ App::post('/v1/functions/:functionId/executions') $sessions = $user->getAttribute('sessions', []); $current = new Document(); - foreach ($sessions as $session) { /** @var Utopia\Database\Document $session */ + foreach ($sessions as $session) { + /** @var Utopia\Database\Document $session */ if ($session->getAttribute('secret') == Auth::hash(Auth::$secret)) { // If current session delete the cookies too $current = $session; } } - if(!$current->isEmpty()) { + if (!$current->isEmpty()) { $jwtObj = new JWT(App::getEnv('_APP_OPENSSL_KEY_V1'), 'HS256', 900, 10); // Instantiate with key, algo, maxAge and leeway. $jwt = $jwtObj->encode([ 'userId' => $user->getId(), @@ -907,19 +936,26 @@ App::post('/v1/functions/:functionId/executions') } } + $events + ->setParam('functionId', $function->getId()) + ->setParam('executionId', $execution->getId()) + ->setContext($function); + if ($async) { - Resque::enqueue(Event::FUNCTIONS_QUEUE_NAME, Event::FUNCTIONS_CLASS_NAME, [ - 'projectId' => $project->getId(), - 'functionId' => $function->getId(), - 'webhooks' => $project->getAttribute('webhooks', []), - 'executionId' => $execution->getId(), - 'trigger' => 'http', - 'data' => $data, - 'userId' => $user->getId(), - 'jwt' => $jwt, - ]); + $event = new Func(); + $event + ->setType('http') + ->setExecution($execution) + ->setFunction($function) + ->setData($data) + ->setJWT($jwt) + ->setProject($project) + ->setUser($user); + + $event->trigger(); $response->setStatusCode(Response::STATUS_CODE_CREATED); + return $response->dynamic($execution, Response::MODEL_EXECUTION); } @@ -956,17 +992,20 @@ App::post('/v1/functions/:functionId/executions') /** Update execution status */ $execution->setAttribute('status', $executionResponse['status']); $execution->setAttribute('statusCode', $executionResponse['statusCode']); - $execution->setAttribute('stdout', $executionResponse['stdout']); + $execution->setAttribute('response', $executionResponse['response']); $execution->setAttribute('stderr', $executionResponse['stderr']); $execution->setAttribute('time', $executionResponse['time']); } catch (\Throwable $th) { + $endtime = \microtime(true); + $time = $endtime - $execution->getAttribute('dateCreated'); + $execution->setAttribute('time', $time); $execution->setAttribute('status', 'failed'); $execution->setAttribute('statusCode', $th->getCode()); $execution->setAttribute('stderr', $th->getMessage()); Console::error($th->getMessage()); } - Authorization::skip(fn() => $dbForProject->updateDocument('executions', $executionId, $execution)); + Authorization::skip(fn () => $dbForProject->updateDocument('executions', $executionId, $execution)); $response ->setStatusCode(Response::STATUS_CODE_CREATED) @@ -996,7 +1035,7 @@ App::get('/v1/functions/:functionId/executions') /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ - $function = Authorization::skip(fn() => $dbForProject->getDocument('functions', $functionId)); + $function = Authorization::skip(fn () => $dbForProject->getDocument('functions', $functionId)); if ($function->isEmpty()) { throw new Exception('Function not found', 404, Exception::FUNCTION_NOT_FOUND); @@ -1046,7 +1085,7 @@ App::get('/v1/functions/:functionId/executions/:executionId') /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ - $function = Authorization::skip(fn() => $dbForProject->getDocument('functions', $functionId)); + $function = Authorization::skip(fn () => $dbForProject->getDocument('functions', $functionId)); if ($function->isEmpty()) { throw new Exception('Function not found', 404, Exception::FUNCTION_NOT_FOUND); @@ -1069,7 +1108,7 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/builds/:buildId') ->groups(['api', 'functions']) ->desc('Retry Build') ->label('scope', 'functions.write') - ->label('event', 'functions.deployments.update') + ->label('event', 'functions.[functionId].deployments.[deploymentId].update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'functions') ->label('sdk.method', 'retryBuild') @@ -1082,10 +1121,12 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/builds/:buildId') ->inject('response') ->inject('dbForProject') ->inject('project') - ->action(function ($functionId, $deploymentId, $buildId, $response, $dbForProject, $project) { + ->inject('events') + ->action(function ($functionId, $deploymentId, $buildId, $response, $dbForProject, $project, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ /** @var Utopia\Database\Document $project */ + /** @var Appwrite\Event\Event $events */ $function = $dbForProject->getDocument('functions', $functionId); $deployment = $dbForProject->getDocument('deployments', $deploymentId); @@ -1098,7 +1139,7 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/builds/:buildId') throw new Exception('Deployment not found', 404, Exception::DEPLOYMENT_NOT_FOUND); } - $build = Authorization::skip(fn() => $dbForProject->getDocument('builds', $buildId)); + $build = Authorization::skip(fn () => $dbForProject->getDocument('builds', $buildId)); if ($build->isEmpty()) { throw new Exception('Build not found', 404, Exception::BUILD_NOT_FOUND); @@ -1108,13 +1149,18 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/builds/:buildId') throw new Exception('Build not failed', 400, Exception::BUILD_IN_PROGRESS); } - // Enqueue a message to start the build - Resque::enqueue(Event::BUILDS_QUEUE_NAME, Event::BUILDS_CLASS_NAME, [ - 'projectId' => $project->getId(), - 'resourceId' => $function->getId(), - 'deploymentId' => $deploymentId, - 'type' => BUILD_TYPE_RETRY - ]); + $events + ->setParam('functionId', $function->getId()) + ->setParam('deploymentId', $deployment->getId()); + + // Retry the build + $buildEvent = new Build(); + $buildEvent + ->setType(BUILD_TYPE_RETRY) + ->setResource($function) + ->setDeployment($deployment) + ->setProject($project) + ->trigger(); $response->noContent(); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/health.php b/app/controllers/api/health.php index 2ca66e24ba..1fc24fd0b2 100644 --- a/app/controllers/api/health.php +++ b/app/controllers/api/health.php @@ -206,23 +206,6 @@ App::get('/v1/health/queue/logs') $response->dynamic(new Document([ 'size' => Resque::size(Event::AUDITS_QUEUE_NAME) ]), Response::MODEL_HEALTH_QUEUE); }, ['response']); -App::get('/v1/health/queue/usage') - ->desc('Get Usage Queue') - ->groups(['api', 'health']) - ->label('scope', 'health.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'health') - ->label('sdk.method', 'getQueueUsage') - ->label('sdk.description', '/docs/references/health/get-queue-usage.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_HEALTH_QUEUE) - ->inject('response') - ->action(function (Response $response) { - - $response->dynamic(new Document([ 'size' => Resque::size(Event::USAGE_QUEUE_NAME) ]), Response::MODEL_HEALTH_QUEUE); - }, ['response']); - App::get('/v1/health/queue/certificates') ->desc('Get Certificates Queue') ->groups(['api', 'health']) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index a9a7e75c3d..7e730513f7 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -2,7 +2,9 @@ use Appwrite\Auth\Auth; use Appwrite\Auth\Validator\Password; -use Appwrite\Event\Event; +use Appwrite\Event\Certificate; +use Appwrite\Event\Delete; +use Appwrite\Event\Validator\Event; use Appwrite\Network\Validator\CNAME; use Appwrite\Network\Validator\Domain as DomainValidator; use Appwrite\Network\Validator\Origin; @@ -23,7 +25,7 @@ use Utopia\Registry\Registry; use Appwrite\Extend\Exception; use Utopia\Validator\ArrayList; use Utopia\Validator\Boolean; -use Utopia\Validator\Integer; +use Utopia\Validator\Hostname; use Utopia\Validator\Range; use Utopia\Validator\Text; use Utopia\Validator\WhiteList; @@ -75,6 +77,9 @@ App::post('/v1/projects') } $projectId = ($projectId == 'unique()') ? $dbForConsole->getId() : $projectId; + if($projectId === 'console') { + throw new Exception("'console' is a reserved project.", 400, Exception::PROJECT_RESERVED_PROJECT); + } $project = $dbForConsole->createDocument('projects', new Document([ '$id' => $projectId == 'unique()' ? $dbForConsole->getId() : $projectId, '$read' => ['team:' . $teamId], @@ -520,7 +525,7 @@ App::delete('/v1/projects/:projectId') ->inject('user') ->inject('dbForConsole') ->inject('deletes') - ->action(function (string $projectId, string $password, Response $response, Document $user, Database $dbForConsole, Event $deletes) { + ->action(function (string $projectId, string $password, Response $response, Document $user, Database $dbForConsole, Delete $deletes) { if (!Auth::passwordVerify($password, $user->getAttribute('password'))) { // Double check user password throw new Exception('Invalid credentials', 401, Exception::USER_INVALID_CREDENTIALS); @@ -533,8 +538,8 @@ App::delete('/v1/projects/:projectId') } $deletes - ->setParam('type', DELETE_TYPE_DOCUMENT) - ->setParam('document', $project) + ->setType(DELETE_TYPE_DOCUMENT) + ->setDocument($project) ; if (!$dbForConsole->deleteDocument('teams', $project->getAttribute('teamId', null))) { @@ -562,7 +567,7 @@ App::post('/v1/projects/:projectId/webhooks') ->label('sdk.response.model', Response::MODEL_WEBHOOK) ->param('projectId', null, new UID(), 'Project unique ID.') ->param('name', null, new Text(128), 'Webhook name. Max length: 128 chars.') - ->param('events', null, new ArrayList(new WhiteList(array_keys(Config::getParam('events'), true), true), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Events list. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' events are allowed.') + ->param('events', null, new ArrayList(new Event(), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Events list. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' events are allowed.') ->param('url', null, new URL(['http', 'https']), 'Webhook URL.') ->param('security', false, new Boolean(true), 'Certificate verification, false for disabled or true for enabled.') ->param('httpUser', '', new Text(256), 'Webhook HTTP user. Max length: 256 chars.', true) @@ -678,7 +683,7 @@ App::put('/v1/projects/:projectId/webhooks/:webhookId') ->param('projectId', null, new UID(), 'Project unique ID.') ->param('webhookId', null, new UID(), 'Webhook unique ID.') ->param('name', null, new Text(128), 'Webhook name. Max length: 128 chars.') - ->param('events', null, new ArrayList(new WhiteList(array_keys(Config::getParam('events'), true), true), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Events list. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' events are allowed.') + ->param('events', null, new ArrayList(new Event(), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Events list. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' events are allowed.') ->param('url', null, new URL(['http', 'https']), 'Webhook URL.') ->param('security', false, new Boolean(true), 'Certificate verification, false for disabled or true for enabled.') ->param('httpUser', '', new Text(256), 'Webhook HTTP user. Max length: 256 chars.', true) @@ -964,11 +969,10 @@ App::post('/v1/projects/:projectId/platforms') ->param('name', null, new Text(128), 'Platform name. Max length: 128 chars.') ->param('key', '', new Text(256), 'Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.', true) ->param('store', '', new Text(256), 'App store or Google Play store ID. Max length: 256 chars.', true) - ->param('hostname', '', new Text(256), 'Platform client hostname. Max length: 256 chars.', true) + ->param('hostname', '', new Hostname(), 'Platform client hostname. Max length: 256 chars.', true) ->inject('response') ->inject('dbForConsole') ->action(function (string $projectId, string $type, string $name, string $key, string $store, string $hostname, Response $response, Database $dbForConsole) { - $project = $dbForConsole->getDocument('projects', $projectId); if ($project->isEmpty()) { @@ -1077,11 +1081,10 @@ App::put('/v1/projects/:projectId/platforms/:platformId') ->param('name', null, new Text(128), 'Platform name. Max length: 128 chars.') ->param('key', '', new Text(256), 'Package name for android or bundle ID for iOS. Max length: 256 chars.', true) ->param('store', '', new Text(256), 'App store or Google Play store ID. Max length: 256 chars.', true) - ->param('hostname', '', new Text(256), 'Platform client URL. Max length: 256 chars.', true) + ->param('hostname', '', new Hostname(), 'Platform client URL. Max length: 256 chars.', true) ->inject('response') ->inject('dbForConsole') ->action(function (string $projectId, string $platformId, string $name, string $key, string $store, string $hostname, Response $response, Database $dbForConsole) { - $project = $dbForConsole->getDocument('projects', $projectId); if ($project->isEmpty()) { @@ -1328,10 +1331,10 @@ App::patch('/v1/projects/:projectId/domains/:domainId/verification') $dbForConsole->deleteCachedDocument('projects', $project->getId()); // Issue a TLS certificate when domain is verified - Resque::enqueue('v1-certificates', 'CertificatesV1', [ - 'document' => $domain->getArrayCopy(), - 'domain' => $domain->getAttribute('domain'), - ]); + $event = new Certificate(); + $event + ->setDomain($domain) + ->trigger(); $response->dynamic($domain, Response::MODEL_DOMAIN); }); @@ -1350,7 +1353,7 @@ App::delete('/v1/projects/:projectId/domains/:domainId') ->inject('response') ->inject('dbForConsole') ->inject('deletes') - ->action(function (string $projectId, string $domainId, Response $response, Database $dbForConsole, $deletes) { + ->action(function (string $projectId, string $domainId, Response $response, Database $dbForConsole, Delete $deletes) { $project = $dbForConsole->getDocument('projects', $projectId); @@ -1372,9 +1375,8 @@ App::delete('/v1/projects/:projectId/domains/:domainId') $dbForConsole->deleteCachedDocument('projects', $project->getId()); $deletes - ->setParam('type', DELETE_TYPE_CERTIFICATES) - ->setParam('document', $domain) - ; + ->setType(DELETE_TYPE_CERTIFICATES) + ->setDocument($domain); $response->noContent(); }); diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index f732f813cb..c2d6c3452e 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -2,6 +2,8 @@ use Appwrite\Auth\Auth; use Appwrite\ClamAV\Network; +use Appwrite\Event\Audit; +use Appwrite\Event\Delete; use Appwrite\Event\Event; use Appwrite\Utopia\Database\Validator\CustomId; use Appwrite\OpenSSL\OpenSSL; @@ -43,7 +45,7 @@ App::post('/v1/storage/buckets') ->desc('Create bucket') ->groups(['api', 'storage']) ->label('scope', 'buckets.write') - ->label('event', 'storage.buckets.create') + ->label('event', 'buckets.[bucketId].create') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'createBucket') @@ -57,7 +59,7 @@ App::post('/v1/storage/buckets') ->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](/docs/permissions) and get a full list of available permissions.', true) ->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](/docs/permissions) and get a full list of available permissions.', true) ->param('enabled', true, new Boolean(true), 'Is bucket enabled?', true) - ->param('maximumFileSize', (int) App::getEnv('_APP_STORAGE_LIMIT', 0), new Integer(), 'Maximum file size allowed in bytes. Maximum allowed value is ' . Storage::human(App::getEnv('_APP_STORAGE_LIMIT', 0), 0) . '. 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)', true) + ->param('maximumFileSize', (int) App::getEnv('_APP_STORAGE_LIMIT', 0), new Range(1, (int) App::getEnv('_APP_STORAGE_LIMIT', 0)), 'Maximum file size allowed in bytes. Maximum allowed value is ' . Storage::human(App::getEnv('_APP_STORAGE_LIMIT', 0), 0) . '. 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)', true) ->param('allowedFileExtensions', [], new ArrayList(new Text(64), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Allowed file extensions. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' extensions are allowed, each 64 characters long.', true) ->param('encryption', true, new Boolean(true), 'Is encryption enabled? For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' encryption is skipped even if it\'s enabled', true) ->param('antivirus', true, new Boolean(true), 'Is virus scanning enabled? For file size above ' . Storage::human(APP_LIMIT_ANTIVIRUS, 0) . ' AntiVirus scanning is skipped even if it\'s enabled', true) @@ -65,7 +67,8 @@ App::post('/v1/storage/buckets') ->inject('dbForProject') ->inject('audits') ->inject('usage') - ->action(function (string $bucketId, string $name, string $permission, ?array $read, ?array $write, bool $enabled, int $maximumFileSize, array $allowedFileExtensions, bool $encryption, bool $antivirus, Response $response, Database $dbForProject, Event $audits, Stats $usage) { + ->inject('events') + ->action(function (string $bucketId, string $name, string $permission, ?array $read, ?array $write, bool $enabled, int $maximumFileSize, array $allowedFileExtensions, bool $encryption, bool $antivirus, Response $response, Database $dbForProject, Audit $audits, Stats $usage, Event $events) { $bucketId = $bucketId === 'unique()' ? $dbForProject->getId() : $bucketId; try { @@ -126,9 +129,12 @@ App::post('/v1/storage/buckets') } $audits - ->setParam('event', 'storage.buckets.create') - ->setParam('resource', 'storage/buckets/' . $bucket->getId()) - ->setParam('data', $bucket->getArrayCopy()) + ->setResource('storage/buckets/' . $bucket->getId()) + ->setPayload($bucket->getArrayCopy()) + ; + + $events + ->setParam('bucketId', $bucket->getId()) ; $usage->setParam('storage.buckets.create', 1); @@ -209,7 +215,7 @@ App::put('/v1/storage/buckets/:bucketId') ->desc('Update Bucket') ->groups(['api', 'storage']) ->label('scope', 'buckets.write') - ->label('event', 'storage.buckets.update') + ->label('event', 'buckets.[bucketId].update') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'updateBucket') @@ -223,7 +229,7 @@ App::put('/v1/storage/buckets/:bucketId') ->param('read', null, new Permissions(), '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.', true) ->param('write', null, new Permissions(), '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.', true) ->param('enabled', true, new Boolean(true), 'Is bucket enabled?', true) - ->param('maximumFileSize', null, new Integer(), 'Maximum file size allowed in bytes. Maximum allowed value is ' . Storage::human((int)App::getEnv('_APP_STORAGE_LIMIT', 0), 0) . '. 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)', true) + ->param('maximumFileSize', null, new Range(1, (int) App::getEnv('_APP_STORAGE_LIMIT', 0)), 'Maximum file size allowed in bytes. Maximum allowed value is ' . Storage::human((int)App::getEnv('_APP_STORAGE_LIMIT', 0), 0) . '. 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)', true) ->param('allowedFileExtensions', [], new ArrayList(new Text(64), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Allowed file extensions. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' extensions are allowed, each 64 characters long.', true) ->param('encryption', true, new Boolean(true), 'Is encryption enabled? For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' encryption is skipped even if it\'s enabled', true) ->param('antivirus', true, new Boolean(true), 'Is virus scanning enabled? For file size above ' . Storage::human(APP_LIMIT_ANTIVIRUS, 0) . ' AntiVirus scanning is skipped even if it\'s enabled', true) @@ -231,21 +237,21 @@ App::put('/v1/storage/buckets/:bucketId') ->inject('dbForProject') ->inject('audits') ->inject('usage') - ->action(function (string $bucketId, string $name, string $permission, ?array $read, ?array $write, bool $enabled, ?int $maximumFileSize, array $allowedFileExtensions, bool $encryption, bool $antivirus, Response $response, Database $dbForProject, Event $audits, Stats $usage) { - + ->inject('events') + ->action(function (string $bucketId, string $name, string $permission, ?array $read, ?array $write, bool $enabled, ?int $maximumFileSize, array $allowedFileExtensions, bool $encryption, bool $antivirus, Response $response, Database $dbForProject, Audit $audits, Stats $usage, Event $events) { $bucket = $dbForProject->getDocument('buckets', $bucketId); if ($bucket->isEmpty()) { throw new Exception('Bucket not found', 404, Exception::STORAGE_BUCKET_NOT_FOUND); } - $read??=$bucket->getAttribute('$read', []); // By default inherit read permissions - $write??=$bucket->getAttribute('$write', []); // By default inherit write permissions - $maximumFileSize??=$bucket->getAttribute('maximumFileSize', (int) App::getEnv('_APP_STORAGE_LIMIT', 0)); - $allowedFileExtensions??=$bucket->getAttribute('allowedFileExtensions', []); - $enabled??=$bucket->getAttribute('enabled', true); - $encryption??=$bucket->getAttribute('encryption', true); - $antivirus??=$bucket->getAttribute('antivirus', true); + $read ??= $bucket->getAttribute('$read', []); // By default inherit read permissions + $write ??= $bucket->getAttribute('$write', []); // By default inherit write permissions + $maximumFileSize ??= $bucket->getAttribute('maximumFileSize', (int) App::getEnv('_APP_STORAGE_LIMIT', 0)); + $allowedFileExtensions ??= $bucket->getAttribute('allowedFileExtensions', []); + $enabled ??= $bucket->getAttribute('enabled', true); + $encryption ??= $bucket->getAttribute('encryption', true); + $antivirus ??= $bucket->getAttribute('antivirus', true); $bucket = $dbForProject->updateDocument('buckets', $bucket->getId(), $bucket ->setAttribute('name', $name) @@ -260,9 +266,12 @@ App::put('/v1/storage/buckets/:bucketId') ); $audits - ->setParam('event', 'storage.buckets.update') - ->setParam('resource', 'storage/buckets/' . $bucket->getId()) - ->setParam('data', $bucket->getArrayCopy()) + ->setResource('storage/buckets/' . $bucket->getId()) + ->setPayload($bucket->getArrayCopy()) + ; + + $events + ->setParam('bucketId', $bucket->getId()) ; $usage->setParam('storage.buckets.update', 1); @@ -274,7 +283,7 @@ App::delete('/v1/storage/buckets/:bucketId') ->desc('Delete Bucket') ->groups(['api', 'storage']) ->label('scope', 'buckets.write') - ->label('event', 'storage.buckets.delete') + ->label('event', 'buckets.[bucketId].delete') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'deleteBucket') @@ -288,8 +297,7 @@ App::delete('/v1/storage/buckets/:bucketId') ->inject('deletes') ->inject('events') ->inject('usage') - ->action(function (string $bucketId, Response $response, Database $dbForProject, Event $audits, Event $deletes, Event $events, Stats $usage) { - + ->action(function (string $bucketId, Response $response, Database $dbForProject, Audit $audits, Delete $deletes, Event $events, Stats $usage) { $bucket = $dbForProject->getDocument('buckets', $bucketId); if ($bucket->isEmpty()) { @@ -301,18 +309,17 @@ App::delete('/v1/storage/buckets/:bucketId') } $deletes - ->setParam('type', DELETE_TYPE_DOCUMENT) - ->setParam('document', $bucket) - ; + ->setType(DELETE_TYPE_DOCUMENT) + ->setDocument($bucket); $events - ->setParam('eventData', $response->output($bucket, Response::MODEL_BUCKET)) + ->setParam('bucketId', $bucket->getId()) + ->setPayload($response->output($bucket, Response::MODEL_BUCKET)) ; $audits - ->setParam('event', 'storage.buckets.delete') - ->setParam('resource', 'storage/buckets/' . $bucket->getId()) - ->setParam('data', $bucket->getArrayCopy()) + ->setResource('storage/buckets/' . $bucket->getId()) + ->setPayload($bucket->getArrayCopy()) ; $usage->setParam('storage.buckets.delete', 1); @@ -325,7 +332,7 @@ App::post('/v1/storage/buckets/:bucketId/files') ->desc('Create File') ->groups(['api', 'storage']) ->label('scope', 'files.write') - ->label('event', 'storage.files.create') + ->label('event', 'buckets.[bucketId].files.[fileId].create') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'createFile') @@ -350,8 +357,7 @@ App::post('/v1/storage/buckets/:bucketId/files') ->inject('mode') ->inject('deviceFiles') ->inject('deviceLocal') - ->action(function (string $bucketId, string $fileId, array $file, ?array $read, ?array $write, Request $request, Response $response, Database $dbForProject, Document $user, Event $audits, Stats $usage, Event $events, string $mode, Device $deviceFiles, Device $deviceLocal) { - + ->action(function (string $bucketId, string $fileId, array $file, ?array $read, ?array $write, Request $request, Response $response, Database $dbForProject, Document $user, Audit $audits, Stats $usage, Event $events, string $mode, Device $deviceFiles, Device $deviceLocal) { $bucket = Authorization::skip(fn () => $dbForProject->getDocument('buckets', $bucketId)); if ($bucket->isEmpty() @@ -397,7 +403,7 @@ App::post('/v1/storage/buckets/:bucketId/files') $maximumFileSize = $bucket->getAttribute('maximumFileSize', 0); if ($maximumFileSize > (int) App::getEnv('_APP_STORAGE_LIMIT', 0)) { - throw new Exception('Error bucket maximum file size is larger than _APP_STORAGE_LIMIT', 500, Exception::GENERAL_SERVER_ERROR); + throw new Exception('Maximum bucket file size is larger than _APP_STORAGE_LIMIT', 500, Exception::GENERAL_SERVER_ERROR); } $file = $request->getFiles('file'); @@ -557,9 +563,7 @@ App::post('/v1/storage/buckets/:bucketId/files') 'metadata' => $metadata, ]); if ($permissionBucket) { - $file = Authorization::skip(function () use ($dbForProject, $bucket, $doc) { - return $dbForProject->createDocument('bucket_' . $bucket->getInternalId(), $doc); - }); + $file = Authorization::skip(fn () => $dbForProject->createDocument('bucket_' . $bucket->getInternalId(), $doc)); } else { $file = $dbForProject->createDocument('bucket_' . $bucket->getInternalId(), $doc); } @@ -579,9 +583,7 @@ App::post('/v1/storage/buckets/:bucketId/files') ->setAttribute('chunksUploaded', $chunksUploaded); if ($permissionBucket) { - $file = Authorization::skip(function () use ($dbForProject, $bucket, $fileId, $file) { - return $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file); - }); + $file = Authorization::skip(fn () => $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file)); } else { $file = $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file); } @@ -594,8 +596,7 @@ App::post('/v1/storage/buckets/:bucketId/files') } $audits - ->setParam('event', 'storage.files.create') - ->setParam('resource', 'storage/files/' . $file->getId()) + ->setResource('storage/files/' . $file->getId()) ; $usage @@ -627,9 +628,7 @@ App::post('/v1/storage/buckets/:bucketId/files') 'metadata' => $metadata, ]); if ($permissionBucket) { - $file = Authorization::skip(function () use ($dbForProject, $bucket, $doc) { - return $dbForProject->createDocument('bucket_' . $bucket->getInternalId(), $doc); - }); + $file = Authorization::skip(fn () => $dbForProject->createDocument('bucket_' . $bucket->getInternalId(), $doc)); } else { $file = $dbForProject->createDocument('bucket_' . $bucket->getInternalId(), $doc); } @@ -639,9 +638,7 @@ App::post('/v1/storage/buckets/:bucketId/files') ->setAttribute('metadata', $metadata); if ($permissionBucket) { - $file = Authorization::skip(function () use ($dbForProject, $bucket, $fileId, $file) { - return $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file); - }); + $file = Authorization::skip(fn () => $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file)); } else { $file = $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file); } @@ -653,13 +650,16 @@ App::post('/v1/storage/buckets/:bucketId/files') } } - $events->setParam('bucket', $bucket->getArrayCopy()); + $events + ->setParam('bucketId', $bucket->getId()) + ->setParam('fileId', $file->getId()) + ->setContext($bucket) + ; $metadata = null; // was causing leaks as it was passed by reference $response->setStatusCode(Response::STATUS_CODE_CREATED); $response->dynamic($file, Response::MODEL_FILE); - ; }); App::get('/v1/storage/buckets/:bucketId/files') @@ -1271,7 +1271,7 @@ App::put('/v1/storage/buckets/:bucketId/files/:fileId') ->desc('Update File') ->groups(['api', 'storage']) ->label('scope', 'files.write') - ->label('event', 'storage.files.update') + ->label('event', 'buckets.[bucketId].files.[fileId].update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'updateFile') @@ -1290,8 +1290,7 @@ App::put('/v1/storage/buckets/:bucketId/files/:fileId') ->inject('usage') ->inject('mode') ->inject('events') - ->action(function (string $bucketId, string $fileId, ?array $read, ?array $write,Response $response, Database $dbForProject, Document $user, Event $audits, Stats $usage, string $mode, Event $events) { - + ->action(function (string $bucketId, string $fileId, ?array $read, ?array $write, Response $response, Database $dbForProject, Document $user, Audit $audits, Stats $usage, string $mode, Event $events) { $bucket = Authorization::skip(fn () => $dbForProject->getDocument('buckets', $bucketId)); $read = (is_null($read) && !$user->isEmpty()) ? ['user:' . $user->getId()] : $read ?? []; // By default set read permissions for user $write = (is_null($write) && !$user->isEmpty()) ? ['user:' . $user->getId()] : $write ?? []; @@ -1346,13 +1345,14 @@ App::put('/v1/storage/buckets/:bucketId/files/:fileId') $file = $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file); } - $events->setParam('bucket', $bucket->getArrayCopy()); - - $audits - ->setParam('event', 'storage.files.update') - ->setParam('resource', 'file/' . $file->getId()) + $events + ->setParam('bucketId', $bucket->getId()) + ->setParam('fileId', $file->getId()) + ->setContext($bucket) ; + $audits->setResource('file/' . $file->getId()); + $usage ->setParam('storage.files.update', 1) ->setParam('bucketId', $bucketId) @@ -1366,7 +1366,7 @@ App::delete('/v1/storage/buckets/:bucketId/files/:fileId') ->desc('Delete File') ->groups(['api', 'storage']) ->label('scope', 'files.write') - ->label('event', 'storage.files.delete') + ->label('event', 'buckets.[bucketId].files.[fileId].delete') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'deleteFile') @@ -1383,8 +1383,7 @@ App::delete('/v1/storage/buckets/:bucketId/files/:fileId') ->inject('mode') ->inject('deviceFiles') ->inject('project') - ->action(function (string $bucketId, string $fileId, Response $response, Database $dbForProject, Event $events, Event $audits, Stats $usage, string $mode, Device $deviceFiles, Document $project) { - + ->action(function (string $bucketId, string $fileId, Response $response, Database $dbForProject, Event $events, Audit $audits, Stats $usage, string $mode, Device $deviceFiles, Document $project) { $bucket = Authorization::skip(fn () => $dbForProject->getDocument('buckets', $bucketId)); if ($bucket->isEmpty() @@ -1438,10 +1437,7 @@ App::delete('/v1/storage/buckets/:bucketId/files/:fileId') throw new Exception('Failed to delete file from device', 500, Exception::GENERAL_SERVER_ERROR); } - $audits - ->setParam('event', 'storage.files.delete') - ->setParam('resource', 'file/' . $file->getId()) - ; + $audits->setResource('file/' . $file->getId()); $usage ->setParam('storage', $file->getAttribute('size', 0) * -1) @@ -1450,8 +1446,10 @@ App::delete('/v1/storage/buckets/:bucketId/files/:fileId') ; $events - ->setParam('eventData', $response->output($file, Response::MODEL_FILE)) - ->setParam('bucket', $bucket->getArrayCopy()) + ->setParam('bucketId', $bucket->getId()) + ->setParam('fileId', $file->getId()) + ->setContext($bucket) + ->setPayload($response->output($file, Response::MODEL_FILE)) ; $response->noContent(); diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index d006c58613..e18e87886d 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -2,7 +2,10 @@ use Appwrite\Auth\Auth; use Appwrite\Detector\Detector; +use Appwrite\Event\Audit as EventAudit; +use Appwrite\Event\Delete; use Appwrite\Event\Event; +use Appwrite\Event\Mail; use Appwrite\Extend\Exception; use Appwrite\Network\Validator\Email; use Appwrite\Network\Validator\Host; @@ -12,6 +15,7 @@ use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; use MaxMind\Db\Reader; use Utopia\App; +use Utopia\Audit\Audit; use Utopia\Config\Config; use Utopia\Database\Database; use Utopia\Database\Document; @@ -30,7 +34,7 @@ use Utopia\Validator\WhiteList; App::post('/v1/teams') ->desc('Create Team') ->groups(['api', 'teams']) - ->label('event', 'teams.create') + ->label('event', 'teams.[teamId].create') ->label('scope', 'teams.write') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'teams') @@ -46,7 +50,8 @@ App::post('/v1/teams') ->inject('user') ->inject('dbForProject') ->inject('events') - ->action(function (string $teamId, string $name, array $roles, Response $response, Document $user, Database $dbForProject, Event $events) { + ->inject('audits') + ->action(function (string $teamId, string $name, array $roles, Response $response, Document $user, Database $dbForProject, Event $events, Event $audits) { $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); $isAppUser = Auth::isAppUser(Authorization::getRoles()); @@ -82,10 +87,18 @@ App::post('/v1/teams') $dbForProject->deleteCachedDocument('users', $user->getId()); } + $events->setParam('teamId', $team->getId()); + if (!empty($user->getId())) { $events->setParam('userId', $user->getId()); } + $audits + ->setParam('event', 'teams.create') + ->setParam('resource', 'team/'.$teamId) + ->setParam('data', $team->getArrayCopy()) + ; + $response->setStatusCode(Response::STATUS_CODE_CREATED); $response->dynamic($team, Response::MODEL_TEAM); }); @@ -162,7 +175,7 @@ App::get('/v1/teams/:teamId') App::put('/v1/teams/:teamId') ->desc('Update Team') ->groups(['api', 'teams']) - ->label('event', 'teams.update') + ->label('event', 'teams.[teamId].update') ->label('scope', 'teams.write') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'teams') @@ -175,7 +188,9 @@ App::put('/v1/teams/:teamId') ->param('name', null, new Text(128), 'New team name. Max length: 128 chars.') ->inject('response') ->inject('dbForProject') - ->action(function (string $teamId, string $name, Response $response, Database $dbForProject) { + ->inject('events') + ->inject('audits') + ->action(function (string $teamId, string $name, Response $response, Database $dbForProject, Event $events, EventAudit $audits) { $team = $dbForProject->getDocument('teams', $teamId); @@ -188,13 +203,16 @@ App::put('/v1/teams/:teamId') ->setAttribute('search', implode(' ', [$teamId, $name])) ); + $events->setParam('teamId', $team->getId()); + $audits->setResource('team/' . $team->getId()); + $response->dynamic($team, Response::MODEL_TEAM); }); App::delete('/v1/teams/:teamId') ->desc('Delete Team') ->groups(['api', 'teams']) - ->label('event', 'teams.delete') + ->label('event', 'teams.[teamId].delete') ->label('scope', 'teams.write') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'teams') @@ -207,7 +225,8 @@ App::delete('/v1/teams/:teamId') ->inject('dbForProject') ->inject('events') ->inject('deletes') - ->action(function (string $teamId, Response $response, Database $dbForProject, Event $events, Event $deletes) { + ->inject('audits') + ->action(function (string $teamId, Response $response, Database $dbForProject, Event $events, Delete $deletes, EventAudit $audits) { $team = $dbForProject->getDocument('teams', $teamId); @@ -231,12 +250,18 @@ App::delete('/v1/teams/:teamId') } $deletes - ->setParam('type', DELETE_TYPE_DOCUMENT) - ->setParam('document', $team) - ; + ->setType(DELETE_TYPE_DOCUMENT) + ->setDocument($team); $events - ->setParam('eventData', $response->output($team, Response::MODEL_TEAM)) + ->setParam('teamId', $team->getId()) + ->setPayload($response->output($team, Response::MODEL_TEAM)) + ; + + $audits + ->setParam('event', 'teams.delete') + ->setParam('resource', 'team/'.$teamId) + ->setParam('data', $team->getArrayCopy()) ; $response->noContent(); @@ -245,7 +270,7 @@ App::delete('/v1/teams/:teamId') App::post('/v1/teams/:teamId/memberships') ->desc('Create Team Membership') ->groups(['api', 'teams', 'auth']) - ->label('event', 'teams.memberships.create') + ->label('event', 'teams.[teamId].memberships.[membershipId].create') ->label('scope', 'teams.write') ->label('auth.type', 'invites') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) @@ -268,7 +293,8 @@ App::post('/v1/teams/:teamId/memberships') ->inject('locale') ->inject('audits') ->inject('mails') - ->action(function (string $teamId, string $email, array $roles, string $url, string $name, Response $response, Document $project, Document $user, Database $dbForProject, Locale $locale, Event $audits, Event $mails) { + ->inject('events') + ->action(function (string $teamId, string $email, array $roles, string $url, string $name, Response $response, Document $project, Document $user, Database $dbForProject, Locale $locale, EventAudit $audits, Mail $mails, Event $events) { if(empty(App::getEnv('_APP_SMTP_HOST'))) { throw new Exception('SMTP Disabled', 503, Exception::GENERAL_SMTP_DISABLED); @@ -319,11 +345,10 @@ App::post('/v1/teams/:teamId/memberships') 'reset' => false, 'name' => $name, 'prefs' => new \stdClass(), - 'sessions' => [], + 'sessions' => null, 'tokens' => null, 'memberships' => null, - 'search' => implode(' ', [$userId, $email, $name]), - 'deleted' => false + 'search' => implode(' ', [$userId, $email, $name]) ]))); } catch (Duplicate $th) { throw new Exception('Account already exists', 409, Exception::USER_ALREADY_EXISTS); @@ -377,30 +402,31 @@ App::post('/v1/teams/:teamId/memberships') if (!$isPrivilegedUser && !$isAppUser) { // No need of confirmation when in admin or app mode $mails - ->setParam('event', 'teams.memberships.create') - ->setParam('from', $project->getId()) - ->setParam('recipient', $email) - ->setParam('name', $name) - ->setParam('url', $url) - ->setParam('locale', $locale->default) - ->setParam('project', $project->getAttribute('name', ['[APP-NAME]'])) - ->setParam('owner', $user->getAttribute('name', '')) - ->setParam('team', $team->getAttribute('name', '[TEAM-NAME]')) - ->setParam('type', MAIL_TYPE_INVITATION) + ->setType(MAIL_TYPE_INVITATION) + ->setRecipient($email) + ->setUrl($url) + ->setName($name) + ->setLocale($locale->default) + ->setTeam($team) + ->setUser($user) ->trigger() ; } $audits - ->setParam('userId', $invitee->getId()) - ->setParam('event', 'teams.memberships.create') - ->setParam('resource', 'team/'.$teamId) + ->setResource('team/'.$teamId) + ; + + $events + ->setParam('teamId', $team->getId()) + ->setParam('membershipId', $membership->getId()) ; $response->setStatusCode(Response::STATUS_CODE_CREATED); $response->dynamic($membership - ->setAttribute('email', $email) - ->setAttribute('name', $name) + ->setAttribute('teamName', $team->getAttribute('name')) + ->setAttribute('userName', $user->getAttribute('name')) + ->setAttribute('userEmail', $user->getAttribute('email')) , Response::MODEL_MEMBERSHIP); }); @@ -464,12 +490,13 @@ App::get('/v1/teams/:teamId/memberships') $memberships = array_filter($memberships, fn(Document $membership) => !empty($membership->getAttribute('userId'))); - $memberships = array_map(function($membership) use ($dbForProject) { + $memberships = array_map(function($membership) use ($dbForProject, $team) { $user = $dbForProject->getDocument('users', $membership->getAttribute('userId')); $membership - ->setAttribute('name', $user->getAttribute('name')) - ->setAttribute('email', $user->getAttribute('email')) + ->setAttribute('teamName', $team->getAttribute('name')) + ->setAttribute('userName', $user->getAttribute('name')) + ->setAttribute('userEmail', $user->getAttribute('email')) ; return $membership; @@ -513,8 +540,9 @@ App::get('/v1/teams/:teamId/memberships/:membershipId') $user = $dbForProject->getDocument('users', $membership->getAttribute('userId')); $membership - ->setAttribute('name', $user->getAttribute('name')) - ->setAttribute('email', $user->getAttribute('email')) + ->setAttribute('teamName', $team->getAttribute('name')) + ->setAttribute('userName', $user->getAttribute('name')) + ->setAttribute('userEmail', $user->getAttribute('email')) ; $response->dynamic($membership, Response::MODEL_MEMBERSHIP ); @@ -523,7 +551,7 @@ App::get('/v1/teams/:teamId/memberships/:membershipId') App::patch('/v1/teams/:teamId/memberships/:membershipId') ->desc('Update Membership Roles') ->groups(['api', 'teams']) - ->label('event', 'teams.memberships.update') + ->label('event', 'teams.[teamId].memberships.[membershipId].update') ->label('scope', 'teams.write') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'teams') @@ -540,7 +568,8 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId') ->inject('user') ->inject('dbForProject') ->inject('audits') - ->action(function (string $teamId, string $membershipId, array $roles, Request $request, Response $response, Document $user, Database $dbForProject, Event $audits) { + ->inject('events') + ->action(function (string $teamId, string $membershipId, array $roles, Request $request, Response $response, Document $user, Database $dbForProject, EventAudit $audits, Event $events) { $team = $dbForProject->getDocument('teams', $teamId); if ($team->isEmpty()) { @@ -574,18 +603,19 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId') /** * Replace membership on profile */ - $dbForProject->deleteCachedDocument('users', $profile->getId()); - $audits - ->setParam('userId', $user->getId()) - ->setParam('event', 'teams.memberships.update') - ->setParam('resource', 'team/' . $teamId); + $audits->setResource('team/' . $teamId); + + $events + ->setParam('teamId', $team->getId()) + ->setParam('membershipId', $membership->getId()); $response->dynamic( $membership - ->setAttribute('email', $profile->getAttribute('email')) - ->setAttribute('name', $profile->getAttribute('name')), + ->setAttribute('teamName', $team->getAttribute('name')) + ->setAttribute('userName', $profile->getAttribute('name')) + ->setAttribute('userEmail', $profile->getAttribute('email')), Response::MODEL_MEMBERSHIP ); }); @@ -593,7 +623,7 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId') App::patch('/v1/teams/:teamId/memberships/:membershipId/status') ->desc('Update Team Membership Status') ->groups(['api', 'teams']) - ->label('event', 'teams.memberships.update.status') + ->label('event', 'teams.[teamId].memberships.[membershipId].update.status') ->label('scope', 'public') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'teams') @@ -612,8 +642,8 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId/status') ->inject('dbForProject') ->inject('geodb') ->inject('audits') - ->action(function (string $teamId, string $membershipId, string $userId, string $secret, Request $request, Response $response, Document $user, Database $dbForProject, Reader $geodb, Event $audits) { - + ->inject('events') + ->action(function (string $teamId, string $membershipId, string $userId, string $secret, Request $request, Response $response, Document $user, Database $dbForProject, Reader $geodb, EventAudit $audits, Event $events) { $protocol = $request->getProtocol(); $membership = $dbForProject->getDocument('memberships', $membershipId); @@ -636,7 +666,7 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId/status') throw new Exception('Secret key not valid', 401, Exception::TEAM_INVALID_SECRET); } - if ($userId != $membership->getAttribute('userId')) { + if ($userId !== $membership->getAttribute('userId')) { throw new Exception('Invite does not belong to current user ('.$user->getAttribute('email').')', 401, Exception::TEAM_INVITE_MISMATCH); } @@ -686,21 +716,21 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId/status') ->setAttribute('$write', ['user:'.$user->getId()]) ); - $user->setAttribute('sessions', $session, Document::SET_TYPE_APPEND); + $dbForProject->deleteCachedDocument('users', $user->getId()); Authorization::setRole('user:'.$userId); - $user = $dbForProject->updateDocument('users', $user->getId(), $user); $membership = $dbForProject->updateDocument('memberships', $membership->getId(), $membership); - + $dbForProject->deleteCachedDocument('users', $user->getId()); $team = Authorization::skip(fn() => $dbForProject->updateDocument('teams', $team->getId(), $team->setAttribute('total', $team->getAttribute('total', 0) + 1))); - $audits - ->setParam('userId', $user->getId()) - ->setParam('event', 'teams.memberships.update.status') - ->setParam('resource', 'team/'.$teamId) + $audits->setResource('team/'.$teamId); + + $events + ->setParam('teamId', $team->getId()) + ->setParam('membershipId', $membership->getId()) ; if (!Config::getParam('domainVerification')) { @@ -715,15 +745,16 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId/status') ; $response->dynamic($membership - ->setAttribute('email', $user->getAttribute('email')) - ->setAttribute('name', $user->getAttribute('name')) + ->setAttribute('teamName', $team->getAttribute('name')) + ->setAttribute('userName', $user->getAttribute('name')) + ->setAttribute('userEmail', $user->getAttribute('email')) , Response::MODEL_MEMBERSHIP); }); App::delete('/v1/teams/:teamId/memberships/:membershipId') ->desc('Delete Team Membership') ->groups(['api', 'teams']) - ->label('event', 'teams.memberships.delete') + ->label('event', 'teams.[teamId].memberships.[membershipId].delete') ->label('scope', 'teams.write') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'teams') @@ -737,7 +768,7 @@ App::delete('/v1/teams/:teamId/memberships/:membershipId') ->inject('dbForProject') ->inject('audits') ->inject('events') - ->action(function (string $teamId, string $membershipId, Response $response, Database $dbForProject, Event $audits, Event $events) { + ->action(function (string $teamId, string $membershipId, Response $response, Database $dbForProject, EventAudit $audits, Event $events) { $membership = $dbForProject->getDocument('memberships', $membershipId); @@ -776,15 +807,98 @@ App::delete('/v1/teams/:teamId/memberships/:membershipId') Authorization::skip(fn() => $dbForProject->updateDocument('teams', $team->getId(), $team)); } - $audits - ->setParam('userId', $membership->getAttribute('userId')) - ->setParam('event', 'teams.memberships.delete') - ->setParam('resource', 'team/'.$teamId) - ; + $audits->setResource('team/'.$teamId); $events - ->setParam('eventData', $response->output($membership, Response::MODEL_MEMBERSHIP)) + ->setParam('teamId', $team->getId()) + ->setParam('membershipId', $membership->getId()) + ->setPayload($response->output($membership, Response::MODEL_MEMBERSHIP)) ; $response->noContent(); }); + +App::get('/v1/teams/:teamId/logs') + ->desc('List Team Logs') + ->groups(['api', 'teams']) + ->label('scope', 'teams.read') + ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) + ->label('sdk.namespace', 'teams') + ->label('sdk.method', 'listLogs') + ->label('sdk.description', '/docs/references/teams/get-team-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('teamId', null, new UID(), 'Team 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 ($teamId, $limit, $offset, $response, $dbForProject, $locale, $geodb) { + /** @var Appwrite\Utopia\Response $response */ + /** @var Utopia\Database\Document $project */ + /** @var Utopia\Database\Database $dbForProject */ + /** @var Utopia\Locale\Locale $locale */ + /** @var MaxMind\Db\Reader $geodb */ + + $team = $dbForProject->getDocument('teams', $teamId); + + if ($team->isEmpty()) { + throw new Exception('Team not found', 404, Exception::TEAM_NOT_FOUND); + } + + $audit = new Audit($dbForProject); + $resource = 'team/'.$team->getId(); + $logs = $audit->getLogsByResource($resource, $limit, $offset); + + $output = []; + + 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); + }); diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index b77303ff2d..95df53ad3a 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -25,7 +25,7 @@ use Utopia\Validator\Boolean; App::post('/v1/users') ->desc('Create User') ->groups(['api', 'users']) - ->label('event', 'users.create') + ->label('event', 'users.[userId].create') ->label('scope', 'users.write') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') @@ -41,10 +41,12 @@ App::post('/v1/users') ->inject('response') ->inject('dbForProject') ->inject('usage') - ->action(function ($userId, $email, $password, $name, $response, $dbForProject, $usage) { + ->inject('events') + ->action(function ($userId, $email, $password, $name, $response, $dbForProject, $usage, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ /** @var Appwrite\Stats\Stats $usage */ + /** @var Appwrite\Event\Event $events */ $email = \strtolower($email); @@ -63,11 +65,10 @@ App::post('/v1/users') 'reset' => false, 'name' => $name, 'prefs' => new \stdClass(), - 'sessions' => [], + 'sessions' => null, 'tokens' => null, 'memberships' => null, - 'search' => implode(' ', [$userId, $email, $name]), - 'deleted' => false + 'search' => implode(' ', [$userId, $email, $name]) ])); } catch (Duplicate $th) { throw new Exception('Account already exists', 409, Exception::USER_ALREADY_EXISTS); @@ -77,6 +78,10 @@ App::post('/v1/users') ->setParam('users.create', 1) ; + $events + ->setParam('userId', $user->getId()) + ; + $response->setStatusCode(Response::STATUS_CODE_CREATED); $response->dynamic($user, Response::MODEL_USER); }); @@ -114,9 +119,7 @@ App::get('/v1/users') } } - $queries = [ - new Query('deleted', Query::TYPE_EQUAL, [false]) - ]; + $queries = []; if (!empty($search)) { $queries[] = new Query('search', Query::TYPE_SEARCH, [$search]); @@ -154,7 +157,7 @@ App::get('/v1/users/:userId') $user = $dbForProject->getDocument('users', $userId); - if ($user->isEmpty() || $user->getAttribute('deleted')) { + if ($user->isEmpty()) { throw new Exception('User not found', 404, Exception::USER_NOT_FOUND); } @@ -186,7 +189,7 @@ App::get('/v1/users/:userId/prefs') $user = $dbForProject->getDocument('users', $userId); - if ($user->isEmpty() || $user->getAttribute('deleted')) { + if ($user->isEmpty()) { throw new Exception('User not found', 404, Exception::USER_NOT_FOUND); } @@ -222,7 +225,7 @@ App::get('/v1/users/:userId/sessions') $user = $dbForProject->getDocument('users', $userId); - if ($user->isEmpty() || $user->getAttribute('deleted')) { + if ($user->isEmpty()) { throw new Exception('User not found', 404, Exception::USER_NOT_FOUND); } @@ -247,6 +250,48 @@ App::get('/v1/users/:userId/sessions') ]), Response::MODEL_SESSION_LIST); }); +App::get('/v1/users/:userId/memberships') + ->desc('Get User Memberships') + ->groups(['api', 'users']) + ->label('scope', 'users.read') + ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) + ->label('sdk.namespace', 'users') + ->label('sdk.method', 'getMemberships') + ->label('sdk.description', '/docs/references/users/get-user-memberships.md') + ->label('sdk.response.code', Response::STATUS_CODE_OK) + ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) + ->label('sdk.response.model', Response::MODEL_MEMBERSHIP_LIST) + ->param('userId', '', new UID(), 'User ID.') + ->inject('response') + ->inject('dbForProject') + ->action(function ($userId, $response, $dbForProject) { + /** @var string $userId */ + /** @var Appwrite\Utopia\Response $response */ + /** @var Utopia\Database\Database $dbForProject */ + + $user = $dbForProject->getDocument('users', $userId); + + if ($user->isEmpty()) { + throw new Exception('User not found', 404, Exception::USER_NOT_FOUND); + } + + $memberships = array_map(function($membership) use ($dbForProject, $user) { + $team = $dbForProject->getDocument('teams', $membership->getAttribute('teamId')); + + $membership + ->setAttribute('teamName', $team->getAttribute('name')) + ->setAttribute('userName', $user->getAttribute('name')) + ->setAttribute('userEmail', $user->getAttribute('email')); + + return $membership; + }, $user->getAttribute('memberships', [])); + + $response->dynamic(new Document([ + 'memberships' => $memberships, + 'total' => count($memberships), + ]), Response::MODEL_MEMBERSHIP_LIST); + }); + App::get('/v1/users/:userId/logs') ->desc('Get User Logs') ->groups(['api', 'users']) @@ -276,31 +321,13 @@ App::get('/v1/users/:userId/logs') $user = $dbForProject->getDocument('users', $userId); - if ($user->isEmpty() || $user->getAttribute('deleted')) { + if ($user->isEmpty()) { throw new Exception('User not found', 404, Exception::USER_NOT_FOUND); } $audit = new Audit($dbForProject); - $auditEvents = [ - 'account.create', - 'account.delete', - 'account.update.name', - 'account.update.email', - 'account.update.password', - 'account.update.prefs', - 'account.sessions.create', - 'account.sessions.update', - 'account.sessions.delete', - 'account.recovery.create', - 'account.recovery.update', - 'account.verification.create', - 'account.verification.update', - 'teams.membership.create', - 'teams.membership.update', - 'teams.membership.delete', - ]; - $logs = $audit->getLogsByUserAndEvents($user->getId(), $auditEvents, $limit, $offset); + $logs = $audit->getLogsByUser($user->getId(), $limit, $offset); $output = []; @@ -348,7 +375,7 @@ App::get('/v1/users/:userId/logs') ; $response->dynamic(new Document([ - 'total' => $audit->countLogsByUserAndEvents($user->getId(), $auditEvents), + 'total' => $audit->countLogsByUser($user->getId()), 'logs' => $output, ]), Response::MODEL_LOG_LIST); }); @@ -356,7 +383,7 @@ App::get('/v1/users/:userId/logs') App::patch('/v1/users/:userId/status') ->desc('Update User Status') ->groups(['api', 'users']) - ->label('event', 'users.update.status') + ->label('event', 'users.[userId].update.status') ->label('scope', 'users.write') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') @@ -370,14 +397,16 @@ App::patch('/v1/users/:userId/status') ->inject('response') ->inject('dbForProject') ->inject('usage') - ->action(function ($userId, $status, $response, $dbForProject, $usage) { + ->inject('events') + ->action(function ($userId, $status, $response, $dbForProject, $usage, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ /** @var Appwrite\Stats\Stats $usage */ + /** @var Appwrite\Event\Event $events */ $user = $dbForProject->getDocument('users', $userId); - if ($user->isEmpty() || $user->getAttribute('deleted')) { + if ($user->isEmpty()) { throw new Exception('User not found', 404, Exception::USER_NOT_FOUND); } @@ -386,13 +415,18 @@ App::patch('/v1/users/:userId/status') $usage ->setParam('users.update', 1) ; + + $events + ->setParam('userId', $user->getId()) + ; + $response->dynamic($user, Response::MODEL_USER); }); App::patch('/v1/users/:userId/verification') ->desc('Update Email Verification') ->groups(['api', 'users']) - ->label('event', 'users.update.verification') + ->label('event', 'users.[userId].update.verification') ->label('scope', 'users.write') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') @@ -406,14 +440,16 @@ App::patch('/v1/users/:userId/verification') ->inject('response') ->inject('dbForProject') ->inject('usage') - ->action(function ($userId, $emailVerification, $response, $dbForProject, $usage) { + ->inject('events') + ->action(function ($userId, $emailVerification, $response, $dbForProject, $usage, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ /** @var Appwrite\Stats\Stats $usage */ + /** @var Appwrite\Event\Event $events */ $user = $dbForProject->getDocument('users', $userId); - if ($user->isEmpty() || $user->getAttribute('deleted')) { + if ($user->isEmpty()) { throw new Exception('User not found', 404, Exception::USER_NOT_FOUND); } @@ -422,13 +458,18 @@ App::patch('/v1/users/:userId/verification') $usage ->setParam('users.update', 1) ; + + $events + ->setParam('userId', $user->getId()) + ; + $response->dynamic($user, Response::MODEL_USER); }); App::patch('/v1/users/:userId/name') ->desc('Update Name') ->groups(['api', 'users']) - ->label('event', 'users.update.name') + ->label('event', 'users.[userId].update.name') ->label('scope', 'users.write') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') @@ -442,23 +483,32 @@ App::patch('/v1/users/:userId/name') ->inject('response') ->inject('dbForProject') ->inject('audits') - ->action(function ($userId, $name, $response, $dbForProject, $audits) { + ->inject('events') + ->action(function ($userId, $name, $response, $dbForProject, $audits, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ + /** @var Appwrite\Event\Event $events */ $user = $dbForProject->getDocument('users', $userId); - if ($user->isEmpty() || $user->getAttribute('deleted')) { + if ($user->isEmpty()) { throw new Exception('User not found', 404, Exception::USER_NOT_FOUND); } - $user = $dbForProject->updateDocument('users', $user->getId(), $user->setAttribute('name', $name)); + $user + ->setAttribute('name', $name) + ->setAttribute('search', \implode(' ', [$user->getId(), $user->getAttribute('email'), $name])); + ; + + $user = $dbForProject->updateDocument('users', $user->getId(), $user); $audits + ->setResource('user/'.$user->getId()) + ; + + $events ->setParam('userId', $user->getId()) - ->setParam('event', 'users.update.name') - ->setParam('resource', 'user/'.$user->getId()) ; $response->dynamic($user, Response::MODEL_USER); @@ -467,7 +517,7 @@ App::patch('/v1/users/:userId/name') App::patch('/v1/users/:userId/password') ->desc('Update Password') ->groups(['api', 'users']) - ->label('event', 'users.update.password') + ->label('event', 'users.[userId].update.password') ->label('scope', 'users.write') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') @@ -481,14 +531,16 @@ App::patch('/v1/users/:userId/password') ->inject('response') ->inject('dbForProject') ->inject('audits') - ->action(function ($userId, $password, $response, $dbForProject, $audits) { + ->inject('events') + ->action(function ($userId, $password, $response, $dbForProject, $audits, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ + /** @var Appwrite\Event\Event $events */ $user = $dbForProject->getDocument('users', $userId); - if ($user->isEmpty() || $user->getAttribute('deleted')) { + if ($user->isEmpty()) { throw new Exception('User not found', 404, Exception::USER_NOT_FOUND); } @@ -499,9 +551,11 @@ App::patch('/v1/users/:userId/password') $user = $dbForProject->updateDocument('users', $user->getId(), $user); $audits + ->setResource('user/'.$user->getId()) + ; + + $events ->setParam('userId', $user->getId()) - ->setParam('event', 'users.update.password') - ->setParam('resource', 'user/'.$user->getId()) ; $response->dynamic($user, Response::MODEL_USER); @@ -510,7 +564,7 @@ App::patch('/v1/users/:userId/password') App::patch('/v1/users/:userId/email') ->desc('Update Email') ->groups(['api', 'users']) - ->label('event', 'users.update.email') + ->label('event', 'users.[userId].update.email') ->label('scope', 'users.write') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') @@ -524,14 +578,16 @@ App::patch('/v1/users/:userId/email') ->inject('response') ->inject('dbForProject') ->inject('audits') - ->action(function ($userId, $email, $response, $dbForProject, $audits) { + ->inject('events') + ->action(function ($userId, $email, $response, $dbForProject, $audits, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ + /** @var Appwrite\Event\Event $events */ $user = $dbForProject->getDocument('users', $userId); - if ($user->isEmpty() || $user->getAttribute('deleted')) { + if ($user->isEmpty()) { throw new Exception('User not found', 404, Exception::USER_NOT_FOUND); } @@ -542,16 +598,24 @@ App::patch('/v1/users/:userId/email') $email = \strtolower($email); + $user + ->setAttribute('email', $email) + ->setAttribute('search', \implode(' ', [$user->getId(), $email, $user->getAttribute('name')])) + ; + try { - $user = $dbForProject->updateDocument('users', $user->getId(), $user->setAttribute('email', $email)); + $user = $dbForProject->updateDocument('users', $user->getId(), $user); } catch(Duplicate $th) { throw new Exception('Email already exists', 409, Exception::USER_EMAIL_ALREADY_EXISTS); } + $audits + ->setResource('user/'.$user->getId()) + ; + + $events ->setParam('userId', $user->getId()) - ->setParam('event', 'users.update.email') - ->setParam('resource', 'user/'.$user->getId()) ; $response->dynamic($user, Response::MODEL_USER); @@ -560,7 +624,7 @@ App::patch('/v1/users/:userId/email') App::patch('/v1/users/:userId/prefs') ->desc('Update User Preferences') ->groups(['api', 'users']) - ->label('event', 'users.update.prefs') + ->label('event', 'users.[userId].update.prefs') ->label('scope', 'users.write') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') @@ -574,14 +638,16 @@ App::patch('/v1/users/:userId/prefs') ->inject('response') ->inject('dbForProject') ->inject('usage') - ->action(function ($userId, $prefs, $response, $dbForProject, $usage) { + ->inject('events') + ->action(function ($userId, $prefs, $response, $dbForProject, $usage, $events) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ /** @var Appwrite\Stats\Stats $usage */ + /** @var Appwrite\Event\Event $events */ $user = $dbForProject->getDocument('users', $userId); - if ($user->isEmpty() || $user->getAttribute('deleted')) { + if ($user->isEmpty()) { throw new Exception('User not found', 404, Exception::USER_NOT_FOUND); } @@ -590,13 +656,18 @@ App::patch('/v1/users/:userId/prefs') $usage ->setParam('users.update', 1) ; + + $events + ->setParam('userId', $user->getId()) + ; + $response->dynamic(new Document($prefs), Response::MODEL_PREFERENCES); }); App::delete('/v1/users/:userId/sessions/:sessionId') ->desc('Delete User Session') ->groups(['api', 'users']) - ->label('event', 'users.sessions.delete') + ->label('event', 'users.[userId].sessions.[sessionId].delete') ->label('scope', 'users.write') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') @@ -618,41 +689,37 @@ App::delete('/v1/users/:userId/sessions/:sessionId') $user = $dbForProject->getDocument('users', $userId); - if ($user->isEmpty() || $user->getAttribute('deleted')) { + if ($user->isEmpty()) { throw new Exception('User not found', 404, Exception::USER_NOT_FOUND); } - $sessions = $user->getAttribute('sessions', []); + $session = $dbForProject->getDocument('sessions', $sessionId); - foreach ($sessions as $key => $session) { /** @var Document $session */ - - if ($sessionId == $session->getId()) { - unset($sessions[$key]); - - $dbForProject->deleteDocument('sessions', $session->getId()); - - $user->setAttribute('sessions', $sessions); - - $events - ->setParam('eventData', $response->output($user, Response::MODEL_USER)) - ; - - $dbForProject->updateDocument('users', $user->getId(), $user); - } + if($session->isEmpty()) { + throw new Exception('Session not found', 404, Exception::USER_SESSION_NOT_FOUND); } + $dbForProject->deleteDocument('sessions', $session->getId()); + $dbForProject->deleteCachedDocument('users', $user->getId()); + + $usage ->setParam('users.update', 1) ->setParam('users.sessions.delete', 1) ; + $events + ->setParam('userId', $user->getId()) + ->setParam('sessionId', $sessionId) + ; + $response->noContent(); }); App::delete('/v1/users/:userId/sessions') ->desc('Delete User Sessions') ->groups(['api', 'users']) - ->label('event', 'users.sessions.delete') + ->label('event', 'users.[userId].sessions.[sessionId].delete') ->label('scope', 'users.write') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') @@ -673,7 +740,7 @@ App::delete('/v1/users/:userId/sessions') $user = $dbForProject->getDocument('users', $userId); - if ($user->isEmpty() || $user->getAttribute('deleted')) { + if ($user->isEmpty()) { throw new Exception('User not found', 404, Exception::USER_NOT_FOUND); } @@ -681,25 +748,28 @@ App::delete('/v1/users/:userId/sessions') foreach ($sessions as $key => $session) { /** @var Document $session */ $dbForProject->deleteDocument('sessions', $session->getId()); + //TODO: fix this } - $dbForProject->updateDocument('users', $user->getId(), $user->setAttribute('sessions', [])); + $dbForProject->deleteCachedDocument('users', $user->getId()); $events - ->setParam('eventData', $response->output($user, Response::MODEL_USER)) + ->setParam('userId', $user->getId()) + ->setPayload($response->output($user, Response::MODEL_USER)) ; $usage ->setParam('users.update', 1) ->setParam('users.sessions.delete', 1) ; + $response->noContent(); }); App::delete('/v1/users/:userId') ->desc('Delete User') ->groups(['api', 'users']) - ->label('event', 'users.delete') + ->label('event', 'users.[userId].delete') ->label('scope', 'users.write') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') @@ -717,41 +787,28 @@ App::delete('/v1/users/:userId') /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForProject */ /** @var Appwrite\Event\Event $events */ - /** @var Appwrite\Event\Event $deletes */ + /** @var Appwrite\Event\Delete $deletes */ /** @var Appwrite\Stats\Stats $usage */ - + $user = $dbForProject->getDocument('users', $userId); - if ($user->isEmpty() || $user->getAttribute('deleted')) { + if ($user->isEmpty()) { throw new Exception('User not found', 404, Exception::USER_NOT_FOUND); } - /** - * DO NOT DELETE THE USER RECORD ITSELF. - * WE RETAIN THE USER RECORD TO RESERVE THE USER ID AND ENSURE THAT THE USER ID IS NOT REUSED. - */ - // clone user object to send to workers $clone = clone $user; - $user - ->setAttribute("name", null) - ->setAttribute("email", null) - ->setAttribute("password", null) - ->setAttribute("deleted", true) - ->setAttribute("tokens", null) - ->setAttribute("search", null) - ; - - $dbForProject->updateDocument('users', $userId, $user); + $dbForProject->deleteDocument('users', $userId); $deletes - ->setParam('type', DELETE_TYPE_DOCUMENT) - ->setParam('document', $clone) + ->setType(DELETE_TYPE_DOCUMENT) + ->setDocument($clone) ; $events - ->setParam('eventData', $response->output($clone, Response::MODEL_USER)) + ->setParam('userId', $user->getId()) + ->setPayload($response->output($clone, Response::MODEL_USER)) ; $usage diff --git a/app/controllers/general.php b/app/controllers/general.php index a65e07c81c..1c49e3cb7a 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -12,15 +12,19 @@ use Appwrite\Extend\Exception; use Utopia\Config\Config; use Utopia\Domains\Domain; use Appwrite\Auth\Auth; +use Appwrite\Event\Certificate; use Appwrite\Network\Validator\Origin; use Appwrite\Utopia\Response\Filters\V11 as ResponseV11; use Appwrite\Utopia\Response\Filters\V12 as ResponseV12; +use Appwrite\Utopia\Response\Filters\V13 as ResponseV13; use Utopia\CLI\Console; use Utopia\Database\Document; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; +use Utopia\Validator\Hostname; use Appwrite\Utopia\Request\Filters\V12 as RequestV12; use Appwrite\Utopia\Request\Filters\V13 as RequestV13; +use Appwrite\Utopia\Request\Filters\V14 as RequestV14; use Utopia\Validator\Text; Config::setParam('domainVerification', false); @@ -53,6 +57,9 @@ App::init(function ($utopia, $request, $response, $console, $project, $dbForCons case version_compare ($requestFormat , '0.13.0', '<') : Request::setFilter(new RequestV13()); break; + case version_compare ($requestFormat , '0.14.0', '<') : + Request::setFilter(new RequestV14()); + break; default: Request::setFilter(null); } @@ -73,31 +80,39 @@ App::init(function ($utopia, $request, $response, $console, $project, $dbForCons } else { Authorization::disable(); - $domainDocument = $dbForConsole->findOne('domains', [ - new Query('domain', QUERY::TYPE_EQUAL, [$domain->get()]) - ]); - - if (!$domainDocument) { - $domainDocument = new Document([ - 'domain' => $domain->get(), - 'tld' => $domain->getSuffix(), - 'registerable' => $domain->getRegisterable(), - 'verification' => false, - 'certificateId' => null, - ]); - - $domainDocument = $dbForConsole->createDocument('domains', $domainDocument); - - Console::info('Issuing a TLS certificate for the master domain (' . $domain->get() . ') in a few seconds...'); - - Resque::enqueue('v1-certificates', 'CertificatesV1', [ - 'document' => $domainDocument, - 'domain' => $domain->get(), - 'validateTarget' => false, - 'validateCNAME' => false, - ]); + $mainDomain = null; + if(!empty(App::getEnv('_APP_DOMAIN', ''))) { + $mainDomain = App::getEnv('_APP_DOMAIN', ''); + } else { + $domainDocument = $dbForConsole->findOne('domains', [], 0, ['_id'], ['ASC']); + $mainDomain = $domainDocument ? $domainDocument->getAttribute('domain') : $domain->get(); } + if($mainDomain !== $domain->get()) { + Console::warning($domain->get() . ' is not a main domain. Skipping SSL certificate generation.'); + } else { + $domainDocument = $dbForConsole->findOne('domains', [ + new Query('domain', QUERY::TYPE_EQUAL, [$domain->get()]) + ]); + + if (!$domainDocument) { + $domainDocument = new Document([ + 'domain' => $domain->get(), + 'tld' => $domain->getSuffix(), + 'registerable' => $domain->getRegisterable(), + 'verification' => false, + 'certificateId' => null, + ]); + + $domainDocument = $dbForConsole->createDocument('domains', $domainDocument); + + Console::info('Issuing a TLS certificate for the main domain (' . $domain->get() . ') in a few seconds...'); + + (new Certificate()) + ->setDomain($domainDocument) + ->trigger(); + } + } $domains[$domain->get()] = true; Authorization::reset(); // ensure authorization is re-enabled @@ -123,8 +138,13 @@ App::init(function ($utopia, $request, $response, $console, $project, $dbForCons $protocol = \parse_url($request->getOrigin($referrer), PHP_URL_SCHEME); $port = \parse_url($request->getOrigin($referrer), PHP_URL_PORT); - $refDomain = (!empty($protocol) ? $protocol : $request->getProtocol()).'://'.((\in_array($origin, $clients)) - ? $origin : 'localhost').(!empty($port) ? ':'.$port : ''); + $refDomainOrigin = 'localhost'; + $validator = new Hostname($clients); + if ($validator->isValid($origin)) { + $refDomainOrigin = $origin; + } + + $refDomain = (!empty($protocol) ? $protocol : $request->getProtocol()) . '://' . $refDomainOrigin . (!empty($port) ? ':' . $port : ''); $refDomain = (!$route->getLabel('origin', false)) // This route is publicly accessible ? $refDomain @@ -158,6 +178,9 @@ App::init(function ($utopia, $request, $response, $console, $project, $dbForCons case version_compare ($responseFormat , '0.12.4', '<='): Response::setFilter(new ResponseV12()); break; + case version_compare ($responseFormat , '0.13.4', '<='): + Response::setFilter(new ResponseV13()); + break; default: Response::setFilter(null); } @@ -173,6 +196,10 @@ App::init(function ($utopia, $request, $response, $console, $project, $dbForCons */ if (App::getEnv('_APP_OPTIONS_FORCE_HTTPS', 'disabled') === 'enabled') { // Force HTTPS if ($request->getProtocol() !== 'https') { + if($request->getMethod() !== Request::METHOD_GET) { + throw new Exception('Method unsupported over HTTP.', 500, Exception::GENERAL_PROTOCOL_UNSUPPORTED); + } + return $response->redirect('https://'.$request->getHostname().$request->getURI()); } diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index c5c6da6167..e4ab00c04b 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -1,19 +1,16 @@ setParam('projectId', $project->getId()) - ->setParam('webhooks', $project->getAttribute('webhooks', [])) - ->setParam('userId', $user->getId()) - ->setParam('event', $route->getLabel('event', '')) - ->setParam('eventData', []) - ->setParam('functionId', null) - ->setParam('executionId', null) - ->setParam('trigger', 'event') + ->setEvent($route->getLabel('event', '')) + ->setProject($project) + ->setUser($user) + ; + + $mails + ->setProject($project) + ->setUser($user) ; $audits - ->setParam('projectId', $project->getId()) - ->setParam('userId', $user->getId()) - ->setParam('userEmail', $user->getAttribute('email')) - ->setParam('userName', $user->getAttribute('name')) - ->setParam('mode', $mode) - ->setParam('event', '') - ->setParam('resource', '') - ->setParam('userAgent', $request->getUserAgent('')) - ->setParam('ip', $request->getIP()) - ->setParam('data', []) + ->setMode($mode) + ->setUserAgent($request->getUserAgent('')) + ->setIP($request->getIP()) + ->setEvent($route->getLabel('event', '')) + ->setProject($project) + ->setUser($user) ; $usage @@ -121,15 +115,10 @@ App::init(function ($utopia, $request, $response, $project, $user, $events, $aud ->setParam('networkResponseSize', 0) ->setParam('storage', 0) ; - - $deletes - ->setParam('projectId', $project->getId()) - ; - $database - ->setParam('projectId', $project->getId()) - ; -}, ['utopia', 'request', 'response', 'project', 'user', 'events', 'audits', 'usage', 'deletes', 'database', 'dbForProject', 'mode'], 'api'); + $deletes->setProject($project); + $database->setProject($project); +}, ['utopia', 'request', 'response', 'project', 'user', 'events', 'audits', 'mails', 'usage', 'deletes', 'database', 'dbForProject', 'mode'], 'api'); App::init(function ($utopia, $request, $project) { /** @var Utopia\App $utopia */ @@ -184,56 +173,66 @@ App::init(function ($utopia, $request, $project) { }, ['utopia', 'request', 'project'], 'auth'); -App::shutdown(function ($utopia, $request, $response, $project, $events, $audits, $usage, $deletes, $database, $mode) { +App::shutdown(function ($utopia, $request, $response, $project, $events, $audits, $usage, $deletes, $database, $mode, $dbForProject) { /** @var Utopia\App $utopia */ /** @var Appwrite\Utopia\Request $request */ /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Document $project */ /** @var Appwrite\Event\Event $events */ - /** @var Appwrite\Event\Event $audits */ + /** @var Appwrite\Event\Audit $audits */ /** @var Appwrite\Stats\Stats $usage */ - /** @var Appwrite\Event\Event $deletes */ - /** @var Appwrite\Event\Event $database */ + /** @var Appwrite\Event\Delete $deletes */ + /** @var Appwrite\Event\Database $database */ /** @var bool $mode */ + /** @var Utopia\Database\Database $dbForProject */ - if (!empty($events->getParam('event'))) { - if (empty($events->getParam('eventData'))) { - $events->setParam('eventData', $response->getPayload()); + if (!empty($events->getEvent())) { + if (empty($events->getPayload())) { + $events->setPayload($response->getPayload()); } - - $webhooks = clone $events; - $functions = clone $events; - - $webhooks - ->setQueue('v1-webhooks') - ->setClass('WebhooksV1') + /** + * Trigger functions. + */ + $events + ->setClass(Event::FUNCTIONS_CLASS_NAME) + ->setQueue(Event::FUNCTIONS_QUEUE_NAME) ->trigger(); - $functions - ->setQueue('v1-functions') - ->setClass('FunctionsV1') + /** + * Trigger webhooks. + */ + $events + ->setClass(Event::WEBHOOK_CLASS_NAME) + ->setQueue(Event::WEBHOOK_QUEUE_NAME) ->trigger(); + /** + * Trigger realtime. + */ if ($project->getId() !== 'console') { - $payload = new Document($response->getPayload()); - $collection = new Document($events->getParam('collection') ?? []); - $bucket = new Document($events->getParam('bucket') ?? []); + $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; $target = Realtime::fromPayload( - event: $events->getParam('event'), - payload: $payload, - project: $project, + // Pass first, most verbose event pattern + event: $allEvents[0], + payload: $payload, + project: $project, collection: $collection, bucket: $bucket, ); Realtime::send( - $target['projectId'] ?? $project->getId(), - $response->getPayload(), - $events->getParam('event'), - $target['channels'], - $target['roles'], - [ + projectId: $target['projectId'] ?? $project->getId(), + payload: $events->getPayload(), + events: $allEvents, + channels: $target['channels'], + roles: $target['roles'], + options: [ 'permissionsChanged' => $target['permissionsChanged'], 'userId' => $events->getParam('userId') ] @@ -241,15 +240,18 @@ App::shutdown(function ($utopia, $request, $response, $project, $events, $audits } } - if (!empty($audits->getParam('event'))) { + if (!empty($audits->getResource())) { + foreach ($events->getParams() as $key => $value) { + $audits->setParam($key, $value); + } $audits->trigger(); } - if (!empty($deletes->getParam('type')) && !empty($deletes->getParam('document'))) { + if (!empty($deletes->getType())) { $deletes->trigger(); } - if (!empty($database->getParam('type')) && !empty($database->getParam('document'))) { + if (!empty($database->getType())) { $database->trigger(); } @@ -262,8 +264,7 @@ App::shutdown(function ($utopia, $request, $response, $project, $events, $audits $usage ->setParam('networkRequestSize', $request->getSize() + $usage->getParam('storage')) ->setParam('networkResponseSize', $response->getSize()) - ->submit() - ; + ->submit(); } -}, ['utopia', 'request', 'response', 'project', 'events', 'audits', 'usage', 'deletes', 'database', 'mode'], 'api'); \ No newline at end of file +}, ['utopia', 'request', 'response', 'project', 'events', 'audits', 'usage', 'deletes', 'database', 'mode', 'dbForProject'], 'api'); \ No newline at end of file diff --git a/app/controllers/web/console.php b/app/controllers/web/console.php index 12cb625a8e..4ec54c1ded 100644 --- a/app/controllers/web/console.php +++ b/app/controllers/web/console.php @@ -162,10 +162,49 @@ App::get('/console/webhooks') $page = new View(__DIR__.'/../../views/console/webhooks/index.phtml'); + $page->setParam('events', Config::getParam('events', [])); + + $layout + ->setParam('title', APP_NAME.' - Webhooks') + ->setParam('body', $page); + }); + +App::get('/console/webhooks/webhook') + ->groups(['web', 'console']) + ->label('permission', 'public') + ->label('scope', 'console') + ->param('id', '', new UID(), 'Webhook unique ID.') + ->inject('layout') + ->action(function ($id, $layout) { + /** @var Appwrite\Utopia\View $layout */ + + $page = new View(__DIR__.'/../../views/console/webhooks/webhook.phtml'); + $page ->setParam('events', Config::getParam('events', [])) + ->setParam('new', false) ; - + + $layout + ->setParam('title', APP_NAME.' - Webhooks') + ->setParam('body', $page); + }); + +App::get('/console/webhooks/webhook/new') + ->groups(['web', 'console']) + ->label('permission', 'public') + ->label('scope', 'console') + ->inject('layout') + ->action(function ($layout) { + /** @var Appwrite\Utopia\View $layout */ + + $page = new View(__DIR__.'/../../views/console/webhooks/webhook.phtml'); + + $page + ->setParam('events', Config::getParam('events', [])) + ->setParam('new', true) + ; + $layout ->setParam('title', APP_NAME.' - Webhooks') ->setParam('body', $page); diff --git a/app/db/SQL/all.sql b/app/db/SQL/all.sql deleted file mode 100644 index 63ec92f42b..0000000000 --- a/app/db/SQL/all.sql +++ /dev/null @@ -1,90 +0,0 @@ -CREATE DATABASE IF NOT EXISTS `appwrite` /*!40100 DEFAULT CHARACTER SET utf8mb4 */; - -USE `appwrite`; - -CREATE TABLE IF NOT EXISTS `template.abuse.abuse` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `_key` varchar(255) NOT NULL, - `_time` int(11) NOT NULL, - `_count` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `unique1` (`_key`,`_time`), - KEY `index1` (`_key`,`_time`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - -CREATE TABLE IF NOT EXISTS `template.audit.audit` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `userId` varchar(45) NOT NULL, - `event` varchar(45) NOT NULL, - `resource` varchar(45) DEFAULT NULL, - `userAgent` text NOT NULL, - `ip` varchar(45) NOT NULL, - `location` varchar(45) DEFAULT NULL, - `time` datetime NOT NULL, - `data` longtext DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `id_UNIQUE` (`id`), - KEY `index_1` (`userId`), - KEY `index_2` (`event`), - KEY `index_3` (`resource`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - -CREATE TABLE IF NOT EXISTS `template.database.documents` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Unique ID for each node', - `uid` varchar(45) DEFAULT NULL, - `status` int(11) NOT NULL DEFAULT 0, - `createdAt` datetime DEFAULT NULL, - `updatedAt` datetime DEFAULT NULL, - `signature` varchar(32) NOT NULL, - `revision` varchar(45) NOT NULL, - `permissions` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `id_UNIQUE` (`id`), - UNIQUE KEY `index2` (`uid`), - KEY `index3` (`signature`,`uid`,`revision`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - -CREATE TABLE IF NOT EXISTS `template.database.properties` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Primary Key', - `documentUid` varchar(45) NOT NULL COMMENT 'Unique UID foreign key', - `documentRevision` varchar(45) NOT NULL, - `key` varchar(32) NOT NULL COMMENT 'Property key name', - `value` text NOT NULL COMMENT 'Value of property', - `primitive` varchar(32) NOT NULL COMMENT 'Primitive type of property value', - `array` tinyint(4) NOT NULL DEFAULT 0, - `order` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `index1` (`documentUid`), - KEY `index2` (`key`,`value`(5)), - FULLTEXT KEY `index3` (`value`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - -CREATE TABLE IF NOT EXISTS `template.database.relationships` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `revision` varchar(45) NOT NULL, - `start` varchar(45) NOT NULL COMMENT 'Unique UID foreign key', - `end` varchar(45) NOT NULL COMMENT 'Unique UID foreign key', - `key` varchar(256) NOT NULL, - `path` int(11) NOT NULL DEFAULT 0, - `array` tinyint(4) NOT NULL DEFAULT 0, - `order` int(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - KEY `relationships_start_nodes_id_idx` (`start`), - KEY `relationships_end_nodes_id_idx` (`end`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - -CREATE TABLE IF NOT EXISTS `template.database.unique` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `key` varchar(128) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `index1` (`key`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - -/* Default App */ - -CREATE TABLE IF NOT EXISTS `app_console.database.documents` LIKE `template.database.documents`; -CREATE TABLE IF NOT EXISTS `app_console.database.properties` LIKE `template.database.properties`; -CREATE TABLE IF NOT EXISTS `app_console.database.relationships` LIKE `template.database.relationships`; -CREATE TABLE IF NOT EXISTS `app_console.database.unique` LIKE `template.database.unique`; -CREATE TABLE IF NOT EXISTS `app_console.audit.audit` LIKE `template.audit.audit`; -CREATE TABLE IF NOT EXISTS `app_console.abuse.abuse` LIKE `template.abuse.abuse`; \ No newline at end of file diff --git a/app/executor.php b/app/executor.php index 34cd9d344a..2e957c624c 100644 --- a/app/executor.php +++ b/app/executor.php @@ -244,7 +244,7 @@ App::post('/v1/runtimes') command: $commands, stdout: $stdout, stderr: $stderr, - timeout: App::getEnv('_APP_FUNCTIONS_TIMEOUT', 900) + timeout: App::getEnv('_APP_FUNCTIONS_BUILD_TIMEOUT', 900) ); if (!$status) { @@ -279,7 +279,7 @@ App::post('/v1/runtimes') $endTime = \time(); $container = array_merge($container, [ 'status' => 'ready', - 'stdout' => \mb_strcut($stdout, 0, 1000000), // Limit to 1MB + 'response' => \mb_strcut($stdout, 0, 1000000), // Limit to 1MB 'stderr' => \mb_strcut($stderr, 0, 1000000), // Limit to 1MB 'startTime' => $startTime, 'endTime' => $endTime, @@ -426,7 +426,7 @@ App::post('/v1/execution') } Console::info('Executing Runtime: ' . $runtimeId); - + $execution = []; $executionStart = \microtime(true); $stdout = ''; @@ -467,52 +467,40 @@ App::post('/v1/execution') \curl_close($ch); - // If timeout error - if (in_array($errNo, [CURLE_OPERATION_TIMEDOUT, 110])) { - $statusCode = 124; + switch (true) { + /** No Error. */ + case $errNo === 0: + break; + /** Runtime not ready for requests yet. 111 is the swoole error code for Connection Refused - see https://openswoole.com/docs/swoole-error-code */ + case $errNo === 111: + throw new Exception('An internal curl error has occurred within the executor! Error Msg: ' . $error, 406); + /** Any other CURL error */ + default: + throw new Exception('An internal curl error has occurred within the executor! Error Msg: ' . $error, 500); } - - // 110 is the Swoole error code for timeout, see: https://www.swoole.co.uk/docs/swoole-error-code - if ($errNo !== 0 && $errNo !== CURLE_COULDNT_CONNECT && $errNo !== CURLE_OPERATION_TIMEDOUT && $errNo !== 110) { - throw new Exception('An internal curl error has occurred within the executor! Error Msg: ' . $error, 406); + + switch (true) { + case $statusCode >= 500: + $stderr = $executorResponse ?? 'Internal Runtime error.'; + break; + case $statusCode >= 100: + $stdout = $executorResponse; + break; + default: + $stderr = $executorResponse ?? 'Execution failed.'; + break; } - - $executionData = []; - - if (!empty($executorResponse)) { - $executionData = json_decode($executorResponse, true); - } - - if (isset($executionData['code'])) { - $statusCode = $executionData['code']; - } - - if ($statusCode === 500) { - if (isset($executionData['message'])) { - $stderr = $executionData['message']; - } else { - $stderr = 'Internal Runtime error'; - } - } else if ($statusCode === 124) { - $stderr = 'Execution timed out.'; - } else if ($statusCode === 0) { - $stderr = 'Execution failed.'; - } else if ($statusCode >= 200 && $statusCode < 300) { - $stdout = $executorResponse; - } else { - $stderr = 'Execution failed.'; - } - + $executionEnd = \microtime(true); $executionTime = ($executionEnd - $executionStart); - $functionStatus = ($statusCode >= 200 && $statusCode < 300) ? 'completed' : 'failed'; - + $functionStatus = ($statusCode >= 500) ? 'failed' : 'completed'; + Console::success('Function executed in ' . $executionTime . ' seconds, status: ' . $functionStatus); $execution = [ 'status' => $functionStatus, 'statusCode' => $statusCode, - 'stdout' => \mb_strcut($stdout, 0, 1000000), // Limit to 1MB + 'response' => \mb_strcut($stdout, 0, 1000000), // Limit to 1MB 'stderr' => \mb_strcut($stderr, 0, 1000000), // Limit to 1MB 'time' => $executionTime, ]; @@ -592,11 +580,11 @@ App::init(function ($request, $response) { $http->on('start', function ($http) { global $orchestrationPool; global $activeRuntimes; - + /** * Warmup: make sure images are ready to run fast 🚀 */ - $runtimes = new Runtimes(); + $runtimes = new Runtimes('v1'); $allowList = empty(App::getEnv('_APP_FUNCTIONS_RUNTIMES')) ? [] : \explode(',', App::getEnv('_APP_FUNCTIONS_RUNTIMES')); $runtimes = $runtimes->getAll(true, $allowList); foreach ($runtimes as $runtime) { diff --git a/app/init.php b/app/init.php index 307ace6b64..37dbf7d20b 100644 --- a/app/init.php +++ b/app/init.php @@ -22,7 +22,11 @@ use Ahc\Jwt\JWT; use Ahc\Jwt\JWTException; use Appwrite\Extend\Exception; 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; use Appwrite\Network\Validator\Email; use Appwrite\Network\Validator\IP; use Appwrite\Network\Validator\URL; @@ -71,7 +75,7 @@ const APP_LIMIT_ENCRYPTION = 20000000; //20MB const APP_LIMIT_COMPRESSION = 20000000; //20MB const APP_LIMIT_ARRAY_PARAMS_SIZE = 100; // Default maximum of how many elements can there be in API parameter that expects array value const APP_CACHE_BUSTER = 304; -const APP_VERSION_STABLE = '0.13.4'; +const APP_VERSION_STABLE = '0.14.0'; const APP_DATABASE_ATTRIBUTE_EMAIL = 'email'; const APP_DATABASE_ATTRIBUTE_ENUM = 'enum'; const APP_DATABASE_ATTRIBUTE_IP = 'ip'; @@ -128,6 +132,7 @@ const MAIL_TYPE_VERIFICATION = 'verification'; const MAIL_TYPE_MAGIC_SESSION = 'magicSession'; const MAIL_TYPE_RECOVERY = 'recovery'; const MAIL_TYPE_INVITATION = 'invitation'; +const MAIL_TYPE_CERTIFICATE = 'certificate'; // Auth Types const APP_AUTH_TYPE_SESSION = 'Session'; const APP_AUTH_TYPE_JWT = 'JWT'; @@ -182,7 +187,7 @@ if(!empty($user) || !empty($pass)) { */ Database::addFilter('casting', function($value) { - return json_encode(['value' => $value]); + return json_encode(['value' => $value], JSON_PRESERVE_ZERO_FRACTION); }, function($value) { if (is_null($value)) { @@ -302,6 +307,19 @@ Database::addFilter('subQueryWebhooks', } ); +Database::addFilter('subQuerySessions', + function($value) { + return null; + }, + function($value, Document $document, Database $database) { + $sessions = Authorization::skip(fn () => $database->find('sessions', [ + new Query('userId', Query::TYPE_EQUAL, [$document->getId()]) + ], $database->getIndexLimit(), 0, [])); + + return $sessions; + } +); + Database::addFilter('subQueryTokens', function($value) { return null; @@ -629,10 +647,10 @@ App::setResource('locale', fn() => new Locale(App::getEnv('_APP_LOCALE', 'en'))) // Queues App::setResource('events', fn() => new Event('', '')); -App::setResource('audits', fn() => new Event(Event::AUDITS_QUEUE_NAME, Event::AUDITS_CLASS_NAME)); -App::setResource('mails', fn() => new Event(Event::MAILS_QUEUE_NAME, Event::MAILS_CLASS_NAME)); -App::setResource('deletes', fn() => new Event(Event::DELETE_QUEUE_NAME, Event::DELETE_CLASS_NAME)); -App::setResource('database', fn() => new Event(Event::DATABASE_QUEUE_NAME, Event::DATABASE_CLASS_NAME)); +App::setResource('audits', fn() => new Audit()); +App::setResource('mails', fn() => new Mail()); +App::setResource('deletes', fn() => new Delete()); +App::setResource('database', fn() => new EventDatabase()); App::setResource('usage', function($register) { return new Stats($register->get('statsd')); }, ['register']); diff --git a/app/realtime.php b/app/realtime.php index 8d36069edb..6b75c25ce1 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -55,10 +55,10 @@ $adapter $server = new Server($adapter); -$logError = function(Throwable $error, string $action) use ($register) { +$logError = function (Throwable $error, string $action) use ($register) { $logger = $register->get('logger'); - if($logger) { + if ($logger) { $version = App::getEnv('_APP_VERSION', 'UNKNOWN'); $log = new Log(); @@ -82,7 +82,7 @@ $logError = function(Throwable $error, string $action) use ($register) { $log->setEnvironment($isProduction ? Log::ENVIRONMENT_PRODUCTION : Log::ENVIRONMENT_STAGING); $responseCode = $logger->addLog($log); - Console::info('Realtime log pushed with status code: '.$responseCode); + Console::info('Realtime log pushed with status code: ' . $responseCode); } Console::error('[Error] Type: ' . get_class($error)); @@ -113,10 +113,10 @@ function getDatabase(Registry &$register, string $namespace) throw new Exception('Collection not ready'); } break; // leave loop if successful - } catch(\Exception $e) { + } catch (\Exception $e) { Console::warning("Database not ready. Retrying connection ({$attempts})..."); if ($attempts >= DATABASE_RECONNECT_MAX_ATTEMPTS) { - throw new \Exception('Failed to connect to database: '. $e->getMessage()); + throw new \Exception('Failed to connect to database: ' . $e->getMessage()); } sleep(DATABASE_RECONNECT_SLEEP); } @@ -129,7 +129,6 @@ function getDatabase(Registry &$register, string $namespace) $register->get('redisPool')->put($redis); } ]; - }; $server->onStart(function () use ($stats, $register, $containerId, &$statsDocument, $logError) { @@ -151,7 +150,7 @@ $server->onStart(function () use ($stats, $register, $containerId, &$statsDocume 'timestamp' => time(), 'value' => '{}' ]); - $statsDocument = Authorization::skip(fn() => $database->createDocument('realtime', $document)); + $statsDocument = Authorization::skip(fn () => $database->createDocument('realtime', $document)); } catch (\Throwable $th) { call_user_func($logError, $th, "createWorkerDocument"); } finally { @@ -163,28 +162,6 @@ $server->onStart(function () use ($stats, $register, $containerId, &$statsDocume * Save current connections to the Database every 5 seconds. */ Timer::tick(5000, function () use ($register, $stats, &$statsDocument, $logError) { - /** @var Document $statsDocument */ - foreach ($stats as $projectId => $value) { - $connections = $stats->get($projectId, 'connections') ?? 0; - $messages = $stats->get($projectId, 'messages' ?? 0); - - $usage = new Event('v1-usage', 'UsageV1'); - $usage - ->setParam('projectId', $projectId) - ->setParam('realtimeConnections', $connections) - ->setParam('realtimeMessages', $messages) - ->setParam('networkRequestSize', 0) - ->setParam('networkResponseSize', 0); - - $stats->set($projectId, [ - 'messages' => 0, - 'connections' => 0 - ]); - - if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { - $usage->trigger(); - } - } $payload = []; foreach ($stats as $projectId => $value) { $payload[$projectId] = $stats->get($projectId, 'connectionsTotal'); @@ -200,7 +177,7 @@ $server->onStart(function () use ($stats, $register, $containerId, &$statsDocume ->setAttribute('timestamp', time()) ->setAttribute('value', json_encode($payload)); - Authorization::skip(fn() => $database->updateDocument('realtime', $statsDocument->getId(), $statsDocument)); + Authorization::skip(fn () => $database->updateDocument('realtime', $statsDocument->getId(), $statsDocument)); } catch (\Throwable $th) { call_user_func($logError, $th, "updateWorkerDocument"); } finally { @@ -225,9 +202,9 @@ $server->onWorkerStart(function (int $workerId) use ($server, $register, $stats, $payload = []; - $list = Authorization::skip(fn() => $database->find('realtime', [ - new Query('timestamp', Query::TYPE_GREATER, [(time() - 15)]) - ])); + $list = Authorization::skip(fn () => $database->find('realtime', [ + new Query('timestamp', Query::TYPE_GREATER, [(time() - 15)]) + ])); /** * Aggregate stats across containers. @@ -251,7 +228,7 @@ $server->onWorkerStart(function (int $workerId) use ($server, $register, $stats, 'project' => 'console', 'roles' => ['team:' . $stats->get($projectId, 'teamId')], 'data' => [ - 'event' => 'stats.connections', + 'events' => ['stats.connections'], 'channels' => ['project'], 'timestamp' => time(), 'payload' => [ @@ -278,7 +255,7 @@ $server->onWorkerStart(function (int $workerId) use ($server, $register, $stats, 'project' => 'console', 'roles' => ['role:guest'], 'data' => [ - 'event' => 'test.event', + 'events' => ['test.event'], 'channels' => ['tests'], 'timestamp' => time(), 'payload' => $payload @@ -321,19 +298,16 @@ $server->onWorkerStart(function (int $workerId) use ($server, $register, $stats, if ($realtime->hasSubscriber($projectId, 'user:' . $userId)) { $connection = array_key_first(reset($realtime->subscriptions[$projectId]['user:' . $userId])); - } else { - return; + [$database, $returnDatabase] = getDatabase($register, "_{$projectId}"); + + $user = $database->getDocument('users', $userId); + + $roles = Auth::getRoles($user); + + $realtime->subscribe($projectId, $connection, $roles, $realtime->connections[$connection]['channels']); + + call_user_func($returnDatabase); } - - [$database, $returnDatabase] = getDatabase($register, "_{$projectId}"); - - $user = $database->getDocument('users', $userId); - - $roles = Auth::getRoles($user); - - $realtime->subscribe($projectId, $connection, $roles, $realtime->connections[$connection]['channels']); - - call_user_func($returnDatabase); } $receivers = $realtime->getSubscribers($event); @@ -362,10 +336,9 @@ $server->onWorkerStart(function (int $workerId) use ($server, $register, $stats, Console::error('Pub/sub error: ' . $th->getMessage()); $register->get('redisPool')->put($redis); $attempts++; + sleep(DATABASE_RECONNECT_SLEEP); continue; } - - $attempts++; } Console::error('Failed to restart pub/sub...'); @@ -383,10 +356,10 @@ $server->onOpen(function (int $connection, SwooleRequest $request) use ($server, Console::info("Connection open (user: {$connection})"); - App::setResource('db', fn() => $db); - App::setResource('cache', fn() => $redis); - App::setResource('request', fn() => $request); - App::setResource('response', fn() => $response); + App::setResource('db', fn () => $db); + App::setResource('cache', fn () => $redis); + App::setResource('request', fn () => $request); + App::setResource('response', fn () => $response); try { /** @var \Utopia\Database\Document $user */ @@ -534,7 +507,7 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re } switch ($message['type']) { - /** + /** * This type is used to authenticate. */ case 'authentication': diff --git a/app/tasks/maintenance.php b/app/tasks/maintenance.php index a6f37ff71b..6bc06584e6 100644 --- a/app/tasks/maintenance.php +++ b/app/tasks/maintenance.php @@ -1,57 +1,121 @@ get('cache'))); + $database = new Database(new MariaDB($register->get('db')), $cache); + $database->setDefaultDatabase(App::getEnv('_APP_DB_SCHEMA', 'appwrite')); + $database->setNamespace('_console'); // Main DB + + if (!$database->exists($database->getDefaultDatabase(), 'certificates')) { + throw new \Exception('Console project not ready'); + } + + break; // leave loop if successful + } catch (\Exception $e) { + Console::warning("Database not ready. Retrying connection ({$attempts})..."); + if ($attempts >= DATABASE_RECONNECT_MAX_ATTEMPTS) { + throw new \Exception('Failed to connect to database: ' . $e->getMessage()); + } + sleep(DATABASE_RECONNECT_SLEEP); + } + } while ($attempts < DATABASE_RECONNECT_MAX_ATTEMPTS); + + return $database; +} $cli ->task('maintenance') ->desc('Schedules maintenance tasks and publishes them to resque') ->action(function () { Console::title('Maintenance V1'); - Console::success(APP_NAME.' maintenance process v1 has started'); + Console::success(APP_NAME . ' maintenance process v1 has started'); function notifyDeleteExecutionLogs(int $interval) { - Resque::enqueue(Event::DELETE_QUEUE_NAME, Event::DELETE_CLASS_NAME, [ - 'type' => DELETE_TYPE_EXECUTIONS, - 'timestamp' => time() - $interval - ]); + (new Delete()) + ->setType(DELETE_TYPE_EXECUTIONS) + ->setTimestamp(time() - $interval) + ->trigger(); } - function notifyDeleteAbuseLogs(int $interval) + function notifyDeleteAbuseLogs(int $interval) { - Resque::enqueue(Event::DELETE_QUEUE_NAME, Event::DELETE_CLASS_NAME, [ - 'type' => DELETE_TYPE_ABUSE, - 'timestamp' => time() - $interval - ]); + (new Delete()) + ->setType(DELETE_TYPE_ABUSE) + ->setTimestamp(time() - $interval) + ->trigger(); } - function notifyDeleteAuditLogs(int $interval) + function notifyDeleteAuditLogs(int $interval) { - Resque::enqueue(Event::DELETE_QUEUE_NAME, Event::DELETE_CLASS_NAME, [ - 'type' => DELETE_TYPE_AUDIT, - 'timestamp' => time() - $interval - ]); + (new Delete()) + ->setType(DELETE_TYPE_AUDIT) + ->setTimestamp(time() - $interval) + ->trigger(); } - function notifyDeleteUsageStats(int $interval30m, int $interval1d) + function notifyDeleteUsageStats(int $interval30m, int $interval1d) { - Resque::enqueue(Event::DELETE_QUEUE_NAME, Event::DELETE_CLASS_NAME, [ - 'type' => DELETE_TYPE_USAGE, - 'timestamp1d' => time() - $interval1d, - 'timestamp30m' => time() - $interval30m, - ]); + (new Delete()) + ->setType(DELETE_TYPE_USAGE) + ->setTimestamp1d(time() - $interval1d) + ->setTimestamp30m(time() - $interval30m) + ->trigger(); } - function notifyDeleteConnections() + function notifyDeleteConnections() { - Resque::enqueue(Event::DELETE_QUEUE_NAME, Event::DELETE_CLASS_NAME, [ - 'type' => DELETE_TYPE_REALTIME, - 'timestamp' => time() - 60 - ]); + (new Delete()) + ->setType(DELETE_TYPE_REALTIME) + ->setTimestamp(time() - 60) + ->trigger(); + } + + function renewCertificates($dbForConsole) + { + $time = date('d-m-Y H:i:s', time()); + $certificates = $dbForConsole->find('certificates', [ + new Query('attempts', Query::TYPE_LESSEREQUAL, [5]), // Maximum 5 attempts + new Query('renewDate', Query::TYPE_LESSEREQUAL, [\time()]) // includes 60 days cooldown (we have 30 days to renew) + ], 200); // Limit 200 comes from LetsEncrypt (300 orders per 3 hours, keeping some for new domains) + + + if (\count($certificates) > 0) { + Console::info("[{$time}] Found " . \count($certificates) . " certificates for renewal, scheduling jobs."); + + $event = new Certificate(); + foreach ($certificates as $certificate) { + $event + ->setDomain(new Document([ + 'domain' => $certificate->getAttribute('domain') + ])) + ->trigger(); + } + } else { + Console::info("[{$time}] No certificates for renewal."); + } } // # of days in seconds (1 day = 86400s) @@ -59,16 +123,19 @@ $cli $executionLogsRetention = (int) App::getEnv('_APP_MAINTENANCE_RETENTION_EXECUTION', '1209600'); $auditLogRetention = (int) App::getEnv('_APP_MAINTENANCE_RETENTION_AUDIT', '1209600'); $abuseLogsRetention = (int) App::getEnv('_APP_MAINTENANCE_RETENTION_ABUSE', '86400'); - $usageStatsRetention30m = (int) App::getEnv('_APP_MAINTENANCE_RETENTION_USAGE_30M', '129600');//36 hours + $usageStatsRetention30m = (int) App::getEnv('_APP_MAINTENANCE_RETENTION_USAGE_30M', '129600'); //36 hours $usageStatsRetention1d = (int) App::getEnv('_APP_MAINTENANCE_RETENTION_USAGE_1D', '8640000'); // 100 days - Console::loop(function() use ($interval, $executionLogsRetention, $abuseLogsRetention, $auditLogRetention, $usageStatsRetention30m, $usageStatsRetention1d) { + Console::loop(function () use ($interval, $executionLogsRetention, $abuseLogsRetention, $auditLogRetention, $usageStatsRetention30m, $usageStatsRetention1d) { + $database = getConsoleDB(); + $time = date('d-m-Y H:i:s', time()); - Console::info("[{$time}] Notifying deletes workers every {$interval} seconds"); + Console::info("[{$time}] Notifying workers with maintenance tasks every {$interval} seconds"); notifyDeleteExecutionLogs($executionLogsRetention); notifyDeleteAbuseLogs($abuseLogsRetention); notifyDeleteAuditLogs($auditLogRetention); notifyDeleteUsageStats($usageStatsRetention30m, $usageStatsRetention1d); notifyDeleteConnections(); + renewCertificates($database); }, $interval); - }); \ No newline at end of file + }); diff --git a/app/tasks/sdks.php b/app/tasks/sdks.php index 166eec4951..67bf2a6d87 100644 --- a/app/tasks/sdks.php +++ b/app/tasks/sdks.php @@ -30,7 +30,7 @@ $cli $production = ($git) ? (Console::confirm('Type "Appwrite" to push code to production git repos') == 'Appwrite') : false; $message = ($git) ? Console::confirm('Please enter your commit message:') : ''; - if(!in_array($version, ['0.6.x', '0.7.x', '0.8.x', '0.9.x', '0.10.x', '0.11.x', '0.12.x', '0.13.x', 'latest'])) { + if(!in_array($version, ['0.6.x', '0.7.x', '0.8.x', '0.9.x', '0.10.x', '0.11.x', '0.12.x', '0.13.x', '0.14.x', 'latest'])) { throw new Exception('Unknown version given'); } @@ -196,7 +196,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ->setTwitter(APP_SOCIAL_TWITTER_HANDLE) ->setDiscord(APP_SOCIAL_DISCORD_CHANNEL, APP_SOCIAL_DISCORD) ->setDefaultHeaders([ - 'X-Appwrite-Response-Format' => '0.13.0', + 'X-Appwrite-Response-Format' => '0.14.0', ]); try { diff --git a/app/tasks/ssl.php b/app/tasks/ssl.php index 2c32324fa3..345da1f22e 100644 --- a/app/tasks/ssl.php +++ b/app/tasks/ssl.php @@ -2,22 +2,23 @@ global $cli; +use Appwrite\Event\Certificate; use Utopia\App; use Utopia\CLI\Console; +use Utopia\Database\Document; +use Utopia\Validator\Hostname; $cli ->task('ssl') ->desc('Validate server certificates') - ->action(function () { - $domain = App::getEnv('_APP_DOMAIN', ''); + ->param('domain', App::getEnv('_APP_DOMAIN', ''), new Hostname(), 'Domain to generate certificate for. If empty, main domain will be used.', true) + ->action(function ($domain) { + Console::success('Scheduling a job to issue a TLS certificate for domain: ' . $domain); - Console::log('Issue a TLS certificate for master domain ('.$domain.') in 30 seconds. - Make sure your domain points to your server or restart to try again.'); - - ResqueScheduler::enqueueAt(\time() + 30, 'v1-certificates', 'CertificatesV1', [ - 'document' => [], - 'domain' => $domain, - 'validateTarget' => false, - 'validateCNAME' => false, - ]); - }); \ No newline at end of file + (new Certificate()) + ->setDomain(new Document([ + 'domain' => $domain + ])) + ->setSkipRenewCheck(true) + ->trigger(); + }); diff --git a/app/tasks/usage.php b/app/tasks/usage.php index aa8dd2371c..829914a706 100644 --- a/app/tasks/usage.php +++ b/app/tasks/usage.php @@ -418,7 +418,7 @@ $cli // Get total storage $dbForProject->setNamespace('_' . $projectId); - $storageTotal = $dbForProject->sum('deployments', 'size'); + $deploymentsTotal = $dbForProject->sum('deployments', 'size'); $time = (int) (floor(time() / 1800) * 1800); // Time rounded to nearest 30 minutes $id = \md5($time . '_30m_storage.deployments.total'); //Construct unique id for each metric using time, period and metric @@ -431,14 +431,14 @@ $cli 'period' => '30m', 'time' => $time, 'metric' => 'storage.deployments.total', - 'value' => $storageTotal, + 'value' => $deploymentsTotal, 'type' => 1, ])); } else { $dbForProject->updateDocument( 'stats', $document->getId(), - $document->setAttribute('value', $storageTotal) + $document->setAttribute('value', $deploymentsTotal) ); } $time = (int) (floor(time() / 86400) * 86400); // Time rounded to nearest day @@ -450,14 +450,14 @@ $cli 'period' => '1d', 'time' => $time, 'metric' => 'storage.deployments.total', - 'value' => $storageTotal, + 'value' => $deploymentsTotal, 'type' => 1, ])); } else { $dbForProject->updateDocument( 'stats', $document->getId(), - $document->setAttribute('value', $storageTotal) + $document->setAttribute('value', $deploymentsTotal) ); } } catch(\Exception $e) { @@ -714,7 +714,7 @@ $cli } /** - * Inserting project level sums for sub collections like storage.total + * Inserting project level sums for sub collections like storage.files.total */ foreach ($subCollectionTotals as $subCollection => $count) { $dbForProject->setNamespace("_{$projectId}"); @@ -754,6 +754,44 @@ $cli $dbForProject->updateDocument('stats', $document->getId(), $document->setAttribute('value', $count)); } + + // aggregate storage.total = storage.files.total + storage.deployments.total + if($metricPrefix === 'storage' && $subCollection === 'files') { + $metric = 'storage.total'; + $time = (int) (floor(time() / 1800) * 1800); // Time rounded to nearest 30 minutes + $id = \md5($time . '_30m_' . $metric); //Construct unique id for each metric using time, period and metric + $document = $dbForProject->getDocument('stats', $id); + if ($document->isEmpty()) { + $dbForProject->createDocument('stats', new Document([ + '$id' => $id, + 'time' => $time, + 'period' => '30m', + 'metric' => $metric, + 'value' => $count + $deploymentsTotal, + 'type' => 1, + ])); + } else { + $dbForProject->updateDocument('stats', $document->getId(), + $document->setAttribute('value', $count + $deploymentsTotal)); + } + + $time = (int) (floor(time() / 86400) * 86400); // Time rounded to nearest day + $id = \md5($time . '_1d_' . $metric); //Construct unique id for each metric using time, period and metric + $document = $dbForProject->getDocument('stats', $id); + if ($document->isEmpty()) { + $dbForProject->createDocument('stats', new Document([ + '$id' => $id, + 'time' => $time, + 'period' => '1d', + 'metric' => $metric, + 'value' => $count + $deploymentsTotal, + 'type' => 1, + ])); + } else { + $dbForProject->updateDocument('stats', $document->getId(), + $document->setAttribute('value', $count + $deploymentsTotal)); + } + } } } catch (\Exception$e) { Console::warning("Failed to save database counters data for project {$collection}: {$e->getMessage()}"); diff --git a/app/views/console/database/collection.phtml b/app/views/console/database/collection.phtml index 3651f05358..48662ead17 100644 --- a/app/views/console/database/collection.phtml +++ b/app/views/console/database/collection.phtml @@ -621,7 +621,7 @@ $logs = $this->getParam('logs', null); data-failure-param-alert-text="Failed to create attribute" data-failure-param-alert-classname="error" @reset="array = required = false" - x-data="{ array: false, required: false }"> + x-data="{ array: false, required: false, size: null }"> @@ -631,7 +631,7 @@ $logs = $this->getParam('logs', null);
Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot
- +
  Required @@ -643,7 +643,7 @@ $logs = $this->getParam('logs', null); @@ -197,6 +211,8 @@ $logs = $this->getParam('logs', null); :placeholder="attr.default" :name="attr.key" :required="attr.required" + :min="attr.min" + :max="attr.max" x-model="doc[attr.key][index]" data-cast-to="integer" /> @@ -207,6 +223,8 @@ $logs = $this->getParam('logs', null); :placeholder="attr.default" :name="attr.key" :required="attr.required" + :min="attr.min" + :max="attr.max" x-model="doc[attr.key][index]" data-cast-to="float" /> @@ -226,6 +244,7 @@ $logs = $this->getParam('logs', null); :placeholder="attr.default" :name="attr.key" :required="attr.required" + :maxlength="attr.size" x-model="doc[attr.key][index]" data-cast-to="string"> diff --git a/app/views/console/functions/function.phtml b/app/views/console/functions/function.phtml index 8ea9d2f8a0..68779e886c 100644 --- a/app/views/console/functions/function.phtml +++ b/app/views/console/functions/function.phtml @@ -1,9 +1,33 @@ getParam('fileLimit', 0); $fileLimitHuman = $this->getParam('fileLimitHuman', 0); -$events = array_keys($this->getParam('events', [])); +$events = $this->getParam('events', []); $timeout = $this->getParam('timeout', 900); $usageStatsEnabled = $this->getParam('usageStatsEnabled', true); +$patterns = []; + +foreach ($events as $name => $event) { + $patterns[] = $name; + foreach ($event as $key => $value) { + if (!\str_starts_with($key, '$')) { + if (!($value['$resource'] ?? false)) { + $patterns[] = "{$name}.{$key}"; + } else { + $patterns[] = $key; + foreach ($value as $key2 => $value2) { + if (!\str_starts_with($key2, '$')) { + if (!($value2['$resource'] ?? false)) { + $patterns[] = "{$key}.{$key2}"; + } + } + } + } + } + } +} + +sort($patterns); + ?>
getParam('usageStatsEnabled', true);

STDOUT

-
-

-                                                        
+                                                    
+

                                                     
-
+

No output was logged.

@@ -469,7 +492,7 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled', true);
-
  • +
  • Settings

    @@ -507,32 +530,30 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled', true);
    Max value is escape(number_format($timeout)); ?> seconds (escape((int) ($timeout / 60)); ?> minutes)
    -
    - -
    - $event): ?> -
    - -   - +
    + +
    +
    +
    Leave blank for no schedule
    -

    Variables

    +
    -
    -
    @@ -541,7 +562,7 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled', true);
    - +
    @@ -554,14 +575,14 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled', true);
    - +
  • -
    +
    @@ -601,6 +622,41 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled', true); + diff --git a/app/views/console/home/index.phtml b/app/views/console/home/index.phtml index 028e7f3b79..82be016b61 100644 --- a/app/views/console/home/index.phtml +++ b/app/views/console/home/index.phtml @@ -299,8 +299,9 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled', true); - - + + +
    You can use * to allow wildcard hostnames or subdomains.
    Next Steps
    @@ -329,7 +330,8 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled', true); data-success="alert,trigger" data-success-param-alert-text="Updated platform successfully" data-success-param-trigger-events="projects.updatePlatform" - data-failure="alert" + data-failure="alert,trigger" + data-failure-param-trigger-events="projects.updatePlatform" data-failure-param-alert-text="Failed to update platform" data-failure-param-alert-classname="error"> @@ -340,7 +342,8 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled', true); - + +
    You can use * to allow wildcard hostnames or subdomains.

    @@ -714,7 +717,8 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled', true); data-success="alert,trigger" data-success-param-alert-text="Updated platform successfully" data-success-param-trigger-events="projects.updatePlatform" - data-failure="alert" + data-failure="alert,trigger" + data-failure-param-trigger-events="projects.updatePlatform" data-failure-param-alert-text="Failed to update platform" data-failure-param-alert-classname="error"> @@ -746,7 +750,8 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled', true); data-success="alert,trigger" data-success-param-alert-text="Updated platform successfully" data-success-param-trigger-events="projects.updatePlatform" - data-failure="alert" + data-failure="alert,trigger" + data-failure-param-trigger-events="projects.updatePlatform" data-failure-param-alert-text="Failed to update platform" data-failure-param-alert-classname="error"> @@ -777,7 +782,8 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled', true); data-success="alert,trigger" data-success-param-alert-text="Updated platform successfully" data-success-param-trigger-events="projects.updatePlatform" - data-failure="alert" + data-failure="alert,trigger" + data-failure-param-trigger-events="projects.updatePlatform" data-failure-param-alert-text="Failed to update platform" data-failure-param-alert-classname="error"> @@ -808,7 +814,8 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled', true); data-success="alert,trigger" data-success-param-alert-text="Updated platform successfully" data-success-param-trigger-events="projects.updatePlatform" - data-failure="alert" + data-failure="alert,trigger" + data-failure-param-trigger-events="projects.updatePlatform" data-failure-param-alert-text="Failed to update platform" data-failure-param-alert-classname="error"> @@ -841,7 +848,8 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled', true); data-success="alert,trigger" data-success-param-alert-text="Updated platform successfully" data-success-param-trigger-events="projects.updatePlatform" - data-failure="alert" + data-failure="alert,trigger" + data-failure-param-trigger-events="projects.updatePlatform" data-failure-param-alert-text="Failed to update platform" data-failure-param-alert-classname="error"> @@ -873,7 +881,8 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled', true); data-success="alert,trigger" data-success-param-alert-text="Updated platform successfully" data-success-param-trigger-events="projects.updatePlatform" - data-failure="alert" + data-failure="alert,trigger" + data-failure-param-trigger-events="projects.updatePlatform" data-failure-param-alert-text="Failed to update platform" data-failure-param-alert-classname="error"> diff --git a/app/views/console/settings/index.phtml b/app/views/console/settings/index.phtml index bae6ff3d03..aed016b17b 100644 --- a/app/views/console/settings/index.phtml +++ b/app/views/console/settings/index.phtml @@ -532,8 +532,8 @@ $smtpEnabled = $this->getParam('smtpEnabled', false); - - + +
    @@ -541,9 +541,9 @@ $smtpEnabled = $this->getParam('smtpEnabled', false); User Avatar
    -      Pending Approval +      Pending Approval
    - + diff --git a/app/views/console/users/team.phtml b/app/views/console/users/team.phtml index af1be485d4..c7c3f84b88 100644 --- a/app/views/console/users/team.phtml +++ b/app/views/console/users/team.phtml @@ -111,14 +111,14 @@ - User Avatar + User Avatar
    -    +   
    -   Pending Approval +   Pending Approval @@ -233,7 +233,53 @@ +
  • +

    Activity

    +
    + + + + +
    +
  • \ No newline at end of file diff --git a/app/views/console/users/user.phtml b/app/views/console/users/user.phtml index e769ef4bb1..9db057b226 100644 --- a/app/views/console/users/user.phtml +++ b/app/views/console/users/user.phtml @@ -242,6 +242,52 @@
  • +
    +
    + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
  • +

    Memberships

    + +
    + + + +
    +
    memberships found
    + +
    +
      +
    • + + + + + + + +
      + +
      + +
      + + + Pending Approval +
      +
    • +
    +
    +
    +
    +
  • Sessions

    diff --git a/app/views/console/webhooks/index.phtml b/app/views/console/webhooks/index.phtml index 93bc72edd7..a3c65297c9 100644 --- a/app/views/console/webhooks/index.phtml +++ b/app/views/console/webhooks/index.phtml @@ -1,8 +1,28 @@ getParam('events', [])); +$events = $this->getParam('events', []); +$patterns = []; + +foreach ($events as $name => $event) { + foreach ($event as $key => $value) { + if (!\str_starts_with($key, '$')) { + if (!($value['$resource'] ?? false)) { + $patterns[] = "{$name}.{$key}"; + } else { + foreach ($value as $key2 => $value2) { + if (!\str_starts_with($key2, '$')) { + if (!($value2['$resource'] ?? false)) { + $patterns[] = "{$key}.{$key2}"; + } + } + } + } + } + } +} ?> +

    Home @@ -30,117 +50,7 @@ $events = array_keys($this->getParam('events', []));
    • - - - -
      - - - - - -
      + Manage   ( events) @@ -152,93 +62,5 @@ $events = array_keys($this->getParam('events', []));
    - -
    - -
    + Add Webhook

    diff --git a/app/views/console/webhooks/webhook.phtml b/app/views/console/webhooks/webhook.phtml new file mode 100644 index 0000000000..399e610b78 --- /dev/null +++ b/app/views/console/webhooks/webhook.phtml @@ -0,0 +1,205 @@ +getParam('new', false); +$events = $this->getParam('events', []); +$patterns = []; + +foreach ($events as $name => $event) { + $patterns[] = $name; + foreach ($event as $key => $value) { + if (!\str_starts_with($key, '$')) { + if (!($value['$resource'] ?? false)) { + $patterns[] = "{$name}.{$key}"; + } else { + $patterns[] = $key; + foreach ($value as $key2 => $value2) { + if (!\str_starts_with($key2, '$')) { + if (!($value2['$resource'] ?? false)) { + $patterns[] = "{$key}.{$key2}"; + } + } + } + } + } + } +} + +sort($patterns); + +?> +
    + +
    +

    + Webhooks +
    + + + Add Webhook + +   + +

    +
    + +
    +

    Settings

    +
    +
    + + +
    +
    + data-success="alert,trigger,redirect" + data-analytics-label="Create Project Webhook" + data-service="projects.createWebhook" + data-success-param-alert-text="Created webhook successfully" + data-success-param-trigger-events="projects.createWebhook" + data-failure-param-alert-text="Failed to create webhook" + data-success-param-redirect-url="/console/webhooks?project={{router.params.project}}" + + data-success="alert,trigger" + data-analytics-label="Update Project Webhook" + data-service="projects.updateWebhook" + data-success-param-alert-text="Updated webhook successfully" + data-success-param-trigger-events="projects.updateWebhook" + data-failure-param-alert-text="Failed to update webhook" + + data-scope="console" + data-event="submit" + data-failure="alert" + data-failure-param-alert-classname="error"> + + + + + + + + + + +
    + +
    + +
    + +
    + +
    + + + +

    + Advanced Options + (optional) +

    + + + +

    Warning: Untrusted or self-signed certificates may not be secure. + Learn more +

    + + + +
    +
    + + +
    +
    + + +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    + +
    + +
    + +
    + + + + + +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index 4c3406ffed..2a1738a9c3 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -2,8 +2,8 @@ x-logging: &x-logging logging: driver: 'json-file' options: - max-file: 5 - max-size: 10m + max-file: '5' + max-size: '10m' getParam('image', ''); services: traefik: - image: traefik:2.5 + image: traefik:2.7 container_name: appwrite-traefik + <<: *x-logging command: - --providers.file.directory=/storage/config - --providers.file.watch=true @@ -342,6 +343,7 @@ services: environment: - _APP_ENV - _APP_OPENSSL_KEY_V1 + - _APP_DOMAIN - _APP_DOMAIN_TARGET - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS - _APP_REDIS_HOST @@ -473,10 +475,17 @@ services: environment: - _APP_ENV - _APP_OPENSSL_KEY_V1 + - _APP_DOMAIN + - _APP_DOMAIN_TARGET - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_REDIS_USER - _APP_REDIS_PASS + - _APP_DB_HOST + - _APP_DB_PORT + - _APP_DB_SCHEMA + - _APP_DB_USER + - _APP_DB_PASS - _APP_MAINTENANCE_INTERVAL - _APP_MAINTENANCE_RETENTION_EXECUTION - _APP_MAINTENANCE_RETENTION_ABUSE diff --git a/app/workers/audits.php b/app/workers/audits.php index d83c832c37..696eb6df50 100644 --- a/app/workers/audits.php +++ b/app/workers/audits.php @@ -1,17 +1,20 @@ args['projectId']; - $userId = $this->args['userId']; - $userName = $this->args['userName']; - $userEmail = $this->args['userEmail']; + $events = $this->args['events']; + $payload = $this->args['payload']; $mode = $this->args['mode']; - $event = $this->args['event']; $resource = $this->args['resource']; $userAgent = $this->args['userAgent']; $ip = $this->args['ip']; - $data = $this->args['data']; - - $dbForProject = $this->getProjectDB($projectId); - $audit = new Audit($dbForProject); - $audit->log($userId, $event, $resource, $userAgent, $ip, '', [ - 'userName' => $userName, - 'userEmail' => $userEmail, - 'mode' => $mode, - 'data' => $data, - ]); + $user = new Document($this->args['user']); + $project = new Document($this->args['project']); + + $userName = $user->getAttribute('name', ''); + $userEmail = $user->getAttribute('email', ''); + + $dbForProject = $this->getProjectDB($project->getId()); + $audit = new Audit($dbForProject); + $audit->log( + userId: $user->getId(), + // Pass first, most verbose event pattern + event: $events[0], + resource: $resource, + userAgent: $userAgent, + ip: $ip, + location: '', + data: [ + 'userName' => $userName, + 'userEmail' => $userEmail, + 'mode' => $mode, + 'data' => $payload, + ] + ); } public function shutdown(): void { - // ... Remove environment for this job } } diff --git a/app/workers/builds.php b/app/workers/builds.php index 031ffd84c3..c1affa5907 100644 --- a/app/workers/builds.php +++ b/app/workers/builds.php @@ -1,7 +1,9 @@ executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST')); } public function run(): void { $type = $this->args['type'] ?? ''; - $projectId = $this->args['projectId'] ?? ''; - $functionId = $this->args['resourceId'] ?? ''; - $deploymentId = $this->args['deploymentId'] ?? ''; - + $project = new Document($this->args['project'] ?? []); + $resource = new Document($this->args['resource'] ?? []); + $deployment = new Document($this->args['deployment'] ?? []); + switch ($type) { case BUILD_TYPE_DEPLOYMENT: case BUILD_TYPE_RETRY: - Console::info("Creating build for deployment: $deploymentId"); - $this->buildDeployment($projectId, $functionId, $deploymentId); + Console::info('Creating build for deployment: ' . $deployment->getId()); + $this->buildDeployment($project, $resource, $deployment); break; default: @@ -56,18 +56,16 @@ class BuildsV1 extends Worker } } - protected function buildDeployment(string $projectId, string $functionId, string $deploymentId) + protected function buildDeployment(Document $project, Document $function, Document $deployment) { - $dbForProject = $this->getProjectDB($projectId); - $dbForConsole = $this->getConsoleDB(); - $project = $dbForConsole->getDocument('projects', $projectId); - - $function = $dbForProject->getDocument('functions', $functionId); + $dbForProject = $this->getProjectDB($project->getId()); + + $function = $dbForProject->getDocument('functions', $function->getId()); if ($function->isEmpty()) { throw new Exception('Function not found', 404); } - $deployment = $dbForProject->getDocument('deployments', $deploymentId); + $deployment = $dbForProject->getDocument('deployments', $deployment->getId()); if ($deployment->isEmpty()) { throw new Exception('Deployment not found', 404); } @@ -89,7 +87,7 @@ class BuildsV1 extends Worker '$read' => [], '$write' => [], 'startTime' => $startTime, - 'deploymentId' => $deploymentId, + 'deploymentId' => $deployment->getId(), 'status' => 'processing', 'outputPath' => '', 'runtime' => $function->getAttribute('runtime'), @@ -101,7 +99,7 @@ class BuildsV1 extends Worker 'duration' => 0 ])); $deployment->setAttribute('buildId', $buildId); - $deployment = $dbForProject->updateDocument('deployments', $deploymentId, $deployment); + $deployment = $dbForProject->updateDocument('deployments', $deployment->getId(), $deployment); } else { $build = $dbForProject->getDocument('builds', $buildId); } @@ -110,12 +108,39 @@ class BuildsV1 extends Worker $build->setAttribute('status', 'building'); $build = $dbForProject->updateDocument('builds', $buildId, $build); - /** Send realtime event */ - $target = Realtime::fromPayload('functions.deployments.update', $build, $project); + /** Trigger Webhook */ + $deploymentModel = new Deployment(); + $deploymentUpdate = new Event(Event::WEBHOOK_QUEUE_NAME, Event::WEBHOOK_CLASS_NAME); + $deploymentUpdate + ->setProject($project) + ->setEvent('functions.[functionId].deployments.[deploymentId].update') + ->setParam('functionId', $function->getId()) + ->setParam('deploymentId', $deployment->getId()) + ->setPayload($deployment->getArrayCopy(array_keys($deploymentModel->getRules()))) + ->trigger(); + + /** Trigger Functions */ + $deploymentUpdate + ->setClass(Event::FUNCTIONS_CLASS_NAME) + ->setQueue(Event::FUNCTIONS_QUEUE_NAME) + ->trigger(); + + /** Trigger Realtime */ + $allEvents = Event::generateEvents('functions.[functionId].deployments.[deploymentId].update', [ + 'functionId' => $function->getId(), + 'deploymentId' => $deployment->getId() + ]); + $target = Realtime::fromPayload( + // Pass first, most verbose event pattern + event: $allEvents[0], + payload: $build, + project: $project + ); + Realtime::send( projectId: 'console', payload: $build->getArrayCopy(), - event: 'functions.deployments.update', + events: $allEvents, channels: $target['channels'], roles: $target['roles'] ); @@ -126,13 +151,13 @@ class BuildsV1 extends Worker try { $response = $this->executor->createRuntime( - projectId: $projectId, - deploymentId: $deploymentId, + projectId: $project->getId(), + deploymentId: $deployment->getId(), entrypoint: $deployment->getAttribute('entrypoint'), source: $source, - destination: APP_STORAGE_BUILDS . "/app-$projectId", - vars: $vars, - runtime: $key, + destination: APP_STORAGE_BUILDS . "/app-{$project->getId()}", + vars: $vars, + runtime: $key, baseImage: $baseImage, workdir: '/usr/code', remove: true, @@ -156,7 +181,7 @@ class BuildsV1 extends Worker /** Set auto deploy */ if ($deployment->getAttribute('activate') === true) { $function->setAttribute('deployment', $deployment->getId()); - $function = $dbForProject->updateDocument('functions', $functionId, $function); + $function = $dbForProject->updateDocument('functions', $function->getId(), $function); } /** Update function schedule */ @@ -164,8 +189,7 @@ class BuildsV1 extends Worker $cron = (empty($function->getAttribute('deployment')) && !empty($schedule)) ? new CronExpression($schedule) : null; $next = (empty($function->getAttribute('deployment')) && !empty($schedule)) ? $cron->getNextRunDate()->format('U') : 0; $function->setAttribute('scheduleNext', (int)$next); - $function = $dbForProject->updateDocument('functions', $functionId, $function); - + $function = $dbForProject->updateDocument('functions', $function->getId(), $function); } catch (\Throwable $th) { $endtime = \time(); $build->setAttribute('endTime', $endtime); @@ -177,18 +201,25 @@ class BuildsV1 extends Worker $build = $dbForProject->updateDocument('builds', $buildId, $build); /** - * Send realtime Event + * Send realtime Event */ - $target = Realtime::fromPayload('functions.deployments.update', $build, $project); + $target = Realtime::fromPayload( + // Pass first, most verbose event pattern + event: $allEvents[0], + payload: $build, + project: $project + ); Realtime::send( projectId: 'console', payload: $build->getArrayCopy(), - event: 'functions.deployments.update', + events: $allEvents, channels: $target['channels'], roles: $target['roles'] ); } } - public function shutdown(): void {} + public function shutdown(): void + { + } } diff --git a/app/workers/certificates.php b/app/workers/certificates.php index 9f9ce33dbd..f5bf5824e3 100644 --- a/app/workers/certificates.php +++ b/app/workers/certificates.php @@ -1,22 +1,33 @@ getConsoleDB(); - + Authorization::disable(); + Authorization::setDefaultStatus(false); /** - * 1. Get new domain document - DONE - * 1.1. Validate domain is valid, public suffix is known and CNAME records are verified - DONE - * 2. Check if a certificate already exists - DONE - * 3. Check if certificate is about to expire, if not - skip it - * 3.1. Create / renew certificate - * 3.2. Update loadblancer - * 3.3. Update database (domains, change date, expiry) - * 3.4. Set retry on failure - * 3.5. Schedule to renew certificate in 60 days + * 1. Read arguments and validate domain + * 2. Get main domain + * 3. Validate CNAME DNS if parameter is not main domain (meaning it's custom domain) + * 4. Validate security email. Cannot be empty, required by LetsEncrypt + * 5. Validate renew date with certificate file, unless requested to skip by parameter + * 6. Issue a certificate using certbot CLI + * 7. Update 'log' attribute on certificate document with Certbot message + * 8. Create storage folder for certificate, if not ready already + * 9. Move certificates from Certbot location to our Storage + * 10. Create/Update our Storage with new Traefik config with new certificate paths + * 11. Read certificate file and update 'renewDate' on certificate document + * 12. Update 'issueDate' and 'attempts' on certificate + * + * If at any point unexpected error occurs, program stops without applying changes to document, and error is thrown into worker + * + * If code stops with expected error: + * 1. 'log' attribute on document is updated with error message + * 2. 'attempts' amount is increased + * 3. Console log is shown + * 4. Email is sent to security email + * + * Unless unexpected error occurs, at the end, we: + * 1. Update 'updated' attribute on document + * 2. Save document to database + * 3. Update all domains documents with current certificate ID + * + * Note: Renewals are checked and scheduled from maintenence worker */ - Authorization::disable(); + $this->dbForConsole = $this->getConsoleDB(); - // Args - $document = $this->args['document']; - $domain = $this->args['domain']; + $skipCheck = $this->args['skipRenewCheck'] ?? false; // If true, we won't double-check expiry from cert file + $document = new Document($this->args['domain'] ?? []); + $domain = new Domain($document->getAttribute('domain', '')); - // Validation Args - $validateTarget = $this->args['validateTarget'] ?? true; - $validateCNAME = $this->args['validateCNAME'] ?? true; - - // Options - $domain = new Domain((!empty($domain)) ? $domain : ''); - $expiry = 60 * 60 * 24 * 30 * 2; // 60 days - $safety = 60 * 60; // 1 hour - $renew = (\time() + $expiry); - - if (empty($domain->get())) { - throw new Exception('Missing domain'); - } - - if (!$domain->isKnown() || $domain->isTest()) { - throw new Exception('Unknown public suffix for domain'); - } - - if ($validateTarget) { - $target = new Domain(App::getEnv('_APP_DOMAIN_TARGET', '')); - - if(!$target->isKnown() || $target->isTest()) { - throw new Exception('Unreachable CNAME target ('.$target->get().'), please use a domain with a public suffix.'); - } - } - - if ($validateCNAME) { - $validator = new CNAME($target->get()); // Verify Domain with DNS records - - if(!$validator->isValid($domain->get())) { - throw new Exception('Failed to verify domain DNS records'); - } - } - - $certificate = $dbForConsole->findOne('certificates', [ - new Query('domain', QUERY::TYPE_EQUAL, [$domain->get()]) - ]); - - // $condition = ($certificate - // && $certificate instanceof Document - // && isset($certificate['issueDate']) - // && (($certificate['issueDate'] + ($expiry)) > time())) ? 'true' : 'false'; - - // throw new Exception('cert issued at'.date('d.m.Y H:i', $certificate['issueDate']).' | renew date is: '.date('d.m.Y H:i', ($certificate['issueDate'] + ($expiry))).' | condition is '.$condition); - - $certificate = (!empty($certificate) && $certificate instanceof $certificate) ? $certificate->getArrayCopy() : []; - - if ( - !empty($certificate) - && isset($certificate['issueDate']) - && (($certificate['issueDate'] + ($expiry)) > \time()) - ) { // Check last issue time - throw new Exception('Renew isn\'t required'); - } - - $staging = (App::isProduction()) ? '' : ' --dry-run'; - $email = App::getEnv('_APP_SYSTEM_SECURITY_EMAIL_ADDRESS'); - - if (empty($email)) { - throw new Exception('You must set a valid security email address (_APP_SYSTEM_SECURITY_EMAIL_ADDRESS) to issue an SSL certificate'); - } - - $stdout = ''; - $stderr = ''; - - $exit = Console::execute("certbot certonly --webroot --noninteractive --agree-tos{$staging}" - . " --email " . $email - . " -w " . APP_STORAGE_CERTIFICATES - . " -d {$domain->get()}", '', $stdout, $stderr); - - if ($exit !== 0) { - throw new Exception('Failed to issue a certificate with message: ' . $stderr); - } - - $path = APP_STORAGE_CERTIFICATES . '/' . $domain->get(); - - if (!\is_readable($path)) { - if (!\mkdir($path, 0755, true)) { - throw new Exception('Failed to create path...'); - } - } - - if(!@\rename('/etc/letsencrypt/live/'.$domain->get().'/cert.pem', APP_STORAGE_CERTIFICATES.'/'.$domain->get().'/cert.pem')) { - throw new Exception('Failed to rename certificate cert.pem: '.\json_encode($stdout)); - } - - if (!@\rename('/etc/letsencrypt/live/' . $domain->get() . '/chain.pem', APP_STORAGE_CERTIFICATES . '/' . $domain->get() . '/chain.pem')) { - throw new Exception('Failed to rename certificate chain.pem: ' . \json_encode($stdout)); - } - - if (!@\rename('/etc/letsencrypt/live/' . $domain->get() . '/fullchain.pem', APP_STORAGE_CERTIFICATES . '/' . $domain->get() . '/fullchain.pem')) { - throw new Exception('Failed to rename certificate fullchain.pem: ' . \json_encode($stdout)); - } - - if (!@\rename('/etc/letsencrypt/live/' . $domain->get() . '/privkey.pem', APP_STORAGE_CERTIFICATES . '/' . $domain->get() . '/privkey.pem')) { - throw new Exception('Failed to rename certificate privkey.pem: ' . \json_encode($stdout)); - } - - $certificate = new Document(\array_merge($certificate, [ - 'domain' => $domain->get(), - 'issueDate' => \time(), - 'renewDate' => $renew, - 'attempts' => 0, - 'log' => \json_encode($stdout), - ])); - - $certificate = $dbForConsole->createDocument('certificates', $certificate); + // Get current certificate + $certificate = $this->dbForConsole->findOne('certificates', [new Query('domain', Query::TYPE_EQUAL, [$domain->get()])]); + // If we don't have certificate for domain yet, let's create new document. At the end we save it if (!$certificate) { - throw new Exception('Failed saving certificate to DB'); + $certificate = new Document(); + $certificate->setAttribute('domain', $domain->get()); } - if(!empty($document)) { - $certificate = new Document(\array_merge($document, [ - 'updated' => \time(), - 'certificateId' => $certificate->getId(), + try { + // Email for alerts is required by LetsEncrypt + $email = App::getEnv('_APP_SYSTEM_SECURITY_EMAIL_ADDRESS'); + if (empty($email)) { + throw new Exception('You must set a valid security email address (_APP_SYSTEM_SECURITY_EMAIL_ADDRESS) to issue an SSL certificate.'); + } + + // Validate domain and DNS records. Skip if job is forced + if (!$skipCheck) { + $mainDomain = $this->getMainDomain(); + $isMainDomain = !isset($mainDomain) || $domain->get() === $mainDomain; + $this->validateDomain($domain, $isMainDomain); + } + + // If certificate exists already, double-check expiry date. Skip if job is forced + if (!$skipCheck && !$this->isRenewRequired($domain->get())) { + throw new Exception('Renew isn\'t required.'); + } + + // Generate certificate files using Let's Encrypt + $letsEncryptData = $this->issueCertificate($domain->get(), $email); + + // Command succeeded, store all data into document + // We store stderr too, because it may include warnings + $certificate->setAttribute('log', \json_encode([ + 'stdout' => $letsEncryptData['stdout'], + 'stderr' => $letsEncryptData['stderr'], ])); - $certificate = $dbForConsole->updateDocument('domains', $certificate->getId(), $certificate); + // Give certificates to Traefik + $this->applyCertificateFiles($domain->get(), $letsEncryptData); - if(!$certificate) { - throw new Exception('Failed saving domain to DB'); - } + // Update certificate info stored in database + $certificate->setAttribute('renewDate', $this->getRenewDate($domain->get())); + $certificate->setAttribute('attempts', 0); + $certificate->setAttribute('issueDate', \time()); + } catch (Throwable $e) { + // Set exception as log in certificate document + $certificate->setAttribute('log', $e->getMessage()); + + // Increase attempts count + $attempts = $certificate->getAttribute('attempts', 0) + 1; + $certificate->setAttribute('attempts', $attempts); + + // Send email to security email + $this->notifyError($domain->get(), $e->getMessage(), $attempts); + } finally { + // All actions result in new updatedAt date + $certificate->setAttribute('updated', \time()); + + // Save all changes we made to certificate document into database + $this->saveCertificateDocument($domain->get(), $certificate); } - - $config = -"tls: - certificates: - - certFile: /storage/certificates/{$domain->get()}/fullchain.pem - keyFile: /storage/certificates/{$domain->get()}/privkey.pem"; - - if (!\file_put_contents(APP_STORAGE_CONFIG . '/' . $domain->get() . '.yml', $config)) { - throw new Exception('Failed to save SSL configuration'); - } - - ResqueScheduler::enqueueAt($renew + $safety, 'v1-certificates', 'CertificatesV1', [ - 'document' => [], - 'domain' => $domain->get(), - 'validateTarget' => $validateTarget, - 'validateCNAME' => $validateCNAME, - ]); // Async task rescheduale - - Authorization::reset(); } public function shutdown(): void { } + + /** + * Save certificate data into database. + * + * @param string $domain Domain name that certificate is for + * @param Document $certificate Certificate document that we need to save + * + * @return void + */ + private function saveCertificateDocument(string $domain, Document $certificate): void + { + // Check if update or insert required + $certificateDocument = $this->dbForConsole->findOne('certificates', [new Query('domain', Query::TYPE_EQUAL, [$domain])]); + if (!empty($certificateDocument) && !$certificateDocument->isEmpty()) { + // Merge new data with current data + $certificate = new Document(\array_merge($certificateDocument->getArrayCopy(), $certificate->getArrayCopy())); + + $certificate = $this->dbForConsole->updateDocument('certificates', $certificate->getId(), $certificate); + } else { + $certificate = $this->dbForConsole->createDocument('certificates', $certificate); + } + + $certificateId = $certificate->getId(); + $this->updateDomainDocuments($certificateId, $domain); + } + + /** + * Get main domain. Needed as we do different checks for main and non-main domains. + * + * @return null|string Returns main domain. If null, there is no main domain yet. + */ + private function getMainDomain(): ?string + { + if (!empty(App::getEnv('_APP_DOMAIN', ''))) { + return App::getEnv('_APP_DOMAIN', ''); + } else { + $domainDocument = $this->dbForConsole->findOne('domains', [], 0, ['_id'], ['ASC']); + if ($domainDocument) { + return $domainDocument->getAttribute('domain'); + } + } + + return null; + } + + /** + * Internal domain validation functionality to prevent unnecessary attempts failed from Let's Encrypt side. We check: + * - Domain needs to be public and valid (prevents NFT domains that are not supported by Let's Encrypt) + * - Domain must have proper DNS record + * + * @param Domain $domain Domain which we validate + * @param bool $isMainDomain In case of master domain, we look for different DNS configurations + * + * @return void + */ + private function validateDomain(Domain $domain, bool $isMainDomain): void + { + if (empty($domain->get())) { + throw new Exception('Missing certificate domain.'); + } + + if (!$domain->isKnown() || $domain->isTest()) { + throw new Exception('Unknown public suffix for domain.'); + } + + if (!$isMainDomain) { + // TODO: Would be awesome to also support A/AAAA records here. Maybe dry run? + + // Validate if domain target is properly configured + $target = new Domain(App::getEnv('_APP_DOMAIN_TARGET', '')); + + if (!$target->isKnown() || $target->isTest()) { + throw new Exception('Unreachable CNAME target (' . $target->get() . '), please use a domain with a public suffix.'); + } + + // Verify domain with DNS records + $validator = new CNAME($target->get()); + if (!$validator->isValid($domain->get())) { + throw new Exception('Failed to verify domain DNS records.'); + } + } else { + // Main domain validation + // TODO: Would be awesome to check A/AAAA record here. Maybe dry run? + } + } + + /** + * Reads expiry date of certificate from file and decides if renewal is required or not. + * + * @param string $domain Domain for which we check certificate file + * + * @return bool True, if certificate needs to be renewed + */ + private function isRenewRequired(string $domain): bool + { + $certPath = APP_STORAGE_CERTIFICATES . '/' . $domain . '/cert.pem'; + if (\file_exists($certPath)) { + $validTo = null; + + $certData = openssl_x509_parse(file_get_contents($certPath)); + $validTo = $certData['validTo_time_t'] ?? 0; + + if (empty($validTo)) { + throw new Exception('Unable to read certificate file (cert.pem).'); + } + + // LetsEncrypt allows renewal 30 days before expiry + $expiryInAdvance = (60 * 60 * 24 * 30); + if ($validTo - $expiryInAdvance > \time()) { + return false; + } + } + + return true; + } + + /** + * LetsEncrypt communication to issue certificate (using certbot CLI) + * + * @param string $domain Domain to generate certificate for + * + * @return array Named array with keys 'stdout' and 'stderr', both string + */ + private function issueCertificate(string $domain, string $email): array + { + $stdout = ''; + $stderr = ''; + + $staging = (App::isProduction()) ? '' : ' --dry-run'; + $exit = Console::execute("certbot certonly --webroot --noninteractive --agree-tos{$staging}" + . " --email " . $email + . " -w " . APP_STORAGE_CERTIFICATES + . " -d {$domain}", '', $stdout, $stderr); + + // Unexpected error, usually 5XX, API limits, ... + if ($exit !== 0) { + throw new Exception('Failed to issue a certificate with message: ' . $stderr); + } + + return [ + 'stdout' => $stdout, + 'stderr' => $stderr + ]; + } + + /** + * Read new renew date from certificate file generated by Let's Encrypt + * + * @param string $domain Domain which certificate was generated for + * + * @return int + */ + private function getRenewDate(string $domain): int + { + $certPath = APP_STORAGE_CERTIFICATES . '/' . $domain . '/cert.pem'; + $certData = openssl_x509_parse(file_get_contents($certPath)); + $validTo = $certData['validTo_time_t'] ?? 0; + $expiryInAdvance = (60 * 60 * 24 * 30); // 30 days + + return $validTo - $expiryInAdvance; + } + + /** + * Method to take files from Let's Encrypt, and put it into Traefik. + * + * @param string $domain Domain which certificate was generated for + * @param array $letsEncryptData Let's Encrypt logs to use for additional info when throwing error + * + * @return void + */ + private function applyCertificateFiles(string $domain, array $letsEncryptData): void + { + // Prepare folder in storage for domain + $path = APP_STORAGE_CERTIFICATES . '/' . $domain; + if (!\is_readable($path)) { + if (!\mkdir($path, 0755, true)) { + throw new Exception('Failed to create path for certificate.'); + } + } + + // Move generated files from certbot into our storage + if (!@\rename('/etc/letsencrypt/live/' . $domain . '/cert.pem', APP_STORAGE_CERTIFICATES . '/' . $domain . '/cert.pem')) { + throw new Exception('Failed to rename certificate cert.pem. Let\'s Encrypt log: ' . $letsEncryptData['stderr'] . ' ; ' . $letsEncryptData['stdout']); + } + + if (!@\rename('/etc/letsencrypt/live/' . $domain . '/chain.pem', APP_STORAGE_CERTIFICATES . '/' . $domain . '/chain.pem')) { + throw new Exception('Failed to rename certificate chain.pem. Let\'s Encrypt log: ' . $letsEncryptData['stderr'] . ' ; ' . $letsEncryptData['stdout']); + } + + if (!@\rename('/etc/letsencrypt/live/' . $domain . '/fullchain.pem', APP_STORAGE_CERTIFICATES . '/' . $domain . '/fullchain.pem')) { + throw new Exception('Failed to rename certificate fullchain.pem. Let\'s Encrypt log: ' . $letsEncryptData['stderr'] . ' ; ' . $letsEncryptData['stdout']); + } + + if (!@\rename('/etc/letsencrypt/live/' . $domain . '/privkey.pem', APP_STORAGE_CERTIFICATES . '/' . $domain . '/privkey.pem')) { + throw new Exception('Failed to rename certificate privkey.pem. Let\'s Encrypt log: ' . $letsEncryptData['stderr'] . ' ; ' . $letsEncryptData['stdout']); + } + + $config = \implode(PHP_EOL, [ + "tls:", + " certificates:", + " - certFile: /storage/certificates/{$domain}/fullchain.pem", + " keyFile: /storage/certificates/{$domain}/privkey.pem" + ]); + + // Save configuration into Traefik using our new cert files + if (!\file_put_contents(APP_STORAGE_CONFIG . '/' . $domain . '.yml', $config)) { + throw new Exception('Failed to save Traefik configuration.'); + } + } + + /** + * Method to make sure information about error is delivered to admnistrator. + * + * @param string $domain Domain that caused the error + * @param string $errorMessage Verbose error message + * @param int $attempt How many times it failed already + * + * @return void + */ + private function notifyError(string $domain, string $errorMessage, int $attempt): void + { + // Log error into console + Console::warning('Cannot renew domain (' . $domain . ') on attempt no. ' . $attempt . ' certificate: ' . $errorMessage); + + // Send mail to administratore mail + Resque::enqueue(Event::MAILS_QUEUE_NAME, Event::MAILS_CLASS_NAME, [ + 'from' => 'console', + 'project' => 'console', + 'name' => 'Appwrite Administrator', + 'recipient' => App::getEnv('_APP_SYSTEM_SECURITY_EMAIL_ADDRESS'), + 'url' => 'https://' . $domain, + 'locale' => App::getEnv('_APP_LOCALE', 'en'), + 'type' => MAIL_TYPE_CERTIFICATE, + + 'domain' => $domain, + 'error' => $errorMessage, + 'attempt' => $attempt + ]); + } + + /** + * Update all existing domain documents so they have relation to correct certificate document. + * This solved issues: + * - when adding a domain for which there is already a certificate + * - when renew creates new document? It might? + * - overall makes it more reliable + * + * @param string $certificateId ID of a new or updated certificate document + * @param string $domain Domain that is affected by new certificate + * + * @return void + */ + private function updateDomainDocuments(string $certificateId, string $domain): void + { + $domains = $this->dbForConsole->find('domains', [ + new Query('domain', Query::TYPE_EQUAL, [$domain]) + ], 1000); + + foreach ($domains as $domainDocument) { + $domainDocument->setAttribute('updated', \time()); + $domainDocument->setAttribute('certificateId', $certificateId); + + $this->dbForConsole->updateDocument('domains', $domainDocument->getId(), $domainDocument); + + if ($domainDocument->getAttribute('projectId')) { + $this->dbForConsole->deleteCachedDocument('projects', $domainDocument->getAttribute('projectId')); + } + } + } } diff --git a/app/workers/database.php b/app/workers/database.php index d95ce122d0..a3451461cc 100644 --- a/app/workers/database.php +++ b/app/workers/database.php @@ -1,5 +1,6 @@ args['projectId'] ?? ''; - $type = $this->args['type'] ?? ''; - $collection = $this->args['collection'] ?? []; - $collection = new Document($collection); - $document = $this->args['document'] ?? []; - $document = new Document($document); + + $type = $this->args['type']; + $project = new Document($this->args['project']); + $collection = new Document($this->args['collection'] ?? []); + $document = new Document($this->args['document'] ?? []); if($collection->isEmpty()) { throw new Exception('Missing collection'); @@ -37,16 +37,16 @@ class DatabaseV1 extends Worker switch (strval($type)) { case DATABASE_TYPE_CREATE_ATTRIBUTE: - $this->createAttribute($collection, $document, $projectId); + $this->createAttribute($collection, $document, $project->getId()); break; case DATABASE_TYPE_DELETE_ATTRIBUTE: - $this->deleteAttribute($collection, $document, $projectId); + $this->deleteAttribute($collection, $document, $project->getId()); break; case DATABASE_TYPE_CREATE_INDEX: - $this->createIndex($collection, $document, $projectId); + $this->createIndex($collection, $document, $project->getId()); break; case DATABASE_TYPE_DELETE_INDEX: - $this->deleteIndex($collection, $document, $projectId); + $this->deleteIndex($collection, $document, $project->getId()); break; default: @@ -71,7 +71,15 @@ class DatabaseV1 extends Worker $dbForConsole = $this->getConsoleDB(); $dbForProject = $this->getProjectDB($projectId); - $event = 'database.attributes.update'; + $events = Event::generateEvents('collections.[collectionId].attributes.[attributeId].update', [ + 'collectionId' => $collection->getId(), + 'attributeId' => $attribute->getId() + ]); + /** + * Fetch attribute from the database, since with Resque float values are loosing informations. + */ + $attribute = $dbForProject->getDocument('attributes', $attribute->getId()); + $collectionId = $collection->getId(); $key = $attribute->getAttribute('key', ''); $type = $attribute->getAttribute('type', ''); @@ -94,12 +102,17 @@ class DatabaseV1 extends Worker Console::error($th->getMessage()); $dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('status', 'failed')); } finally { - $target = Realtime::fromPayload($event, $attribute, $project); + $target = Realtime::fromPayload( + // Pass first, most verbose event pattern + event: $events[0], + payload: $attribute, + project: $project + ); Realtime::send( projectId: 'console', payload: $attribute->getArrayCopy(), - event: $event, + events: $events, channels: $target['channels'], roles: $target['roles'], options: [ @@ -122,7 +135,10 @@ class DatabaseV1 extends Worker $dbForConsole = $this->getConsoleDB(); $dbForProject = $this->getProjectDB($projectId); - $event = 'database.attributes.delete'; + $events = Event::generateEvents('collections.[collectionId].attributes.[attributeId].delete', [ + 'collectionId' => $collection->getId(), + 'attributeId' => $attribute->getId() + ]); $collectionId = $collection->getId(); $key = $attribute->getAttribute('key', ''); $status = $attribute->getAttribute('status', ''); @@ -143,12 +159,17 @@ class DatabaseV1 extends Worker Console::error($th->getMessage()); $dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('status', 'stuck')); } finally { - $target = Realtime::fromPayload($event, $attribute, $project); + $target = Realtime::fromPayload( + // Pass first, most verbose event pattern + event: $events[0], + payload: $attribute, + project: $project + ); Realtime::send( projectId: 'console', payload: $attribute->getArrayCopy(), - event: $event, + events: $events, channels: $target['channels'], roles: $target['roles'], options: [ @@ -223,7 +244,10 @@ class DatabaseV1 extends Worker $dbForConsole = $this->getConsoleDB(); $dbForProject = $this->getProjectDB($projectId); - $event = 'database.indexes.update'; + $events = Event::generateEvents('collections.[collectionId].indexes.[indexId].update', [ + 'collectionId' => $collection->getId(), + 'indexId' => $index->getId() + ]); $collectionId = $collection->getId(); $key = $index->getAttribute('key', ''); $type = $index->getAttribute('type', ''); @@ -241,12 +265,17 @@ class DatabaseV1 extends Worker Console::error($th->getMessage()); $dbForProject->updateDocument('indexes', $index->getId(), $index->setAttribute('status', 'failed')); } finally { - $target = Realtime::fromPayload($event, $index, $project); + $target = Realtime::fromPayload( + // Pass first, most verbose event pattern + event: $events[0], + payload: $index, + project: $project + ); Realtime::send( projectId: 'console', payload: $index->getArrayCopy(), - event: $event, + events: $events, channels: $target['channels'], roles: $target['roles'], options: [ @@ -269,10 +298,12 @@ class DatabaseV1 extends Worker $dbForConsole = $this->getConsoleDB(); $dbForProject = $this->getProjectDB($projectId); - $collectionId = $collection->getId(); + $events = Event::generateEvents('collections.[collectionId].indexes.[indexId].delete', [ + 'collectionId' => $collection->getId(), + 'indexId' => $index->getId() + ]); $key = $index->getAttribute('key'); $status = $index->getAttribute('status', ''); - $event = 'database.indexes.delete'; $project = $dbForConsole->getDocument('projects', $projectId); try { @@ -284,12 +315,17 @@ class DatabaseV1 extends Worker Console::error($th->getMessage()); $dbForProject->updateDocument('indexes', $index->getId(), $index->setAttribute('status', 'stuck')); } finally { - $target = Realtime::fromPayload($event, $index, $project); + $target = Realtime::fromPayload( + // Pass first, most verbose event pattern + event: $events[0], + payload: $index, + project: $project + ); Realtime::send( projectId: 'console', payload: $index->getArrayCopy(), - event: $event, + events: $events, channels: $target['channels'], roles: $target['roles'], options: [ @@ -299,6 +335,6 @@ class DatabaseV1 extends Worker ); } - $dbForProject->deleteCachedDocument('collections', $collectionId); + $dbForProject->deleteCachedDocument('collections', $collection->getId()); } } diff --git a/app/workers/deletes.php b/app/workers/deletes.php index 892d417d9c..0f9d76f81e 100644 --- a/app/workers/deletes.php +++ b/app/workers/deletes.php @@ -31,7 +31,8 @@ class DeletesV1 extends Worker */ protected $consoleDB = null; - public function getName(): string { + public function getName(): string + { return "deletes"; } @@ -41,7 +42,7 @@ class DeletesV1 extends Worker public function run(): void { - $projectId = $this->args['projectId'] ?? ''; + $project = new Document($this->args['project'] ?? []); $type = $this->args['type'] ?? ''; switch (strval($type)) { @@ -50,25 +51,25 @@ class DeletesV1 extends Worker switch ($document->getCollection()) { case DELETE_TYPE_COLLECTIONS: - $this->deleteCollection($document, $projectId); + $this->deleteCollection($document, $project->getId()); break; case DELETE_TYPE_PROJECTS: $this->deleteProject($document); break; case DELETE_TYPE_FUNCTIONS: - $this->deleteFunction($document, $projectId); + $this->deleteFunction($document, $project->getId()); break; case DELETE_TYPE_DEPLOYMENTS: - $this->deleteDeployment($document, $projectId); + $this->deleteDeployment($document, $project->getId()); break; case DELETE_TYPE_USERS: - $this->deleteUser($document, $projectId); + $this->deleteUser($document, $project->getId()); break; case DELETE_TYPE_TEAMS: - $this->deleteMemberships($document, $projectId); + $this->deleteMemberships($document, $project->getId()); break; case DELETE_TYPE_BUCKETS: - $this->deleteBucket($document, $projectId); + $this->deleteBucket($document, $project->getId()); break; default: Console::error('No lazy delete operation available for document of type: ' . $document->getCollection()); @@ -81,15 +82,15 @@ class DeletesV1 extends Worker break; case DELETE_TYPE_AUDIT: - $timestamp = $this->args['timestamp'] ?? 0; - $document = new Document($this->args['document'] ?? []); + $timestamp = $payload['timestamp'] ?? 0; + $document = new Document($payload['document'] ?? []); if (!empty($timestamp)) { $this->deleteAuditLogs($this->args['timestamp']); } if (!$document->isEmpty()) { - $this->deleteAuditLogsByResource('document/' . $document->getId(), $projectId); + $this->deleteAuditLogsByResource('document/' . $document->getId(), $project->getId()); } break; @@ -202,19 +203,15 @@ class DeletesV1 extends Worker */ protected function deleteUser(Document $document, string $projectId): void { - /** - * DO NOT DELETE THE USER RECORD ITSELF. - * WE RETAIN THE USER RECORD TO RESERVE THE USER ID AND ENSURE THAT THE USER ID IS NOT REUSED. - */ - $userId = $document->getId(); - $user = $this->getProjectDB($projectId)->getDocument('users', $userId); // Delete all sessions of this user from the sessions table and update the sessions field of the user record $this->deleteByGroup('sessions', [ new Query('userId', Query::TYPE_EQUAL, [$userId]) ], $this->getProjectDB($projectId)); - + + $this->getProjectDB($projectId)->deleteCachedDocument('users', $userId); + // Delete Memberships and decrement team membership counts $this->deleteByGroup('memberships', [ new Query('userId', Query::TYPE_EQUAL, [$userId]) @@ -224,9 +221,14 @@ class DeletesV1 extends Worker $teamId = $document->getAttribute('teamId'); $team = $this->getProjectDB($projectId)->getDocument('teams', $teamId); if (!$team->isEmpty()) { - $team = $this->getProjectDB($projectId)->updateDocument('teams', $teamId, new Document(\array_merge($team->getArrayCopy(), [ - 'total' => \max($team->getAttribute('total', 0) - 1, 0), // Ensure that total >= 0 - ]))); + $team = $this + ->getProjectDB($projectId) + ->updateDocument( + 'teams', + $teamId, + // Ensure that total >= 0 + $team->setAttribute('total', \max($team->getAttribute('total', 0) - 1, 0)) + ); } } }); @@ -347,7 +349,7 @@ class DeletesV1 extends Worker */ Console::info("Deleting builds for function " . $functionId); $storageBuilds = new Local(APP_STORAGE_BUILDS . '/app-' . $projectId); - foreach ($deploymentIds as $deploymentId) { + foreach ($deploymentIds as $deploymentId) { $this->deleteByGroup('builds', [ new Query('deploymentId', Query::TYPE_EQUAL, [$deploymentId]) ], $dbForProject, function (Document $document) use ($storageBuilds, $deploymentId) { @@ -361,7 +363,7 @@ class DeletesV1 extends Worker /** * Delete Executions - */ + */ Console::info("Deleting executions for function " . $functionId); $this->deleteByGroup('executions', [ new Query('functionId', Query::TYPE_EQUAL, [$functionId]) @@ -379,7 +381,6 @@ class DeletesV1 extends Worker Console::error($th->getMessage()); } } - } /** @@ -473,7 +474,7 @@ class DeletesV1 extends Worker $chunk++; /** @var string[] $projectIds */ - $projectIds = array_map(fn(Document $project) => $project->getId(), $projects); + $projectIds = array_map(fn (Document $project) => $project->getId(), $projects); $sum = count($projects); @@ -529,11 +530,40 @@ class DeletesV1 extends Worker */ protected function deleteCertificates(Document $document): void { + $consoleDB = $this->getConsoleDB(); + + // If domain has certificate generated + if (isset($document['certificateId'])) { + $domainUsingCertificate = $consoleDB->findOne('domains', [ + new Query('certificateId', Query::TYPE_EQUAL, [$document['certificateId']]) + ]); + + if (!$domainUsingCertificate) { + $mainDomain = App::getEnv('_APP_DOMAIN_TARGET', ''); + if ($mainDomain === $document->getAttribute('domain')) { + $domainUsingCertificate = $mainDomain; + } + } + + // If certificate is still used by some domain, mark we can't delete. + // Current domain should not be found, because we only have copy. Original domain is already deleted from database. + if ($domainUsingCertificate) { + Console::warning("Skipping certificate deletion, because a domain is still using it."); + return; + } + } + $domain = $document->getAttribute('domain'); $directory = APP_STORAGE_CERTIFICATES . '/' . $domain; $checkTraversal = realpath($directory) === $directory; if ($domain && $checkTraversal && is_dir($directory)) { + // Delete certificate document, so Appwrite is aware of change + if (isset($document['certificateId'])) { + $consoleDB->deleteDocument('certificates', $document['certificateId']); + } + + // Delete files, so Traefik is aware of change array_map('unlink', glob($directory . '/*.*')); rmdir($directory); Console::info("Deleted certificate files for {$domain}"); @@ -547,8 +577,8 @@ class DeletesV1 extends Worker $dbForProject = $this->getProjectDB($projectId); $dbForProject->deleteCollection('bucket_' . $document->getInternalId()); - $device = new Local(APP_STORAGE_UPLOADS.'/app-'.$projectId); - + $device = new Local(APP_STORAGE_UPLOADS . '/app-' . $projectId); + switch (App::getEnv('_APP_STORAGE_DEVICE', Storage::DEVICE_LOCAL)) { case Storage::DEVICE_S3: $s3AccessKey = App::getEnv('_APP_STORAGE_S3_ACCESS_KEY', ''); @@ -567,7 +597,7 @@ class DeletesV1 extends Worker $device = new DOSpaces(APP_STORAGE_UPLOADS . '/app-' . $projectId, $doSpacesAccessKey, $doSpacesSecretKey, $doSpacesBucket, $doSpacesRegion, $doSpacesAcl); break; } - + $device->deletePath($document->getId()); } } diff --git a/app/workers/functions.php b/app/workers/functions.php index 66464a9d23..b621d95f43 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -1,13 +1,13 @@ args['projectId'] ?? ''; - $functionId = $this->args['functionId'] ?? ''; - $webhooks = $this->args['webhooks'] ?? []; - $executionId = $this->args['executionId'] ?? ''; - $trigger = $this->args['trigger'] ?? ''; - $event = $this->args['event'] ?? ''; - $scheduleOriginal = $this->args['scheduleOriginal'] ?? ''; - $eventData = (!empty($this->args['eventData'])) ? json_encode($this->args['eventData']) : ''; - $data = $this->args['data'] ?? ''; - $userId = $this->args['userId'] ?? ''; - $jwt = $this->args['jwt'] ?? ''; + $type = $this->args['type'] ?? ''; + $events = $this->args['events'] ?? []; + $project = new Document($this->args['project'] ?? []); + $user = new Document($this->args['user'] ?? []); + $payload = json_encode($this->args['payload'] ?? []); - $database = $this->getProjectDB($projectId); + $database = $this->getProjectDB($project->getId()); - switch ($trigger) { - case 'event': - $limit = 30; - $sum = 30; - $offset = 0; - $functions = []; - /** @var Document[] $functions */ + /** + * Handle Event execution. + */ + if (!empty($events)) { + $limit = 30; + $sum = 30; + $offset = 0; + $functions = []; + /** @var Document[] $functions */ - while ($sum >= $limit) { - $functions = Authorization::skip(fn() => $database->find('functions', [], $limit, $offset, ['name'], [Database::ORDER_ASC])); - $sum = \count($functions); - $offset = $offset + $limit; + while ($sum >= $limit) { + $functions = Authorization::skip(fn () => $database->find('functions', [], $limit, $offset, ['name'], [Database::ORDER_ASC])); + $sum = \count($functions); + $offset = $offset + $limit; - Console::log('Fetched ' . $sum . ' functions...'); + Console::log('Fetched ' . $sum . ' functions...'); - foreach ($functions as $function) { - $events = $function->getAttribute('events', []); - - if (!\in_array($event, $events)) { - continue; - } - - Console::success('Iterating function: ' . $function->getAttribute('name')); - - $this->execute( - projectId: $projectId, - function: $function, - dbForProject: $database, - executionId: $executionId, - webhooks: $webhooks, - trigger: $trigger, - event: $event, - eventData: $eventData, - data: $data, - userId: $userId, - jwt: $jwt - ); - - Console::success('Triggered function: ' . $event); + foreach ($functions as $function) { + if (!array_intersect($events, $function->getAttribute('events', []))) { + continue; } + + Console::success('Iterating function: ' . $function->getAttribute('name')); + + $this->execute( + project: $project, + function: $function, + dbForProject: $database, + trigger: 'event', + // Pass first, most verbose event pattern + event: $events[0], + eventData: $payload, + user: $user + ); + + Console::success('Triggered function: ' . $events[0]); } + } + + return; + } + + /** + * Handle Schedule and HTTP execution. + */ + $user = new Document($this->args['user'] ?? []); + $project = new Document($this->args['project'] ?? []); + $execution = new Document($this->args['execution'] ?? []); + + switch ($type) { + case 'http': + $jwt = $this->args['jwt'] ?? ''; + $data = $this->args['data'] ?? ''; + + $function = Authorization::skip(fn () => $database->getDocument('functions', $execution->getAttribute('functionId'))); + + $this->execute( + project: $project, + function: $function, + dbForProject: $database, + executionId: $execution->getId(), + trigger: 'http', + data: $data, + user: $user, + jwt: $jwt + ); break; case 'schedule': + $scheduleOriginal = $execution->getAttribute('scheduleOriginal', ''); + $function = Authorization::skip(fn () => $database->getDocument('functions', $execution->getAttribute('functionId'))); + /* * 1. Get Original Task * 2. Check for updates @@ -115,10 +133,8 @@ class FunctionsV1 extends Worker */ // Reschedule - $function = Authorization::skip(fn() => $database->getDocument('functions', $functionId)); - if (empty($function->getId())) { - throw new Exception('Function not found ('.$functionId.')'); + throw new Exception('Function not found (' . $function->getId() . ')'); } if ($scheduleOriginal && $scheduleOriginal !== $function->getAttribute('schedule')) { // Schedule has changed from previous run, ignore this run. @@ -132,61 +148,31 @@ class FunctionsV1 extends Worker ->setAttribute('scheduleNext', $next) ->setAttribute('schedulePrevious', \time()); - $function = Authorization::skip(function() use ($database, $function, $next, $functionId) { - $function = $database->updateDocument('functions', $function->getId(), new Document(array_merge($function->getArrayCopy(), [ - 'scheduleNext' => (int)$next, - ]))); - - if ($function === false) { - throw new Exception('Function update failed (' . $functionId . ')'); - } - return $function; - }); + $function = Authorization::skip(fn () => $database->updateDocument( + 'functions', + $function->getId(), + $function->setAttribute('scheduleNext', (int) $next) + )); - ResqueScheduler::enqueueAt($next, Event::FUNCTIONS_QUEUE_NAME, Event::FUNCTIONS_CLASS_NAME, [ - 'projectId' => $projectId, - 'webhooks' => $webhooks, - 'functionId' => $function->getId(), - 'userId' => $userId, - 'executionId' => null, - 'trigger' => 'schedule', - 'scheduleOriginal' => $function->getAttribute('schedule', ''), - ]); // Async task reschedule - - $this->execute( - projectId: $projectId, - function: $function, - dbForProject: $database, - executionId: $executionId, - webhooks: $webhooks, - trigger: $trigger, - event: $event, - eventData: $eventData, - data: $data, - userId: $userId, - jwt: $jwt - ); - break; - - case 'http': - $function = Authorization::skip(fn() => $database->getDocument('functions', $functionId)); - - if (empty($function->getId())) { - throw new Exception('Function not found ('.$functionId.')'); + if ($function === false) { + throw new Exception('Function update failed.'); } + $reschedule = new Func(); + $reschedule + ->setFunction($function) + ->setType('schedule') + ->setUser($user) + ->setProject($project); + + // Async task reschedule + $reschedule->schedule($next); + $this->execute( - projectId: $projectId, + project: $project, function: $function, dbForProject: $database, - executionId: $executionId, - webhooks: $webhooks, - trigger: $trigger, - event: $event, - eventData: $eventData, - data: $data, - userId: $userId, - jwt: $jwt + trigger: 'schedule' ); break; @@ -194,24 +180,23 @@ class FunctionsV1 extends Worker } private function execute( - string $projectId, + Document $project, Document $function, Database $dbForProject, - string $executionId, - array $webhooks, string $trigger, - string $event, - string $eventData, - string $data, - string $userId, - string $jwt + string $executionId = null, + string $event = null, + string $eventData = null, + string $data = null, + ?Document $user = null, + string $jwt = null ) { $functionId = $function->getId(); $deploymentId = $function->getAttribute('deployment', ''); /** Check if deployment exists */ - $deployment = Authorization::skip(fn() => $dbForProject->getDocument('deployments', $deploymentId)); + $deployment = Authorization::skip(fn () => $dbForProject->getDocument('deployments', $deploymentId)); if ($deployment->getAttribute('resourceId') !== $functionId) { throw new Exception('Deployment not found. Create deployment before trying to execute a function', 404); @@ -222,7 +207,7 @@ class FunctionsV1 extends Worker } /** Check if build has exists */ - $build = Authorization::skip(fn() => $dbForProject->getDocument('builds', $deployment->getAttribute('buildId', ''))); + $build = Authorization::skip(fn () => $dbForProject->getDocument('builds', $deployment->getAttribute('buildId', ''))); if ($build->isEmpty()) { throw new Exception('Build not found', 404); } @@ -233,20 +218,21 @@ class FunctionsV1 extends Worker /** Check if runtime is supported */ $runtimes = Config::getParam('runtimes', []); - $runtime = (isset($runtimes[$function->getAttribute('runtime', '')])) ? $runtimes[$function->getAttribute('runtime', '')] : null; - if (\is_null($runtime)) { + if (!\array_key_exists($function->getAttribute('runtime'), $runtimes)) { throw new Exception('Runtime "' . $function->getAttribute('runtime', '') . '" is not supported', 400); } + $runtime = $runtimes[$function->getAttribute('runtime')]; + /** Create execution or update execution status */ - $execution = Authorization::skip(function() use ($dbForProject, &$executionId, $functionId, $deploymentId, $trigger, $userId) { + $execution = Authorization::skip(function () use ($dbForProject, &$executionId, $functionId, $deploymentId, $trigger, $user) { $execution = $dbForProject->getDocument('executions', $executionId); if ($execution->isEmpty()) { $executionId = $dbForProject->getId(); $execution = $dbForProject->createDocument('executions', new Document([ '$id' => $executionId, - '$read' => $userId ? ['user:' . $userId] : [], + '$read' => $user->getId() ? ['user:' . $user->getId()] : [], '$write' => [], 'dateCreated' => time(), 'functionId' => $functionId, @@ -254,18 +240,19 @@ class FunctionsV1 extends Worker 'trigger' => $trigger, 'status' => 'waiting', 'statusCode' => 0, - 'stdout' => '', + 'response' => '', 'stderr' => '', 'time' => 0.0, 'search' => implode(' ', [$functionId, $executionId]), ])); - + if ($execution->isEmpty()) { throw new Exception('Failed to create or read execution'); } } $execution->setAttribute('status', 'processing'); $execution = $dbForProject->updateDocument('executions', $executionId, $execution); + return $execution; }); @@ -280,8 +267,8 @@ class FunctionsV1 extends Worker 'APPWRITE_FUNCTION_EVENT' => $event, 'APPWRITE_FUNCTION_EVENT_DATA' => $eventData, 'APPWRITE_FUNCTION_DATA' => $data, - 'APPWRITE_FUNCTION_PROJECT_ID' => $projectId, - 'APPWRITE_FUNCTION_USER_ID' => $userId, + 'APPWRITE_FUNCTION_PROJECT_ID' => $project->getId(), + 'APPWRITE_FUNCTION_USER_ID' => $user->getId(), 'APPWRITE_FUNCTION_JWT' => $jwt, ]; $vars = \array_merge($function->getAttribute('vars', []), $vars); @@ -289,7 +276,7 @@ class FunctionsV1 extends Worker /** Execute function */ try { $executionResponse = $this->executor->createExecution( - projectId: $projectId, + projectId: $project->getId(), deploymentId: $deploymentId, path: $build->getAttribute('outputPath', ''), vars: $vars, @@ -301,44 +288,65 @@ class FunctionsV1 extends Worker ); /** Update execution status */ - $execution->setAttribute('status', $executionResponse['status']); - $execution->setAttribute('statusCode', $executionResponse['statusCode']); - $execution->setAttribute('stdout', $executionResponse['stdout']); - $execution->setAttribute('stderr', $executionResponse['stderr']); - $execution->setAttribute('time', $executionResponse['time']); + $execution + ->setAttribute('status', $executionResponse['status']) + ->setAttribute('statusCode', $executionResponse['statusCode']) + ->setAttribute('response', $executionResponse['response']) + ->setAttribute('stderr', $executionResponse['stderr']) + ->setAttribute('time', $executionResponse['time']); } catch (\Throwable $th) { - $execution->setAttribute('status', 'failed'); - $execution->setAttribute('statusCode', $th->getCode()); - $execution->setAttribute('stderr', $th->getMessage()); + $endtime = \microtime(true); + $time = $endtime - $execution->getAttribute('dateCreated'); + $execution + ->setAttribute('time', $time) + ->setAttribute('status', 'failed') + ->setAttribute('statusCode', $th->getCode()) + ->setAttribute('stderr', $th->getMessage()); Console::error($th->getMessage()); } - $execution = Authorization::skip(fn() => $dbForProject->updateDocument('executions', $executionId, $execution)); + $execution = Authorization::skip(fn () => $dbForProject->updateDocument('executions', $executionId, $execution)); + /** @var Document $execution */ /** Trigger Webhook */ $executionModel = new Execution(); $executionUpdate = new Event(Event::WEBHOOK_QUEUE_NAME, Event::WEBHOOK_CLASS_NAME); $executionUpdate - ->setParam('projectId', $projectId) - ->setParam('userId', $userId) - ->setParam('webhooks', $webhooks) - ->setParam('event', 'functions.executions.update') - ->setParam('eventData', $execution->getArrayCopy(array_keys($executionModel->getRules()))); - $executionUpdate->trigger(); + ->setProject($project) + ->setUser($user) + ->setEvent('functions.[functionId].executions.[executionId].update') + ->setParam('functionId', $function->getId()) + ->setParam('executionId', $execution->getId()) + ->setPayload($execution->getArrayCopy(array_keys($executionModel->getRules()))) + ->trigger(); + + /** Trigger Functions */ + $executionUpdate + ->setClass(Event::FUNCTIONS_CLASS_NAME) + ->setQueue(Event::FUNCTIONS_QUEUE_NAME) + ->trigger(); /** Trigger realtime event */ - $target = Realtime::fromPayload('functions.executions.update', $execution); + $allEvents = Event::generateEvents('functions.[functionId].executions.[executionId].update', [ + 'functionId' => $function->getId(), + 'executionId' => $execution->getId() + ]); + $target = Realtime::fromPayload( + // Pass first, most verbose event pattern + event: $allEvents[0], + payload: $execution + ); Realtime::send( projectId: 'console', payload: $execution->getArrayCopy(), - event: 'functions.executions.update', + events: $allEvents, channels: $target['channels'], roles: $target['roles'] ); Realtime::send( - projectId: $projectId, + projectId: $project->getId(), payload: $execution->getArrayCopy(), - event: 'functions.executions.update', + events: $allEvents, channels: $target['channels'], roles: $target['roles'] ); @@ -349,7 +357,7 @@ class FunctionsV1 extends Worker $statsd = $register->get('statsd'); $usage = new Stats($statsd); $usage - ->setParam('projectId', $projectId) + ->setParam('projectId', $project->getId()) ->setParam('functionId', $function->getId()) ->setParam('functionExecution', 1) ->setParam('functionStatus', $execution->getAttribute('status', '')) @@ -357,7 +365,6 @@ class FunctionsV1 extends Worker ->setParam('networkRequestSize', 0) ->setParam('networkResponseSize', 0) ->submit(); - $usage->submit(); } } diff --git a/app/workers/mails.php b/app/workers/mails.php index 25ddb438c0..8c78ff9006 100644 --- a/app/workers/mails.php +++ b/app/workers/mails.php @@ -4,6 +4,7 @@ use Appwrite\Resque\Worker; use Appwrite\Template\Template; use Utopia\App; use Utopia\CLI\Console; +use Utopia\Database\Document; use Utopia\Locale\Locale; require_once __DIR__ . '/../init.php'; @@ -30,26 +31,40 @@ class MailsV1 extends Worker return; } + $project = new Document($this->args['project']); + $user = new Document($this->args['user'] ?? []); + $team = new Document($this->args['team'] ?? []); + $recipient = $this->args['recipient']; - $name = $this->args['name']; $url = $this->args['url']; - $project = $this->args['project']; + $name = $this->args['name']; $type = $this->args['type']; $prefix = $this->getPrefix($type); $locale = new Locale($this->args['locale']); + $projectName = $project->getAttribute('name', '[APP-NAME]'); if (!$this->doesLocaleExist($locale, $prefix)) { $locale->setDefault('en'); } - $from = $this->args['from'] === 'console' ? '' : \sprintf($locale->getText('emails.sender'), $project); + $from = $project->getId() === 'console' ? '' : \sprintf($locale->getText('emails.sender'), $projectName); $body = Template::fromFile(__DIR__ . '/../config/locale/templates/email-base.tpl'); $subject = ''; switch ($type) { + case MAIL_TYPE_CERTIFICATE: + $domain = $this->args['domain']; + $error = $this->args['error']; + $attempt = $this->args['attempt']; + + $subject = \sprintf($locale->getText("$prefix.subject"), $domain); + $body->setParam('{{domain}}', $domain); + $body->setParam('{{error}}', $error); + $body->setParam('{{attempt}}', $attempt); + break; case MAIL_TYPE_INVITATION: - $subject = \sprintf($locale->getText("$prefix.subject"), $this->args['team'], $project); - $body->setParam('{{owner}}', $this->args['owner']); - $body->setParam('{{team}}', $this->args['team']); + $subject = \sprintf($locale->getText("$prefix.subject"), $team->getAttribute('name'), $projectName); + $body->setParam('{{owner}}', $user->getAttribute('name')); + $body->setParam('{{team}}', $team->getAttribute('name')); break; case MAIL_TYPE_RECOVERY: case MAIL_TYPE_VERIFICATION: @@ -69,7 +84,7 @@ class MailsV1 extends Worker ->setParam('{{footer}}', $locale->getText("$prefix.footer")) ->setParam('{{thanks}}', $locale->getText("$prefix.thanks")) ->setParam('{{signature}}', $locale->getText("$prefix.signature")) - ->setParam('{{project}}', $project) + ->setParam('{{project}}', $projectName) ->setParam('{{direction}}', $locale->getText('settings.direction')) ->setParam('{{bg-body}}', '#f7f7f7') ->setParam('{{bg-content}}', '#ffffff') @@ -126,6 +141,8 @@ class MailsV1 extends Worker switch ($type) { case MAIL_TYPE_RECOVERY: return 'emails.recovery'; + case MAIL_TYPE_CERTIFICATE: + return 'emails.certificate'; case MAIL_TYPE_INVITATION: return 'emails.invitation'; case MAIL_TYPE_VERIFICATION: diff --git a/app/workers/webhooks.php b/app/workers/webhooks.php index 8613472216..e44881c1b4 100644 --- a/app/workers/webhooks.php +++ b/app/workers/webhooks.php @@ -3,15 +3,19 @@ use Appwrite\Resque\Worker; use Utopia\App; use Utopia\CLI\Console; +use Utopia\Database\Document; -require_once __DIR__.'/../init.php'; +require_once __DIR__ . '/../init.php'; Console::title('Webhooks V1 Worker'); Console::success(APP_NAME . ' webhooks worker v1 has started'); class WebhooksV1 extends Worker { - public function getName(): string { + protected array $errors = []; + + public function getName(): string + { return "webhooks"; } @@ -21,77 +25,72 @@ class WebhooksV1 extends Worker public function run(): void { - $errors = []; + $events = $this->args['events']; + $payload = json_encode($this->args['payload']); + $project = new Document($this->args['project']); + $user = new Document($this->args['user'] ?? []); - // Event - $projectId = $this->args['projectId'] ?? ''; - $webhooks = $this->args['webhooks'] ?? []; - $userId = $this->args['userId'] ?? ''; - $event = $this->args['event'] ?? ''; - $eventData = \json_encode($this->args['eventData']); - - foreach ($webhooks as $webhook) { - if (!(isset($webhook['events']) && \is_array($webhook['events']) && \in_array($event, $webhook['events']))) { - continue; + foreach ($project->getAttribute('webhooks', []) as $webhook) { + if (array_intersect($webhook->getAttribute('events', []), $events)) { + $this->execute($events, $payload, $webhook, $user, $project); } - - $id = $webhook['$id'] ?? ''; - $name = $webhook['name'] ?? ''; - $signature = $webhook['signature'] ?? 'not-yet-implemented'; - $url = $webhook['url'] ?? ''; - $security = (bool) ($webhook['security'] ?? true); - $httpUser = $webhook['httpUser'] ?? null; - $httpPass = $webhook['httpPass'] ?? null; - - $ch = \curl_init($url); - - \curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST'); - \curl_setopt($ch, CURLOPT_POSTFIELDS, $eventData); - \curl_setopt($ch, CURLOPT_HEADER, 0); - \curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - \curl_setopt($ch, CURLOPT_USERAGENT, \sprintf( - APP_USERAGENT, - App::getEnv('_APP_VERSION', 'UNKNOWN'), - App::getEnv('_APP_SYSTEM_SECURITY_EMAIL_ADDRESS', APP_EMAIL_SECURITY) - )); - \curl_setopt( - $ch, - CURLOPT_HTTPHEADER, - [ - 'Content-Type: application/json', - 'Content-Length: ' . \strlen($eventData), - 'X-' . APP_NAME . '-Webhook-Id: ' . $id, - 'X-' . APP_NAME . '-Webhook-Event: ' . $event, - 'X-' . APP_NAME . '-Webhook-Name: ' . $name, - 'X-' . APP_NAME . '-Webhook-User-Id: ' . $userId, - 'X-' . APP_NAME . '-Webhook-Project-Id: ' . $projectId, - 'X-' . APP_NAME . '-Webhook-Signature: ' . $signature, - ] - ); - - if (!$security) { - \curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); - \curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); - } - - if (!empty($httpUser) && !empty($httpPass)) { - \curl_setopt($ch, CURLOPT_USERPWD, "$httpUser:$httpPass"); - \curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); - } - - if (false === \curl_exec($ch)) { - $errors[] = \curl_error($ch) . ' in event ' . $event . ' for webhook ' . $name; - } - - \curl_close($ch); } - if (!empty($errors)) { - throw new Exception(\implode(" / \n\n", $errors)); + if (!empty($this->errors)) { + throw new Exception(\implode(" / \n\n", $this->errors)); } } + protected function execute(array $events, string $payload, Document $webhook, Document $user, Document $project): void + { + $httpUser = $webhook->getAttribute('httpUser'); + $httpPass = $webhook->getAttribute('httpPass'); + + $ch = \curl_init($webhook->getAttribute('url')); + + \curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST'); + \curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); + \curl_setopt($ch, CURLOPT_HEADER, 0); + \curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + \curl_setopt($ch, CURLOPT_USERAGENT, \sprintf( + APP_USERAGENT, + App::getEnv('_APP_VERSION', 'UNKNOWN'), + App::getEnv('_APP_SYSTEM_SECURITY_EMAIL_ADDRESS', APP_EMAIL_SECURITY) + )); + \curl_setopt( + $ch, + CURLOPT_HTTPHEADER, + [ + 'Content-Type: application/json', + 'Content-Length: ' . \strlen($payload), + 'X-' . APP_NAME . '-Webhook-Id: ' . $webhook->getId(), + 'X-' . APP_NAME . '-Webhook-Events: ' . implode(',', $events), + 'X-' . APP_NAME . '-Webhook-Name: ' . $webhook->getAttribute('name', ''), + 'X-' . APP_NAME . '-Webhook-User-Id: ' . $user->getId(), + 'X-' . APP_NAME . '-Webhook-Project-Id: ' . $project->getId(), + 'X-' . APP_NAME . '-Webhook-Signature: ' . $webhook->getAttribute('signature', 'not-yet-implemented'), + ] + ); + + if (!$webhook->getAttribute('security', true)) { + \curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); + \curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + } + + if (!empty($httpUser) && !empty($httpPass)) { + \curl_setopt($ch, CURLOPT_USERPWD, "$httpUser:$httpPass"); + \curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); + } + + if (false === \curl_exec($ch)) { + $this->errors[] = \curl_error($ch) . ' in events ' . implode(', ', $events) . ' for webhook ' . $webhook->getAttribute('name'); + } + + \curl_close($ch); + } + public function shutdown(): void { + $this->errors = []; } } diff --git a/composer.json b/composer.json index 4f01b06e48..4baf04043a 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ "ext-zlib": "*", "ext-sockets": "*", "appwrite/php-clamav": "1.1.*", - "appwrite/php-runtimes": "0.7.*", + "appwrite/php-runtimes": "0.9.*", "utopia-php/framework": "0.19.*", "utopia-php/logger": "0.3.*", "utopia-php/abuse": "0.7.*", @@ -45,7 +45,7 @@ "utopia-php/cache": "0.6.*", "utopia-php/cli": "0.12.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.15.*", + "utopia-php/database": "0.17.*", "utopia-php/locale": "0.4.*", "utopia-php/registry": "0.5.*", "utopia-php/preloader": "0.2.*", @@ -56,7 +56,7 @@ "utopia-php/image": "0.5.*", "utopia-php/orchestration": "0.4.*", "resque/php-resque": "1.3.6", - "matomo/device-detector": "5.0.4", + "matomo/device-detector": "6.0.0", "dragonmantank/cron-expression": "3.3.1", "influxdb/influxdb-php": "1.15.2", "phpmailer/phpmailer": "6.6.0", @@ -71,10 +71,10 @@ } ], "require-dev": { - "appwrite/sdk-generator": "0.18.3", - "phpunit/phpunit": "9.5.10", - "swoole/ide-helper": "4.8.5", - "textalk/websocket": "1.5.5", + "appwrite/sdk-generator": "0.18.4", + "phpunit/phpunit": "9.5.20", + "swoole/ide-helper": "4.8.9", + "textalk/websocket": "1.5.7", "vimeo/psalm": "4.13.1" }, "provide": { diff --git a/composer.lock b/composer.lock index ca66336799..b946b34282 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e0de8d0bba618a46646cf3da1e06a652", + "content-hash": "ae4e8cc9efbd28d8c2536e378c9e7ead", "packages": [ { "name": "adhocore/jwt", @@ -115,11 +115,11 @@ }, { "name": "appwrite/php-runtimes", - "version": "0.7.4", + "version": "0.9.0", "source": { "type": "git", "url": "https://github.com/appwrite/runtimes.git", - "reference": "8e0972ecce6ad96f3701edab8d2c9a8af7074093" + "reference": "e8aa94aa42f45711e11cb1da401b442ecc2c32a4" }, "require": { "php": ">=8.0", @@ -154,7 +154,7 @@ "php", "runtimes" ], - "time": "2022-02-26T11:38:09+00:00" + "time": "2022-05-16T10:54:14+00:00" }, { "name": "chillerlan/php-qrcode", @@ -925,16 +925,16 @@ }, { "name": "matomo/device-detector", - "version": "5.0.4", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/matomo-org/device-detector.git", - "reference": "99ea1953fc7f23f785e593ce1499a00586645530" + "reference": "7fc2af3af62bd69e6e3404d561e371a83c112be9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matomo-org/device-detector/zipball/99ea1953fc7f23f785e593ce1499a00586645530", - "reference": "99ea1953fc7f23f785e593ce1499a00586645530", + "url": "https://api.github.com/repos/matomo-org/device-detector/zipball/7fc2af3af62bd69e6e3404d561e371a83c112be9", + "reference": "7fc2af3af62bd69e6e3404d561e371a83c112be9", "shasum": "" }, "require": { @@ -990,7 +990,7 @@ "source": "https://github.com/matomo-org/matomo", "wiki": "https://dev.matomo.org/" }, - "time": "2022-02-18T19:51:56+00:00" + "time": "2022-04-11T09:58:17+00:00" }, { "name": "mongodb/mongodb", @@ -2133,16 +2133,16 @@ }, { "name": "utopia-php/database", - "version": "0.15.5", + "version": "0.17.1", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "6507b58ef3e22703b9df68d3dbd5e822d5bb023f" + "reference": "a4d001452b78b85335ffbd34176cd45d2b13c1ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/6507b58ef3e22703b9df68d3dbd5e822d5bb023f", - "reference": "6507b58ef3e22703b9df68d3dbd5e822d5bb023f", + "url": "https://api.github.com/repos/utopia-php/database/zipball/a4d001452b78b85335ffbd34176cd45d2b13c1ca", + "reference": "a4d001452b78b85335ffbd34176cd45d2b13c1ca", "shasum": "" }, "require": { @@ -2190,9 +2190,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.15.5" + "source": "https://github.com/utopia-php/database/tree/0.17.1" }, - "time": "2022-04-04T13:42:00+00:00" + "time": "2022-05-16T09:11:44+00:00" }, { "name": "utopia-php/domains", @@ -2250,16 +2250,16 @@ }, { "name": "utopia-php/framework", - "version": "0.19.20", + "version": "0.19.21", "source": { "type": "git", "url": "https://github.com/utopia-php/framework.git", - "reference": "65ced168db8f6e188ceeb0d101f57552c3d8b2af" + "reference": "3b7bd8e4acf84fd7d560ced8e0142221d302575d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/framework/zipball/65ced168db8f6e188ceeb0d101f57552c3d8b2af", - "reference": "65ced168db8f6e188ceeb0d101f57552c3d8b2af", + "url": "https://api.github.com/repos/utopia-php/framework/zipball/3b7bd8e4acf84fd7d560ced8e0142221d302575d", + "reference": "3b7bd8e4acf84fd7d560ced8e0142221d302575d", "shasum": "" }, "require": { @@ -2293,31 +2293,31 @@ ], "support": { "issues": "https://github.com/utopia-php/framework/issues", - "source": "https://github.com/utopia-php/framework/tree/0.19.20" + "source": "https://github.com/utopia-php/framework/tree/0.19.21" }, - "time": "2022-04-14T15:42:37+00:00" + "time": "2022-05-12T18:42:28+00:00" }, { "name": "utopia-php/image", - "version": "0.5.3", + "version": "0.5.4", "source": { "type": "git", "url": "https://github.com/utopia-php/image.git", - "reference": "4a8429b62dcf56562b038d6712375f75166f0c02" + "reference": "ca5f436f9aa22dedaa6648f24f3687733808e336" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/image/zipball/4a8429b62dcf56562b038d6712375f75166f0c02", - "reference": "4a8429b62dcf56562b038d6712375f75166f0c02", + "url": "https://api.github.com/repos/utopia-php/image/zipball/ca5f436f9aa22dedaa6648f24f3687733808e336", + "reference": "ca5f436f9aa22dedaa6648f24f3687733808e336", "shasum": "" }, "require": { "ext-imagick": "*", - "php": ">=7.4" + "php": ">=8.0" }, "require-dev": { "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" + "vimeo/psalm": "4.13.1" }, "type": "library", "autoload": { @@ -2345,9 +2345,9 @@ ], "support": { "issues": "https://github.com/utopia-php/image/issues", - "source": "https://github.com/utopia-php/image/tree/0.5.3" + "source": "https://github.com/utopia-php/image/tree/0.5.4" }, - "time": "2021-11-02T05:47:16+00:00" + "time": "2022-05-11T12:30:41+00:00" }, { "name": "utopia-php/locale", @@ -3075,16 +3075,16 @@ }, { "name": "appwrite/sdk-generator", - "version": "0.18.3", + "version": "0.18.4", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "96e2c9b0f350d4fa43ddff6334ef44908716c944" + "reference": "841281fab95c774d5aa96f5bf9bd0dabf9f96e8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/96e2c9b0f350d4fa43ddff6334ef44908716c944", - "reference": "96e2c9b0f350d4fa43ddff6334ef44908716c944", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/841281fab95c774d5aa96f5bf9bd0dabf9f96e8d", + "reference": "841281fab95c774d5aa96f5bf9bd0dabf9f96e8d", "shasum": "" }, "require": { @@ -3119,9 +3119,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.18.3" + "source": "https://github.com/appwrite/sdk-generator/tree/0.18.4" }, - "time": "2022-04-13T04:00:59+00:00" + "time": "2022-05-17T12:16:09+00:00" }, { "name": "composer/pcre", @@ -3551,16 +3551,16 @@ }, { "name": "matthiasmullie/minify", - "version": "1.3.67", + "version": "1.3.68", "source": { "type": "git", "url": "https://github.com/matthiasmullie/minify.git", - "reference": "acaee1b7ca3cd67a39d7f98673cacd7e4739a8d9" + "reference": "c00fb02f71b2ef0a5f53fe18c5a8b9aa30f48297" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/acaee1b7ca3cd67a39d7f98673cacd7e4739a8d9", - "reference": "acaee1b7ca3cd67a39d7f98673cacd7e4739a8d9", + "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/c00fb02f71b2ef0a5f53fe18c5a8b9aa30f48297", + "reference": "c00fb02f71b2ef0a5f53fe18c5a8b9aa30f48297", "shasum": "" }, "require": { @@ -3609,7 +3609,7 @@ ], "support": { "issues": "https://github.com/matthiasmullie/minify/issues", - "source": "https://github.com/matthiasmullie/minify/tree/1.3.67" + "source": "https://github.com/matthiasmullie/minify/tree/1.3.68" }, "funding": [ { @@ -3617,7 +3617,7 @@ "type": "github" } ], - "time": "2022-03-24T08:54:59+00:00" + "time": "2022-04-19T08:28:56+00:00" }, { "name": "matthiasmullie/path-converter", @@ -4549,16 +4549,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.10", + "version": "9.5.20", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a" + "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c814a05837f2edb0d1471d6e3f4ab3501ca3899a", - "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/12bc8879fb65aef2138b26fc633cb1e3620cffba", + "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba", "shasum": "" }, "require": { @@ -4574,7 +4574,7 @@ "phar-io/version": "^3.0.2", "php": ">=7.3", "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.7", + "phpunit/php-code-coverage": "^9.2.13", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", @@ -4588,7 +4588,7 @@ "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3.4", + "sebastian/type": "^3.0", "sebastian/version": "^3.0.2" }, "require-dev": { @@ -4636,11 +4636,11 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.10" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.20" }, "funding": [ { - "url": "https://phpunit.de/donate.html", + "url": "https://phpunit.de/sponsors.html", "type": "custom" }, { @@ -4648,7 +4648,7 @@ "type": "github" } ], - "time": "2021-09-25T07:38:51+00:00" + "time": "2022-04-01T12:37:26+00:00" }, { "name": "psr/container", @@ -5560,28 +5560,28 @@ }, { "name": "sebastian/type", - "version": "2.3.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" + "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", + "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", "shasum": "" }, "require": { "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -5604,7 +5604,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + "source": "https://github.com/sebastianbergmann/type/tree/3.0.0" }, "funding": [ { @@ -5612,7 +5612,7 @@ "type": "github" } ], - "time": "2021-06-15T12:49:02+00:00" + "time": "2022-03-15T09:54:48+00:00" }, { "name": "sebastian/version", @@ -5669,16 +5669,16 @@ }, { "name": "swoole/ide-helper", - "version": "4.8.5", + "version": "4.8.9", "source": { "type": "git", "url": "https://github.com/swoole/ide-helper.git", - "reference": "d03c707d4dc803228e93b4884c72949c4d28e8b8" + "reference": "8f82ba3b6af04a5bccb97c1654af992d1ee8b0fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swoole/ide-helper/zipball/d03c707d4dc803228e93b4884c72949c4d28e8b8", - "reference": "d03c707d4dc803228e93b4884c72949c4d28e8b8", + "url": "https://api.github.com/repos/swoole/ide-helper/zipball/8f82ba3b6af04a5bccb97c1654af992d1ee8b0fe", + "reference": "8f82ba3b6af04a5bccb97c1654af992d1ee8b0fe", "shasum": "" }, "type": "library", @@ -5695,7 +5695,7 @@ "description": "IDE help files for Swoole.", "support": { "issues": "https://github.com/swoole/ide-helper/issues", - "source": "https://github.com/swoole/ide-helper/tree/4.8.5" + "source": "https://github.com/swoole/ide-helper/tree/4.8.9" }, "funding": [ { @@ -5707,20 +5707,20 @@ "type": "github" } ], - "time": "2021-12-24T22:44:20+00:00" + "time": "2022-04-18T20:38:04+00:00" }, { "name": "symfony/console", - "version": "v6.0.7", + "version": "v6.0.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "70dcf7b2ca2ea08ad6ebcc475f104a024fb5632e" + "reference": "0d00aa289215353aa8746a31d101f8e60826285c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/70dcf7b2ca2ea08ad6ebcc475f104a024fb5632e", - "reference": "70dcf7b2ca2ea08ad6ebcc475f104a024fb5632e", + "url": "https://api.github.com/repos/symfony/console/zipball/0d00aa289215353aa8746a31d101f8e60826285c", + "reference": "0d00aa289215353aa8746a31d101f8e60826285c", "shasum": "" }, "require": { @@ -5786,7 +5786,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.0.7" + "source": "https://github.com/symfony/console/tree/v6.0.8" }, "funding": [ { @@ -5802,7 +5802,7 @@ "type": "tidelift" } ], - "time": "2022-03-31T17:18:25+00:00" + "time": "2022-04-20T15:01:42+00:00" }, { "name": "symfony/polyfill-intl-grapheme", @@ -6136,16 +6136,16 @@ }, { "name": "symfony/string", - "version": "v6.0.3", + "version": "v6.0.8", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "522144f0c4c004c80d56fa47e40e17028e2eefc2" + "reference": "ac0aa5c2282e0de624c175b68d13f2c8f2e2649d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/522144f0c4c004c80d56fa47e40e17028e2eefc2", - "reference": "522144f0c4c004c80d56fa47e40e17028e2eefc2", + "url": "https://api.github.com/repos/symfony/string/zipball/ac0aa5c2282e0de624c175b68d13f2c8f2e2649d", + "reference": "ac0aa5c2282e0de624c175b68d13f2c8f2e2649d", "shasum": "" }, "require": { @@ -6201,7 +6201,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.0.3" + "source": "https://github.com/symfony/string/tree/v6.0.8" }, "funding": [ { @@ -6217,20 +6217,20 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2022-04-22T08:18:02+00:00" }, { "name": "textalk/websocket", - "version": "1.5.5", + "version": "1.5.7", "source": { "type": "git", "url": "https://github.com/Textalk/websocket-php.git", - "reference": "846542f82658132cd36acb7a7e8ce0f03960c295" + "reference": "1712325e99b6bf869ccbf9bf41ab749e7328ea46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Textalk/websocket-php/zipball/846542f82658132cd36acb7a7e8ce0f03960c295", - "reference": "846542f82658132cd36acb7a7e8ce0f03960c295", + "url": "https://api.github.com/repos/Textalk/websocket-php/zipball/1712325e99b6bf869ccbf9bf41ab749e7328ea46", + "reference": "1712325e99b6bf869ccbf9bf41ab749e7328ea46", "shasum": "" }, "require": { @@ -6264,9 +6264,9 @@ "description": "WebSocket client and server", "support": { "issues": "https://github.com/Textalk/websocket-php/issues", - "source": "https://github.com/Textalk/websocket-php/tree/1.5.5" + "source": "https://github.com/Textalk/websocket-php/tree/1.5.7" }, - "time": "2021-08-07T10:21:40+00:00" + "time": "2022-03-29T09:46:59+00:00" }, { "name": "theseer/tokenizer", @@ -6320,16 +6320,16 @@ }, { "name": "twig/twig", - "version": "v3.3.10", + "version": "v3.4.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "8442df056c51b706793adf80a9fd363406dd3674" + "reference": "e939eae92386b69b49cfa4599dd9bead6bf4a342" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/8442df056c51b706793adf80a9fd363406dd3674", - "reference": "8442df056c51b706793adf80a9fd363406dd3674", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/e939eae92386b69b49cfa4599dd9bead6bf4a342", + "reference": "e939eae92386b69b49cfa4599dd9bead6bf4a342", "shasum": "" }, "require": { @@ -6344,7 +6344,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -6380,7 +6380,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.3.10" + "source": "https://github.com/twigphp/Twig/tree/v3.4.1" }, "funding": [ { @@ -6392,7 +6392,7 @@ "type": "tidelift" } ], - "time": "2022-04-06T06:47:41+00:00" + "time": "2022-05-17T05:48:52+00:00" }, { "name": "vimeo/psalm", @@ -6576,5 +6576,5 @@ "platform-overrides": { "php": "8.0" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.1.0" } diff --git a/docker-compose.yml b/docker-compose.yml index 9f567b4233..159b811566 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,7 +14,7 @@ version: '3' services: traefik: - image: traefik:2.5 + image: traefik:2.7 <<: *x-logging container_name: appwrite-traefik command: @@ -129,6 +129,7 @@ services: - _APP_INFLUXDB_HOST - _APP_INFLUXDB_PORT - _APP_STORAGE_LIMIT + - _APP_STORAGE_PREVIEW_LIMIT - _APP_STORAGE_ANTIVIRUS - _APP_STORAGE_ANTIVIRUS_HOST - _APP_STORAGE_ANTIVIRUS_PORT @@ -389,6 +390,7 @@ services: environment: - _APP_ENV - _APP_OPENSSL_KEY_V1 + - _APP_DOMAIN - _APP_DOMAIN_TARGET - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS - _APP_REDIS_HOST @@ -538,11 +540,18 @@ services: - redis environment: - _APP_ENV + - _APP_DOMAIN + - _APP_DOMAIN_TARGET - _APP_OPENSSL_KEY_V1 - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_REDIS_USER - _APP_REDIS_PASS + - _APP_DB_HOST + - _APP_DB_PORT + - _APP_DB_SCHEMA + - _APP_DB_USER + - _APP_DB_PASS - _APP_MAINTENANCE_INTERVAL - _APP_MAINTENANCE_RETENTION_EXECUTION - _APP_MAINTENANCE_RETENTION_ABUSE diff --git a/docs/examples/0.14.x/client-android/java/account/create-anonymous-session.md b/docs/examples/0.14.x/client-android/java/account/create-anonymous-session.md new file mode 100644 index 0000000000..b1a2a25828 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/create-anonymous-session.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.createAnonymousSession(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/account/create-j-w-t.md b/docs/examples/0.14.x/client-android/java/account/create-j-w-t.md new file mode 100644 index 0000000000..3a97c334ce --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/create-j-w-t.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.createJWT(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/account/create-magic-u-r-l-session.md b/docs/examples/0.14.x/client-android/java/account/create-magic-u-r-l-session.md new file mode 100644 index 0000000000..6c9fa7c662 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/create-magic-u-r-l-session.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.createMagicURLSession( + "[USER_ID]", + "email@example.com", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/account/create-o-auth2session.md b/docs/examples/0.14.x/client-android/java/account/create-o-auth2session.md new file mode 100644 index 0000000000..e4cfb8d471 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/create-o-auth2session.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.createOAuth2Session( + this, + "amazon", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/account/create-recovery.md b/docs/examples/0.14.x/client-android/java/account/create-recovery.md new file mode 100644 index 0000000000..459213bce9 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/create-recovery.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.createRecovery( + "email@example.com", + "https://example.com" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/account/create-session.md b/docs/examples/0.14.x/client-android/java/account/create-session.md new file mode 100644 index 0000000000..34dfca55d8 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/create-session.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.createSession( + "email@example.com", + "password" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/account/create-verification.md b/docs/examples/0.14.x/client-android/java/account/create-verification.md new file mode 100644 index 0000000000..b8b1c206bf --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/create-verification.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.createVerification( + "https://example.com" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/account/create.md b/docs/examples/0.14.x/client-android/java/account/create.md new file mode 100644 index 0000000000..11a5168d60 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/create.md @@ -0,0 +1,50 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.create( + "[USER_ID]", + "email@example.com", + "password", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/account/delete-session.md b/docs/examples/0.14.x/client-android/java/account/delete-session.md new file mode 100644 index 0000000000..b3549c708b --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/delete-session.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.deleteSession( + "[SESSION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/account/delete-sessions.md b/docs/examples/0.14.x/client-android/java/account/delete-sessions.md new file mode 100644 index 0000000000..153c323b56 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/delete-sessions.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.deleteSessions(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/account/get-logs.md b/docs/examples/0.14.x/client-android/java/account/get-logs.md new file mode 100644 index 0000000000..fb83c5d6cc --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/get-logs.md @@ -0,0 +1,47 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.getLogs( + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/account/get-prefs.md b/docs/examples/0.14.x/client-android/java/account/get-prefs.md new file mode 100644 index 0000000000..25ab6c3951 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/get-prefs.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.getPrefs(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/account/get-session.md b/docs/examples/0.14.x/client-android/java/account/get-session.md new file mode 100644 index 0000000000..8d4c95aaf2 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/get-session.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.getSession( + "[SESSION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/account/get-sessions.md b/docs/examples/0.14.x/client-android/java/account/get-sessions.md new file mode 100644 index 0000000000..7afe852d71 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/get-sessions.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.getSessions(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/account/get.md b/docs/examples/0.14.x/client-android/java/account/get.md new file mode 100644 index 0000000000..146a5e501d --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/get.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.get(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/account/update-email.md b/docs/examples/0.14.x/client-android/java/account/update-email.md new file mode 100644 index 0000000000..56a1bc0206 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/update-email.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.updateEmail( + "email@example.com", + "password" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/account/update-magic-u-r-l-session.md b/docs/examples/0.14.x/client-android/java/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..d0734e18ee --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/update-magic-u-r-l-session.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.updateMagicURLSession( + "[USER_ID]", + "[SECRET]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/account/update-name.md b/docs/examples/0.14.x/client-android/java/account/update-name.md new file mode 100644 index 0000000000..9842a2216e --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/update-name.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.updateName( + "[NAME]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/account/update-password.md b/docs/examples/0.14.x/client-android/java/account/update-password.md new file mode 100644 index 0000000000..468bdc21da --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/update-password.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.updatePassword( + "password", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/account/update-prefs.md b/docs/examples/0.14.x/client-android/java/account/update-prefs.md new file mode 100644 index 0000000000..9f94b8fe59 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/update-prefs.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.updatePrefs( + mapOf( "a" to "b" ) + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/account/update-recovery.md b/docs/examples/0.14.x/client-android/java/account/update-recovery.md new file mode 100644 index 0000000000..bfcc89ed19 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/update-recovery.md @@ -0,0 +1,51 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.updateRecovery( + "[USER_ID]", + "[SECRET]", + "password", + "password" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/account/update-session.md b/docs/examples/0.14.x/client-android/java/account/update-session.md new file mode 100644 index 0000000000..80aff11b98 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/update-session.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.updateSession( + "[SESSION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/account/update-status.md b/docs/examples/0.14.x/client-android/java/account/update-status.md new file mode 100644 index 0000000000..0ef6a6e1f8 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/update-status.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.updateStatus(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/account/update-verification.md b/docs/examples/0.14.x/client-android/java/account/update-verification.md new file mode 100644 index 0000000000..8cf8d67363 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/account/update-verification.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Account account = new Account(client); + + account.updateVerification( + "[USER_ID]", + "[SECRET]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/avatars/get-browser.md b/docs/examples/0.14.x/client-android/java/avatars/get-browser.md new file mode 100644 index 0000000000..fa88749dff --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/avatars/get-browser.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Avatars + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Avatars avatars = new Avatars(client); + + avatars.getBrowser( + "aa", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/avatars/get-credit-card.md b/docs/examples/0.14.x/client-android/java/avatars/get-credit-card.md new file mode 100644 index 0000000000..2ddda86cce --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/avatars/get-credit-card.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Avatars + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Avatars avatars = new Avatars(client); + + avatars.getCreditCard( + "amex", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/avatars/get-favicon.md b/docs/examples/0.14.x/client-android/java/avatars/get-favicon.md new file mode 100644 index 0000000000..39c1432260 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/avatars/get-favicon.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Avatars + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Avatars avatars = new Avatars(client); + + avatars.getFavicon( + "https://example.com" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/avatars/get-flag.md b/docs/examples/0.14.x/client-android/java/avatars/get-flag.md new file mode 100644 index 0000000000..77bf3b1b1f --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/avatars/get-flag.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Avatars + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Avatars avatars = new Avatars(client); + + avatars.getFlag( + "af", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/avatars/get-image.md b/docs/examples/0.14.x/client-android/java/avatars/get-image.md new file mode 100644 index 0000000000..69371da6d3 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/avatars/get-image.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Avatars + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Avatars avatars = new Avatars(client); + + avatars.getImage( + "https://example.com", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/avatars/get-initials.md b/docs/examples/0.14.x/client-android/java/avatars/get-initials.md new file mode 100644 index 0000000000..eea5669c2c --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/avatars/get-initials.md @@ -0,0 +1,47 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Avatars + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Avatars avatars = new Avatars(client); + + avatars.getInitials( + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/avatars/get-q-r.md b/docs/examples/0.14.x/client-android/java/avatars/get-q-r.md new file mode 100644 index 0000000000..e2c48cdded --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/avatars/get-q-r.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Avatars + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Avatars avatars = new Avatars(client); + + avatars.getQR( + "[TEXT]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/database/create-document.md b/docs/examples/0.14.x/client-android/java/database/create-document.md new file mode 100644 index 0000000000..059a42ed66 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/database/create-document.md @@ -0,0 +1,50 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Database + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Database database = new Database(client); + + database.createDocument( + "[COLLECTION_ID]", + "[DOCUMENT_ID]", + mapOf( "a" to "b" ), + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/database/delete-document.md b/docs/examples/0.14.x/client-android/java/database/delete-document.md new file mode 100644 index 0000000000..75877c470a --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/database/delete-document.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Database + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Database database = new Database(client); + + database.deleteDocument( + "[COLLECTION_ID]", + "[DOCUMENT_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/database/get-document.md b/docs/examples/0.14.x/client-android/java/database/get-document.md new file mode 100644 index 0000000000..69aff1df2c --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/database/get-document.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Database + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Database database = new Database(client); + + database.getDocument( + "[COLLECTION_ID]", + "[DOCUMENT_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/database/list-documents.md b/docs/examples/0.14.x/client-android/java/database/list-documents.md new file mode 100644 index 0000000000..711aa412c0 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/database/list-documents.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Database + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Database database = new Database(client); + + database.listDocuments( + "[COLLECTION_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/database/update-document.md b/docs/examples/0.14.x/client-android/java/database/update-document.md new file mode 100644 index 0000000000..a14c91f48c --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/database/update-document.md @@ -0,0 +1,50 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Database + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Database database = new Database(client); + + database.updateDocument( + "[COLLECTION_ID]", + "[DOCUMENT_ID]", + mapOf( "a" to "b" ), + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/functions/create-execution.md b/docs/examples/0.14.x/client-android/java/functions/create-execution.md new file mode 100644 index 0000000000..ea30faddf3 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/functions/create-execution.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Functions + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Functions functions = new Functions(client); + + functions.createExecution( + "[FUNCTION_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/functions/get-execution.md b/docs/examples/0.14.x/client-android/java/functions/get-execution.md new file mode 100644 index 0000000000..2f4e57edce --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/functions/get-execution.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Functions + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Functions functions = new Functions(client); + + functions.getExecution( + "[FUNCTION_ID]", + "[EXECUTION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/functions/list-executions.md b/docs/examples/0.14.x/client-android/java/functions/list-executions.md new file mode 100644 index 0000000000..68f767db9c --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/functions/list-executions.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Functions + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Functions functions = new Functions(client); + + functions.listExecutions( + "[FUNCTION_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/functions/retry-build.md b/docs/examples/0.14.x/client-android/java/functions/retry-build.md new file mode 100644 index 0000000000..96501a096e --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/functions/retry-build.md @@ -0,0 +1,50 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Functions + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Functions functions = new Functions(client); + + functions.retryBuild( + "[FUNCTION_ID]", + "[DEPLOYMENT_ID]", + "[BUILD_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/locale/get-continents.md b/docs/examples/0.14.x/client-android/java/locale/get-continents.md new file mode 100644 index 0000000000..e96a9fec1e --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/locale/get-continents.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Locale + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Locale locale = new Locale(client); + + locale.getContinents(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/locale/get-countries-e-u.md b/docs/examples/0.14.x/client-android/java/locale/get-countries-e-u.md new file mode 100644 index 0000000000..ec478bc839 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/locale/get-countries-e-u.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Locale + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Locale locale = new Locale(client); + + locale.getCountriesEU(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/locale/get-countries-phones.md b/docs/examples/0.14.x/client-android/java/locale/get-countries-phones.md new file mode 100644 index 0000000000..34368d2877 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/locale/get-countries-phones.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Locale + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Locale locale = new Locale(client); + + locale.getCountriesPhones(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/locale/get-countries.md b/docs/examples/0.14.x/client-android/java/locale/get-countries.md new file mode 100644 index 0000000000..f1c50fc8d1 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/locale/get-countries.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Locale + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Locale locale = new Locale(client); + + locale.getCountries(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/locale/get-currencies.md b/docs/examples/0.14.x/client-android/java/locale/get-currencies.md new file mode 100644 index 0000000000..63af14bbb3 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/locale/get-currencies.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Locale + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Locale locale = new Locale(client); + + locale.getCurrencies(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/locale/get-languages.md b/docs/examples/0.14.x/client-android/java/locale/get-languages.md new file mode 100644 index 0000000000..5952daafef --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/locale/get-languages.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Locale + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Locale locale = new Locale(client); + + locale.getLanguages(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/locale/get.md b/docs/examples/0.14.x/client-android/java/locale/get.md new file mode 100644 index 0000000000..417fc16f23 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/locale/get.md @@ -0,0 +1,46 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Locale + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Locale locale = new Locale(client); + + locale.get(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/storage/create-file.md b/docs/examples/0.14.x/client-android/java/storage/create-file.md new file mode 100644 index 0000000000..3b7099e216 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/storage/create-file.md @@ -0,0 +1,50 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Storage storage = new Storage(client); + + storage.createFile( + "[BUCKET_ID]", + "[FILE_ID]", + File("file.png"), + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/storage/delete-file.md b/docs/examples/0.14.x/client-android/java/storage/delete-file.md new file mode 100644 index 0000000000..585593a8cb --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/storage/delete-file.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Storage storage = new Storage(client); + + storage.deleteFile( + "[BUCKET_ID]", + "[FILE_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/storage/get-file-download.md b/docs/examples/0.14.x/client-android/java/storage/get-file-download.md new file mode 100644 index 0000000000..b16224804a --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/storage/get-file-download.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Storage storage = new Storage(client); + + storage.getFileDownload( + "[BUCKET_ID]", + "[FILE_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/storage/get-file-preview.md b/docs/examples/0.14.x/client-android/java/storage/get-file-preview.md new file mode 100644 index 0000000000..583c1a0a3c --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/storage/get-file-preview.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Storage storage = new Storage(client); + + storage.getFilePreview( + "[BUCKET_ID]", + "[FILE_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/storage/get-file-view.md b/docs/examples/0.14.x/client-android/java/storage/get-file-view.md new file mode 100644 index 0000000000..21a5074aca --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/storage/get-file-view.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Storage storage = new Storage(client); + + storage.getFileView( + "[BUCKET_ID]", + "[FILE_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/storage/get-file.md b/docs/examples/0.14.x/client-android/java/storage/get-file.md new file mode 100644 index 0000000000..61740a9a46 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/storage/get-file.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Storage storage = new Storage(client); + + storage.getFile( + "[BUCKET_ID]", + "[FILE_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/storage/list-files.md b/docs/examples/0.14.x/client-android/java/storage/list-files.md new file mode 100644 index 0000000000..a7ea06ec5b --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/storage/list-files.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Storage storage = new Storage(client); + + storage.listFiles( + "[BUCKET_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/storage/update-file.md b/docs/examples/0.14.x/client-android/java/storage/update-file.md new file mode 100644 index 0000000000..b3e8e904ef --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/storage/update-file.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Storage storage = new Storage(client); + + storage.updateFile( + "[BUCKET_ID]", + "[FILE_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/teams/create-membership.md b/docs/examples/0.14.x/client-android/java/teams/create-membership.md new file mode 100644 index 0000000000..f4d96de575 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/teams/create-membership.md @@ -0,0 +1,51 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Teams teams = new Teams(client); + + teams.createMembership( + "[TEAM_ID]", + "email@example.com", + listOf(), + "https://example.com", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/teams/create.md b/docs/examples/0.14.x/client-android/java/teams/create.md new file mode 100644 index 0000000000..3723b30b03 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/teams/create.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Teams teams = new Teams(client); + + teams.create( + "[TEAM_ID]", + "[NAME]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/teams/delete-membership.md b/docs/examples/0.14.x/client-android/java/teams/delete-membership.md new file mode 100644 index 0000000000..98cb29ac75 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/teams/delete-membership.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Teams teams = new Teams(client); + + teams.deleteMembership( + "[TEAM_ID]", + "[MEMBERSHIP_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/teams/delete.md b/docs/examples/0.14.x/client-android/java/teams/delete.md new file mode 100644 index 0000000000..828b457217 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/teams/delete.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Teams teams = new Teams(client); + + teams.delete( + "[TEAM_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/teams/get-membership.md b/docs/examples/0.14.x/client-android/java/teams/get-membership.md new file mode 100644 index 0000000000..87c0160bf1 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/teams/get-membership.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Teams teams = new Teams(client); + + teams.getMembership( + "[TEAM_ID]", + "[MEMBERSHIP_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/teams/get-memberships.md b/docs/examples/0.14.x/client-android/java/teams/get-memberships.md new file mode 100644 index 0000000000..d8a4100b98 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/teams/get-memberships.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Teams teams = new Teams(client); + + teams.getMemberships( + "[TEAM_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/teams/get.md b/docs/examples/0.14.x/client-android/java/teams/get.md new file mode 100644 index 0000000000..53ba33c4ca --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/teams/get.md @@ -0,0 +1,48 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Teams teams = new Teams(client); + + teams.get( + "[TEAM_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/teams/list.md b/docs/examples/0.14.x/client-android/java/teams/list.md new file mode 100644 index 0000000000..61c2aa3f8e --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/teams/list.md @@ -0,0 +1,47 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Teams teams = new Teams(client); + + teams.list( + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/teams/update-membership-roles.md b/docs/examples/0.14.x/client-android/java/teams/update-membership-roles.md new file mode 100644 index 0000000000..ef6c67307e --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/teams/update-membership-roles.md @@ -0,0 +1,50 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Teams teams = new Teams(client); + + teams.updateMembershipRoles( + "[TEAM_ID]", + "[MEMBERSHIP_ID]", + listOf() + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/teams/update-membership-status.md b/docs/examples/0.14.x/client-android/java/teams/update-membership-status.md new file mode 100644 index 0000000000..447d0da2c9 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/teams/update-membership-status.md @@ -0,0 +1,51 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Teams teams = new Teams(client); + + teams.updateMembershipStatus( + "[TEAM_ID]", + "[MEMBERSHIP_ID]", + "[USER_ID]", + "[SECRET]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/java/teams/update.md b/docs/examples/0.14.x/client-android/java/teams/update.md new file mode 100644 index 0000000000..b4df429a07 --- /dev/null +++ b/docs/examples/0.14.x/client-android/java/teams/update.md @@ -0,0 +1,49 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Client client = new Client(getApplicationContext()) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2"); // Your project ID + + Teams teams = new Teams(client); + + teams.update( + "[TEAM_ID]", + "[NAME]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + json = response.body().string(); + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/create-anonymous-session.md b/docs/examples/0.14.x/client-android/kotlin/account/create-anonymous-session.md new file mode 100644 index 0000000000..5fa06994fb --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/create-anonymous-session.md @@ -0,0 +1,24 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + val response = account.createAnonymousSession() + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/create-j-w-t.md b/docs/examples/0.14.x/client-android/kotlin/account/create-j-w-t.md new file mode 100644 index 0000000000..212838b7fd --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/create-j-w-t.md @@ -0,0 +1,24 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + val response = account.createJWT() + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/create-magic-u-r-l-session.md b/docs/examples/0.14.x/client-android/kotlin/account/create-magic-u-r-l-session.md new file mode 100644 index 0000000000..15fa1c7a9f --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/create-magic-u-r-l-session.md @@ -0,0 +1,27 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + val response = account.createMagicURLSession( + userId = "[USER_ID]", + email = "email@example.com", + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/create-o-auth2session.md b/docs/examples/0.14.x/client-android/kotlin/account/create-o-auth2session.md new file mode 100644 index 0000000000..baf993069a --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/create-o-auth2session.md @@ -0,0 +1,27 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + account.createOAuth2Session( + activity = this@MainActivity, + provider = "amazon", + ) + + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/create-recovery.md b/docs/examples/0.14.x/client-android/kotlin/account/create-recovery.md new file mode 100644 index 0000000000..2c1e7597b9 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/create-recovery.md @@ -0,0 +1,27 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + val response = account.createRecovery( + email = "email@example.com", + url = "https://example.com" + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/create-session.md b/docs/examples/0.14.x/client-android/kotlin/account/create-session.md new file mode 100644 index 0000000000..4999232e5b --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/create-session.md @@ -0,0 +1,27 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + val response = account.createSession( + email = "email@example.com", + password = "password" + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/create-verification.md b/docs/examples/0.14.x/client-android/kotlin/account/create-verification.md new file mode 100644 index 0000000000..1ebddee5cf --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/create-verification.md @@ -0,0 +1,26 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + val response = account.createVerification( + url = "https://example.com" + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/create.md b/docs/examples/0.14.x/client-android/kotlin/account/create.md new file mode 100644 index 0000000000..ab2534f1db --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/create.md @@ -0,0 +1,28 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + val response = account.create( + userId = "[USER_ID]", + email = "email@example.com", + password = "password", + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/delete-session.md b/docs/examples/0.14.x/client-android/kotlin/account/delete-session.md new file mode 100644 index 0000000000..e670623490 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/delete-session.md @@ -0,0 +1,26 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + val response = account.deleteSession( + sessionId = "[SESSION_ID]" + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/delete-sessions.md b/docs/examples/0.14.x/client-android/kotlin/account/delete-sessions.md new file mode 100644 index 0000000000..ec30efdb8f --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/delete-sessions.md @@ -0,0 +1,24 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + val response = account.deleteSessions() + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/get-logs.md b/docs/examples/0.14.x/client-android/kotlin/account/get-logs.md new file mode 100644 index 0000000000..b8c89f4985 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/get-logs.md @@ -0,0 +1,25 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + val response = account.getLogs( + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/get-prefs.md b/docs/examples/0.14.x/client-android/kotlin/account/get-prefs.md new file mode 100644 index 0000000000..9378cd2456 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/get-prefs.md @@ -0,0 +1,24 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + val response = account.getPrefs() + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/get-session.md b/docs/examples/0.14.x/client-android/kotlin/account/get-session.md new file mode 100644 index 0000000000..45f00b69fc --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/get-session.md @@ -0,0 +1,26 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + val response = account.getSession( + sessionId = "[SESSION_ID]" + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/get-sessions.md b/docs/examples/0.14.x/client-android/kotlin/account/get-sessions.md new file mode 100644 index 0000000000..4f939cc162 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/get-sessions.md @@ -0,0 +1,24 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + val response = account.getSessions() + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/get.md b/docs/examples/0.14.x/client-android/kotlin/account/get.md new file mode 100644 index 0000000000..c4c81a20aa --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/get.md @@ -0,0 +1,24 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + val response = account.get() + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/update-email.md b/docs/examples/0.14.x/client-android/kotlin/account/update-email.md new file mode 100644 index 0000000000..a9ec88b8a4 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/update-email.md @@ -0,0 +1,27 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + val response = account.updateEmail( + email = "email@example.com", + password = "password" + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/update-magic-u-r-l-session.md b/docs/examples/0.14.x/client-android/kotlin/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..3fe1b7c26e --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/update-magic-u-r-l-session.md @@ -0,0 +1,27 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + val response = account.updateMagicURLSession( + userId = "[USER_ID]", + secret = "[SECRET]" + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/update-name.md b/docs/examples/0.14.x/client-android/kotlin/account/update-name.md new file mode 100644 index 0000000000..ce9d8a368f --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/update-name.md @@ -0,0 +1,26 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + val response = account.updateName( + name = "[NAME]" + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/update-password.md b/docs/examples/0.14.x/client-android/kotlin/account/update-password.md new file mode 100644 index 0000000000..edee78eab9 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/update-password.md @@ -0,0 +1,26 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + val response = account.updatePassword( + password = "password", + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/update-prefs.md b/docs/examples/0.14.x/client-android/kotlin/account/update-prefs.md new file mode 100644 index 0000000000..3059bc8196 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/update-prefs.md @@ -0,0 +1,26 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + val response = account.updatePrefs( + prefs = mapOf( "a" to "b" ) + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/update-recovery.md b/docs/examples/0.14.x/client-android/kotlin/account/update-recovery.md new file mode 100644 index 0000000000..81c00b4f26 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/update-recovery.md @@ -0,0 +1,29 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + val response = account.updateRecovery( + userId = "[USER_ID]", + secret = "[SECRET]", + password = "password", + passwordAgain = "password" + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/update-session.md b/docs/examples/0.14.x/client-android/kotlin/account/update-session.md new file mode 100644 index 0000000000..465320d097 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/update-session.md @@ -0,0 +1,26 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + val response = account.updateSession( + sessionId = "[SESSION_ID]" + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/update-status.md b/docs/examples/0.14.x/client-android/kotlin/account/update-status.md new file mode 100644 index 0000000000..e138751287 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/update-status.md @@ -0,0 +1,24 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + val response = account.updateStatus() + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/account/update-verification.md b/docs/examples/0.14.x/client-android/kotlin/account/update-verification.md new file mode 100644 index 0000000000..cea2592a73 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/account/update-verification.md @@ -0,0 +1,27 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Account + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val account = Account(client) + + GlobalScope.launch { + val response = account.updateVerification( + userId = "[USER_ID]", + secret = "[SECRET]" + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/avatars/get-browser.md b/docs/examples/0.14.x/client-android/kotlin/avatars/get-browser.md new file mode 100644 index 0000000000..95a2201d6a --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/avatars/get-browser.md @@ -0,0 +1,26 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Avatars + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val avatars = Avatars(client) + + GlobalScope.launch { + val result = avatars.getBrowser( + code = "aa", + ) + println(result); // Resource URL + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/avatars/get-credit-card.md b/docs/examples/0.14.x/client-android/kotlin/avatars/get-credit-card.md new file mode 100644 index 0000000000..7507c40c5c --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/avatars/get-credit-card.md @@ -0,0 +1,26 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Avatars + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val avatars = Avatars(client) + + GlobalScope.launch { + val result = avatars.getCreditCard( + code = "amex", + ) + println(result); // Resource URL + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/avatars/get-favicon.md b/docs/examples/0.14.x/client-android/kotlin/avatars/get-favicon.md new file mode 100644 index 0000000000..f8e2b400a8 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/avatars/get-favicon.md @@ -0,0 +1,26 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Avatars + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val avatars = Avatars(client) + + GlobalScope.launch { + val result = avatars.getFavicon( + url = "https://example.com" + ) + println(result); // Resource URL + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/avatars/get-flag.md b/docs/examples/0.14.x/client-android/kotlin/avatars/get-flag.md new file mode 100644 index 0000000000..738ec8a91f --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/avatars/get-flag.md @@ -0,0 +1,26 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Avatars + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val avatars = Avatars(client) + + GlobalScope.launch { + val result = avatars.getFlag( + code = "af", + ) + println(result); // Resource URL + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/avatars/get-image.md b/docs/examples/0.14.x/client-android/kotlin/avatars/get-image.md new file mode 100644 index 0000000000..25171b1447 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/avatars/get-image.md @@ -0,0 +1,26 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Avatars + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val avatars = Avatars(client) + + GlobalScope.launch { + val result = avatars.getImage( + url = "https://example.com", + ) + println(result); // Resource URL + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/avatars/get-initials.md b/docs/examples/0.14.x/client-android/kotlin/avatars/get-initials.md new file mode 100644 index 0000000000..e53a647b09 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/avatars/get-initials.md @@ -0,0 +1,25 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Avatars + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val avatars = Avatars(client) + + GlobalScope.launch { + val result = avatars.getInitials( + ) + println(result); // Resource URL + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/avatars/get-q-r.md b/docs/examples/0.14.x/client-android/kotlin/avatars/get-q-r.md new file mode 100644 index 0000000000..c9d60ea9c7 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/avatars/get-q-r.md @@ -0,0 +1,26 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Avatars + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val avatars = Avatars(client) + + GlobalScope.launch { + val result = avatars.getQR( + text = "[TEXT]", + ) + println(result); // Resource URL + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/database/create-document.md b/docs/examples/0.14.x/client-android/kotlin/database/create-document.md new file mode 100644 index 0000000000..d207383e62 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/database/create-document.md @@ -0,0 +1,28 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Database + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val database = Database(client) + + GlobalScope.launch { + val response = database.createDocument( + collectionId = "[COLLECTION_ID]", + documentId = "[DOCUMENT_ID]", + data = mapOf( "a" to "b" ), + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/database/delete-document.md b/docs/examples/0.14.x/client-android/kotlin/database/delete-document.md new file mode 100644 index 0000000000..49a85c8ebb --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/database/delete-document.md @@ -0,0 +1,27 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Database + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val database = Database(client) + + GlobalScope.launch { + val response = database.deleteDocument( + collectionId = "[COLLECTION_ID]", + documentId = "[DOCUMENT_ID]" + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/database/get-document.md b/docs/examples/0.14.x/client-android/kotlin/database/get-document.md new file mode 100644 index 0000000000..3dd65c085d --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/database/get-document.md @@ -0,0 +1,27 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Database + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val database = Database(client) + + GlobalScope.launch { + val response = database.getDocument( + collectionId = "[COLLECTION_ID]", + documentId = "[DOCUMENT_ID]" + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/database/list-documents.md b/docs/examples/0.14.x/client-android/kotlin/database/list-documents.md new file mode 100644 index 0000000000..65119819fd --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/database/list-documents.md @@ -0,0 +1,26 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Database + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val database = Database(client) + + GlobalScope.launch { + val response = database.listDocuments( + collectionId = "[COLLECTION_ID]", + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/database/update-document.md b/docs/examples/0.14.x/client-android/kotlin/database/update-document.md new file mode 100644 index 0000000000..e19ce4a994 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/database/update-document.md @@ -0,0 +1,28 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Database + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val database = Database(client) + + GlobalScope.launch { + val response = database.updateDocument( + collectionId = "[COLLECTION_ID]", + documentId = "[DOCUMENT_ID]", + data = mapOf( "a" to "b" ), + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/functions/create-execution.md b/docs/examples/0.14.x/client-android/kotlin/functions/create-execution.md new file mode 100644 index 0000000000..3a7e599f8c --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/functions/create-execution.md @@ -0,0 +1,26 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Functions + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val functions = Functions(client) + + GlobalScope.launch { + val response = functions.createExecution( + functionId = "[FUNCTION_ID]", + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/functions/get-execution.md b/docs/examples/0.14.x/client-android/kotlin/functions/get-execution.md new file mode 100644 index 0000000000..781f26c743 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/functions/get-execution.md @@ -0,0 +1,27 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Functions + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val functions = Functions(client) + + GlobalScope.launch { + val response = functions.getExecution( + functionId = "[FUNCTION_ID]", + executionId = "[EXECUTION_ID]" + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/functions/list-executions.md b/docs/examples/0.14.x/client-android/kotlin/functions/list-executions.md new file mode 100644 index 0000000000..4f11574f0d --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/functions/list-executions.md @@ -0,0 +1,26 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Functions + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val functions = Functions(client) + + GlobalScope.launch { + val response = functions.listExecutions( + functionId = "[FUNCTION_ID]", + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/functions/retry-build.md b/docs/examples/0.14.x/client-android/kotlin/functions/retry-build.md new file mode 100644 index 0000000000..597421c9e3 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/functions/retry-build.md @@ -0,0 +1,28 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Functions + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val functions = Functions(client) + + GlobalScope.launch { + val response = functions.retryBuild( + functionId = "[FUNCTION_ID]", + deploymentId = "[DEPLOYMENT_ID]", + buildId = "[BUILD_ID]" + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/locale/get-continents.md b/docs/examples/0.14.x/client-android/kotlin/locale/get-continents.md new file mode 100644 index 0000000000..faf1448d73 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/locale/get-continents.md @@ -0,0 +1,24 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Locale + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val locale = Locale(client) + + GlobalScope.launch { + val response = locale.getContinents() + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/locale/get-countries-e-u.md b/docs/examples/0.14.x/client-android/kotlin/locale/get-countries-e-u.md new file mode 100644 index 0000000000..5a3552f1a7 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/locale/get-countries-e-u.md @@ -0,0 +1,24 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Locale + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val locale = Locale(client) + + GlobalScope.launch { + val response = locale.getCountriesEU() + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/locale/get-countries-phones.md b/docs/examples/0.14.x/client-android/kotlin/locale/get-countries-phones.md new file mode 100644 index 0000000000..565097ef4b --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/locale/get-countries-phones.md @@ -0,0 +1,24 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Locale + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val locale = Locale(client) + + GlobalScope.launch { + val response = locale.getCountriesPhones() + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/locale/get-countries.md b/docs/examples/0.14.x/client-android/kotlin/locale/get-countries.md new file mode 100644 index 0000000000..e327c14ab8 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/locale/get-countries.md @@ -0,0 +1,24 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Locale + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val locale = Locale(client) + + GlobalScope.launch { + val response = locale.getCountries() + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/locale/get-currencies.md b/docs/examples/0.14.x/client-android/kotlin/locale/get-currencies.md new file mode 100644 index 0000000000..00e11999e6 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/locale/get-currencies.md @@ -0,0 +1,24 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Locale + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val locale = Locale(client) + + GlobalScope.launch { + val response = locale.getCurrencies() + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/locale/get-languages.md b/docs/examples/0.14.x/client-android/kotlin/locale/get-languages.md new file mode 100644 index 0000000000..796747a00d --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/locale/get-languages.md @@ -0,0 +1,24 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Locale + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val locale = Locale(client) + + GlobalScope.launch { + val response = locale.getLanguages() + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/locale/get.md b/docs/examples/0.14.x/client-android/kotlin/locale/get.md new file mode 100644 index 0000000000..f89c66a7ed --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/locale/get.md @@ -0,0 +1,24 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Locale + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val locale = Locale(client) + + GlobalScope.launch { + val response = locale.get() + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/storage/create-file.md b/docs/examples/0.14.x/client-android/kotlin/storage/create-file.md new file mode 100644 index 0000000000..c5cc6a3b24 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/storage/create-file.md @@ -0,0 +1,28 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val storage = Storage(client) + + GlobalScope.launch { + val response = storage.createFile( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]", + file = File("file.png"), + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/storage/delete-file.md b/docs/examples/0.14.x/client-android/kotlin/storage/delete-file.md new file mode 100644 index 0000000000..1a4a5b9da1 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/storage/delete-file.md @@ -0,0 +1,27 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val storage = Storage(client) + + GlobalScope.launch { + val response = storage.deleteFile( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]" + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/storage/get-file-download.md b/docs/examples/0.14.x/client-android/kotlin/storage/get-file-download.md new file mode 100644 index 0000000000..3970fb8245 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/storage/get-file-download.md @@ -0,0 +1,27 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val storage = Storage(client) + + GlobalScope.launch { + val result = storage.getFileDownload( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]" + ) + println(result); // Resource URL + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/storage/get-file-preview.md b/docs/examples/0.14.x/client-android/kotlin/storage/get-file-preview.md new file mode 100644 index 0000000000..780452729e --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/storage/get-file-preview.md @@ -0,0 +1,27 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val storage = Storage(client) + + GlobalScope.launch { + val result = storage.getFilePreview( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]", + ) + println(result); // Resource URL + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/storage/get-file-view.md b/docs/examples/0.14.x/client-android/kotlin/storage/get-file-view.md new file mode 100644 index 0000000000..107ad45679 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/storage/get-file-view.md @@ -0,0 +1,27 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val storage = Storage(client) + + GlobalScope.launch { + val result = storage.getFileView( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]" + ) + println(result); // Resource URL + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/storage/get-file.md b/docs/examples/0.14.x/client-android/kotlin/storage/get-file.md new file mode 100644 index 0000000000..30f640ba35 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/storage/get-file.md @@ -0,0 +1,27 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val storage = Storage(client) + + GlobalScope.launch { + val response = storage.getFile( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]" + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/storage/list-files.md b/docs/examples/0.14.x/client-android/kotlin/storage/list-files.md new file mode 100644 index 0000000000..20a253ab07 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/storage/list-files.md @@ -0,0 +1,26 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val storage = Storage(client) + + GlobalScope.launch { + val response = storage.listFiles( + bucketId = "[BUCKET_ID]", + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/storage/update-file.md b/docs/examples/0.14.x/client-android/kotlin/storage/update-file.md new file mode 100644 index 0000000000..35b1afb939 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/storage/update-file.md @@ -0,0 +1,27 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Storage + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val storage = Storage(client) + + GlobalScope.launch { + val response = storage.updateFile( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]", + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/teams/create-membership.md b/docs/examples/0.14.x/client-android/kotlin/teams/create-membership.md new file mode 100644 index 0000000000..e2b7d16bfc --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/teams/create-membership.md @@ -0,0 +1,29 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val teams = Teams(client) + + GlobalScope.launch { + val response = teams.createMembership( + teamId = "[TEAM_ID]", + email = "email@example.com", + roles = listOf(), + url = "https://example.com", + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/teams/create.md b/docs/examples/0.14.x/client-android/kotlin/teams/create.md new file mode 100644 index 0000000000..73857b80bb --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/teams/create.md @@ -0,0 +1,27 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val teams = Teams(client) + + GlobalScope.launch { + val response = teams.create( + teamId = "[TEAM_ID]", + name = "[NAME]", + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/teams/delete-membership.md b/docs/examples/0.14.x/client-android/kotlin/teams/delete-membership.md new file mode 100644 index 0000000000..6545af5de7 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/teams/delete-membership.md @@ -0,0 +1,27 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val teams = Teams(client) + + GlobalScope.launch { + val response = teams.deleteMembership( + teamId = "[TEAM_ID]", + membershipId = "[MEMBERSHIP_ID]" + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/teams/delete.md b/docs/examples/0.14.x/client-android/kotlin/teams/delete.md new file mode 100644 index 0000000000..de12449562 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/teams/delete.md @@ -0,0 +1,26 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val teams = Teams(client) + + GlobalScope.launch { + val response = teams.delete( + teamId = "[TEAM_ID]" + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/teams/get-membership.md b/docs/examples/0.14.x/client-android/kotlin/teams/get-membership.md new file mode 100644 index 0000000000..aa3f29e74d --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/teams/get-membership.md @@ -0,0 +1,27 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val teams = Teams(client) + + GlobalScope.launch { + val response = teams.getMembership( + teamId = "[TEAM_ID]", + membershipId = "[MEMBERSHIP_ID]" + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/teams/get-memberships.md b/docs/examples/0.14.x/client-android/kotlin/teams/get-memberships.md new file mode 100644 index 0000000000..89b4f54559 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/teams/get-memberships.md @@ -0,0 +1,26 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val teams = Teams(client) + + GlobalScope.launch { + val response = teams.getMemberships( + teamId = "[TEAM_ID]", + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/teams/get.md b/docs/examples/0.14.x/client-android/kotlin/teams/get.md new file mode 100644 index 0000000000..54550b3ed6 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/teams/get.md @@ -0,0 +1,26 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val teams = Teams(client) + + GlobalScope.launch { + val response = teams.get( + teamId = "[TEAM_ID]" + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/teams/list.md b/docs/examples/0.14.x/client-android/kotlin/teams/list.md new file mode 100644 index 0000000000..6444205472 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/teams/list.md @@ -0,0 +1,25 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val teams = Teams(client) + + GlobalScope.launch { + val response = teams.list( + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/teams/update-membership-roles.md b/docs/examples/0.14.x/client-android/kotlin/teams/update-membership-roles.md new file mode 100644 index 0000000000..d9a8a41895 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/teams/update-membership-roles.md @@ -0,0 +1,28 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val teams = Teams(client) + + GlobalScope.launch { + val response = teams.updateMembershipRoles( + teamId = "[TEAM_ID]", + membershipId = "[MEMBERSHIP_ID]", + roles = listOf() + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/teams/update-membership-status.md b/docs/examples/0.14.x/client-android/kotlin/teams/update-membership-status.md new file mode 100644 index 0000000000..f8e10fdafc --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/teams/update-membership-status.md @@ -0,0 +1,29 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val teams = Teams(client) + + GlobalScope.launch { + val response = teams.updateMembershipStatus( + teamId = "[TEAM_ID]", + membershipId = "[MEMBERSHIP_ID]", + userId = "[USER_ID]", + secret = "[SECRET]" + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-android/kotlin/teams/update.md b/docs/examples/0.14.x/client-android/kotlin/teams/update.md new file mode 100644 index 0000000000..59dd69f081 --- /dev/null +++ b/docs/examples/0.14.x/client-android/kotlin/teams/update.md @@ -0,0 +1,27 @@ +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.appwrite.Client +import io.appwrite.services.Teams + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val client = Client(applicationContext) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + + val teams = Teams(client) + + GlobalScope.launch { + val response = teams.update( + teamId = "[TEAM_ID]", + name = "[NAME]" + ) + val json = response.body?.string() + } + } +} \ No newline at end of file diff --git a/docs/examples/0.14.x/client-apple/examples/account/create-anonymous-session.md b/docs/examples/0.14.x/client-apple/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..d2d71b9f00 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/create-anonymous-session.md @@ -0,0 +1,11 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let session = try await account.createAnonymousSession() + + print(String(describing: session) +} diff --git a/docs/examples/0.14.x/client-apple/examples/account/create-j-w-t.md b/docs/examples/0.14.x/client-apple/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..51952f9953 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/create-j-w-t.md @@ -0,0 +1,11 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let jwt = try await account.createJWT() + + print(String(describing: jwt) +} diff --git a/docs/examples/0.14.x/client-apple/examples/account/create-magic-u-r-l-session.md b/docs/examples/0.14.x/client-apple/examples/account/create-magic-u-r-l-session.md new file mode 100644 index 0000000000..3eab67aac4 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/create-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let token = try await account.createMagicURLSession( + userId: "[USER_ID]", + email: "email@example.com" + ) + + print(String(describing: token) +} diff --git a/docs/examples/0.14.x/client-apple/examples/account/create-o-auth2session.md b/docs/examples/0.14.x/client-apple/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..ddd7eb28a4 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/create-o-auth2session.md @@ -0,0 +1,13 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let success = try await account.createOAuth2Session( + provider: "amazon" + ) + + print(String(describing: success) +} diff --git a/docs/examples/0.14.x/client-apple/examples/account/create-recovery.md b/docs/examples/0.14.x/client-apple/examples/account/create-recovery.md new file mode 100644 index 0000000000..1f2d9b9e05 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let token = try await account.createRecovery( + email: "email@example.com", + url: "https://example.com" + ) + + print(String(describing: token) +} diff --git a/docs/examples/0.14.x/client-apple/examples/account/create-session.md b/docs/examples/0.14.x/client-apple/examples/account/create-session.md new file mode 100644 index 0000000000..dcaf9caa67 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/create-session.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let session = try await account.createSession( + email: "email@example.com", + password: "password" + ) + + print(String(describing: session) +} diff --git a/docs/examples/0.14.x/client-apple/examples/account/create-verification.md b/docs/examples/0.14.x/client-apple/examples/account/create-verification.md new file mode 100644 index 0000000000..cd0f9d5c87 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/create-verification.md @@ -0,0 +1,13 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let token = try await account.createVerification( + url: "https://example.com" + ) + + print(String(describing: token) +} diff --git a/docs/examples/0.14.x/client-apple/examples/account/create.md b/docs/examples/0.14.x/client-apple/examples/account/create.md new file mode 100644 index 0000000000..346f7da6e4 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/create.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let user = try await account.create( + userId: "[USER_ID]", + email: "email@example.com", + password: "password" + ) + + print(String(describing: user) +} diff --git a/docs/examples/0.14.x/client-apple/examples/account/delete-session.md b/docs/examples/0.14.x/client-apple/examples/account/delete-session.md new file mode 100644 index 0000000000..6f3dd76905 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/delete-session.md @@ -0,0 +1,13 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let result = try await account.deleteSession( + sessionId: "[SESSION_ID]" + ) + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/client-apple/examples/account/delete-sessions.md b/docs/examples/0.14.x/client-apple/examples/account/delete-sessions.md new file mode 100644 index 0000000000..f2721be95e --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/delete-sessions.md @@ -0,0 +1,11 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let result = try await account.deleteSessions() + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/client-apple/examples/account/get-logs.md b/docs/examples/0.14.x/client-apple/examples/account/get-logs.md new file mode 100644 index 0000000000..326672e682 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/get-logs.md @@ -0,0 +1,11 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let logList = try await account.getLogs() + + print(String(describing: logList) +} diff --git a/docs/examples/0.14.x/client-apple/examples/account/get-prefs.md b/docs/examples/0.14.x/client-apple/examples/account/get-prefs.md new file mode 100644 index 0000000000..6fb47ce31f --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/get-prefs.md @@ -0,0 +1,11 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let preferences = try await account.getPrefs() + + print(String(describing: preferences) +} diff --git a/docs/examples/0.14.x/client-apple/examples/account/get-session.md b/docs/examples/0.14.x/client-apple/examples/account/get-session.md new file mode 100644 index 0000000000..fa15d6d222 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/get-session.md @@ -0,0 +1,13 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let session = try await account.getSession( + sessionId: "[SESSION_ID]" + ) + + print(String(describing: session) +} diff --git a/docs/examples/0.14.x/client-apple/examples/account/get-sessions.md b/docs/examples/0.14.x/client-apple/examples/account/get-sessions.md new file mode 100644 index 0000000000..81c02bbaf3 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/get-sessions.md @@ -0,0 +1,11 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let sessionList = try await account.getSessions() + + print(String(describing: sessionList) +} diff --git a/docs/examples/0.14.x/client-apple/examples/account/get.md b/docs/examples/0.14.x/client-apple/examples/account/get.md new file mode 100644 index 0000000000..822dc3007f --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/get.md @@ -0,0 +1,11 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let user = try await account.get() + + print(String(describing: user) +} diff --git a/docs/examples/0.14.x/client-apple/examples/account/update-email.md b/docs/examples/0.14.x/client-apple/examples/account/update-email.md new file mode 100644 index 0000000000..ec74963844 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/update-email.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let user = try await account.updateEmail( + email: "email@example.com", + password: "password" + ) + + print(String(describing: user) +} diff --git a/docs/examples/0.14.x/client-apple/examples/account/update-magic-u-r-l-session.md b/docs/examples/0.14.x/client-apple/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..34bfab9e80 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let session = try await account.updateMagicURLSession( + userId: "[USER_ID]", + secret: "[SECRET]" + ) + + print(String(describing: session) +} diff --git a/docs/examples/0.14.x/client-apple/examples/account/update-name.md b/docs/examples/0.14.x/client-apple/examples/account/update-name.md new file mode 100644 index 0000000000..a757f95253 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/update-name.md @@ -0,0 +1,13 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let user = try await account.updateName( + name: "[NAME]" + ) + + print(String(describing: user) +} diff --git a/docs/examples/0.14.x/client-apple/examples/account/update-password.md b/docs/examples/0.14.x/client-apple/examples/account/update-password.md new file mode 100644 index 0000000000..0c36e41f42 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/update-password.md @@ -0,0 +1,13 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let user = try await account.updatePassword( + password: "password" + ) + + print(String(describing: user) +} diff --git a/docs/examples/0.14.x/client-apple/examples/account/update-prefs.md b/docs/examples/0.14.x/client-apple/examples/account/update-prefs.md new file mode 100644 index 0000000000..d9197a5482 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/update-prefs.md @@ -0,0 +1,13 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let user = try await account.updatePrefs( + prefs: + ) + + print(String(describing: user) +} diff --git a/docs/examples/0.14.x/client-apple/examples/account/update-recovery.md b/docs/examples/0.14.x/client-apple/examples/account/update-recovery.md new file mode 100644 index 0000000000..f412c0f35a --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/update-recovery.md @@ -0,0 +1,16 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let token = try await account.updateRecovery( + userId: "[USER_ID]", + secret: "[SECRET]", + password: "password", + passwordAgain: "password" + ) + + print(String(describing: token) +} diff --git a/docs/examples/0.14.x/client-apple/examples/account/update-session.md b/docs/examples/0.14.x/client-apple/examples/account/update-session.md new file mode 100644 index 0000000000..1d9282641c --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/update-session.md @@ -0,0 +1,13 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let session = try await account.updateSession( + sessionId: "[SESSION_ID]" + ) + + print(String(describing: session) +} diff --git a/docs/examples/0.14.x/client-apple/examples/account/update-status.md b/docs/examples/0.14.x/client-apple/examples/account/update-status.md new file mode 100644 index 0000000000..cdb26ddda4 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/update-status.md @@ -0,0 +1,11 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let user = try await account.updateStatus() + + print(String(describing: user) +} diff --git a/docs/examples/0.14.x/client-apple/examples/account/update-verification.md b/docs/examples/0.14.x/client-apple/examples/account/update-verification.md new file mode 100644 index 0000000000..10e46b19d1 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/account/update-verification.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let account = Account(client) + let token = try await account.updateVerification( + userId: "[USER_ID]", + secret: "[SECRET]" + ) + + print(String(describing: token) +} diff --git a/docs/examples/0.14.x/client-apple/examples/avatars/get-browser.md b/docs/examples/0.14.x/client-apple/examples/avatars/get-browser.md new file mode 100644 index 0000000000..536d9b6167 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/avatars/get-browser.md @@ -0,0 +1,13 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let avatars = Avatars(client) + let byteBuffer = try await avatars.getBrowser( + code: "aa" + ) + + print(String(describing: byteBuffer) +} diff --git a/docs/examples/0.14.x/client-apple/examples/avatars/get-credit-card.md b/docs/examples/0.14.x/client-apple/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..7dff9411d0 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/avatars/get-credit-card.md @@ -0,0 +1,13 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let avatars = Avatars(client) + let byteBuffer = try await avatars.getCreditCard( + code: "amex" + ) + + print(String(describing: byteBuffer) +} diff --git a/docs/examples/0.14.x/client-apple/examples/avatars/get-favicon.md b/docs/examples/0.14.x/client-apple/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..1e2afab969 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/avatars/get-favicon.md @@ -0,0 +1,13 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let avatars = Avatars(client) + let byteBuffer = try await avatars.getFavicon( + url: "https://example.com" + ) + + print(String(describing: byteBuffer) +} diff --git a/docs/examples/0.14.x/client-apple/examples/avatars/get-flag.md b/docs/examples/0.14.x/client-apple/examples/avatars/get-flag.md new file mode 100644 index 0000000000..43035a3530 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/avatars/get-flag.md @@ -0,0 +1,13 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let avatars = Avatars(client) + let byteBuffer = try await avatars.getFlag( + code: "af" + ) + + print(String(describing: byteBuffer) +} diff --git a/docs/examples/0.14.x/client-apple/examples/avatars/get-image.md b/docs/examples/0.14.x/client-apple/examples/avatars/get-image.md new file mode 100644 index 0000000000..a28299c153 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/avatars/get-image.md @@ -0,0 +1,13 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let avatars = Avatars(client) + let byteBuffer = try await avatars.getImage( + url: "https://example.com" + ) + + print(String(describing: byteBuffer) +} diff --git a/docs/examples/0.14.x/client-apple/examples/avatars/get-initials.md b/docs/examples/0.14.x/client-apple/examples/avatars/get-initials.md new file mode 100644 index 0000000000..df22100428 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/avatars/get-initials.md @@ -0,0 +1,11 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let avatars = Avatars(client) + let byteBuffer = try await avatars.getInitials() + + print(String(describing: byteBuffer) +} diff --git a/docs/examples/0.14.x/client-apple/examples/avatars/get-q-r.md b/docs/examples/0.14.x/client-apple/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..a9e3e9bae1 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/avatars/get-q-r.md @@ -0,0 +1,13 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let avatars = Avatars(client) + let byteBuffer = try await avatars.getQR( + text: "[TEXT]" + ) + + print(String(describing: byteBuffer) +} diff --git a/docs/examples/0.14.x/client-apple/examples/database/create-document.md b/docs/examples/0.14.x/client-apple/examples/database/create-document.md new file mode 100644 index 0000000000..416580a46f --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/database/create-document.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let database = Database(client) + let document = try await database.createDocument( + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]", + data: + ) + + print(String(describing: document) +} diff --git a/docs/examples/0.14.x/client-apple/examples/database/delete-document.md b/docs/examples/0.14.x/client-apple/examples/database/delete-document.md new file mode 100644 index 0000000000..04eecbf316 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/database/delete-document.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let database = Database(client) + let result = try await database.deleteDocument( + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]" + ) + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/client-apple/examples/database/get-document.md b/docs/examples/0.14.x/client-apple/examples/database/get-document.md new file mode 100644 index 0000000000..26ad5a0b17 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/database/get-document.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let database = Database(client) + let document = try await database.getDocument( + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]" + ) + + print(String(describing: document) +} diff --git a/docs/examples/0.14.x/client-apple/examples/database/list-documents.md b/docs/examples/0.14.x/client-apple/examples/database/list-documents.md new file mode 100644 index 0000000000..f11cc2793f --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/database/list-documents.md @@ -0,0 +1,13 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let database = Database(client) + let documentList = try await database.listDocuments( + collectionId: "[COLLECTION_ID]" + ) + + print(String(describing: documentList) +} diff --git a/docs/examples/0.14.x/client-apple/examples/database/update-document.md b/docs/examples/0.14.x/client-apple/examples/database/update-document.md new file mode 100644 index 0000000000..dc1e5646ac --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/database/update-document.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let database = Database(client) + let document = try await database.updateDocument( + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]", + data: + ) + + print(String(describing: document) +} diff --git a/docs/examples/0.14.x/client-apple/examples/functions/create-execution.md b/docs/examples/0.14.x/client-apple/examples/functions/create-execution.md new file mode 100644 index 0000000000..f086125c35 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/functions/create-execution.md @@ -0,0 +1,13 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let functions = Functions(client) + let execution = try await functions.createExecution( + functionId: "[FUNCTION_ID]" + ) + + print(String(describing: execution) +} diff --git a/docs/examples/0.14.x/client-apple/examples/functions/get-execution.md b/docs/examples/0.14.x/client-apple/examples/functions/get-execution.md new file mode 100644 index 0000000000..503c7f5412 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let functions = Functions(client) + let execution = try await functions.getExecution( + functionId: "[FUNCTION_ID]", + executionId: "[EXECUTION_ID]" + ) + + print(String(describing: execution) +} diff --git a/docs/examples/0.14.x/client-apple/examples/functions/list-executions.md b/docs/examples/0.14.x/client-apple/examples/functions/list-executions.md new file mode 100644 index 0000000000..45da8ee7a2 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/functions/list-executions.md @@ -0,0 +1,13 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let functions = Functions(client) + let executionList = try await functions.listExecutions( + functionId: "[FUNCTION_ID]" + ) + + print(String(describing: executionList) +} diff --git a/docs/examples/0.14.x/client-apple/examples/functions/retry-build.md b/docs/examples/0.14.x/client-apple/examples/functions/retry-build.md new file mode 100644 index 0000000000..1869dc8a61 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/functions/retry-build.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let functions = Functions(client) + let result = try await functions.retryBuild( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]", + buildId: "[BUILD_ID]" + ) + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/client-apple/examples/locale/get-continents.md b/docs/examples/0.14.x/client-apple/examples/locale/get-continents.md new file mode 100644 index 0000000000..efd4ffcda3 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/locale/get-continents.md @@ -0,0 +1,11 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let locale = Locale(client) + let continentList = try await locale.getContinents() + + print(String(describing: continentList) +} diff --git a/docs/examples/0.14.x/client-apple/examples/locale/get-countries-e-u.md b/docs/examples/0.14.x/client-apple/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..74837af07c --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/locale/get-countries-e-u.md @@ -0,0 +1,11 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let locale = Locale(client) + let countryList = try await locale.getCountriesEU() + + print(String(describing: countryList) +} diff --git a/docs/examples/0.14.x/client-apple/examples/locale/get-countries-phones.md b/docs/examples/0.14.x/client-apple/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..6a9b72c197 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/locale/get-countries-phones.md @@ -0,0 +1,11 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let locale = Locale(client) + let phoneList = try await locale.getCountriesPhones() + + print(String(describing: phoneList) +} diff --git a/docs/examples/0.14.x/client-apple/examples/locale/get-countries.md b/docs/examples/0.14.x/client-apple/examples/locale/get-countries.md new file mode 100644 index 0000000000..f753379f59 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/locale/get-countries.md @@ -0,0 +1,11 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let locale = Locale(client) + let countryList = try await locale.getCountries() + + print(String(describing: countryList) +} diff --git a/docs/examples/0.14.x/client-apple/examples/locale/get-currencies.md b/docs/examples/0.14.x/client-apple/examples/locale/get-currencies.md new file mode 100644 index 0000000000..9282fef954 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/locale/get-currencies.md @@ -0,0 +1,11 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let locale = Locale(client) + let currencyList = try await locale.getCurrencies() + + print(String(describing: currencyList) +} diff --git a/docs/examples/0.14.x/client-apple/examples/locale/get-languages.md b/docs/examples/0.14.x/client-apple/examples/locale/get-languages.md new file mode 100644 index 0000000000..bc178e6b7a --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/locale/get-languages.md @@ -0,0 +1,11 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let locale = Locale(client) + let languageList = try await locale.getLanguages() + + print(String(describing: languageList) +} diff --git a/docs/examples/0.14.x/client-apple/examples/locale/get.md b/docs/examples/0.14.x/client-apple/examples/locale/get.md new file mode 100644 index 0000000000..2b6101c5ed --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/locale/get.md @@ -0,0 +1,11 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let locale = Locale(client) + let locale = try await locale.get() + + print(String(describing: locale) +} diff --git a/docs/examples/0.14.x/client-apple/examples/storage/create-file.md b/docs/examples/0.14.x/client-apple/examples/storage/create-file.md new file mode 100644 index 0000000000..84e4af6425 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/storage/create-file.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let storage = Storage(client) + let file = try await storage.createFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]", + file: File(name: "image.jpg", buffer: yourByteBuffer) + ) + + print(String(describing: file) +} diff --git a/docs/examples/0.14.x/client-apple/examples/storage/delete-file.md b/docs/examples/0.14.x/client-apple/examples/storage/delete-file.md new file mode 100644 index 0000000000..5bad56677d --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let storage = Storage(client) + let result = try await storage.deleteFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/client-apple/examples/storage/get-file-download.md b/docs/examples/0.14.x/client-apple/examples/storage/get-file-download.md new file mode 100644 index 0000000000..1504f78d33 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let storage = Storage(client) + let byteBuffer = try await storage.getFileDownload( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) + + print(String(describing: byteBuffer) +} diff --git a/docs/examples/0.14.x/client-apple/examples/storage/get-file-preview.md b/docs/examples/0.14.x/client-apple/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..33b80c49ae --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/storage/get-file-preview.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let storage = Storage(client) + let byteBuffer = try await storage.getFilePreview( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) + + print(String(describing: byteBuffer) +} diff --git a/docs/examples/0.14.x/client-apple/examples/storage/get-file-view.md b/docs/examples/0.14.x/client-apple/examples/storage/get-file-view.md new file mode 100644 index 0000000000..7e3524aabb --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let storage = Storage(client) + let byteBuffer = try await storage.getFileView( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) + + print(String(describing: byteBuffer) +} diff --git a/docs/examples/0.14.x/client-apple/examples/storage/get-file.md b/docs/examples/0.14.x/client-apple/examples/storage/get-file.md new file mode 100644 index 0000000000..1f2fae973d --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/storage/get-file.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let storage = Storage(client) + let file = try await storage.getFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) + + print(String(describing: file) +} diff --git a/docs/examples/0.14.x/client-apple/examples/storage/list-files.md b/docs/examples/0.14.x/client-apple/examples/storage/list-files.md new file mode 100644 index 0000000000..01ae959e43 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/storage/list-files.md @@ -0,0 +1,13 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let storage = Storage(client) + let fileList = try await storage.listFiles( + bucketId: "[BUCKET_ID]" + ) + + print(String(describing: fileList) +} diff --git a/docs/examples/0.14.x/client-apple/examples/storage/update-file.md b/docs/examples/0.14.x/client-apple/examples/storage/update-file.md new file mode 100644 index 0000000000..85503f0199 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/storage/update-file.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let storage = Storage(client) + let file = try await storage.updateFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) + + print(String(describing: file) +} diff --git a/docs/examples/0.14.x/client-apple/examples/teams/create-membership.md b/docs/examples/0.14.x/client-apple/examples/teams/create-membership.md new file mode 100644 index 0000000000..5a81e431d9 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/teams/create-membership.md @@ -0,0 +1,16 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let teams = Teams(client) + let membership = try await teams.createMembership( + teamId: "[TEAM_ID]", + email: "email@example.com", + roles: [], + url: "https://example.com" + ) + + print(String(describing: membership) +} diff --git a/docs/examples/0.14.x/client-apple/examples/teams/create.md b/docs/examples/0.14.x/client-apple/examples/teams/create.md new file mode 100644 index 0000000000..227ceb37b2 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/teams/create.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let teams = Teams(client) + let team = try await teams.create( + teamId: "[TEAM_ID]", + name: "[NAME]" + ) + + print(String(describing: team) +} diff --git a/docs/examples/0.14.x/client-apple/examples/teams/delete-membership.md b/docs/examples/0.14.x/client-apple/examples/teams/delete-membership.md new file mode 100644 index 0000000000..46a1ad7728 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let teams = Teams(client) + let result = try await teams.deleteMembership( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]" + ) + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/client-apple/examples/teams/delete.md b/docs/examples/0.14.x/client-apple/examples/teams/delete.md new file mode 100644 index 0000000000..d117a8bbf7 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/teams/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let teams = Teams(client) + let result = try await teams.delete( + teamId: "[TEAM_ID]" + ) + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/client-apple/examples/teams/get-membership.md b/docs/examples/0.14.x/client-apple/examples/teams/get-membership.md new file mode 100644 index 0000000000..46bd83ecd6 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let teams = Teams(client) + let membershipList = try await teams.getMembership( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]" + ) + + print(String(describing: membershipList) +} diff --git a/docs/examples/0.14.x/client-apple/examples/teams/get-memberships.md b/docs/examples/0.14.x/client-apple/examples/teams/get-memberships.md new file mode 100644 index 0000000000..32e79a6faf --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/teams/get-memberships.md @@ -0,0 +1,13 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let teams = Teams(client) + let membershipList = try await teams.getMemberships( + teamId: "[TEAM_ID]" + ) + + print(String(describing: membershipList) +} diff --git a/docs/examples/0.14.x/client-apple/examples/teams/get.md b/docs/examples/0.14.x/client-apple/examples/teams/get.md new file mode 100644 index 0000000000..e4e0b9b68b --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/teams/get.md @@ -0,0 +1,13 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let teams = Teams(client) + let team = try await teams.get( + teamId: "[TEAM_ID]" + ) + + print(String(describing: team) +} diff --git a/docs/examples/0.14.x/client-apple/examples/teams/list.md b/docs/examples/0.14.x/client-apple/examples/teams/list.md new file mode 100644 index 0000000000..a1e454fd6c --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/teams/list.md @@ -0,0 +1,11 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let teams = Teams(client) + let teamList = try await teams.list() + + print(String(describing: teamList) +} diff --git a/docs/examples/0.14.x/client-apple/examples/teams/update-membership-roles.md b/docs/examples/0.14.x/client-apple/examples/teams/update-membership-roles.md new file mode 100644 index 0000000000..68ed875e42 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/teams/update-membership-roles.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let teams = Teams(client) + let membership = try await teams.updateMembershipRoles( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]", + roles: [] + ) + + print(String(describing: membership) +} diff --git a/docs/examples/0.14.x/client-apple/examples/teams/update-membership-status.md b/docs/examples/0.14.x/client-apple/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..9712539a6e --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/teams/update-membership-status.md @@ -0,0 +1,16 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let teams = Teams(client) + let membership = try await teams.updateMembershipStatus( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]", + userId: "[USER_ID]", + secret: "[SECRET]" + ) + + print(String(describing: membership) +} diff --git a/docs/examples/0.14.x/client-apple/examples/teams/update.md b/docs/examples/0.14.x/client-apple/examples/teams/update.md new file mode 100644 index 0000000000..90a4332756 --- /dev/null +++ b/docs/examples/0.14.x/client-apple/examples/teams/update.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + let teams = Teams(client) + let team = try await teams.update( + teamId: "[TEAM_ID]", + name: "[NAME]" + ) + + print(String(describing: team) +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/create-anonymous-session.md b/docs/examples/0.14.x/client-flutter/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..01b43744b0 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/create-anonymous-session.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.createAnonymousSession(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/create-j-w-t.md b/docs/examples/0.14.x/client-flutter/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..f88c7ad3ea --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/create-j-w-t.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.createJWT(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/create-magic-u-r-l-session.md b/docs/examples/0.14.x/client-flutter/examples/account/create-magic-u-r-l-session.md new file mode 100644 index 0000000000..4d36b45b30 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/create-magic-u-r-l-session.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.createMagicURLSession( + userId: '[USER_ID]', + email: 'email@example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/create-o-auth2session.md b/docs/examples/0.14.x/client-flutter/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..a100378a00 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/create-o-auth2session.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.createOAuth2Session( + provider: 'amazon', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/create-recovery.md b/docs/examples/0.14.x/client-flutter/examples/account/create-recovery.md new file mode 100644 index 0000000000..2a5df1aa49 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/create-recovery.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.createRecovery( + email: 'email@example.com', + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/create-session.md b/docs/examples/0.14.x/client-flutter/examples/account/create-session.md new file mode 100644 index 0000000000..6233665a43 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/create-session.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.createSession( + email: 'email@example.com', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/create-verification.md b/docs/examples/0.14.x/client-flutter/examples/account/create-verification.md new file mode 100644 index 0000000000..18fa98aed2 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/create-verification.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.createVerification( + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/create.md b/docs/examples/0.14.x/client-flutter/examples/account/create.md new file mode 100644 index 0000000000..37447d9810 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/create.md @@ -0,0 +1,23 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.create( + userId: '[USER_ID]', + email: 'email@example.com', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/delete-session.md b/docs/examples/0.14.x/client-flutter/examples/account/delete-session.md new file mode 100644 index 0000000000..c116ef1188 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/delete-session.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.deleteSession( + sessionId: '[SESSION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/delete-sessions.md b/docs/examples/0.14.x/client-flutter/examples/account/delete-sessions.md new file mode 100644 index 0000000000..0d84b9d121 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/delete-sessions.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.deleteSessions(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/get-logs.md b/docs/examples/0.14.x/client-flutter/examples/account/get-logs.md new file mode 100644 index 0000000000..6cb5cf9714 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/get-logs.md @@ -0,0 +1,20 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.getLogs( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/get-prefs.md b/docs/examples/0.14.x/client-flutter/examples/account/get-prefs.md new file mode 100644 index 0000000000..2d6efd54db --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/get-prefs.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.getPrefs(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/get-session.md b/docs/examples/0.14.x/client-flutter/examples/account/get-session.md new file mode 100644 index 0000000000..4d93a81c72 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/get-session.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.getSession( + sessionId: '[SESSION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/get-sessions.md b/docs/examples/0.14.x/client-flutter/examples/account/get-sessions.md new file mode 100644 index 0000000000..a44eac144b --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/get-sessions.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.getSessions(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/get.md b/docs/examples/0.14.x/client-flutter/examples/account/get.md new file mode 100644 index 0000000000..733d8842ce --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/get.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.get(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/update-email.md b/docs/examples/0.14.x/client-flutter/examples/account/update-email.md new file mode 100644 index 0000000000..30dff9b7c9 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/update-email.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.updateEmail( + email: 'email@example.com', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/update-magic-u-r-l-session.md b/docs/examples/0.14.x/client-flutter/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..96881103b5 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.updateMagicURLSession( + userId: '[USER_ID]', + secret: '[SECRET]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/update-name.md b/docs/examples/0.14.x/client-flutter/examples/account/update-name.md new file mode 100644 index 0000000000..01ff7a0b62 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/update-name.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.updateName( + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/update-password.md b/docs/examples/0.14.x/client-flutter/examples/account/update-password.md new file mode 100644 index 0000000000..a4647c95bc --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/update-password.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.updatePassword( + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/update-prefs.md b/docs/examples/0.14.x/client-flutter/examples/account/update-prefs.md new file mode 100644 index 0000000000..bb7b8f800e --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/update-prefs.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.updatePrefs( + prefs: {}, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/update-recovery.md b/docs/examples/0.14.x/client-flutter/examples/account/update-recovery.md new file mode 100644 index 0000000000..df9f144600 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/update-recovery.md @@ -0,0 +1,24 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.updateRecovery( + userId: '[USER_ID]', + secret: '[SECRET]', + password: 'password', + passwordAgain: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/update-session.md b/docs/examples/0.14.x/client-flutter/examples/account/update-session.md new file mode 100644 index 0000000000..37fd58c3fd --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/update-session.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.updateSession( + sessionId: '[SESSION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/update-status.md b/docs/examples/0.14.x/client-flutter/examples/account/update-status.md new file mode 100644 index 0000000000..fb3790ead8 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/update-status.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.updateStatus(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/account/update-verification.md b/docs/examples/0.14.x/client-flutter/examples/account/update-verification.md new file mode 100644 index 0000000000..2bfbaed75c --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/account/update-verification.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = account.updateVerification( + userId: '[USER_ID]', + secret: '[SECRET]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/avatars/get-browser.md b/docs/examples/0.14.x/client-flutter/examples/avatars/get-browser.md new file mode 100644 index 0000000000..f908d11099 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/avatars/get-browser.md @@ -0,0 +1,34 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + // downloading file + Future result = avatars.getBrowser( + code: 'aa', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) +} + +//displaying image preview +FutureBuilder( + future: avatars.getBrowser( + code: 'aa', + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/0.14.x/client-flutter/examples/avatars/get-credit-card.md b/docs/examples/0.14.x/client-flutter/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..0c6ff01d19 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/avatars/get-credit-card.md @@ -0,0 +1,34 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + // downloading file + Future result = avatars.getCreditCard( + code: 'amex', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) +} + +//displaying image preview +FutureBuilder( + future: avatars.getCreditCard( + code: 'amex', + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/0.14.x/client-flutter/examples/avatars/get-favicon.md b/docs/examples/0.14.x/client-flutter/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..6df7c2dfbf --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/avatars/get-favicon.md @@ -0,0 +1,34 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + // downloading file + Future result = avatars.getFavicon( + url: 'https://example.com', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) +} + +//displaying image preview +FutureBuilder( + future: avatars.getFavicon( + url: 'https://example.com', + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/0.14.x/client-flutter/examples/avatars/get-flag.md b/docs/examples/0.14.x/client-flutter/examples/avatars/get-flag.md new file mode 100644 index 0000000000..fa5b60d767 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/avatars/get-flag.md @@ -0,0 +1,34 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + // downloading file + Future result = avatars.getFlag( + code: 'af', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) +} + +//displaying image preview +FutureBuilder( + future: avatars.getFlag( + code: 'af', + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/0.14.x/client-flutter/examples/avatars/get-image.md b/docs/examples/0.14.x/client-flutter/examples/avatars/get-image.md new file mode 100644 index 0000000000..219d160d8d --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/avatars/get-image.md @@ -0,0 +1,34 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + // downloading file + Future result = avatars.getImage( + url: 'https://example.com', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) +} + +//displaying image preview +FutureBuilder( + future: avatars.getImage( + url: 'https://example.com', + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/0.14.x/client-flutter/examples/avatars/get-initials.md b/docs/examples/0.14.x/client-flutter/examples/avatars/get-initials.md new file mode 100644 index 0000000000..cd1b1f7e9c --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/avatars/get-initials.md @@ -0,0 +1,32 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + // downloading file + Future result = avatars.getInitials( + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) +} + +//displaying image preview +FutureBuilder( + future: avatars.getInitials( + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/0.14.x/client-flutter/examples/avatars/get-q-r.md b/docs/examples/0.14.x/client-flutter/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..df6ebd3c8c --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/avatars/get-q-r.md @@ -0,0 +1,34 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + // downloading file + Future result = avatars.getQR( + text: '[TEXT]', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) +} + +//displaying image preview +FutureBuilder( + future: avatars.getQR( + text: '[TEXT]', + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/0.14.x/client-flutter/examples/database/create-document.md b/docs/examples/0.14.x/client-flutter/examples/database/create-document.md new file mode 100644 index 0000000000..9027b71dca --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/database/create-document.md @@ -0,0 +1,23 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = database.createDocument( + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + data: {}, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/database/delete-document.md b/docs/examples/0.14.x/client-flutter/examples/database/delete-document.md new file mode 100644 index 0000000000..94479a0949 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/database/delete-document.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = database.deleteDocument( + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/database/get-document.md b/docs/examples/0.14.x/client-flutter/examples/database/get-document.md new file mode 100644 index 0000000000..153ad8e0f9 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/database/get-document.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = database.getDocument( + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/database/list-documents.md b/docs/examples/0.14.x/client-flutter/examples/database/list-documents.md new file mode 100644 index 0000000000..dc6893a285 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/database/list-documents.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = database.listDocuments( + collectionId: '[COLLECTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/database/update-document.md b/docs/examples/0.14.x/client-flutter/examples/database/update-document.md new file mode 100644 index 0000000000..65c23a297e --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/database/update-document.md @@ -0,0 +1,23 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = database.updateDocument( + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + data: {}, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/functions/create-execution.md b/docs/examples/0.14.x/client-flutter/examples/functions/create-execution.md new file mode 100644 index 0000000000..70b617ffab --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/functions/create-execution.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = functions.createExecution( + functionId: '[FUNCTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/functions/get-execution.md b/docs/examples/0.14.x/client-flutter/examples/functions/get-execution.md new file mode 100644 index 0000000000..a10f7933c2 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/functions/get-execution.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = functions.getExecution( + functionId: '[FUNCTION_ID]', + executionId: '[EXECUTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/functions/list-executions.md b/docs/examples/0.14.x/client-flutter/examples/functions/list-executions.md new file mode 100644 index 0000000000..3f59aa3f20 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/functions/list-executions.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = functions.listExecutions( + functionId: '[FUNCTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/functions/retry-build.md b/docs/examples/0.14.x/client-flutter/examples/functions/retry-build.md new file mode 100644 index 0000000000..1e6c174e07 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/functions/retry-build.md @@ -0,0 +1,23 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = functions.retryBuild( + functionId: '[FUNCTION_ID]', + deploymentId: '[DEPLOYMENT_ID]', + buildId: '[BUILD_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/locale/get-continents.md b/docs/examples/0.14.x/client-flutter/examples/locale/get-continents.md new file mode 100644 index 0000000000..63920e735a --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/locale/get-continents.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = locale.getContinents(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/locale/get-countries-e-u.md b/docs/examples/0.14.x/client-flutter/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..39f3a1d709 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/locale/get-countries-e-u.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = locale.getCountriesEU(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/locale/get-countries-phones.md b/docs/examples/0.14.x/client-flutter/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..44ff02603b --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/locale/get-countries-phones.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = locale.getCountriesPhones(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/locale/get-countries.md b/docs/examples/0.14.x/client-flutter/examples/locale/get-countries.md new file mode 100644 index 0000000000..97ef85e1e6 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/locale/get-countries.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = locale.getCountries(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/locale/get-currencies.md b/docs/examples/0.14.x/client-flutter/examples/locale/get-currencies.md new file mode 100644 index 0000000000..fb27e3d957 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/locale/get-currencies.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = locale.getCurrencies(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/locale/get-languages.md b/docs/examples/0.14.x/client-flutter/examples/locale/get-languages.md new file mode 100644 index 0000000000..badc806861 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/locale/get-languages.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = locale.getLanguages(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/locale/get.md b/docs/examples/0.14.x/client-flutter/examples/locale/get.md new file mode 100644 index 0000000000..21b1a6cff2 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/locale/get.md @@ -0,0 +1,19 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = locale.get(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/storage/create-file.md b/docs/examples/0.14.x/client-flutter/examples/storage/create-file.md new file mode 100644 index 0000000000..5c591ff223 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/storage/create-file.md @@ -0,0 +1,24 @@ +import 'dart:io'; +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = storage.createFile( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + file: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/storage/delete-file.md b/docs/examples/0.14.x/client-flutter/examples/storage/delete-file.md new file mode 100644 index 0000000000..ee193d936f --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/storage/delete-file.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = storage.deleteFile( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/storage/get-file-download.md b/docs/examples/0.14.x/client-flutter/examples/storage/get-file-download.md new file mode 100644 index 0000000000..ea3f2abfc8 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/storage/get-file-download.md @@ -0,0 +1,36 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + // downloading file + Future result = storage.getFileDownload( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) +} + +//displaying image preview +FutureBuilder( + future: storage.getFileDownload( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/0.14.x/client-flutter/examples/storage/get-file-preview.md b/docs/examples/0.14.x/client-flutter/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..1a0fca2911 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/storage/get-file-preview.md @@ -0,0 +1,36 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + // downloading file + Future result = storage.getFilePreview( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) +} + +//displaying image preview +FutureBuilder( + future: storage.getFilePreview( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/0.14.x/client-flutter/examples/storage/get-file-view.md b/docs/examples/0.14.x/client-flutter/examples/storage/get-file-view.md new file mode 100644 index 0000000000..46051338eb --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/storage/get-file-view.md @@ -0,0 +1,36 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + // downloading file + Future result = storage.getFileView( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) +} + +//displaying image preview +FutureBuilder( + future: storage.getFileView( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/0.14.x/client-flutter/examples/storage/get-file.md b/docs/examples/0.14.x/client-flutter/examples/storage/get-file.md new file mode 100644 index 0000000000..26e5db0777 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/storage/get-file.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = storage.getFile( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/storage/list-files.md b/docs/examples/0.14.x/client-flutter/examples/storage/list-files.md new file mode 100644 index 0000000000..b1d095a5c7 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/storage/list-files.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = storage.listFiles( + bucketId: '[BUCKET_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/storage/update-file.md b/docs/examples/0.14.x/client-flutter/examples/storage/update-file.md new file mode 100644 index 0000000000..71056526e9 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/storage/update-file.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = storage.updateFile( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/teams/create-membership.md b/docs/examples/0.14.x/client-flutter/examples/teams/create-membership.md new file mode 100644 index 0000000000..ef5931ea66 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/teams/create-membership.md @@ -0,0 +1,24 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.createMembership( + teamId: '[TEAM_ID]', + email: 'email@example.com', + roles: [], + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/teams/create.md b/docs/examples/0.14.x/client-flutter/examples/teams/create.md new file mode 100644 index 0000000000..5333ce35f8 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/teams/create.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.create( + teamId: '[TEAM_ID]', + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/teams/delete-membership.md b/docs/examples/0.14.x/client-flutter/examples/teams/delete-membership.md new file mode 100644 index 0000000000..8192b8528e --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/teams/delete-membership.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.deleteMembership( + teamId: '[TEAM_ID]', + membershipId: '[MEMBERSHIP_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/teams/delete.md b/docs/examples/0.14.x/client-flutter/examples/teams/delete.md new file mode 100644 index 0000000000..e55c62b2e3 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/teams/delete.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.delete( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/teams/get-membership.md b/docs/examples/0.14.x/client-flutter/examples/teams/get-membership.md new file mode 100644 index 0000000000..6abecfe3f8 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/teams/get-membership.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.getMembership( + teamId: '[TEAM_ID]', + membershipId: '[MEMBERSHIP_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/teams/get-memberships.md b/docs/examples/0.14.x/client-flutter/examples/teams/get-memberships.md new file mode 100644 index 0000000000..3116ca86ad --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/teams/get-memberships.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.getMemberships( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/teams/get.md b/docs/examples/0.14.x/client-flutter/examples/teams/get.md new file mode 100644 index 0000000000..25eb2453fc --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/teams/get.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.get( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/teams/list.md b/docs/examples/0.14.x/client-flutter/examples/teams/list.md new file mode 100644 index 0000000000..8657f80fd3 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/teams/list.md @@ -0,0 +1,20 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.list( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/teams/update-membership-roles.md b/docs/examples/0.14.x/client-flutter/examples/teams/update-membership-roles.md new file mode 100644 index 0000000000..7615752cd9 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/teams/update-membership-roles.md @@ -0,0 +1,23 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.updateMembershipRoles( + teamId: '[TEAM_ID]', + membershipId: '[MEMBERSHIP_ID]', + roles: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/teams/update-membership-status.md b/docs/examples/0.14.x/client-flutter/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..7cda544d00 --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/teams/update-membership-status.md @@ -0,0 +1,24 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.updateMembershipStatus( + teamId: '[TEAM_ID]', + membershipId: '[MEMBERSHIP_ID]', + userId: '[USER_ID]', + secret: '[SECRET]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-flutter/examples/teams/update.md b/docs/examples/0.14.x/client-flutter/examples/teams/update.md new file mode 100644 index 0000000000..838639be9b --- /dev/null +++ b/docs/examples/0.14.x/client-flutter/examples/teams/update.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + Future result = teams.update( + teamId: '[TEAM_ID]', + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} diff --git a/docs/examples/0.14.x/client-web/examples/account/create-anonymous-session.md b/docs/examples/0.14.x/client-web/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..8979218e0f --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/create-anonymous-session.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.createAnonymousSession(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/account/create-j-w-t.md b/docs/examples/0.14.x/client-web/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..cf00356375 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/create-j-w-t.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.createJWT(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/account/create-magic-u-r-l-session.md b/docs/examples/0.14.x/client-web/examples/account/create-magic-u-r-l-session.md new file mode 100644 index 0000000000..5318f5f276 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/create-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.createMagicURLSession('[USER_ID]', 'email@example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/account/create-o-auth2session.md b/docs/examples/0.14.x/client-web/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..886a8f8480 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/create-o-auth2session.md @@ -0,0 +1,10 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +// Go to OAuth provider login page +sdk.account.createOAuth2Session('amazon'); + diff --git a/docs/examples/0.14.x/client-web/examples/account/create-recovery.md b/docs/examples/0.14.x/client-web/examples/account/create-recovery.md new file mode 100644 index 0000000000..f57e926e9b --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.createRecovery('email@example.com', 'https://example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/account/create-session.md b/docs/examples/0.14.x/client-web/examples/account/create-session.md new file mode 100644 index 0000000000..f41438306e --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/create-session.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.createSession('email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/account/create-verification.md b/docs/examples/0.14.x/client-web/examples/account/create-verification.md new file mode 100644 index 0000000000..6a00f1a3e1 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/create-verification.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.createVerification('https://example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/account/create.md b/docs/examples/0.14.x/client-web/examples/account/create.md new file mode 100644 index 0000000000..18f2fbbdc6 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/create.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.create('[USER_ID]', 'email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/account/delete-session.md b/docs/examples/0.14.x/client-web/examples/account/delete-session.md new file mode 100644 index 0000000000..b3f46d15a9 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/delete-session.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.deleteSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/account/delete-sessions.md b/docs/examples/0.14.x/client-web/examples/account/delete-sessions.md new file mode 100644 index 0000000000..e89ba3087a --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/delete-sessions.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.deleteSessions(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/account/get-logs.md b/docs/examples/0.14.x/client-web/examples/account/get-logs.md new file mode 100644 index 0000000000..f382d7216c --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/get-logs.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.getLogs(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/account/get-prefs.md b/docs/examples/0.14.x/client-web/examples/account/get-prefs.md new file mode 100644 index 0000000000..99e86d4f1d --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/get-prefs.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.getPrefs(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/account/get-session.md b/docs/examples/0.14.x/client-web/examples/account/get-session.md new file mode 100644 index 0000000000..79ec93f6e9 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/get-session.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.getSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/account/get-sessions.md b/docs/examples/0.14.x/client-web/examples/account/get-sessions.md new file mode 100644 index 0000000000..384e6fa347 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/get-sessions.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.getSessions(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/account/get.md b/docs/examples/0.14.x/client-web/examples/account/get.md new file mode 100644 index 0000000000..cc933152a2 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/get.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.get(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/account/update-email.md b/docs/examples/0.14.x/client-web/examples/account/update-email.md new file mode 100644 index 0000000000..e4a68e25c9 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/update-email.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updateEmail('email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/account/update-magic-u-r-l-session.md b/docs/examples/0.14.x/client-web/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..3c00386b7f --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updateMagicURLSession('[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/account/update-name.md b/docs/examples/0.14.x/client-web/examples/account/update-name.md new file mode 100644 index 0000000000..ff782195b1 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/update-name.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updateName('[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/account/update-password.md b/docs/examples/0.14.x/client-web/examples/account/update-password.md new file mode 100644 index 0000000000..d551ed726f --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/update-password.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updatePassword('password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/account/update-prefs.md b/docs/examples/0.14.x/client-web/examples/account/update-prefs.md new file mode 100644 index 0000000000..232b77025b --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/update-prefs.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updatePrefs({}); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/account/update-recovery.md b/docs/examples/0.14.x/client-web/examples/account/update-recovery.md new file mode 100644 index 0000000000..6fe36c017e --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/account/update-session.md b/docs/examples/0.14.x/client-web/examples/account/update-session.md new file mode 100644 index 0000000000..cfb61b679a --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/update-session.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updateSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/account/update-status.md b/docs/examples/0.14.x/client-web/examples/account/update-status.md new file mode 100644 index 0000000000..1b22ae81ad --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/update-status.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updateStatus(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/account/update-verification.md b/docs/examples/0.14.x/client-web/examples/account/update-verification.md new file mode 100644 index 0000000000..e3312c5d5b --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/account/update-verification.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updateVerification('[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/avatars/get-browser.md b/docs/examples/0.14.x/client-web/examples/avatars/get-browser.md new file mode 100644 index 0000000000..fe0143b818 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/avatars/get-browser.md @@ -0,0 +1,10 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.avatars.getBrowser('aa'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/avatars/get-credit-card.md b/docs/examples/0.14.x/client-web/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..5477094ca5 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/avatars/get-credit-card.md @@ -0,0 +1,10 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.avatars.getCreditCard('amex'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/avatars/get-favicon.md b/docs/examples/0.14.x/client-web/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..1327bb7384 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/avatars/get-favicon.md @@ -0,0 +1,10 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.avatars.getFavicon('https://example.com'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/avatars/get-flag.md b/docs/examples/0.14.x/client-web/examples/avatars/get-flag.md new file mode 100644 index 0000000000..13a90c3075 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/avatars/get-flag.md @@ -0,0 +1,10 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.avatars.getFlag('af'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/avatars/get-image.md b/docs/examples/0.14.x/client-web/examples/avatars/get-image.md new file mode 100644 index 0000000000..82cb205a74 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/avatars/get-image.md @@ -0,0 +1,10 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.avatars.getImage('https://example.com'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/avatars/get-initials.md b/docs/examples/0.14.x/client-web/examples/avatars/get-initials.md new file mode 100644 index 0000000000..a3da13d460 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/avatars/get-initials.md @@ -0,0 +1,10 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.avatars.getInitials(); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/avatars/get-q-r.md b/docs/examples/0.14.x/client-web/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..c900a63531 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/avatars/get-q-r.md @@ -0,0 +1,10 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.avatars.getQR('[TEXT]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/database/create-document.md b/docs/examples/0.14.x/client-web/examples/database/create-document.md new file mode 100644 index 0000000000..5f57b2fc3d --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/database/create-document.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.createDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/database/delete-document.md b/docs/examples/0.14.x/client-web/examples/database/delete-document.md new file mode 100644 index 0000000000..557662966d --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/database/delete-document.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/database/get-document.md b/docs/examples/0.14.x/client-web/examples/database/get-document.md new file mode 100644 index 0000000000..841157f551 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/database/get-document.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/database/list-documents.md b/docs/examples/0.14.x/client-web/examples/database/list-documents.md new file mode 100644 index 0000000000..620137cf8e --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/database/list-documents.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.listDocuments('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/database/update-document.md b/docs/examples/0.14.x/client-web/examples/database/update-document.md new file mode 100644 index 0000000000..b07b2ecac1 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/database/update-document.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/functions/create-execution.md b/docs/examples/0.14.x/client-web/examples/functions/create-execution.md new file mode 100644 index 0000000000..87dc73a205 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/functions/create-execution.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.functions.createExecution('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/functions/get-execution.md b/docs/examples/0.14.x/client-web/examples/functions/get-execution.md new file mode 100644 index 0000000000..a8a0c4a0c8 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.functions.getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/functions/list-executions.md b/docs/examples/0.14.x/client-web/examples/functions/list-executions.md new file mode 100644 index 0000000000..82652ddb6c --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/functions/list-executions.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.functions.listExecutions('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/functions/retry-build.md b/docs/examples/0.14.x/client-web/examples/functions/retry-build.md new file mode 100644 index 0000000000..e0f49976b0 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/functions/retry-build.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.functions.retryBuild('[FUNCTION_ID]', '[DEPLOYMENT_ID]', '[BUILD_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/locale/get-continents.md b/docs/examples/0.14.x/client-web/examples/locale/get-continents.md new file mode 100644 index 0000000000..f0798a820c --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/locale/get-continents.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.locale.getContinents(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/locale/get-countries-e-u.md b/docs/examples/0.14.x/client-web/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..7bc6aa2d50 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/locale/get-countries-e-u.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.locale.getCountriesEU(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/locale/get-countries-phones.md b/docs/examples/0.14.x/client-web/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..e92982c1a2 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/locale/get-countries-phones.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.locale.getCountriesPhones(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/locale/get-countries.md b/docs/examples/0.14.x/client-web/examples/locale/get-countries.md new file mode 100644 index 0000000000..bb12e6ab5f --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/locale/get-countries.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.locale.getCountries(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/locale/get-currencies.md b/docs/examples/0.14.x/client-web/examples/locale/get-currencies.md new file mode 100644 index 0000000000..3382c2015c --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/locale/get-currencies.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.locale.getCurrencies(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/locale/get-languages.md b/docs/examples/0.14.x/client-web/examples/locale/get-languages.md new file mode 100644 index 0000000000..a7fa4a0170 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/locale/get-languages.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.locale.getLanguages(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/locale/get.md b/docs/examples/0.14.x/client-web/examples/locale/get.md new file mode 100644 index 0000000000..89ade06941 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/locale/get.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.locale.get(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/storage/create-file.md b/docs/examples/0.14.x/client-web/examples/storage/create-file.md new file mode 100644 index 0000000000..f464fe608e --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/storage/create-file.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.storage.createFile('[BUCKET_ID]', '[FILE_ID]', document.getElementById('uploader').files[0]); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/storage/delete-file.md b/docs/examples/0.14.x/client-web/examples/storage/delete-file.md new file mode 100644 index 0000000000..94c9e3112c --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.storage.deleteFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/storage/get-file-download.md b/docs/examples/0.14.x/client-web/examples/storage/get-file-download.md new file mode 100644 index 0000000000..18a01aaa91 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/storage/get-file-download.md @@ -0,0 +1,10 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.storage.getFileDownload('[BUCKET_ID]', '[FILE_ID]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/storage/get-file-preview.md b/docs/examples/0.14.x/client-web/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..b9d9377e1f --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/storage/get-file-preview.md @@ -0,0 +1,10 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.storage.getFilePreview('[BUCKET_ID]', '[FILE_ID]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/storage/get-file-view.md b/docs/examples/0.14.x/client-web/examples/storage/get-file-view.md new file mode 100644 index 0000000000..eae4e78d6a --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/storage/get-file-view.md @@ -0,0 +1,10 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.storage.getFileView('[BUCKET_ID]', '[FILE_ID]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/storage/get-file.md b/docs/examples/0.14.x/client-web/examples/storage/get-file.md new file mode 100644 index 0000000000..4a8eb23038 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/storage/get-file.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.storage.getFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/storage/list-files.md b/docs/examples/0.14.x/client-web/examples/storage/list-files.md new file mode 100644 index 0000000000..f4a83cd29d --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/storage/list-files.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.storage.listFiles('[BUCKET_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/storage/update-file.md b/docs/examples/0.14.x/client-web/examples/storage/update-file.md new file mode 100644 index 0000000000..fbb04a9bda --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/storage/update-file.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.storage.updateFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/teams/create-membership.md b/docs/examples/0.14.x/client-web/examples/teams/create-membership.md new file mode 100644 index 0000000000..68b7f2be17 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/teams/create-membership.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/teams/create.md b/docs/examples/0.14.x/client-web/examples/teams/create.md new file mode 100644 index 0000000000..c0b5e6aa06 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/teams/create.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.create('[TEAM_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/teams/delete-membership.md b/docs/examples/0.14.x/client-web/examples/teams/delete-membership.md new file mode 100644 index 0000000000..46916ab1f4 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.deleteMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/teams/delete.md b/docs/examples/0.14.x/client-web/examples/teams/delete.md new file mode 100644 index 0000000000..e04f9f505a --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/teams/delete.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.delete('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/teams/get-membership.md b/docs/examples/0.14.x/client-web/examples/teams/get-membership.md new file mode 100644 index 0000000000..0ff21ca48e --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.getMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/teams/get-memberships.md b/docs/examples/0.14.x/client-web/examples/teams/get-memberships.md new file mode 100644 index 0000000000..c23f190cbe --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/teams/get-memberships.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.getMemberships('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/teams/get.md b/docs/examples/0.14.x/client-web/examples/teams/get.md new file mode 100644 index 0000000000..c05bd59a0b --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/teams/get.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.get('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/teams/list.md b/docs/examples/0.14.x/client-web/examples/teams/list.md new file mode 100644 index 0000000000..1e1a974d80 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/teams/list.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.list(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/teams/update-membership-roles.md b/docs/examples/0.14.x/client-web/examples/teams/update-membership-roles.md new file mode 100644 index 0000000000..1d25e2601e --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/teams/update-membership-roles.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.updateMembershipRoles('[TEAM_ID]', '[MEMBERSHIP_ID]', []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/teams/update-membership-status.md b/docs/examples/0.14.x/client-web/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..032f162501 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/teams/update-membership-status.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.updateMembershipStatus('[TEAM_ID]', '[MEMBERSHIP_ID]', '[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/client-web/examples/teams/update.md b/docs/examples/0.14.x/client-web/examples/teams/update.md new file mode 100644 index 0000000000..bcf53d1605 --- /dev/null +++ b/docs/examples/0.14.x/client-web/examples/teams/update.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.update('[TEAM_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-cli/examples/account/create-anonymous-session.md b/docs/examples/0.14.x/console-cli/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..a7eb9c5be3 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/create-anonymous-session.md @@ -0,0 +1 @@ +appwrite account createAnonymousSession diff --git a/docs/examples/0.14.x/console-cli/examples/account/create-j-w-t.md b/docs/examples/0.14.x/console-cli/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..7b5337993d --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/create-j-w-t.md @@ -0,0 +1 @@ +appwrite account createJWT diff --git a/docs/examples/0.14.x/console-cli/examples/account/create-magic-u-r-l-session.md b/docs/examples/0.14.x/console-cli/examples/account/create-magic-u-r-l-session.md new file mode 100644 index 0000000000..0060f2a892 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/create-magic-u-r-l-session.md @@ -0,0 +1,4 @@ +appwrite account createMagicURLSession \ + --userId [USER_ID] \ + --email email@example.com \ + diff --git a/docs/examples/0.14.x/console-cli/examples/account/create-o-auth2session.md b/docs/examples/0.14.x/console-cli/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..9159b8f25f --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/create-o-auth2session.md @@ -0,0 +1,5 @@ +appwrite account createOAuth2Session \ + --provider amazon \ + + + diff --git a/docs/examples/0.14.x/console-cli/examples/account/create-recovery.md b/docs/examples/0.14.x/console-cli/examples/account/create-recovery.md new file mode 100644 index 0000000000..ea8c145abb --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/create-recovery.md @@ -0,0 +1,3 @@ +appwrite account createRecovery \ + --email email@example.com \ + --url https://example.com diff --git a/docs/examples/0.14.x/console-cli/examples/account/create-session.md b/docs/examples/0.14.x/console-cli/examples/account/create-session.md new file mode 100644 index 0000000000..e174029636 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/create-session.md @@ -0,0 +1,3 @@ +appwrite account createSession \ + --email email@example.com \ + --password password diff --git a/docs/examples/0.14.x/console-cli/examples/account/create-verification.md b/docs/examples/0.14.x/console-cli/examples/account/create-verification.md new file mode 100644 index 0000000000..402038b4b6 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/create-verification.md @@ -0,0 +1,2 @@ +appwrite account createVerification \ + --url https://example.com diff --git a/docs/examples/0.14.x/console-cli/examples/account/create.md b/docs/examples/0.14.x/console-cli/examples/account/create.md new file mode 100644 index 0000000000..7d2221be29 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/create.md @@ -0,0 +1,5 @@ +appwrite account create \ + --userId [USER_ID] \ + --email email@example.com \ + --password password \ + diff --git a/docs/examples/0.14.x/console-cli/examples/account/delete-session.md b/docs/examples/0.14.x/console-cli/examples/account/delete-session.md new file mode 100644 index 0000000000..2c68c1a43b --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/delete-session.md @@ -0,0 +1,2 @@ +appwrite account deleteSession \ + --sessionId [SESSION_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/account/delete-sessions.md b/docs/examples/0.14.x/console-cli/examples/account/delete-sessions.md new file mode 100644 index 0000000000..dd11877a5d --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/delete-sessions.md @@ -0,0 +1 @@ +appwrite account deleteSessions diff --git a/docs/examples/0.14.x/console-cli/examples/account/get-logs.md b/docs/examples/0.14.x/console-cli/examples/account/get-logs.md new file mode 100644 index 0000000000..9ab3150c10 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/get-logs.md @@ -0,0 +1,3 @@ +appwrite account getLogs \ + + diff --git a/docs/examples/0.14.x/console-cli/examples/account/get-prefs.md b/docs/examples/0.14.x/console-cli/examples/account/get-prefs.md new file mode 100644 index 0000000000..6569925d99 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/get-prefs.md @@ -0,0 +1 @@ +appwrite account getPrefs diff --git a/docs/examples/0.14.x/console-cli/examples/account/get-session.md b/docs/examples/0.14.x/console-cli/examples/account/get-session.md new file mode 100644 index 0000000000..fac3fca10d --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/get-session.md @@ -0,0 +1,2 @@ +appwrite account getSession \ + --sessionId [SESSION_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/account/get-sessions.md b/docs/examples/0.14.x/console-cli/examples/account/get-sessions.md new file mode 100644 index 0000000000..cdf2d2b460 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/get-sessions.md @@ -0,0 +1 @@ +appwrite account getSessions diff --git a/docs/examples/0.14.x/console-cli/examples/account/get.md b/docs/examples/0.14.x/console-cli/examples/account/get.md new file mode 100644 index 0000000000..c8b46e34c7 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/get.md @@ -0,0 +1 @@ +appwrite account get diff --git a/docs/examples/0.14.x/console-cli/examples/account/update-email.md b/docs/examples/0.14.x/console-cli/examples/account/update-email.md new file mode 100644 index 0000000000..81938ff3a9 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/update-email.md @@ -0,0 +1,3 @@ +appwrite account updateEmail \ + --email email@example.com \ + --password password diff --git a/docs/examples/0.14.x/console-cli/examples/account/update-magic-u-r-l-session.md b/docs/examples/0.14.x/console-cli/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..1411370123 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,3 @@ +appwrite account updateMagicURLSession \ + --userId [USER_ID] \ + --secret [SECRET] diff --git a/docs/examples/0.14.x/console-cli/examples/account/update-name.md b/docs/examples/0.14.x/console-cli/examples/account/update-name.md new file mode 100644 index 0000000000..f4acb58db6 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/update-name.md @@ -0,0 +1,2 @@ +appwrite account updateName \ + --name [NAME] diff --git a/docs/examples/0.14.x/console-cli/examples/account/update-password.md b/docs/examples/0.14.x/console-cli/examples/account/update-password.md new file mode 100644 index 0000000000..520f9bb82e --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/update-password.md @@ -0,0 +1,3 @@ +appwrite account updatePassword \ + --password password \ + diff --git a/docs/examples/0.14.x/console-cli/examples/account/update-prefs.md b/docs/examples/0.14.x/console-cli/examples/account/update-prefs.md new file mode 100644 index 0000000000..568ac66e48 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/update-prefs.md @@ -0,0 +1,2 @@ +appwrite account updatePrefs \ + --prefs '{ "key": "value" }' diff --git a/docs/examples/0.14.x/console-cli/examples/account/update-recovery.md b/docs/examples/0.14.x/console-cli/examples/account/update-recovery.md new file mode 100644 index 0000000000..7825aac8f0 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/update-recovery.md @@ -0,0 +1,5 @@ +appwrite account updateRecovery \ + --userId [USER_ID] \ + --secret [SECRET] \ + --password password \ + --passwordAgain password diff --git a/docs/examples/0.14.x/console-cli/examples/account/update-session.md b/docs/examples/0.14.x/console-cli/examples/account/update-session.md new file mode 100644 index 0000000000..56f74565de --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/update-session.md @@ -0,0 +1,2 @@ +appwrite account updateSession \ + --sessionId [SESSION_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/account/update-status.md b/docs/examples/0.14.x/console-cli/examples/account/update-status.md new file mode 100644 index 0000000000..8886dbbc6a --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/update-status.md @@ -0,0 +1 @@ +appwrite account updateStatus diff --git a/docs/examples/0.14.x/console-cli/examples/account/update-verification.md b/docs/examples/0.14.x/console-cli/examples/account/update-verification.md new file mode 100644 index 0000000000..ff420b5895 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/account/update-verification.md @@ -0,0 +1,3 @@ +appwrite account updateVerification \ + --userId [USER_ID] \ + --secret [SECRET] diff --git a/docs/examples/0.14.x/console-cli/examples/avatars/get-browser.md b/docs/examples/0.14.x/console-cli/examples/avatars/get-browser.md new file mode 100644 index 0000000000..6b4f0b8007 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/avatars/get-browser.md @@ -0,0 +1,5 @@ +appwrite avatars getBrowser \ + --code aa \ + + + diff --git a/docs/examples/0.14.x/console-cli/examples/avatars/get-credit-card.md b/docs/examples/0.14.x/console-cli/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..365568ba19 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/avatars/get-credit-card.md @@ -0,0 +1,5 @@ +appwrite avatars getCreditCard \ + --code amex \ + + + diff --git a/docs/examples/0.14.x/console-cli/examples/avatars/get-favicon.md b/docs/examples/0.14.x/console-cli/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..c658f1a483 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/avatars/get-favicon.md @@ -0,0 +1,2 @@ +appwrite avatars getFavicon \ + --url https://example.com diff --git a/docs/examples/0.14.x/console-cli/examples/avatars/get-flag.md b/docs/examples/0.14.x/console-cli/examples/avatars/get-flag.md new file mode 100644 index 0000000000..9f11fef840 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/avatars/get-flag.md @@ -0,0 +1,5 @@ +appwrite avatars getFlag \ + --code af \ + + + diff --git a/docs/examples/0.14.x/console-cli/examples/avatars/get-image.md b/docs/examples/0.14.x/console-cli/examples/avatars/get-image.md new file mode 100644 index 0000000000..7df150610c --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/avatars/get-image.md @@ -0,0 +1,4 @@ +appwrite avatars getImage \ + --url https://example.com \ + + diff --git a/docs/examples/0.14.x/console-cli/examples/avatars/get-initials.md b/docs/examples/0.14.x/console-cli/examples/avatars/get-initials.md new file mode 100644 index 0000000000..ff11a4fe1b --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/avatars/get-initials.md @@ -0,0 +1,6 @@ +appwrite avatars getInitials \ + + + + + diff --git a/docs/examples/0.14.x/console-cli/examples/avatars/get-q-r.md b/docs/examples/0.14.x/console-cli/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..855f33920a --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/avatars/get-q-r.md @@ -0,0 +1,5 @@ +appwrite avatars getQR \ + --text [TEXT] \ + + + diff --git a/docs/examples/0.14.x/console-cli/examples/database/create-boolean-attribute.md b/docs/examples/0.14.x/console-cli/examples/database/create-boolean-attribute.md new file mode 100644 index 0000000000..4fa1b8f8b8 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/create-boolean-attribute.md @@ -0,0 +1,6 @@ +appwrite database createBooleanAttribute \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --required false \ + + diff --git a/docs/examples/0.14.x/console-cli/examples/database/create-collection.md b/docs/examples/0.14.x/console-cli/examples/database/create-collection.md new file mode 100644 index 0000000000..c08c5dad9e --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/create-collection.md @@ -0,0 +1,6 @@ +appwrite database createCollection \ + --collectionId [COLLECTION_ID] \ + --name [NAME] \ + --permission document \ + --read "role:all" \ + --write "role:all" diff --git a/docs/examples/0.14.x/console-cli/examples/database/create-document.md b/docs/examples/0.14.x/console-cli/examples/database/create-document.md new file mode 100644 index 0000000000..7fc2e7d49a --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/create-document.md @@ -0,0 +1,6 @@ +appwrite database createDocument \ + --collectionId [COLLECTION_ID] \ + --documentId [DOCUMENT_ID] \ + --data '{ "key": "value" }' \ + + diff --git a/docs/examples/0.14.x/console-cli/examples/database/create-email-attribute.md b/docs/examples/0.14.x/console-cli/examples/database/create-email-attribute.md new file mode 100644 index 0000000000..649072b53c --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/create-email-attribute.md @@ -0,0 +1,6 @@ +appwrite database createEmailAttribute \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --required false \ + + diff --git a/docs/examples/0.14.x/console-cli/examples/database/create-enum-attribute.md b/docs/examples/0.14.x/console-cli/examples/database/create-enum-attribute.md new file mode 100644 index 0000000000..309a57b566 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/create-enum-attribute.md @@ -0,0 +1,7 @@ +appwrite database createEnumAttribute \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --elements one two three \ + --required false \ + + diff --git a/docs/examples/0.14.x/console-cli/examples/database/create-float-attribute.md b/docs/examples/0.14.x/console-cli/examples/database/create-float-attribute.md new file mode 100644 index 0000000000..5fff529cbb --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/create-float-attribute.md @@ -0,0 +1,8 @@ +appwrite database createFloatAttribute \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/0.14.x/console-cli/examples/database/create-index.md b/docs/examples/0.14.x/console-cli/examples/database/create-index.md new file mode 100644 index 0000000000..e2b3b5d021 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/create-index.md @@ -0,0 +1,6 @@ +appwrite database createIndex \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --type key \ + --attributes one two three \ + diff --git a/docs/examples/0.14.x/console-cli/examples/database/create-integer-attribute.md b/docs/examples/0.14.x/console-cli/examples/database/create-integer-attribute.md new file mode 100644 index 0000000000..61546febf9 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/create-integer-attribute.md @@ -0,0 +1,8 @@ +appwrite database createIntegerAttribute \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/0.14.x/console-cli/examples/database/create-ip-attribute.md b/docs/examples/0.14.x/console-cli/examples/database/create-ip-attribute.md new file mode 100644 index 0000000000..19d40a73ef --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/create-ip-attribute.md @@ -0,0 +1,6 @@ +appwrite database createIpAttribute \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --required false \ + + diff --git a/docs/examples/0.14.x/console-cli/examples/database/create-string-attribute.md b/docs/examples/0.14.x/console-cli/examples/database/create-string-attribute.md new file mode 100644 index 0000000000..542bc8e10b --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/create-string-attribute.md @@ -0,0 +1,7 @@ +appwrite database createStringAttribute \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --size 1 \ + --required false \ + + diff --git a/docs/examples/0.14.x/console-cli/examples/database/create-url-attribute.md b/docs/examples/0.14.x/console-cli/examples/database/create-url-attribute.md new file mode 100644 index 0000000000..1ff338026d --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/create-url-attribute.md @@ -0,0 +1,6 @@ +appwrite database createUrlAttribute \ + --collectionId [COLLECTION_ID] \ + --key '' \ + --required false \ + + diff --git a/docs/examples/0.14.x/console-cli/examples/database/delete-attribute.md b/docs/examples/0.14.x/console-cli/examples/database/delete-attribute.md new file mode 100644 index 0000000000..435919b006 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/delete-attribute.md @@ -0,0 +1,3 @@ +appwrite database deleteAttribute \ + --collectionId [COLLECTION_ID] \ + --key '' diff --git a/docs/examples/0.14.x/console-cli/examples/database/delete-collection.md b/docs/examples/0.14.x/console-cli/examples/database/delete-collection.md new file mode 100644 index 0000000000..90cfde5885 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/delete-collection.md @@ -0,0 +1,2 @@ +appwrite database deleteCollection \ + --collectionId [COLLECTION_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/database/delete-document.md b/docs/examples/0.14.x/console-cli/examples/database/delete-document.md new file mode 100644 index 0000000000..3987f90779 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/delete-document.md @@ -0,0 +1,3 @@ +appwrite database deleteDocument \ + --collectionId [COLLECTION_ID] \ + --documentId [DOCUMENT_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/database/delete-index.md b/docs/examples/0.14.x/console-cli/examples/database/delete-index.md new file mode 100644 index 0000000000..d3ac3c6a54 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/delete-index.md @@ -0,0 +1,3 @@ +appwrite database deleteIndex \ + --collectionId [COLLECTION_ID] \ + --key '' diff --git a/docs/examples/0.14.x/console-cli/examples/database/get-attribute.md b/docs/examples/0.14.x/console-cli/examples/database/get-attribute.md new file mode 100644 index 0000000000..ef0a004b41 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/get-attribute.md @@ -0,0 +1,3 @@ +appwrite database getAttribute \ + --collectionId [COLLECTION_ID] \ + --key '' diff --git a/docs/examples/0.14.x/console-cli/examples/database/get-collection-usage.md b/docs/examples/0.14.x/console-cli/examples/database/get-collection-usage.md new file mode 100644 index 0000000000..e945936251 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/get-collection-usage.md @@ -0,0 +1,3 @@ +appwrite database getCollectionUsage \ + --collectionId [COLLECTION_ID] \ + diff --git a/docs/examples/0.14.x/console-cli/examples/database/get-collection.md b/docs/examples/0.14.x/console-cli/examples/database/get-collection.md new file mode 100644 index 0000000000..bfee02ff60 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/get-collection.md @@ -0,0 +1,2 @@ +appwrite database getCollection \ + --collectionId [COLLECTION_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/database/get-document.md b/docs/examples/0.14.x/console-cli/examples/database/get-document.md new file mode 100644 index 0000000000..d1082b3967 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/get-document.md @@ -0,0 +1,3 @@ +appwrite database getDocument \ + --collectionId [COLLECTION_ID] \ + --documentId [DOCUMENT_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/database/get-index.md b/docs/examples/0.14.x/console-cli/examples/database/get-index.md new file mode 100644 index 0000000000..d931f64b79 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/get-index.md @@ -0,0 +1,3 @@ +appwrite database getIndex \ + --collectionId [COLLECTION_ID] \ + --key '' diff --git a/docs/examples/0.14.x/console-cli/examples/database/get-usage.md b/docs/examples/0.14.x/console-cli/examples/database/get-usage.md new file mode 100644 index 0000000000..4c0611a64e --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/get-usage.md @@ -0,0 +1,2 @@ +appwrite database getUsage \ + diff --git a/docs/examples/0.14.x/console-cli/examples/database/list-attributes.md b/docs/examples/0.14.x/console-cli/examples/database/list-attributes.md new file mode 100644 index 0000000000..164f110d14 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/list-attributes.md @@ -0,0 +1,2 @@ +appwrite database listAttributes \ + --collectionId [COLLECTION_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/database/list-collection-logs.md b/docs/examples/0.14.x/console-cli/examples/database/list-collection-logs.md new file mode 100644 index 0000000000..d6dfcf5163 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/list-collection-logs.md @@ -0,0 +1,4 @@ +appwrite database listCollectionLogs \ + --collectionId [COLLECTION_ID] \ + + diff --git a/docs/examples/0.14.x/console-cli/examples/database/list-collections.md b/docs/examples/0.14.x/console-cli/examples/database/list-collections.md new file mode 100644 index 0000000000..a81fd940dc --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/list-collections.md @@ -0,0 +1,7 @@ +appwrite database listCollections \ + + + + + + diff --git a/docs/examples/0.14.x/console-cli/examples/database/list-document-logs.md b/docs/examples/0.14.x/console-cli/examples/database/list-document-logs.md new file mode 100644 index 0000000000..dfe192e6ed --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/list-document-logs.md @@ -0,0 +1,5 @@ +appwrite database listDocumentLogs \ + --collectionId [COLLECTION_ID] \ + --documentId [DOCUMENT_ID] \ + + diff --git a/docs/examples/0.14.x/console-cli/examples/database/list-documents.md b/docs/examples/0.14.x/console-cli/examples/database/list-documents.md new file mode 100644 index 0000000000..cd295c64c7 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/list-documents.md @@ -0,0 +1,9 @@ +appwrite database listDocuments \ + --collectionId [COLLECTION_ID] \ + + + + + + + diff --git a/docs/examples/0.14.x/console-cli/examples/database/list-indexes.md b/docs/examples/0.14.x/console-cli/examples/database/list-indexes.md new file mode 100644 index 0000000000..ccfc13f2ab --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/list-indexes.md @@ -0,0 +1,2 @@ +appwrite database listIndexes \ + --collectionId [COLLECTION_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/database/update-collection.md b/docs/examples/0.14.x/console-cli/examples/database/update-collection.md new file mode 100644 index 0000000000..576fbe5c71 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/update-collection.md @@ -0,0 +1,7 @@ +appwrite database updateCollection \ + --collectionId [COLLECTION_ID] \ + --name [NAME] \ + --permission document \ + + + diff --git a/docs/examples/0.14.x/console-cli/examples/database/update-document.md b/docs/examples/0.14.x/console-cli/examples/database/update-document.md new file mode 100644 index 0000000000..475ff0d557 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/database/update-document.md @@ -0,0 +1,6 @@ +appwrite database updateDocument \ + --collectionId [COLLECTION_ID] \ + --documentId [DOCUMENT_ID] \ + --data '{ "key": "value" }' \ + + diff --git a/docs/examples/0.14.x/console-cli/examples/functions/create-deployment.md b/docs/examples/0.14.x/console-cli/examples/functions/create-deployment.md new file mode 100644 index 0000000000..91e31739ba --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/functions/create-deployment.md @@ -0,0 +1,5 @@ +appwrite functions createDeployment \ + --functionId [FUNCTION_ID] \ + --entrypoint [ENTRYPOINT] \ + --code 'path/to/file.png' \ + --activate false diff --git a/docs/examples/0.14.x/console-cli/examples/functions/create-execution.md b/docs/examples/0.14.x/console-cli/examples/functions/create-execution.md new file mode 100644 index 0000000000..adcb3cde08 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/functions/create-execution.md @@ -0,0 +1,4 @@ +appwrite functions createExecution \ + --functionId [FUNCTION_ID] \ + + diff --git a/docs/examples/0.14.x/console-cli/examples/functions/create.md b/docs/examples/0.14.x/console-cli/examples/functions/create.md new file mode 100644 index 0000000000..a9c7ec030a --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/functions/create.md @@ -0,0 +1,9 @@ +appwrite functions create \ + --functionId [FUNCTION_ID] \ + --name [NAME] \ + --execute one two three \ + --runtime node-14.5 \ + + + + diff --git a/docs/examples/0.14.x/console-cli/examples/functions/delete-deployment.md b/docs/examples/0.14.x/console-cli/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..2033b846ce --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/functions/delete-deployment.md @@ -0,0 +1,3 @@ +appwrite functions deleteDeployment \ + --functionId [FUNCTION_ID] \ + --deploymentId [DEPLOYMENT_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/functions/delete.md b/docs/examples/0.14.x/console-cli/examples/functions/delete.md new file mode 100644 index 0000000000..b3ce304016 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/functions/delete.md @@ -0,0 +1,2 @@ +appwrite functions delete \ + --functionId [FUNCTION_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/functions/get-deployment.md b/docs/examples/0.14.x/console-cli/examples/functions/get-deployment.md new file mode 100644 index 0000000000..668bcde4fe --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/functions/get-deployment.md @@ -0,0 +1,3 @@ +appwrite functions getDeployment \ + --functionId [FUNCTION_ID] \ + --deploymentId [DEPLOYMENT_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/functions/get-execution.md b/docs/examples/0.14.x/console-cli/examples/functions/get-execution.md new file mode 100644 index 0000000000..b6a974766d --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/functions/get-execution.md @@ -0,0 +1,3 @@ +appwrite functions getExecution \ + --functionId [FUNCTION_ID] \ + --executionId [EXECUTION_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/functions/get-usage.md b/docs/examples/0.14.x/console-cli/examples/functions/get-usage.md new file mode 100644 index 0000000000..1c2cf27a50 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/functions/get-usage.md @@ -0,0 +1,3 @@ +appwrite functions getUsage \ + --functionId [FUNCTION_ID] \ + diff --git a/docs/examples/0.14.x/console-cli/examples/functions/get.md b/docs/examples/0.14.x/console-cli/examples/functions/get.md new file mode 100644 index 0000000000..0332c4a6aa --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/functions/get.md @@ -0,0 +1,2 @@ +appwrite functions get \ + --functionId [FUNCTION_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/functions/list-deployments.md b/docs/examples/0.14.x/console-cli/examples/functions/list-deployments.md new file mode 100644 index 0000000000..1dc432533e --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/functions/list-deployments.md @@ -0,0 +1,8 @@ +appwrite functions listDeployments \ + --functionId [FUNCTION_ID] \ + + + + + + diff --git a/docs/examples/0.14.x/console-cli/examples/functions/list-executions.md b/docs/examples/0.14.x/console-cli/examples/functions/list-executions.md new file mode 100644 index 0000000000..9eec5b9e56 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/functions/list-executions.md @@ -0,0 +1,7 @@ +appwrite functions listExecutions \ + --functionId [FUNCTION_ID] \ + + + + + diff --git a/docs/examples/0.14.x/console-cli/examples/functions/list-runtimes.md b/docs/examples/0.14.x/console-cli/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..15dc019c44 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/functions/list-runtimes.md @@ -0,0 +1 @@ +appwrite functions listRuntimes diff --git a/docs/examples/0.14.x/console-cli/examples/functions/list.md b/docs/examples/0.14.x/console-cli/examples/functions/list.md new file mode 100644 index 0000000000..40ace98960 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/functions/list.md @@ -0,0 +1,7 @@ +appwrite functions list \ + + + + + + diff --git a/docs/examples/0.14.x/console-cli/examples/functions/retry-build.md b/docs/examples/0.14.x/console-cli/examples/functions/retry-build.md new file mode 100644 index 0000000000..bd226b77b1 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/functions/retry-build.md @@ -0,0 +1,4 @@ +appwrite functions retryBuild \ + --functionId [FUNCTION_ID] \ + --deploymentId [DEPLOYMENT_ID] \ + --buildId [BUILD_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/functions/update-deployment.md b/docs/examples/0.14.x/console-cli/examples/functions/update-deployment.md new file mode 100644 index 0000000000..7276b3e780 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/functions/update-deployment.md @@ -0,0 +1,3 @@ +appwrite functions updateDeployment \ + --functionId [FUNCTION_ID] \ + --deploymentId [DEPLOYMENT_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/functions/update.md b/docs/examples/0.14.x/console-cli/examples/functions/update.md new file mode 100644 index 0000000000..d0557d9cd1 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/functions/update.md @@ -0,0 +1,8 @@ +appwrite functions update \ + --functionId [FUNCTION_ID] \ + --name [NAME] \ + --execute one two three \ + + + + diff --git a/docs/examples/0.14.x/console-cli/examples/health/get-antivirus.md b/docs/examples/0.14.x/console-cli/examples/health/get-antivirus.md new file mode 100644 index 0000000000..96dd7e78b2 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/health/get-antivirus.md @@ -0,0 +1 @@ +appwrite health getAntivirus diff --git a/docs/examples/0.14.x/console-cli/examples/health/get-cache.md b/docs/examples/0.14.x/console-cli/examples/health/get-cache.md new file mode 100644 index 0000000000..ad1111ccf0 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/health/get-cache.md @@ -0,0 +1 @@ +appwrite health getCache diff --git a/docs/examples/0.14.x/console-cli/examples/health/get-d-b.md b/docs/examples/0.14.x/console-cli/examples/health/get-d-b.md new file mode 100644 index 0000000000..b0ea2d3eac --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/health/get-d-b.md @@ -0,0 +1 @@ +appwrite health getDB diff --git a/docs/examples/0.14.x/console-cli/examples/health/get-queue-certificates.md b/docs/examples/0.14.x/console-cli/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..7cae239389 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/health/get-queue-certificates.md @@ -0,0 +1 @@ +appwrite health getQueueCertificates diff --git a/docs/examples/0.14.x/console-cli/examples/health/get-queue-functions.md b/docs/examples/0.14.x/console-cli/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..9edfddac62 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/health/get-queue-functions.md @@ -0,0 +1 @@ +appwrite health getQueueFunctions diff --git a/docs/examples/0.14.x/console-cli/examples/health/get-queue-logs.md b/docs/examples/0.14.x/console-cli/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..9a0974934b --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/health/get-queue-logs.md @@ -0,0 +1 @@ +appwrite health getQueueLogs diff --git a/docs/examples/0.14.x/console-cli/examples/health/get-queue-webhooks.md b/docs/examples/0.14.x/console-cli/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..f38eaa4e77 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/health/get-queue-webhooks.md @@ -0,0 +1 @@ +appwrite health getQueueWebhooks diff --git a/docs/examples/0.14.x/console-cli/examples/health/get-storage-local.md b/docs/examples/0.14.x/console-cli/examples/health/get-storage-local.md new file mode 100644 index 0000000000..b5df39fae0 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/health/get-storage-local.md @@ -0,0 +1 @@ +appwrite health getStorageLocal diff --git a/docs/examples/0.14.x/console-cli/examples/health/get-time.md b/docs/examples/0.14.x/console-cli/examples/health/get-time.md new file mode 100644 index 0000000000..067e5daf9e --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/health/get-time.md @@ -0,0 +1 @@ +appwrite health getTime diff --git a/docs/examples/0.14.x/console-cli/examples/health/get.md b/docs/examples/0.14.x/console-cli/examples/health/get.md new file mode 100644 index 0000000000..94c08e5aa3 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/health/get.md @@ -0,0 +1 @@ +appwrite health get diff --git a/docs/examples/0.14.x/console-cli/examples/locale/get-continents.md b/docs/examples/0.14.x/console-cli/examples/locale/get-continents.md new file mode 100644 index 0000000000..ff7f1aea0d --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/locale/get-continents.md @@ -0,0 +1 @@ +appwrite locale getContinents diff --git a/docs/examples/0.14.x/console-cli/examples/locale/get-countries-e-u.md b/docs/examples/0.14.x/console-cli/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..8ecd92fb10 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/locale/get-countries-e-u.md @@ -0,0 +1 @@ +appwrite locale getCountriesEU diff --git a/docs/examples/0.14.x/console-cli/examples/locale/get-countries-phones.md b/docs/examples/0.14.x/console-cli/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..6be84104d4 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/locale/get-countries-phones.md @@ -0,0 +1 @@ +appwrite locale getCountriesPhones diff --git a/docs/examples/0.14.x/console-cli/examples/locale/get-countries.md b/docs/examples/0.14.x/console-cli/examples/locale/get-countries.md new file mode 100644 index 0000000000..f2a4a4dc28 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/locale/get-countries.md @@ -0,0 +1 @@ +appwrite locale getCountries diff --git a/docs/examples/0.14.x/console-cli/examples/locale/get-currencies.md b/docs/examples/0.14.x/console-cli/examples/locale/get-currencies.md new file mode 100644 index 0000000000..b43f11f507 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/locale/get-currencies.md @@ -0,0 +1 @@ +appwrite locale getCurrencies diff --git a/docs/examples/0.14.x/console-cli/examples/locale/get-languages.md b/docs/examples/0.14.x/console-cli/examples/locale/get-languages.md new file mode 100644 index 0000000000..86ab7134b9 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/locale/get-languages.md @@ -0,0 +1 @@ +appwrite locale getLanguages diff --git a/docs/examples/0.14.x/console-cli/examples/locale/get.md b/docs/examples/0.14.x/console-cli/examples/locale/get.md new file mode 100644 index 0000000000..2002a06c20 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/locale/get.md @@ -0,0 +1 @@ +appwrite locale get diff --git a/docs/examples/0.14.x/console-cli/examples/projects/create-domain.md b/docs/examples/0.14.x/console-cli/examples/projects/create-domain.md new file mode 100644 index 0000000000..6ae89ccf27 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/create-domain.md @@ -0,0 +1,3 @@ +appwrite projects createDomain \ + --projectId [PROJECT_ID] \ + --domain '' diff --git a/docs/examples/0.14.x/console-cli/examples/projects/create-key.md b/docs/examples/0.14.x/console-cli/examples/projects/create-key.md new file mode 100644 index 0000000000..c0a7983def --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/create-key.md @@ -0,0 +1,4 @@ +appwrite projects createKey \ + --projectId [PROJECT_ID] \ + --name [NAME] \ + --scopes one two three diff --git a/docs/examples/0.14.x/console-cli/examples/projects/create-platform.md b/docs/examples/0.14.x/console-cli/examples/projects/create-platform.md new file mode 100644 index 0000000000..1374f510e2 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/create-platform.md @@ -0,0 +1,7 @@ +appwrite projects createPlatform \ + --projectId [PROJECT_ID] \ + --type web \ + --name [NAME] \ + + + diff --git a/docs/examples/0.14.x/console-cli/examples/projects/create-webhook.md b/docs/examples/0.14.x/console-cli/examples/projects/create-webhook.md new file mode 100644 index 0000000000..2eaacd167f --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/create-webhook.md @@ -0,0 +1,8 @@ +appwrite projects createWebhook \ + --projectId [PROJECT_ID] \ + --name [NAME] \ + --events one two three \ + --url https://example.com \ + --security false \ + + diff --git a/docs/examples/0.14.x/console-cli/examples/projects/create.md b/docs/examples/0.14.x/console-cli/examples/projects/create.md new file mode 100644 index 0000000000..3638e11b10 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/create.md @@ -0,0 +1,13 @@ +appwrite projects create \ + --projectId [PROJECT_ID] \ + --name [NAME] \ + --teamId [TEAM_ID] \ + + + + + + + + + diff --git a/docs/examples/0.14.x/console-cli/examples/projects/delete-domain.md b/docs/examples/0.14.x/console-cli/examples/projects/delete-domain.md new file mode 100644 index 0000000000..c4690086e1 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/delete-domain.md @@ -0,0 +1,3 @@ +appwrite projects deleteDomain \ + --projectId [PROJECT_ID] \ + --domainId [DOMAIN_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/projects/delete-key.md b/docs/examples/0.14.x/console-cli/examples/projects/delete-key.md new file mode 100644 index 0000000000..48f97cf529 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/delete-key.md @@ -0,0 +1,3 @@ +appwrite projects deleteKey \ + --projectId [PROJECT_ID] \ + --keyId [KEY_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/projects/delete-platform.md b/docs/examples/0.14.x/console-cli/examples/projects/delete-platform.md new file mode 100644 index 0000000000..9e14cb5b69 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/delete-platform.md @@ -0,0 +1,3 @@ +appwrite projects deletePlatform \ + --projectId [PROJECT_ID] \ + --platformId [PLATFORM_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/projects/delete-webhook.md b/docs/examples/0.14.x/console-cli/examples/projects/delete-webhook.md new file mode 100644 index 0000000000..1235e737c4 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/delete-webhook.md @@ -0,0 +1,3 @@ +appwrite projects deleteWebhook \ + --projectId [PROJECT_ID] \ + --webhookId [WEBHOOK_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/projects/delete.md b/docs/examples/0.14.x/console-cli/examples/projects/delete.md new file mode 100644 index 0000000000..99a21b1127 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/delete.md @@ -0,0 +1,3 @@ +appwrite projects delete \ + --projectId [PROJECT_ID] \ + --password password diff --git a/docs/examples/0.14.x/console-cli/examples/projects/get-domain.md b/docs/examples/0.14.x/console-cli/examples/projects/get-domain.md new file mode 100644 index 0000000000..367679aa4e --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/get-domain.md @@ -0,0 +1,3 @@ +appwrite projects getDomain \ + --projectId [PROJECT_ID] \ + --domainId [DOMAIN_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/projects/get-key.md b/docs/examples/0.14.x/console-cli/examples/projects/get-key.md new file mode 100644 index 0000000000..75548d21b3 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/get-key.md @@ -0,0 +1,3 @@ +appwrite projects getKey \ + --projectId [PROJECT_ID] \ + --keyId [KEY_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/projects/get-platform.md b/docs/examples/0.14.x/console-cli/examples/projects/get-platform.md new file mode 100644 index 0000000000..97432f00a2 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/get-platform.md @@ -0,0 +1,3 @@ +appwrite projects getPlatform \ + --projectId [PROJECT_ID] \ + --platformId [PLATFORM_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/projects/get-usage.md b/docs/examples/0.14.x/console-cli/examples/projects/get-usage.md new file mode 100644 index 0000000000..a10e474c14 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/get-usage.md @@ -0,0 +1,3 @@ +appwrite projects getUsage \ + --projectId [PROJECT_ID] \ + diff --git a/docs/examples/0.14.x/console-cli/examples/projects/get-webhook.md b/docs/examples/0.14.x/console-cli/examples/projects/get-webhook.md new file mode 100644 index 0000000000..b51a78c247 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/get-webhook.md @@ -0,0 +1,3 @@ +appwrite projects getWebhook \ + --projectId [PROJECT_ID] \ + --webhookId [WEBHOOK_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/projects/get.md b/docs/examples/0.14.x/console-cli/examples/projects/get.md new file mode 100644 index 0000000000..b0589ea3e7 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/get.md @@ -0,0 +1,2 @@ +appwrite projects get \ + --projectId [PROJECT_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/projects/list-domains.md b/docs/examples/0.14.x/console-cli/examples/projects/list-domains.md new file mode 100644 index 0000000000..29677137bc --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/list-domains.md @@ -0,0 +1,2 @@ +appwrite projects listDomains \ + --projectId [PROJECT_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/projects/list-keys.md b/docs/examples/0.14.x/console-cli/examples/projects/list-keys.md new file mode 100644 index 0000000000..aba2fab9e1 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/list-keys.md @@ -0,0 +1,2 @@ +appwrite projects listKeys \ + --projectId [PROJECT_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/projects/list-platforms.md b/docs/examples/0.14.x/console-cli/examples/projects/list-platforms.md new file mode 100644 index 0000000000..cd7ae3760f --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/list-platforms.md @@ -0,0 +1,2 @@ +appwrite projects listPlatforms \ + --projectId [PROJECT_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/projects/list-webhooks.md b/docs/examples/0.14.x/console-cli/examples/projects/list-webhooks.md new file mode 100644 index 0000000000..cda3f1e5c8 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/list-webhooks.md @@ -0,0 +1,2 @@ +appwrite projects listWebhooks \ + --projectId [PROJECT_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/projects/list.md b/docs/examples/0.14.x/console-cli/examples/projects/list.md new file mode 100644 index 0000000000..ca4d5e70eb --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/list.md @@ -0,0 +1,7 @@ +appwrite projects list \ + + + + + + diff --git a/docs/examples/0.14.x/console-cli/examples/projects/update-auth-limit.md b/docs/examples/0.14.x/console-cli/examples/projects/update-auth-limit.md new file mode 100644 index 0000000000..0f59c9600c --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/update-auth-limit.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthLimit \ + --projectId [PROJECT_ID] \ + --limit 0 diff --git a/docs/examples/0.14.x/console-cli/examples/projects/update-auth-status.md b/docs/examples/0.14.x/console-cli/examples/projects/update-auth-status.md new file mode 100644 index 0000000000..c4348c1b09 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/update-auth-status.md @@ -0,0 +1,4 @@ +appwrite projects updateAuthStatus \ + --projectId [PROJECT_ID] \ + --method email-password \ + --status false diff --git a/docs/examples/0.14.x/console-cli/examples/projects/update-domain-verification.md b/docs/examples/0.14.x/console-cli/examples/projects/update-domain-verification.md new file mode 100644 index 0000000000..bb07cdba78 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/update-domain-verification.md @@ -0,0 +1,3 @@ +appwrite projects updateDomainVerification \ + --projectId [PROJECT_ID] \ + --domainId [DOMAIN_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/projects/update-key.md b/docs/examples/0.14.x/console-cli/examples/projects/update-key.md new file mode 100644 index 0000000000..0e49afad8d --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/update-key.md @@ -0,0 +1,5 @@ +appwrite projects updateKey \ + --projectId [PROJECT_ID] \ + --keyId [KEY_ID] \ + --name [NAME] \ + --scopes one two three diff --git a/docs/examples/0.14.x/console-cli/examples/projects/update-o-auth2.md b/docs/examples/0.14.x/console-cli/examples/projects/update-o-auth2.md new file mode 100644 index 0000000000..bf9dea665a --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/update-o-auth2.md @@ -0,0 +1,5 @@ +appwrite projects updateOAuth2 \ + --projectId [PROJECT_ID] \ + --provider amazon \ + + diff --git a/docs/examples/0.14.x/console-cli/examples/projects/update-platform.md b/docs/examples/0.14.x/console-cli/examples/projects/update-platform.md new file mode 100644 index 0000000000..77268a4ee7 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/update-platform.md @@ -0,0 +1,7 @@ +appwrite projects updatePlatform \ + --projectId [PROJECT_ID] \ + --platformId [PLATFORM_ID] \ + --name [NAME] \ + + + diff --git a/docs/examples/0.14.x/console-cli/examples/projects/update-service-status.md b/docs/examples/0.14.x/console-cli/examples/projects/update-service-status.md new file mode 100644 index 0000000000..4cfd9f9f3c --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/update-service-status.md @@ -0,0 +1,4 @@ +appwrite projects updateServiceStatus \ + --projectId [PROJECT_ID] \ + --service account \ + --status false diff --git a/docs/examples/0.14.x/console-cli/examples/projects/update-webhook.md b/docs/examples/0.14.x/console-cli/examples/projects/update-webhook.md new file mode 100644 index 0000000000..98517cbfa8 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/update-webhook.md @@ -0,0 +1,9 @@ +appwrite projects updateWebhook \ + --projectId [PROJECT_ID] \ + --webhookId [WEBHOOK_ID] \ + --name [NAME] \ + --events one two three \ + --url https://example.com \ + --security false \ + + diff --git a/docs/examples/0.14.x/console-cli/examples/projects/update.md b/docs/examples/0.14.x/console-cli/examples/projects/update.md new file mode 100644 index 0000000000..83e99a1a8a --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/projects/update.md @@ -0,0 +1,12 @@ +appwrite projects update \ + --projectId [PROJECT_ID] \ + --name [NAME] \ + + + + + + + + + diff --git a/docs/examples/0.14.x/console-cli/examples/storage/create-bucket.md b/docs/examples/0.14.x/console-cli/examples/storage/create-bucket.md new file mode 100644 index 0000000000..0ccfdb088f --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/storage/create-bucket.md @@ -0,0 +1,11 @@ +appwrite storage createBucket \ + --bucketId [BUCKET_ID] \ + --name [NAME] \ + --permission file \ + + + + + + + diff --git a/docs/examples/0.14.x/console-cli/examples/storage/create-file.md b/docs/examples/0.14.x/console-cli/examples/storage/create-file.md new file mode 100644 index 0000000000..eaa8f9bc88 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/storage/create-file.md @@ -0,0 +1,6 @@ +appwrite storage createFile \ + --bucketId [BUCKET_ID] \ + --fileId [FILE_ID] \ + --file 'path/to/file.png' \ + + diff --git a/docs/examples/0.14.x/console-cli/examples/storage/delete-bucket.md b/docs/examples/0.14.x/console-cli/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..178a6a4b3a --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/storage/delete-bucket.md @@ -0,0 +1,2 @@ +appwrite storage deleteBucket \ + --bucketId [BUCKET_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/storage/delete-file.md b/docs/examples/0.14.x/console-cli/examples/storage/delete-file.md new file mode 100644 index 0000000000..0275f87172 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/storage/delete-file.md @@ -0,0 +1,3 @@ +appwrite storage deleteFile \ + --bucketId [BUCKET_ID] \ + --fileId [FILE_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/storage/get-bucket-usage.md b/docs/examples/0.14.x/console-cli/examples/storage/get-bucket-usage.md new file mode 100644 index 0000000000..930575e2e9 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/storage/get-bucket-usage.md @@ -0,0 +1,3 @@ +appwrite storage getBucketUsage \ + --bucketId [BUCKET_ID] \ + diff --git a/docs/examples/0.14.x/console-cli/examples/storage/get-bucket.md b/docs/examples/0.14.x/console-cli/examples/storage/get-bucket.md new file mode 100644 index 0000000000..76479be7d6 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/storage/get-bucket.md @@ -0,0 +1,2 @@ +appwrite storage getBucket \ + --bucketId [BUCKET_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/storage/get-file-download.md b/docs/examples/0.14.x/console-cli/examples/storage/get-file-download.md new file mode 100644 index 0000000000..637c7db1da --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/storage/get-file-download.md @@ -0,0 +1,3 @@ +appwrite storage getFileDownload \ + --bucketId [BUCKET_ID] \ + --fileId [FILE_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/storage/get-file-preview.md b/docs/examples/0.14.x/console-cli/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..309088506b --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/storage/get-file-preview.md @@ -0,0 +1,14 @@ +appwrite storage getFilePreview \ + --bucketId [BUCKET_ID] \ + --fileId [FILE_ID] \ + + + + + + + + + + + diff --git a/docs/examples/0.14.x/console-cli/examples/storage/get-file-view.md b/docs/examples/0.14.x/console-cli/examples/storage/get-file-view.md new file mode 100644 index 0000000000..a8500f3597 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/storage/get-file-view.md @@ -0,0 +1,3 @@ +appwrite storage getFileView \ + --bucketId [BUCKET_ID] \ + --fileId [FILE_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/storage/get-file.md b/docs/examples/0.14.x/console-cli/examples/storage/get-file.md new file mode 100644 index 0000000000..f556ef1d5c --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/storage/get-file.md @@ -0,0 +1,3 @@ +appwrite storage getFile \ + --bucketId [BUCKET_ID] \ + --fileId [FILE_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/storage/get-usage.md b/docs/examples/0.14.x/console-cli/examples/storage/get-usage.md new file mode 100644 index 0000000000..29466e02f0 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/storage/get-usage.md @@ -0,0 +1,2 @@ +appwrite storage getUsage \ + diff --git a/docs/examples/0.14.x/console-cli/examples/storage/list-buckets.md b/docs/examples/0.14.x/console-cli/examples/storage/list-buckets.md new file mode 100644 index 0000000000..2245c6ca32 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/storage/list-buckets.md @@ -0,0 +1,7 @@ +appwrite storage listBuckets \ + + + + + + diff --git a/docs/examples/0.14.x/console-cli/examples/storage/list-files.md b/docs/examples/0.14.x/console-cli/examples/storage/list-files.md new file mode 100644 index 0000000000..c0a7b1bade --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/storage/list-files.md @@ -0,0 +1,8 @@ +appwrite storage listFiles \ + --bucketId [BUCKET_ID] \ + + + + + + diff --git a/docs/examples/0.14.x/console-cli/examples/storage/update-bucket.md b/docs/examples/0.14.x/console-cli/examples/storage/update-bucket.md new file mode 100644 index 0000000000..9fc6b8001d --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/storage/update-bucket.md @@ -0,0 +1,11 @@ +appwrite storage updateBucket \ + --bucketId [BUCKET_ID] \ + --name [NAME] \ + --permission file \ + + + + + + + diff --git a/docs/examples/0.14.x/console-cli/examples/storage/update-file.md b/docs/examples/0.14.x/console-cli/examples/storage/update-file.md new file mode 100644 index 0000000000..6f6a9ca2f6 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/storage/update-file.md @@ -0,0 +1,5 @@ +appwrite storage updateFile \ + --bucketId [BUCKET_ID] \ + --fileId [FILE_ID] \ + + diff --git a/docs/examples/0.14.x/console-cli/examples/teams/create-membership.md b/docs/examples/0.14.x/console-cli/examples/teams/create-membership.md new file mode 100644 index 0000000000..351213c078 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/teams/create-membership.md @@ -0,0 +1,6 @@ +appwrite teams createMembership \ + --teamId [TEAM_ID] \ + --email email@example.com \ + --roles one two three \ + --url https://example.com \ + diff --git a/docs/examples/0.14.x/console-cli/examples/teams/create.md b/docs/examples/0.14.x/console-cli/examples/teams/create.md new file mode 100644 index 0000000000..3704d02d0b --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/teams/create.md @@ -0,0 +1,4 @@ +appwrite teams create \ + --teamId [TEAM_ID] \ + --name [NAME] \ + diff --git a/docs/examples/0.14.x/console-cli/examples/teams/delete-membership.md b/docs/examples/0.14.x/console-cli/examples/teams/delete-membership.md new file mode 100644 index 0000000000..6aaaf8902b --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/teams/delete-membership.md @@ -0,0 +1,3 @@ +appwrite teams deleteMembership \ + --teamId [TEAM_ID] \ + --membershipId [MEMBERSHIP_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/teams/delete.md b/docs/examples/0.14.x/console-cli/examples/teams/delete.md new file mode 100644 index 0000000000..0a4d554b1b --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/teams/delete.md @@ -0,0 +1,2 @@ +appwrite teams delete \ + --teamId [TEAM_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/teams/get-membership.md b/docs/examples/0.14.x/console-cli/examples/teams/get-membership.md new file mode 100644 index 0000000000..25d11863b9 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/teams/get-membership.md @@ -0,0 +1,3 @@ +appwrite teams getMembership \ + --teamId [TEAM_ID] \ + --membershipId [MEMBERSHIP_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/teams/get-memberships.md b/docs/examples/0.14.x/console-cli/examples/teams/get-memberships.md new file mode 100644 index 0000000000..2ce366bb93 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/teams/get-memberships.md @@ -0,0 +1,8 @@ +appwrite teams getMemberships \ + --teamId [TEAM_ID] \ + + + + + + diff --git a/docs/examples/0.14.x/console-cli/examples/teams/get.md b/docs/examples/0.14.x/console-cli/examples/teams/get.md new file mode 100644 index 0000000000..111aff623b --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/teams/get.md @@ -0,0 +1,2 @@ +appwrite teams get \ + --teamId [TEAM_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/teams/list-logs.md b/docs/examples/0.14.x/console-cli/examples/teams/list-logs.md new file mode 100644 index 0000000000..6acfe4e3b6 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/teams/list-logs.md @@ -0,0 +1,4 @@ +appwrite teams listLogs \ + --teamId [TEAM_ID] \ + + diff --git a/docs/examples/0.14.x/console-cli/examples/teams/list.md b/docs/examples/0.14.x/console-cli/examples/teams/list.md new file mode 100644 index 0000000000..f2cf1beee3 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/teams/list.md @@ -0,0 +1,7 @@ +appwrite teams list \ + + + + + + diff --git a/docs/examples/0.14.x/console-cli/examples/teams/update-membership-roles.md b/docs/examples/0.14.x/console-cli/examples/teams/update-membership-roles.md new file mode 100644 index 0000000000..c6684d2f65 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/teams/update-membership-roles.md @@ -0,0 +1,4 @@ +appwrite teams updateMembershipRoles \ + --teamId [TEAM_ID] \ + --membershipId [MEMBERSHIP_ID] \ + --roles one two three diff --git a/docs/examples/0.14.x/console-cli/examples/teams/update-membership-status.md b/docs/examples/0.14.x/console-cli/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..0f3efc413a --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/teams/update-membership-status.md @@ -0,0 +1,5 @@ +appwrite teams updateMembershipStatus \ + --teamId [TEAM_ID] \ + --membershipId [MEMBERSHIP_ID] \ + --userId [USER_ID] \ + --secret [SECRET] diff --git a/docs/examples/0.14.x/console-cli/examples/teams/update.md b/docs/examples/0.14.x/console-cli/examples/teams/update.md new file mode 100644 index 0000000000..4298ea519a --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/teams/update.md @@ -0,0 +1,3 @@ +appwrite teams update \ + --teamId [TEAM_ID] \ + --name [NAME] diff --git a/docs/examples/0.14.x/console-cli/examples/users/create.md b/docs/examples/0.14.x/console-cli/examples/users/create.md new file mode 100644 index 0000000000..ccf46cc98b --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/users/create.md @@ -0,0 +1,5 @@ +appwrite users create \ + --userId [USER_ID] \ + --email email@example.com \ + --password password \ + diff --git a/docs/examples/0.14.x/console-cli/examples/users/delete-session.md b/docs/examples/0.14.x/console-cli/examples/users/delete-session.md new file mode 100644 index 0000000000..e4b7632cf7 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/users/delete-session.md @@ -0,0 +1,3 @@ +appwrite users deleteSession \ + --userId [USER_ID] \ + --sessionId [SESSION_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/users/delete-sessions.md b/docs/examples/0.14.x/console-cli/examples/users/delete-sessions.md new file mode 100644 index 0000000000..16c2c3a070 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/users/delete-sessions.md @@ -0,0 +1,2 @@ +appwrite users deleteSessions \ + --userId [USER_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/users/delete.md b/docs/examples/0.14.x/console-cli/examples/users/delete.md new file mode 100644 index 0000000000..9c24060965 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/users/delete.md @@ -0,0 +1,2 @@ +appwrite users delete \ + --userId [USER_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/users/get-logs.md b/docs/examples/0.14.x/console-cli/examples/users/get-logs.md new file mode 100644 index 0000000000..dfc1744564 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/users/get-logs.md @@ -0,0 +1,4 @@ +appwrite users getLogs \ + --userId [USER_ID] \ + + diff --git a/docs/examples/0.14.x/console-cli/examples/users/get-memberships.md b/docs/examples/0.14.x/console-cli/examples/users/get-memberships.md new file mode 100644 index 0000000000..7375de23c2 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/users/get-memberships.md @@ -0,0 +1,2 @@ +appwrite users getMemberships \ + --userId [USER_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/users/get-prefs.md b/docs/examples/0.14.x/console-cli/examples/users/get-prefs.md new file mode 100644 index 0000000000..1aa1b1e332 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/users/get-prefs.md @@ -0,0 +1,2 @@ +appwrite users getPrefs \ + --userId [USER_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/users/get-sessions.md b/docs/examples/0.14.x/console-cli/examples/users/get-sessions.md new file mode 100644 index 0000000000..432b35cd2d --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/users/get-sessions.md @@ -0,0 +1,2 @@ +appwrite users getSessions \ + --userId [USER_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/users/get-usage.md b/docs/examples/0.14.x/console-cli/examples/users/get-usage.md new file mode 100644 index 0000000000..860cdc0c42 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/users/get-usage.md @@ -0,0 +1,3 @@ +appwrite users getUsage \ + + diff --git a/docs/examples/0.14.x/console-cli/examples/users/get.md b/docs/examples/0.14.x/console-cli/examples/users/get.md new file mode 100644 index 0000000000..95f44afecf --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/users/get.md @@ -0,0 +1,2 @@ +appwrite users get \ + --userId [USER_ID] diff --git a/docs/examples/0.14.x/console-cli/examples/users/list.md b/docs/examples/0.14.x/console-cli/examples/users/list.md new file mode 100644 index 0000000000..79bd22c68e --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/users/list.md @@ -0,0 +1,7 @@ +appwrite users list \ + + + + + + diff --git a/docs/examples/0.14.x/console-cli/examples/users/update-email.md b/docs/examples/0.14.x/console-cli/examples/users/update-email.md new file mode 100644 index 0000000000..be8bb11607 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/users/update-email.md @@ -0,0 +1,3 @@ +appwrite users updateEmail \ + --userId [USER_ID] \ + --email email@example.com diff --git a/docs/examples/0.14.x/console-cli/examples/users/update-name.md b/docs/examples/0.14.x/console-cli/examples/users/update-name.md new file mode 100644 index 0000000000..ce9cad511b --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/users/update-name.md @@ -0,0 +1,3 @@ +appwrite users updateName \ + --userId [USER_ID] \ + --name [NAME] diff --git a/docs/examples/0.14.x/console-cli/examples/users/update-password.md b/docs/examples/0.14.x/console-cli/examples/users/update-password.md new file mode 100644 index 0000000000..1678467102 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/users/update-password.md @@ -0,0 +1,3 @@ +appwrite users updatePassword \ + --userId [USER_ID] \ + --password password diff --git a/docs/examples/0.14.x/console-cli/examples/users/update-prefs.md b/docs/examples/0.14.x/console-cli/examples/users/update-prefs.md new file mode 100644 index 0000000000..cc4a7422ac --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/users/update-prefs.md @@ -0,0 +1,3 @@ +appwrite users updatePrefs \ + --userId [USER_ID] \ + --prefs '{ "key": "value" }' diff --git a/docs/examples/0.14.x/console-cli/examples/users/update-status.md b/docs/examples/0.14.x/console-cli/examples/users/update-status.md new file mode 100644 index 0000000000..6bc10ee5de --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/users/update-status.md @@ -0,0 +1,3 @@ +appwrite users updateStatus \ + --userId [USER_ID] \ + --status false diff --git a/docs/examples/0.14.x/console-cli/examples/users/update-verification.md b/docs/examples/0.14.x/console-cli/examples/users/update-verification.md new file mode 100644 index 0000000000..edc5934bb4 --- /dev/null +++ b/docs/examples/0.14.x/console-cli/examples/users/update-verification.md @@ -0,0 +1,3 @@ +appwrite users updateVerification \ + --userId [USER_ID] \ + --emailVerification false diff --git a/docs/examples/0.14.x/console-web/examples/account/create-anonymous-session.md b/docs/examples/0.14.x/console-web/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..8979218e0f --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/create-anonymous-session.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.createAnonymousSession(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/account/create-j-w-t.md b/docs/examples/0.14.x/console-web/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..cf00356375 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/create-j-w-t.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.createJWT(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/account/create-magic-u-r-l-session.md b/docs/examples/0.14.x/console-web/examples/account/create-magic-u-r-l-session.md new file mode 100644 index 0000000000..5318f5f276 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/create-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.createMagicURLSession('[USER_ID]', 'email@example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/account/create-o-auth2session.md b/docs/examples/0.14.x/console-web/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..886a8f8480 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/create-o-auth2session.md @@ -0,0 +1,10 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +// Go to OAuth provider login page +sdk.account.createOAuth2Session('amazon'); + diff --git a/docs/examples/0.14.x/console-web/examples/account/create-recovery.md b/docs/examples/0.14.x/console-web/examples/account/create-recovery.md new file mode 100644 index 0000000000..f57e926e9b --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.createRecovery('email@example.com', 'https://example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/account/create-session.md b/docs/examples/0.14.x/console-web/examples/account/create-session.md new file mode 100644 index 0000000000..f41438306e --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/create-session.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.createSession('email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/account/create-verification.md b/docs/examples/0.14.x/console-web/examples/account/create-verification.md new file mode 100644 index 0000000000..6a00f1a3e1 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/create-verification.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.createVerification('https://example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/account/create.md b/docs/examples/0.14.x/console-web/examples/account/create.md new file mode 100644 index 0000000000..18f2fbbdc6 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/create.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.create('[USER_ID]', 'email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/account/delete-session.md b/docs/examples/0.14.x/console-web/examples/account/delete-session.md new file mode 100644 index 0000000000..b3f46d15a9 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/delete-session.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.deleteSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/account/delete-sessions.md b/docs/examples/0.14.x/console-web/examples/account/delete-sessions.md new file mode 100644 index 0000000000..e89ba3087a --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/delete-sessions.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.deleteSessions(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/account/get-logs.md b/docs/examples/0.14.x/console-web/examples/account/get-logs.md new file mode 100644 index 0000000000..f382d7216c --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/get-logs.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.getLogs(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/account/get-prefs.md b/docs/examples/0.14.x/console-web/examples/account/get-prefs.md new file mode 100644 index 0000000000..99e86d4f1d --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/get-prefs.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.getPrefs(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/account/get-session.md b/docs/examples/0.14.x/console-web/examples/account/get-session.md new file mode 100644 index 0000000000..79ec93f6e9 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/get-session.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.getSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/account/get-sessions.md b/docs/examples/0.14.x/console-web/examples/account/get-sessions.md new file mode 100644 index 0000000000..384e6fa347 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/get-sessions.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.getSessions(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/account/get.md b/docs/examples/0.14.x/console-web/examples/account/get.md new file mode 100644 index 0000000000..cc933152a2 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/get.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.get(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/account/update-email.md b/docs/examples/0.14.x/console-web/examples/account/update-email.md new file mode 100644 index 0000000000..e4a68e25c9 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/update-email.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updateEmail('email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/account/update-magic-u-r-l-session.md b/docs/examples/0.14.x/console-web/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..3c00386b7f --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updateMagicURLSession('[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/account/update-name.md b/docs/examples/0.14.x/console-web/examples/account/update-name.md new file mode 100644 index 0000000000..ff782195b1 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/update-name.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updateName('[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/account/update-password.md b/docs/examples/0.14.x/console-web/examples/account/update-password.md new file mode 100644 index 0000000000..d551ed726f --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/update-password.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updatePassword('password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/account/update-prefs.md b/docs/examples/0.14.x/console-web/examples/account/update-prefs.md new file mode 100644 index 0000000000..232b77025b --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/update-prefs.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updatePrefs({}); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/account/update-recovery.md b/docs/examples/0.14.x/console-web/examples/account/update-recovery.md new file mode 100644 index 0000000000..6fe36c017e --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/account/update-session.md b/docs/examples/0.14.x/console-web/examples/account/update-session.md new file mode 100644 index 0000000000..cfb61b679a --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/update-session.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updateSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/account/update-status.md b/docs/examples/0.14.x/console-web/examples/account/update-status.md new file mode 100644 index 0000000000..1b22ae81ad --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/update-status.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updateStatus(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/account/update-verification.md b/docs/examples/0.14.x/console-web/examples/account/update-verification.md new file mode 100644 index 0000000000..e3312c5d5b --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/account/update-verification.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updateVerification('[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/avatars/get-browser.md b/docs/examples/0.14.x/console-web/examples/avatars/get-browser.md new file mode 100644 index 0000000000..fe0143b818 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/avatars/get-browser.md @@ -0,0 +1,10 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.avatars.getBrowser('aa'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/avatars/get-credit-card.md b/docs/examples/0.14.x/console-web/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..5477094ca5 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/avatars/get-credit-card.md @@ -0,0 +1,10 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.avatars.getCreditCard('amex'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/avatars/get-favicon.md b/docs/examples/0.14.x/console-web/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..1327bb7384 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/avatars/get-favicon.md @@ -0,0 +1,10 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.avatars.getFavicon('https://example.com'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/avatars/get-flag.md b/docs/examples/0.14.x/console-web/examples/avatars/get-flag.md new file mode 100644 index 0000000000..13a90c3075 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/avatars/get-flag.md @@ -0,0 +1,10 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.avatars.getFlag('af'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/avatars/get-image.md b/docs/examples/0.14.x/console-web/examples/avatars/get-image.md new file mode 100644 index 0000000000..82cb205a74 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/avatars/get-image.md @@ -0,0 +1,10 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.avatars.getImage('https://example.com'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/avatars/get-initials.md b/docs/examples/0.14.x/console-web/examples/avatars/get-initials.md new file mode 100644 index 0000000000..a3da13d460 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/avatars/get-initials.md @@ -0,0 +1,10 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.avatars.getInitials(); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/avatars/get-q-r.md b/docs/examples/0.14.x/console-web/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..c900a63531 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/avatars/get-q-r.md @@ -0,0 +1,10 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.avatars.getQR('[TEXT]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/create-boolean-attribute.md b/docs/examples/0.14.x/console-web/examples/database/create-boolean-attribute.md new file mode 100644 index 0000000000..cfa1ea0e8d --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/create-boolean-attribute.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.createBooleanAttribute('[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/create-collection.md b/docs/examples/0.14.x/console-web/examples/database/create-collection.md new file mode 100644 index 0000000000..c4add41814 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/create-collection.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.createCollection('[COLLECTION_ID]', '[NAME]', 'document', ["role:all"], ["role:all"]); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/create-document.md b/docs/examples/0.14.x/console-web/examples/database/create-document.md new file mode 100644 index 0000000000..5f57b2fc3d --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/create-document.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.createDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/create-email-attribute.md b/docs/examples/0.14.x/console-web/examples/database/create-email-attribute.md new file mode 100644 index 0000000000..c6dc762917 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/create-email-attribute.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.createEmailAttribute('[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/create-enum-attribute.md b/docs/examples/0.14.x/console-web/examples/database/create-enum-attribute.md new file mode 100644 index 0000000000..e1d8146d3d --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/create-enum-attribute.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.createEnumAttribute('[COLLECTION_ID]', '', [], false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/create-float-attribute.md b/docs/examples/0.14.x/console-web/examples/database/create-float-attribute.md new file mode 100644 index 0000000000..302a6fdfa3 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/create-float-attribute.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.createFloatAttribute('[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/create-index.md b/docs/examples/0.14.x/console-web/examples/database/create-index.md new file mode 100644 index 0000000000..4dc3b43fef --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/create-index.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.createIndex('[COLLECTION_ID]', '', 'key', []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/create-integer-attribute.md b/docs/examples/0.14.x/console-web/examples/database/create-integer-attribute.md new file mode 100644 index 0000000000..e9d50a2525 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/create-integer-attribute.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.createIntegerAttribute('[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/create-ip-attribute.md b/docs/examples/0.14.x/console-web/examples/database/create-ip-attribute.md new file mode 100644 index 0000000000..62fad8c742 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/create-ip-attribute.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.createIpAttribute('[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/create-string-attribute.md b/docs/examples/0.14.x/console-web/examples/database/create-string-attribute.md new file mode 100644 index 0000000000..2a5b6169fd --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/create-string-attribute.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.createStringAttribute('[COLLECTION_ID]', '', 1, false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/create-url-attribute.md b/docs/examples/0.14.x/console-web/examples/database/create-url-attribute.md new file mode 100644 index 0000000000..e95c5f0a72 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/create-url-attribute.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.createUrlAttribute('[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/delete-attribute.md b/docs/examples/0.14.x/console-web/examples/database/delete-attribute.md new file mode 100644 index 0000000000..574137390b --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/delete-attribute.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.deleteAttribute('[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/delete-collection.md b/docs/examples/0.14.x/console-web/examples/database/delete-collection.md new file mode 100644 index 0000000000..94ff0a6f06 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/delete-collection.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.deleteCollection('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/delete-document.md b/docs/examples/0.14.x/console-web/examples/database/delete-document.md new file mode 100644 index 0000000000..557662966d --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/delete-document.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/delete-index.md b/docs/examples/0.14.x/console-web/examples/database/delete-index.md new file mode 100644 index 0000000000..0ffb7b626b --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/delete-index.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.deleteIndex('[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/get-attribute.md b/docs/examples/0.14.x/console-web/examples/database/get-attribute.md new file mode 100644 index 0000000000..38f96614e1 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/get-attribute.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.getAttribute('[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/get-collection-usage.md b/docs/examples/0.14.x/console-web/examples/database/get-collection-usage.md new file mode 100644 index 0000000000..80bb7a8acd --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/get-collection-usage.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.getCollectionUsage('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/get-collection.md b/docs/examples/0.14.x/console-web/examples/database/get-collection.md new file mode 100644 index 0000000000..4180a5c7db --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/get-collection.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.getCollection('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/get-document.md b/docs/examples/0.14.x/console-web/examples/database/get-document.md new file mode 100644 index 0000000000..841157f551 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/get-document.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/get-index.md b/docs/examples/0.14.x/console-web/examples/database/get-index.md new file mode 100644 index 0000000000..1994f9c8a3 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/get-index.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.getIndex('[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/get-usage.md b/docs/examples/0.14.x/console-web/examples/database/get-usage.md new file mode 100644 index 0000000000..1e4316ac62 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/get-usage.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.getUsage(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/list-attributes.md b/docs/examples/0.14.x/console-web/examples/database/list-attributes.md new file mode 100644 index 0000000000..e05c5e778f --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/list-attributes.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.listAttributes('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/list-collection-logs.md b/docs/examples/0.14.x/console-web/examples/database/list-collection-logs.md new file mode 100644 index 0000000000..536b1c698b --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/list-collection-logs.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.listCollectionLogs('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/list-collections.md b/docs/examples/0.14.x/console-web/examples/database/list-collections.md new file mode 100644 index 0000000000..d06151dcee --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/list-collections.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.listCollections(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/list-document-logs.md b/docs/examples/0.14.x/console-web/examples/database/list-document-logs.md new file mode 100644 index 0000000000..761328157c --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/list-document-logs.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.listDocumentLogs('[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/list-documents.md b/docs/examples/0.14.x/console-web/examples/database/list-documents.md new file mode 100644 index 0000000000..620137cf8e --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/list-documents.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.listDocuments('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/list-indexes.md b/docs/examples/0.14.x/console-web/examples/database/list-indexes.md new file mode 100644 index 0000000000..4d755d929b --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/list-indexes.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.listIndexes('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/update-collection.md b/docs/examples/0.14.x/console-web/examples/database/update-collection.md new file mode 100644 index 0000000000..efca04d443 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/update-collection.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.updateCollection('[COLLECTION_ID]', '[NAME]', 'document'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/database/update-document.md b/docs/examples/0.14.x/console-web/examples/database/update-document.md new file mode 100644 index 0000000000..b07b2ecac1 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/database/update-document.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/functions/create-deployment.md b/docs/examples/0.14.x/console-web/examples/functions/create-deployment.md new file mode 100644 index 0000000000..6076987a56 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/functions/create-deployment.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.functions.createDeployment('[FUNCTION_ID]', '[ENTRYPOINT]', document.getElementById('uploader').files[0], false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/functions/create-execution.md b/docs/examples/0.14.x/console-web/examples/functions/create-execution.md new file mode 100644 index 0000000000..87dc73a205 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/functions/create-execution.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.functions.createExecution('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/functions/create.md b/docs/examples/0.14.x/console-web/examples/functions/create.md new file mode 100644 index 0000000000..296e2798c6 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/functions/create.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.functions.create('[FUNCTION_ID]', '[NAME]', [], 'node-14.5'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/functions/delete-deployment.md b/docs/examples/0.14.x/console-web/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..1bea4d90fc --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/functions/delete-deployment.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.functions.deleteDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/functions/delete.md b/docs/examples/0.14.x/console-web/examples/functions/delete.md new file mode 100644 index 0000000000..d080c101bf --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/functions/delete.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.functions.delete('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/functions/get-deployment.md b/docs/examples/0.14.x/console-web/examples/functions/get-deployment.md new file mode 100644 index 0000000000..3eb536f9ee --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/functions/get-deployment.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.functions.getDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/functions/get-execution.md b/docs/examples/0.14.x/console-web/examples/functions/get-execution.md new file mode 100644 index 0000000000..a8a0c4a0c8 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.functions.getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/functions/get-usage.md b/docs/examples/0.14.x/console-web/examples/functions/get-usage.md new file mode 100644 index 0000000000..3a14e5d0be --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/functions/get-usage.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.functions.getUsage('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/functions/get.md b/docs/examples/0.14.x/console-web/examples/functions/get.md new file mode 100644 index 0000000000..eeeee205bd --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/functions/get.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.functions.get('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/functions/list-deployments.md b/docs/examples/0.14.x/console-web/examples/functions/list-deployments.md new file mode 100644 index 0000000000..04ef5bf9c4 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/functions/list-deployments.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.functions.listDeployments('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/functions/list-executions.md b/docs/examples/0.14.x/console-web/examples/functions/list-executions.md new file mode 100644 index 0000000000..82652ddb6c --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/functions/list-executions.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.functions.listExecutions('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/functions/list-runtimes.md b/docs/examples/0.14.x/console-web/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..a6d0099e1b --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/functions/list-runtimes.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.functions.listRuntimes(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/functions/list.md b/docs/examples/0.14.x/console-web/examples/functions/list.md new file mode 100644 index 0000000000..3002e2d8ee --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/functions/list.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.functions.list(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/functions/retry-build.md b/docs/examples/0.14.x/console-web/examples/functions/retry-build.md new file mode 100644 index 0000000000..e0f49976b0 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/functions/retry-build.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.functions.retryBuild('[FUNCTION_ID]', '[DEPLOYMENT_ID]', '[BUILD_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/functions/update-deployment.md b/docs/examples/0.14.x/console-web/examples/functions/update-deployment.md new file mode 100644 index 0000000000..e8e3ad2faa --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/functions/update-deployment.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.functions.updateDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/functions/update.md b/docs/examples/0.14.x/console-web/examples/functions/update.md new file mode 100644 index 0000000000..4243843568 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/functions/update.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.functions.update('[FUNCTION_ID]', '[NAME]', []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/health/get-antivirus.md b/docs/examples/0.14.x/console-web/examples/health/get-antivirus.md new file mode 100644 index 0000000000..71e16bd903 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/health/get-antivirus.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.health.getAntivirus(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/health/get-cache.md b/docs/examples/0.14.x/console-web/examples/health/get-cache.md new file mode 100644 index 0000000000..a087d8db58 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/health/get-cache.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.health.getCache(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/health/get-d-b.md b/docs/examples/0.14.x/console-web/examples/health/get-d-b.md new file mode 100644 index 0000000000..fa4810de41 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/health/get-d-b.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.health.getDB(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/health/get-queue-certificates.md b/docs/examples/0.14.x/console-web/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..9395664549 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/health/get-queue-certificates.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.health.getQueueCertificates(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/health/get-queue-functions.md b/docs/examples/0.14.x/console-web/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..9153497870 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/health/get-queue-functions.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.health.getQueueFunctions(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/health/get-queue-logs.md b/docs/examples/0.14.x/console-web/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..32b58757a3 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/health/get-queue-logs.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.health.getQueueLogs(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/health/get-queue-webhooks.md b/docs/examples/0.14.x/console-web/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..8a23b957d7 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/health/get-queue-webhooks.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.health.getQueueWebhooks(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/health/get-storage-local.md b/docs/examples/0.14.x/console-web/examples/health/get-storage-local.md new file mode 100644 index 0000000000..8fb72d9538 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/health/get-storage-local.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.health.getStorageLocal(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/health/get-time.md b/docs/examples/0.14.x/console-web/examples/health/get-time.md new file mode 100644 index 0000000000..49c9848e9b --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/health/get-time.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.health.getTime(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/health/get.md b/docs/examples/0.14.x/console-web/examples/health/get.md new file mode 100644 index 0000000000..b933fb70f0 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/health/get.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.health.get(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/locale/get-continents.md b/docs/examples/0.14.x/console-web/examples/locale/get-continents.md new file mode 100644 index 0000000000..f0798a820c --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/locale/get-continents.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.locale.getContinents(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/locale/get-countries-e-u.md b/docs/examples/0.14.x/console-web/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..7bc6aa2d50 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/locale/get-countries-e-u.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.locale.getCountriesEU(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/locale/get-countries-phones.md b/docs/examples/0.14.x/console-web/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..e92982c1a2 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/locale/get-countries-phones.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.locale.getCountriesPhones(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/locale/get-countries.md b/docs/examples/0.14.x/console-web/examples/locale/get-countries.md new file mode 100644 index 0000000000..bb12e6ab5f --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/locale/get-countries.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.locale.getCountries(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/locale/get-currencies.md b/docs/examples/0.14.x/console-web/examples/locale/get-currencies.md new file mode 100644 index 0000000000..3382c2015c --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/locale/get-currencies.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.locale.getCurrencies(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/locale/get-languages.md b/docs/examples/0.14.x/console-web/examples/locale/get-languages.md new file mode 100644 index 0000000000..a7fa4a0170 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/locale/get-languages.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.locale.getLanguages(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/locale/get.md b/docs/examples/0.14.x/console-web/examples/locale/get.md new file mode 100644 index 0000000000..89ade06941 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/locale/get.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.locale.get(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/create-domain.md b/docs/examples/0.14.x/console-web/examples/projects/create-domain.md new file mode 100644 index 0000000000..1382106c03 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/create-domain.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.createDomain('[PROJECT_ID]', ''); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/create-key.md b/docs/examples/0.14.x/console-web/examples/projects/create-key.md new file mode 100644 index 0000000000..95157eab7b --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/create-key.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.createKey('[PROJECT_ID]', '[NAME]', []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/create-platform.md b/docs/examples/0.14.x/console-web/examples/projects/create-platform.md new file mode 100644 index 0000000000..177fe89e01 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/create-platform.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.createPlatform('[PROJECT_ID]', 'web', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/create-webhook.md b/docs/examples/0.14.x/console-web/examples/projects/create-webhook.md new file mode 100644 index 0000000000..f3a1271d34 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/create-webhook.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.createWebhook('[PROJECT_ID]', '[NAME]', [], 'https://example.com', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/create.md b/docs/examples/0.14.x/console-web/examples/projects/create.md new file mode 100644 index 0000000000..5321ffa040 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/create.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.create('[PROJECT_ID]', '[NAME]', '[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/delete-domain.md b/docs/examples/0.14.x/console-web/examples/projects/delete-domain.md new file mode 100644 index 0000000000..53aaa577f7 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/delete-domain.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.deleteDomain('[PROJECT_ID]', '[DOMAIN_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/delete-key.md b/docs/examples/0.14.x/console-web/examples/projects/delete-key.md new file mode 100644 index 0000000000..205f357a70 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/delete-key.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.deleteKey('[PROJECT_ID]', '[KEY_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/delete-platform.md b/docs/examples/0.14.x/console-web/examples/projects/delete-platform.md new file mode 100644 index 0000000000..3f770290ad --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/delete-platform.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.deletePlatform('[PROJECT_ID]', '[PLATFORM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/delete-webhook.md b/docs/examples/0.14.x/console-web/examples/projects/delete-webhook.md new file mode 100644 index 0000000000..5e698f398f --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/delete-webhook.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.deleteWebhook('[PROJECT_ID]', '[WEBHOOK_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/delete.md b/docs/examples/0.14.x/console-web/examples/projects/delete.md new file mode 100644 index 0000000000..506bba2f42 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/delete.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.delete('[PROJECT_ID]', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/get-domain.md b/docs/examples/0.14.x/console-web/examples/projects/get-domain.md new file mode 100644 index 0000000000..f81b67f3ab --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/get-domain.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.getDomain('[PROJECT_ID]', '[DOMAIN_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/get-key.md b/docs/examples/0.14.x/console-web/examples/projects/get-key.md new file mode 100644 index 0000000000..0780229ecf --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/get-key.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.getKey('[PROJECT_ID]', '[KEY_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/get-platform.md b/docs/examples/0.14.x/console-web/examples/projects/get-platform.md new file mode 100644 index 0000000000..a2229a2c59 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/get-platform.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.getPlatform('[PROJECT_ID]', '[PLATFORM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/get-usage.md b/docs/examples/0.14.x/console-web/examples/projects/get-usage.md new file mode 100644 index 0000000000..db4f2d84f9 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/get-usage.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.getUsage('[PROJECT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/get-webhook.md b/docs/examples/0.14.x/console-web/examples/projects/get-webhook.md new file mode 100644 index 0000000000..849cf75ee0 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/get-webhook.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.getWebhook('[PROJECT_ID]', '[WEBHOOK_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/get.md b/docs/examples/0.14.x/console-web/examples/projects/get.md new file mode 100644 index 0000000000..3e3e10f023 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/get.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.get('[PROJECT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/list-domains.md b/docs/examples/0.14.x/console-web/examples/projects/list-domains.md new file mode 100644 index 0000000000..f6537d86bf --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/list-domains.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.listDomains('[PROJECT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/list-keys.md b/docs/examples/0.14.x/console-web/examples/projects/list-keys.md new file mode 100644 index 0000000000..1ce0040051 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/list-keys.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.listKeys('[PROJECT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/list-platforms.md b/docs/examples/0.14.x/console-web/examples/projects/list-platforms.md new file mode 100644 index 0000000000..7851b80b44 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/list-platforms.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.listPlatforms('[PROJECT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/list-webhooks.md b/docs/examples/0.14.x/console-web/examples/projects/list-webhooks.md new file mode 100644 index 0000000000..eef35c531e --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/list-webhooks.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.listWebhooks('[PROJECT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/list.md b/docs/examples/0.14.x/console-web/examples/projects/list.md new file mode 100644 index 0000000000..2dae186849 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/list.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.list(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/update-auth-limit.md b/docs/examples/0.14.x/console-web/examples/projects/update-auth-limit.md new file mode 100644 index 0000000000..68e3a4a764 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/update-auth-limit.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.updateAuthLimit('[PROJECT_ID]', 0); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/update-auth-status.md b/docs/examples/0.14.x/console-web/examples/projects/update-auth-status.md new file mode 100644 index 0000000000..7e325972b3 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/update-auth-status.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.updateAuthStatus('[PROJECT_ID]', 'email-password', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/update-domain-verification.md b/docs/examples/0.14.x/console-web/examples/projects/update-domain-verification.md new file mode 100644 index 0000000000..c00aea2724 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/update-domain-verification.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.updateDomainVerification('[PROJECT_ID]', '[DOMAIN_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/update-key.md b/docs/examples/0.14.x/console-web/examples/projects/update-key.md new file mode 100644 index 0000000000..90209de5e1 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/update-key.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.updateKey('[PROJECT_ID]', '[KEY_ID]', '[NAME]', []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/update-o-auth2.md b/docs/examples/0.14.x/console-web/examples/projects/update-o-auth2.md new file mode 100644 index 0000000000..126a45e425 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/update-o-auth2.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.updateOAuth2('[PROJECT_ID]', 'amazon'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/update-platform.md b/docs/examples/0.14.x/console-web/examples/projects/update-platform.md new file mode 100644 index 0000000000..17d3773ea9 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/update-platform.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.updatePlatform('[PROJECT_ID]', '[PLATFORM_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/update-service-status.md b/docs/examples/0.14.x/console-web/examples/projects/update-service-status.md new file mode 100644 index 0000000000..3fdaa5ad6d --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/update-service-status.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.updateServiceStatus('[PROJECT_ID]', 'account', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/update-webhook.md b/docs/examples/0.14.x/console-web/examples/projects/update-webhook.md new file mode 100644 index 0000000000..cf12bcb209 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/update-webhook.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.updateWebhook('[PROJECT_ID]', '[WEBHOOK_ID]', '[NAME]', [], 'https://example.com', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/projects/update.md b/docs/examples/0.14.x/console-web/examples/projects/update.md new file mode 100644 index 0000000000..835779e30f --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/projects/update.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.projects.update('[PROJECT_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/storage/create-bucket.md b/docs/examples/0.14.x/console-web/examples/storage/create-bucket.md new file mode 100644 index 0000000000..5af19f6264 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/storage/create-bucket.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.storage.createBucket('[BUCKET_ID]', '[NAME]', 'file'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/storage/create-file.md b/docs/examples/0.14.x/console-web/examples/storage/create-file.md new file mode 100644 index 0000000000..f464fe608e --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/storage/create-file.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.storage.createFile('[BUCKET_ID]', '[FILE_ID]', document.getElementById('uploader').files[0]); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/storage/delete-bucket.md b/docs/examples/0.14.x/console-web/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..02d11d5846 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/storage/delete-bucket.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.storage.deleteBucket('[BUCKET_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/storage/delete-file.md b/docs/examples/0.14.x/console-web/examples/storage/delete-file.md new file mode 100644 index 0000000000..94c9e3112c --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.storage.deleteFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/storage/get-bucket-usage.md b/docs/examples/0.14.x/console-web/examples/storage/get-bucket-usage.md new file mode 100644 index 0000000000..7cc74b6665 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/storage/get-bucket-usage.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.storage.getBucketUsage('[BUCKET_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/storage/get-bucket.md b/docs/examples/0.14.x/console-web/examples/storage/get-bucket.md new file mode 100644 index 0000000000..57c32e138b --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/storage/get-bucket.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.storage.getBucket('[BUCKET_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/storage/get-file-download.md b/docs/examples/0.14.x/console-web/examples/storage/get-file-download.md new file mode 100644 index 0000000000..18a01aaa91 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/storage/get-file-download.md @@ -0,0 +1,10 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.storage.getFileDownload('[BUCKET_ID]', '[FILE_ID]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/storage/get-file-preview.md b/docs/examples/0.14.x/console-web/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..b9d9377e1f --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/storage/get-file-preview.md @@ -0,0 +1,10 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.storage.getFilePreview('[BUCKET_ID]', '[FILE_ID]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/storage/get-file-view.md b/docs/examples/0.14.x/console-web/examples/storage/get-file-view.md new file mode 100644 index 0000000000..eae4e78d6a --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/storage/get-file-view.md @@ -0,0 +1,10 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.storage.getFileView('[BUCKET_ID]', '[FILE_ID]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/storage/get-file.md b/docs/examples/0.14.x/console-web/examples/storage/get-file.md new file mode 100644 index 0000000000..4a8eb23038 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/storage/get-file.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.storage.getFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/storage/get-usage.md b/docs/examples/0.14.x/console-web/examples/storage/get-usage.md new file mode 100644 index 0000000000..a232301ba6 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/storage/get-usage.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.storage.getUsage(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/storage/list-buckets.md b/docs/examples/0.14.x/console-web/examples/storage/list-buckets.md new file mode 100644 index 0000000000..f44b2d232d --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/storage/list-buckets.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.storage.listBuckets(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/storage/list-files.md b/docs/examples/0.14.x/console-web/examples/storage/list-files.md new file mode 100644 index 0000000000..f4a83cd29d --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/storage/list-files.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.storage.listFiles('[BUCKET_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/storage/update-bucket.md b/docs/examples/0.14.x/console-web/examples/storage/update-bucket.md new file mode 100644 index 0000000000..06eaf14176 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/storage/update-bucket.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.storage.updateBucket('[BUCKET_ID]', '[NAME]', 'file'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/storage/update-file.md b/docs/examples/0.14.x/console-web/examples/storage/update-file.md new file mode 100644 index 0000000000..fbb04a9bda --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/storage/update-file.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.storage.updateFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/teams/create-membership.md b/docs/examples/0.14.x/console-web/examples/teams/create-membership.md new file mode 100644 index 0000000000..68b7f2be17 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/teams/create-membership.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/teams/create.md b/docs/examples/0.14.x/console-web/examples/teams/create.md new file mode 100644 index 0000000000..c0b5e6aa06 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/teams/create.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.create('[TEAM_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/teams/delete-membership.md b/docs/examples/0.14.x/console-web/examples/teams/delete-membership.md new file mode 100644 index 0000000000..46916ab1f4 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.deleteMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/teams/delete.md b/docs/examples/0.14.x/console-web/examples/teams/delete.md new file mode 100644 index 0000000000..e04f9f505a --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/teams/delete.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.delete('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/teams/get-membership.md b/docs/examples/0.14.x/console-web/examples/teams/get-membership.md new file mode 100644 index 0000000000..0ff21ca48e --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.getMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/teams/get-memberships.md b/docs/examples/0.14.x/console-web/examples/teams/get-memberships.md new file mode 100644 index 0000000000..c23f190cbe --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/teams/get-memberships.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.getMemberships('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/teams/get.md b/docs/examples/0.14.x/console-web/examples/teams/get.md new file mode 100644 index 0000000000..c05bd59a0b --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/teams/get.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.get('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/teams/list-logs.md b/docs/examples/0.14.x/console-web/examples/teams/list-logs.md new file mode 100644 index 0000000000..79ee8e965f --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/teams/list-logs.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.listLogs('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/teams/list.md b/docs/examples/0.14.x/console-web/examples/teams/list.md new file mode 100644 index 0000000000..1e1a974d80 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/teams/list.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.list(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/teams/update-membership-roles.md b/docs/examples/0.14.x/console-web/examples/teams/update-membership-roles.md new file mode 100644 index 0000000000..1d25e2601e --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/teams/update-membership-roles.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.updateMembershipRoles('[TEAM_ID]', '[MEMBERSHIP_ID]', []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/teams/update-membership-status.md b/docs/examples/0.14.x/console-web/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..032f162501 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/teams/update-membership-status.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.updateMembershipStatus('[TEAM_ID]', '[MEMBERSHIP_ID]', '[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/teams/update.md b/docs/examples/0.14.x/console-web/examples/teams/update.md new file mode 100644 index 0000000000..bcf53d1605 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/teams/update.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.update('[TEAM_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/users/create.md b/docs/examples/0.14.x/console-web/examples/users/create.md new file mode 100644 index 0000000000..180589f554 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/users/create.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.users.create('[USER_ID]', 'email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/users/delete-session.md b/docs/examples/0.14.x/console-web/examples/users/delete-session.md new file mode 100644 index 0000000000..12e225032f --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/users/delete-session.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.users.deleteSession('[USER_ID]', '[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/users/delete-sessions.md b/docs/examples/0.14.x/console-web/examples/users/delete-sessions.md new file mode 100644 index 0000000000..df330210fe --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/users/delete-sessions.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.users.deleteSessions('[USER_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/users/delete.md b/docs/examples/0.14.x/console-web/examples/users/delete.md new file mode 100644 index 0000000000..f9cb4c0e0e --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/users/delete.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.users.delete('[USER_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/users/get-logs.md b/docs/examples/0.14.x/console-web/examples/users/get-logs.md new file mode 100644 index 0000000000..7ad392a78b --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/users/get-logs.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.users.getLogs('[USER_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/users/get-memberships.md b/docs/examples/0.14.x/console-web/examples/users/get-memberships.md new file mode 100644 index 0000000000..b421e59afc --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/users/get-memberships.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.users.getMemberships('[USER_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/users/get-prefs.md b/docs/examples/0.14.x/console-web/examples/users/get-prefs.md new file mode 100644 index 0000000000..f3f5d6a3db --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/users/get-prefs.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.users.getPrefs('[USER_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/users/get-sessions.md b/docs/examples/0.14.x/console-web/examples/users/get-sessions.md new file mode 100644 index 0000000000..f50f5221eb --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/users/get-sessions.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.users.getSessions('[USER_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/users/get-usage.md b/docs/examples/0.14.x/console-web/examples/users/get-usage.md new file mode 100644 index 0000000000..15464df92a --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/users/get-usage.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.users.getUsage(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/users/get.md b/docs/examples/0.14.x/console-web/examples/users/get.md new file mode 100644 index 0000000000..48069a70f2 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/users/get.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.users.get('[USER_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/users/list.md b/docs/examples/0.14.x/console-web/examples/users/list.md new file mode 100644 index 0000000000..4a37dd985d --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/users/list.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.users.list(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/users/update-email.md b/docs/examples/0.14.x/console-web/examples/users/update-email.md new file mode 100644 index 0000000000..97236c4b7c --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/users/update-email.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.users.updateEmail('[USER_ID]', 'email@example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/users/update-name.md b/docs/examples/0.14.x/console-web/examples/users/update-name.md new file mode 100644 index 0000000000..332f076fb6 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/users/update-name.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.users.updateName('[USER_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/users/update-password.md b/docs/examples/0.14.x/console-web/examples/users/update-password.md new file mode 100644 index 0000000000..d2647ca200 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/users/update-password.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.users.updatePassword('[USER_ID]', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/users/update-prefs.md b/docs/examples/0.14.x/console-web/examples/users/update-prefs.md new file mode 100644 index 0000000000..d6abb5914d --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/users/update-prefs.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.users.updatePrefs('[USER_ID]', {}); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/users/update-status.md b/docs/examples/0.14.x/console-web/examples/users/update-status.md new file mode 100644 index 0000000000..00b94ba3eb --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/users/update-status.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.users.updateStatus('[USER_ID]', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/users/update-verification.md b/docs/examples/0.14.x/console-web/examples/users/update-verification.md new file mode 100644 index 0000000000..a07f9e8433 --- /dev/null +++ b/docs/examples/0.14.x/console-web/examples/users/update-verification.md @@ -0,0 +1,14 @@ +const sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.users.updateVerification('[USER_ID]', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/account/create-recovery.md b/docs/examples/0.14.x/server-dart/examples/account/create-recovery.md new file mode 100644 index 0000000000..1d6c7fca9e --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/account/create-recovery.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.createRecovery( + email: 'email@example.com', + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/account/create-verification.md b/docs/examples/0.14.x/server-dart/examples/account/create-verification.md new file mode 100644 index 0000000000..a46c1cf519 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/account/create-verification.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.createVerification( + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/account/delete-session.md b/docs/examples/0.14.x/server-dart/examples/account/delete-session.md new file mode 100644 index 0000000000..7e2c59b629 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/account/delete-session.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.deleteSession( + sessionId: '[SESSION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/account/delete-sessions.md b/docs/examples/0.14.x/server-dart/examples/account/delete-sessions.md new file mode 100644 index 0000000000..8647d09fa7 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/account/delete-sessions.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.deleteSessions(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/account/get-logs.md b/docs/examples/0.14.x/server-dart/examples/account/get-logs.md new file mode 100644 index 0000000000..27b579c725 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/account/get-logs.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.getLogs( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/account/get-prefs.md b/docs/examples/0.14.x/server-dart/examples/account/get-prefs.md new file mode 100644 index 0000000000..911e868115 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/account/get-prefs.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.getPrefs(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/account/get-session.md b/docs/examples/0.14.x/server-dart/examples/account/get-session.md new file mode 100644 index 0000000000..ef78a5291d --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/account/get-session.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.getSession( + sessionId: '[SESSION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/account/get-sessions.md b/docs/examples/0.14.x/server-dart/examples/account/get-sessions.md new file mode 100644 index 0000000000..40051a967d --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/account/get-sessions.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.getSessions(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/account/get.md b/docs/examples/0.14.x/server-dart/examples/account/get.md new file mode 100644 index 0000000000..040dad642f --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/account/get.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.get(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/account/update-email.md b/docs/examples/0.14.x/server-dart/examples/account/update-email.md new file mode 100644 index 0000000000..85b5950bc5 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/account/update-email.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.updateEmail( + email: 'email@example.com', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/account/update-name.md b/docs/examples/0.14.x/server-dart/examples/account/update-name.md new file mode 100644 index 0000000000..026206d169 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/account/update-name.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.updateName( + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/account/update-password.md b/docs/examples/0.14.x/server-dart/examples/account/update-password.md new file mode 100644 index 0000000000..dec459c686 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/account/update-password.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.updatePassword( + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/account/update-prefs.md b/docs/examples/0.14.x/server-dart/examples/account/update-prefs.md new file mode 100644 index 0000000000..8bcb83e7db --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/account/update-prefs.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.updatePrefs( + prefs: {}, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/account/update-recovery.md b/docs/examples/0.14.x/server-dart/examples/account/update-recovery.md new file mode 100644 index 0000000000..5840fbec70 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/account/update-recovery.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.updateRecovery( + userId: '[USER_ID]', + secret: '[SECRET]', + password: 'password', + passwordAgain: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/account/update-session.md b/docs/examples/0.14.x/server-dart/examples/account/update-session.md new file mode 100644 index 0000000000..c689dda9f0 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/account/update-session.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.updateSession( + sessionId: '[SESSION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/account/update-status.md b/docs/examples/0.14.x/server-dart/examples/account/update-status.md new file mode 100644 index 0000000000..025ef77771 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/account/update-status.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.updateStatus(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/account/update-verification.md b/docs/examples/0.14.x/server-dart/examples/account/update-verification.md new file mode 100644 index 0000000000..c970793640 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/account/update-verification.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = account.updateVerification( + userId: '[USER_ID]', + secret: '[SECRET]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/avatars/get-browser.md b/docs/examples/0.14.x/server-dart/examples/avatars/get-browser.md new file mode 100644 index 0000000000..c924ae43c8 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/avatars/get-browser.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = avatars.getBrowser( + code: 'aa', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/avatars/get-credit-card.md b/docs/examples/0.14.x/server-dart/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..5d01d690dd --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/avatars/get-credit-card.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = avatars.getCreditCard( + code: 'amex', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/avatars/get-favicon.md b/docs/examples/0.14.x/server-dart/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..3308f5c59a --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/avatars/get-favicon.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = avatars.getFavicon( + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/avatars/get-flag.md b/docs/examples/0.14.x/server-dart/examples/avatars/get-flag.md new file mode 100644 index 0000000000..5da4aaf219 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/avatars/get-flag.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = avatars.getFlag( + code: 'af', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/avatars/get-image.md b/docs/examples/0.14.x/server-dart/examples/avatars/get-image.md new file mode 100644 index 0000000000..196c6dedb5 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/avatars/get-image.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = avatars.getImage( + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/avatars/get-initials.md b/docs/examples/0.14.x/server-dart/examples/avatars/get-initials.md new file mode 100644 index 0000000000..c40a54b712 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/avatars/get-initials.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = avatars.getInitials( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/avatars/get-q-r.md b/docs/examples/0.14.x/server-dart/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..bef31b345f --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/avatars/get-q-r.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = avatars.getQR( + text: '[TEXT]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/create-boolean-attribute.md b/docs/examples/0.14.x/server-dart/examples/database/create-boolean-attribute.md new file mode 100644 index 0000000000..81e66e1ab6 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/create-boolean-attribute.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.createBooleanAttribute( + collectionId: '[COLLECTION_ID]', + key: '', + required: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/create-collection.md b/docs/examples/0.14.x/server-dart/examples/database/create-collection.md new file mode 100644 index 0000000000..aff5643ff5 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/create-collection.md @@ -0,0 +1,27 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.createCollection( + collectionId: '[COLLECTION_ID]', + name: '[NAME]', + permission: 'document', + read: ["role:all"], + write: ["role:all"], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/create-document.md b/docs/examples/0.14.x/server-dart/examples/database/create-document.md new file mode 100644 index 0000000000..2775f740ab --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/create-document.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.createDocument( + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + data: {}, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/create-email-attribute.md b/docs/examples/0.14.x/server-dart/examples/database/create-email-attribute.md new file mode 100644 index 0000000000..d0eca5cc73 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/create-email-attribute.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.createEmailAttribute( + collectionId: '[COLLECTION_ID]', + key: '', + required: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/create-enum-attribute.md b/docs/examples/0.14.x/server-dart/examples/database/create-enum-attribute.md new file mode 100644 index 0000000000..d50c76efb3 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/create-enum-attribute.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.createEnumAttribute( + collectionId: '[COLLECTION_ID]', + key: '', + elements: [], + required: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/create-float-attribute.md b/docs/examples/0.14.x/server-dart/examples/database/create-float-attribute.md new file mode 100644 index 0000000000..5fa831b682 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/create-float-attribute.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.createFloatAttribute( + collectionId: '[COLLECTION_ID]', + key: '', + required: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/create-index.md b/docs/examples/0.14.x/server-dart/examples/database/create-index.md new file mode 100644 index 0000000000..41b118d6af --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/create-index.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.createIndex( + collectionId: '[COLLECTION_ID]', + key: '', + type: 'key', + attributes: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/create-integer-attribute.md b/docs/examples/0.14.x/server-dart/examples/database/create-integer-attribute.md new file mode 100644 index 0000000000..161a5c9812 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/create-integer-attribute.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.createIntegerAttribute( + collectionId: '[COLLECTION_ID]', + key: '', + required: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/create-ip-attribute.md b/docs/examples/0.14.x/server-dart/examples/database/create-ip-attribute.md new file mode 100644 index 0000000000..94990f9cf1 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/create-ip-attribute.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.createIpAttribute( + collectionId: '[COLLECTION_ID]', + key: '', + required: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/create-string-attribute.md b/docs/examples/0.14.x/server-dart/examples/database/create-string-attribute.md new file mode 100644 index 0000000000..e9119e11c0 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/create-string-attribute.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.createStringAttribute( + collectionId: '[COLLECTION_ID]', + key: '', + size: 1, + required: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/create-url-attribute.md b/docs/examples/0.14.x/server-dart/examples/database/create-url-attribute.md new file mode 100644 index 0000000000..3bea728890 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/create-url-attribute.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.createUrlAttribute( + collectionId: '[COLLECTION_ID]', + key: '', + required: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/delete-attribute.md b/docs/examples/0.14.x/server-dart/examples/database/delete-attribute.md new file mode 100644 index 0000000000..50d5f345c7 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/delete-attribute.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.deleteAttribute( + collectionId: '[COLLECTION_ID]', + key: '', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/delete-collection.md b/docs/examples/0.14.x/server-dart/examples/database/delete-collection.md new file mode 100644 index 0000000000..6543cc1491 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/delete-collection.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.deleteCollection( + collectionId: '[COLLECTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/delete-document.md b/docs/examples/0.14.x/server-dart/examples/database/delete-document.md new file mode 100644 index 0000000000..89204f6d81 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/delete-document.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.deleteDocument( + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/delete-index.md b/docs/examples/0.14.x/server-dart/examples/database/delete-index.md new file mode 100644 index 0000000000..fe6cd43f11 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/delete-index.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.deleteIndex( + collectionId: '[COLLECTION_ID]', + key: '', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/get-attribute.md b/docs/examples/0.14.x/server-dart/examples/database/get-attribute.md new file mode 100644 index 0000000000..41a0fbee21 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/get-attribute.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.getAttribute( + collectionId: '[COLLECTION_ID]', + key: '', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/get-collection.md b/docs/examples/0.14.x/server-dart/examples/database/get-collection.md new file mode 100644 index 0000000000..6b0cb526ca --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/get-collection.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.getCollection( + collectionId: '[COLLECTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/get-document.md b/docs/examples/0.14.x/server-dart/examples/database/get-document.md new file mode 100644 index 0000000000..efe007aadf --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/get-document.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.getDocument( + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/get-index.md b/docs/examples/0.14.x/server-dart/examples/database/get-index.md new file mode 100644 index 0000000000..736e860f30 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/get-index.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.getIndex( + collectionId: '[COLLECTION_ID]', + key: '', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/list-attributes.md b/docs/examples/0.14.x/server-dart/examples/database/list-attributes.md new file mode 100644 index 0000000000..ffbc556e71 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/list-attributes.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.listAttributes( + collectionId: '[COLLECTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/list-collections.md b/docs/examples/0.14.x/server-dart/examples/database/list-collections.md new file mode 100644 index 0000000000..aecd08a54a --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/list-collections.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.listCollections( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/list-documents.md b/docs/examples/0.14.x/server-dart/examples/database/list-documents.md new file mode 100644 index 0000000000..9323fd34be --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/list-documents.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.listDocuments( + collectionId: '[COLLECTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/list-indexes.md b/docs/examples/0.14.x/server-dart/examples/database/list-indexes.md new file mode 100644 index 0000000000..3f22632bc7 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/list-indexes.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.listIndexes( + collectionId: '[COLLECTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/update-collection.md b/docs/examples/0.14.x/server-dart/examples/database/update-collection.md new file mode 100644 index 0000000000..7430ef8673 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/update-collection.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.updateCollection( + collectionId: '[COLLECTION_ID]', + name: '[NAME]', + permission: 'document', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/database/update-document.md b/docs/examples/0.14.x/server-dart/examples/database/update-document.md new file mode 100644 index 0000000000..b2c78752e5 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/database/update-document.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.updateDocument( + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + data: {}, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/functions/create-deployment.md b/docs/examples/0.14.x/server-dart/examples/functions/create-deployment.md new file mode 100644 index 0000000000..a407622ffc --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/functions/create-deployment.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.createDeployment( + functionId: '[FUNCTION_ID]', + entrypoint: '[ENTRYPOINT]', + code: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), + activate: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/functions/create-execution.md b/docs/examples/0.14.x/server-dart/examples/functions/create-execution.md new file mode 100644 index 0000000000..572b54ffd5 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/functions/create-execution.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.createExecution( + functionId: '[FUNCTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/functions/create.md b/docs/examples/0.14.x/server-dart/examples/functions/create.md new file mode 100644 index 0000000000..9788357e4a --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/functions/create.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.create( + functionId: '[FUNCTION_ID]', + name: '[NAME]', + execute: [], + runtime: 'node-14.5', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/functions/delete-deployment.md b/docs/examples/0.14.x/server-dart/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..495b5b6c25 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/functions/delete-deployment.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.deleteDeployment( + functionId: '[FUNCTION_ID]', + deploymentId: '[DEPLOYMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/functions/delete.md b/docs/examples/0.14.x/server-dart/examples/functions/delete.md new file mode 100644 index 0000000000..36694658cd --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/functions/delete.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.delete( + functionId: '[FUNCTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/functions/get-deployment.md b/docs/examples/0.14.x/server-dart/examples/functions/get-deployment.md new file mode 100644 index 0000000000..7e529df767 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/functions/get-deployment.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.getDeployment( + functionId: '[FUNCTION_ID]', + deploymentId: '[DEPLOYMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/functions/get-execution.md b/docs/examples/0.14.x/server-dart/examples/functions/get-execution.md new file mode 100644 index 0000000000..7854e7f7c4 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/functions/get-execution.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.getExecution( + functionId: '[FUNCTION_ID]', + executionId: '[EXECUTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/functions/get.md b/docs/examples/0.14.x/server-dart/examples/functions/get.md new file mode 100644 index 0000000000..261ffef362 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/functions/get.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.get( + functionId: '[FUNCTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/functions/list-deployments.md b/docs/examples/0.14.x/server-dart/examples/functions/list-deployments.md new file mode 100644 index 0000000000..071c1a7f5a --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/functions/list-deployments.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.listDeployments( + functionId: '[FUNCTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/functions/list-executions.md b/docs/examples/0.14.x/server-dart/examples/functions/list-executions.md new file mode 100644 index 0000000000..a0af0d161e --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/functions/list-executions.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.listExecutions( + functionId: '[FUNCTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/functions/list-runtimes.md b/docs/examples/0.14.x/server-dart/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..da474ff727 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/functions/list-runtimes.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.listRuntimes(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/functions/list.md b/docs/examples/0.14.x/server-dart/examples/functions/list.md new file mode 100644 index 0000000000..a530d00fbb --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/functions/list.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.list( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/functions/retry-build.md b/docs/examples/0.14.x/server-dart/examples/functions/retry-build.md new file mode 100644 index 0000000000..2312208584 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/functions/retry-build.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.retryBuild( + functionId: '[FUNCTION_ID]', + deploymentId: '[DEPLOYMENT_ID]', + buildId: '[BUILD_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/functions/update-deployment.md b/docs/examples/0.14.x/server-dart/examples/functions/update-deployment.md new file mode 100644 index 0000000000..633b626560 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/functions/update-deployment.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.updateDeployment( + functionId: '[FUNCTION_ID]', + deploymentId: '[DEPLOYMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/functions/update.md b/docs/examples/0.14.x/server-dart/examples/functions/update.md new file mode 100644 index 0000000000..d1845b771d --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/functions/update.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Functions functions = Functions(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = functions.update( + functionId: '[FUNCTION_ID]', + name: '[NAME]', + execute: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/health/get-antivirus.md b/docs/examples/0.14.x/server-dart/examples/health/get-antivirus.md new file mode 100644 index 0000000000..974a29bd1f --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/health/get-antivirus.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getAntivirus(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/health/get-cache.md b/docs/examples/0.14.x/server-dart/examples/health/get-cache.md new file mode 100644 index 0000000000..322939d74e --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/health/get-cache.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getCache(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/health/get-d-b.md b/docs/examples/0.14.x/server-dart/examples/health/get-d-b.md new file mode 100644 index 0000000000..e3447550eb --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/health/get-d-b.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getDB(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/health/get-queue-certificates.md b/docs/examples/0.14.x/server-dart/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..7c605154a6 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/health/get-queue-certificates.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getQueueCertificates(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/health/get-queue-functions.md b/docs/examples/0.14.x/server-dart/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..c06cda9185 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/health/get-queue-functions.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getQueueFunctions(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/health/get-queue-logs.md b/docs/examples/0.14.x/server-dart/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..807a04fb11 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/health/get-queue-logs.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getQueueLogs(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/health/get-queue-webhooks.md b/docs/examples/0.14.x/server-dart/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..7c159ac8cd --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/health/get-queue-webhooks.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getQueueWebhooks(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/health/get-storage-local.md b/docs/examples/0.14.x/server-dart/examples/health/get-storage-local.md new file mode 100644 index 0000000000..7f172bf86c --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/health/get-storage-local.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getStorageLocal(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/health/get-time.md b/docs/examples/0.14.x/server-dart/examples/health/get-time.md new file mode 100644 index 0000000000..65861d3cc3 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/health/get-time.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getTime(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/health/get.md b/docs/examples/0.14.x/server-dart/examples/health/get.md new file mode 100644 index 0000000000..0c9d39218e --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/health/get.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.get(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/locale/get-continents.md b/docs/examples/0.14.x/server-dart/examples/locale/get-continents.md new file mode 100644 index 0000000000..2daced78b6 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/locale/get-continents.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.getContinents(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/locale/get-countries-e-u.md b/docs/examples/0.14.x/server-dart/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..7b04a49487 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/locale/get-countries-e-u.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.getCountriesEU(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/locale/get-countries-phones.md b/docs/examples/0.14.x/server-dart/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..57138a6b75 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/locale/get-countries-phones.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.getCountriesPhones(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/locale/get-countries.md b/docs/examples/0.14.x/server-dart/examples/locale/get-countries.md new file mode 100644 index 0000000000..2bf758adca --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/locale/get-countries.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.getCountries(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/locale/get-currencies.md b/docs/examples/0.14.x/server-dart/examples/locale/get-currencies.md new file mode 100644 index 0000000000..c8a415de4c --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/locale/get-currencies.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.getCurrencies(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/locale/get-languages.md b/docs/examples/0.14.x/server-dart/examples/locale/get-languages.md new file mode 100644 index 0000000000..b9ae6655a3 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/locale/get-languages.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.getLanguages(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/locale/get.md b/docs/examples/0.14.x/server-dart/examples/locale/get.md new file mode 100644 index 0000000000..d290063060 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/locale/get.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.get(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/storage/create-bucket.md b/docs/examples/0.14.x/server-dart/examples/storage/create-bucket.md new file mode 100644 index 0000000000..9d58d263ba --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/storage/create-bucket.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.createBucket( + bucketId: '[BUCKET_ID]', + name: '[NAME]', + permission: 'file', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/storage/create-file.md b/docs/examples/0.14.x/server-dart/examples/storage/create-file.md new file mode 100644 index 0000000000..ef596fcc49 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/storage/create-file.md @@ -0,0 +1,26 @@ +import 'dart:io'; +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.createFile( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + file: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/storage/delete-bucket.md b/docs/examples/0.14.x/server-dart/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..786084a158 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/storage/delete-bucket.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.deleteBucket( + bucketId: '[BUCKET_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/storage/delete-file.md b/docs/examples/0.14.x/server-dart/examples/storage/delete-file.md new file mode 100644 index 0000000000..574532c12b --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/storage/delete-file.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.deleteFile( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/storage/get-bucket.md b/docs/examples/0.14.x/server-dart/examples/storage/get-bucket.md new file mode 100644 index 0000000000..22360826ef --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/storage/get-bucket.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.getBucket( + bucketId: '[BUCKET_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/storage/get-file-download.md b/docs/examples/0.14.x/server-dart/examples/storage/get-file-download.md new file mode 100644 index 0000000000..6a87cafe83 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/storage/get-file-download.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.getFileDownload( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/storage/get-file-preview.md b/docs/examples/0.14.x/server-dart/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..f678eacb2a --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/storage/get-file-preview.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.getFilePreview( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/storage/get-file-view.md b/docs/examples/0.14.x/server-dart/examples/storage/get-file-view.md new file mode 100644 index 0000000000..2be352fef0 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/storage/get-file-view.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.getFileView( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/storage/get-file.md b/docs/examples/0.14.x/server-dart/examples/storage/get-file.md new file mode 100644 index 0000000000..7ecdcf9e53 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/storage/get-file.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.getFile( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/storage/list-buckets.md b/docs/examples/0.14.x/server-dart/examples/storage/list-buckets.md new file mode 100644 index 0000000000..fa5607a825 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/storage/list-buckets.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.listBuckets( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/storage/list-files.md b/docs/examples/0.14.x/server-dart/examples/storage/list-files.md new file mode 100644 index 0000000000..519a002ced --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/storage/list-files.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.listFiles( + bucketId: '[BUCKET_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/storage/update-bucket.md b/docs/examples/0.14.x/server-dart/examples/storage/update-bucket.md new file mode 100644 index 0000000000..6a09e87c4d --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/storage/update-bucket.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.updateBucket( + bucketId: '[BUCKET_ID]', + name: '[NAME]', + permission: 'file', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/storage/update-file.md b/docs/examples/0.14.x/server-dart/examples/storage/update-file.md new file mode 100644 index 0000000000..77d43afba3 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/storage/update-file.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.updateFile( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/teams/create-membership.md b/docs/examples/0.14.x/server-dart/examples/teams/create-membership.md new file mode 100644 index 0000000000..e3923bd207 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/teams/create-membership.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.createMembership( + teamId: '[TEAM_ID]', + email: 'email@example.com', + roles: [], + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/teams/create.md b/docs/examples/0.14.x/server-dart/examples/teams/create.md new file mode 100644 index 0000000000..fd89a4814a --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/teams/create.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.create( + teamId: '[TEAM_ID]', + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/teams/delete-membership.md b/docs/examples/0.14.x/server-dart/examples/teams/delete-membership.md new file mode 100644 index 0000000000..28069ad04a --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/teams/delete-membership.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.deleteMembership( + teamId: '[TEAM_ID]', + membershipId: '[MEMBERSHIP_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/teams/delete.md b/docs/examples/0.14.x/server-dart/examples/teams/delete.md new file mode 100644 index 0000000000..a006e8f347 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/teams/delete.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.delete( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/teams/get-membership.md b/docs/examples/0.14.x/server-dart/examples/teams/get-membership.md new file mode 100644 index 0000000000..1beceeb3d7 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/teams/get-membership.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.getMembership( + teamId: '[TEAM_ID]', + membershipId: '[MEMBERSHIP_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/teams/get-memberships.md b/docs/examples/0.14.x/server-dart/examples/teams/get-memberships.md new file mode 100644 index 0000000000..3a12dc5c2b --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/teams/get-memberships.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.getMemberships( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/teams/get.md b/docs/examples/0.14.x/server-dart/examples/teams/get.md new file mode 100644 index 0000000000..a1bfe8e72c --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/teams/get.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.get( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/teams/list.md b/docs/examples/0.14.x/server-dart/examples/teams/list.md new file mode 100644 index 0000000000..d55e58e36e --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/teams/list.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.list( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/teams/update-membership-roles.md b/docs/examples/0.14.x/server-dart/examples/teams/update-membership-roles.md new file mode 100644 index 0000000000..e3488768b6 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/teams/update-membership-roles.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.updateMembershipRoles( + teamId: '[TEAM_ID]', + membershipId: '[MEMBERSHIP_ID]', + roles: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/teams/update-membership-status.md b/docs/examples/0.14.x/server-dart/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..2a3f1e101e --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/teams/update-membership-status.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token + ; + + Future result = teams.updateMembershipStatus( + teamId: '[TEAM_ID]', + membershipId: '[MEMBERSHIP_ID]', + userId: '[USER_ID]', + secret: '[SECRET]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/teams/update.md b/docs/examples/0.14.x/server-dart/examples/teams/update.md new file mode 100644 index 0000000000..22af165502 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/teams/update.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.update( + teamId: '[TEAM_ID]', + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/users/create.md b/docs/examples/0.14.x/server-dart/examples/users/create.md new file mode 100644 index 0000000000..027363f2a5 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/users/create.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.create( + userId: '[USER_ID]', + email: 'email@example.com', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/users/delete-session.md b/docs/examples/0.14.x/server-dart/examples/users/delete-session.md new file mode 100644 index 0000000000..eaa98c17b7 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/users/delete-session.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.deleteSession( + userId: '[USER_ID]', + sessionId: '[SESSION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/users/delete-sessions.md b/docs/examples/0.14.x/server-dart/examples/users/delete-sessions.md new file mode 100644 index 0000000000..8c889aad2b --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/users/delete-sessions.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.deleteSessions( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/users/delete.md b/docs/examples/0.14.x/server-dart/examples/users/delete.md new file mode 100644 index 0000000000..b45f398b4a --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/users/delete.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.delete( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/users/get-logs.md b/docs/examples/0.14.x/server-dart/examples/users/get-logs.md new file mode 100644 index 0000000000..63eb6b5bcf --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/users/get-logs.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.getLogs( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/users/get-memberships.md b/docs/examples/0.14.x/server-dart/examples/users/get-memberships.md new file mode 100644 index 0000000000..e5c60cdfbe --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/users/get-memberships.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.getMemberships( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/users/get-prefs.md b/docs/examples/0.14.x/server-dart/examples/users/get-prefs.md new file mode 100644 index 0000000000..e5909422a3 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/users/get-prefs.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.getPrefs( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/users/get-sessions.md b/docs/examples/0.14.x/server-dart/examples/users/get-sessions.md new file mode 100644 index 0000000000..ebe44c3eb9 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/users/get-sessions.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.getSessions( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/users/get.md b/docs/examples/0.14.x/server-dart/examples/users/get.md new file mode 100644 index 0000000000..be582d52c5 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/users/get.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.get( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/users/list.md b/docs/examples/0.14.x/server-dart/examples/users/list.md new file mode 100644 index 0000000000..e0ecf7adf3 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/users/list.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.list( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/users/update-email.md b/docs/examples/0.14.x/server-dart/examples/users/update-email.md new file mode 100644 index 0000000000..dc3e063ab8 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/users/update-email.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.updateEmail( + userId: '[USER_ID]', + email: 'email@example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/users/update-name.md b/docs/examples/0.14.x/server-dart/examples/users/update-name.md new file mode 100644 index 0000000000..192add919a --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/users/update-name.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.updateName( + userId: '[USER_ID]', + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/users/update-password.md b/docs/examples/0.14.x/server-dart/examples/users/update-password.md new file mode 100644 index 0000000000..44ead5980b --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/users/update-password.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.updatePassword( + userId: '[USER_ID]', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/users/update-prefs.md b/docs/examples/0.14.x/server-dart/examples/users/update-prefs.md new file mode 100644 index 0000000000..d148e52f0b --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/users/update-prefs.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.updatePrefs( + userId: '[USER_ID]', + prefs: {}, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/users/update-status.md b/docs/examples/0.14.x/server-dart/examples/users/update-status.md new file mode 100644 index 0000000000..4392188985 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/users/update-status.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.updateStatus( + userId: '[USER_ID]', + status: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-dart/examples/users/update-verification.md b/docs/examples/0.14.x/server-dart/examples/users/update-verification.md new file mode 100644 index 0000000000..065dfb7f91 --- /dev/null +++ b/docs/examples/0.14.x/server-dart/examples/users/update-verification.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.updateVerification( + userId: '[USER_ID]', + emailVerification: false, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/account/create-recovery.md b/docs/examples/0.14.x/server-deno/examples/account/create-recovery.md new file mode 100644 index 0000000000..003dbdfec7 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/account/create-recovery.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.createRecovery('email@example.com', 'https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/account/create-verification.md b/docs/examples/0.14.x/server-deno/examples/account/create-verification.md new file mode 100644 index 0000000000..18dec9a9f0 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/account/create-verification.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.createVerification('https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/account/delete-session.md b/docs/examples/0.14.x/server-deno/examples/account/delete-session.md new file mode 100644 index 0000000000..6ff639935b --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/account/delete-session.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.deleteSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/account/delete-sessions.md b/docs/examples/0.14.x/server-deno/examples/account/delete-sessions.md new file mode 100644 index 0000000000..453c7e418d --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/account/delete-sessions.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.deleteSessions(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/account/get-logs.md b/docs/examples/0.14.x/server-deno/examples/account/get-logs.md new file mode 100644 index 0000000000..43d67078e2 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/account/get-logs.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.getLogs(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/account/get-prefs.md b/docs/examples/0.14.x/server-deno/examples/account/get-prefs.md new file mode 100644 index 0000000000..537760c32e --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/account/get-prefs.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.getPrefs(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/account/get-session.md b/docs/examples/0.14.x/server-deno/examples/account/get-session.md new file mode 100644 index 0000000000..46c7a5981d --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/account/get-session.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.getSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/account/get-sessions.md b/docs/examples/0.14.x/server-deno/examples/account/get-sessions.md new file mode 100644 index 0000000000..486a153f0b --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/account/get-sessions.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.getSessions(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/account/get.md b/docs/examples/0.14.x/server-deno/examples/account/get.md new file mode 100644 index 0000000000..35453cd3b2 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/account/get.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.get(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/account/update-email.md b/docs/examples/0.14.x/server-deno/examples/account/update-email.md new file mode 100644 index 0000000000..12706c4313 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/account/update-email.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.updateEmail('email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/account/update-name.md b/docs/examples/0.14.x/server-deno/examples/account/update-name.md new file mode 100644 index 0000000000..2ee6aa4f87 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/account/update-name.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.updateName('[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/account/update-password.md b/docs/examples/0.14.x/server-deno/examples/account/update-password.md new file mode 100644 index 0000000000..bf27df4dde --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/account/update-password.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.updatePassword('password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/account/update-prefs.md b/docs/examples/0.14.x/server-deno/examples/account/update-prefs.md new file mode 100644 index 0000000000..f553593ae0 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/account/update-prefs.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.updatePrefs({}); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/account/update-recovery.md b/docs/examples/0.14.x/server-deno/examples/account/update-recovery.md new file mode 100644 index 0000000000..6d91d570c2 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/account/update-recovery.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/account/update-session.md b/docs/examples/0.14.x/server-deno/examples/account/update-session.md new file mode 100644 index 0000000000..36c3d1e250 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/account/update-session.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.updateSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/account/update-status.md b/docs/examples/0.14.x/server-deno/examples/account/update-status.md new file mode 100644 index 0000000000..26585b6f7b --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/account/update-status.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.updateStatus(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/account/update-verification.md b/docs/examples/0.14.x/server-deno/examples/account/update-verification.md new file mode 100644 index 0000000000..40ebcdd7c6 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/account/update-verification.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = account.updateVerification('[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/avatars/get-browser.md b/docs/examples/0.14.x/server-deno/examples/avatars/get-browser.md new file mode 100644 index 0000000000..3eb6ff845d --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/avatars/get-browser.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = avatars.getBrowser('aa'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/avatars/get-credit-card.md b/docs/examples/0.14.x/server-deno/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..0a75b1665d --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/avatars/get-credit-card.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = avatars.getCreditCard('amex'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/avatars/get-favicon.md b/docs/examples/0.14.x/server-deno/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..e132db2f5f --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/avatars/get-favicon.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = avatars.getFavicon('https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/avatars/get-flag.md b/docs/examples/0.14.x/server-deno/examples/avatars/get-flag.md new file mode 100644 index 0000000000..7455538cec --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/avatars/get-flag.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = avatars.getFlag('af'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/avatars/get-image.md b/docs/examples/0.14.x/server-deno/examples/avatars/get-image.md new file mode 100644 index 0000000000..e1d6f7d5f5 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/avatars/get-image.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = avatars.getImage('https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/avatars/get-initials.md b/docs/examples/0.14.x/server-deno/examples/avatars/get-initials.md new file mode 100644 index 0000000000..36e9b8fa94 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/avatars/get-initials.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = avatars.getInitials(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/avatars/get-q-r.md b/docs/examples/0.14.x/server-deno/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..23d6a60d90 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/avatars/get-q-r.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = avatars.getQR('[TEXT]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/create-boolean-attribute.md b/docs/examples/0.14.x/server-deno/examples/database/create-boolean-attribute.md new file mode 100644 index 0000000000..b332758ef3 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/create-boolean-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.createBooleanAttribute('[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/create-collection.md b/docs/examples/0.14.x/server-deno/examples/database/create-collection.md new file mode 100644 index 0000000000..9646b8c0a4 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/create-collection.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.createCollection('[COLLECTION_ID]', '[NAME]', 'document', ["role:all"], ["role:all"]); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/create-document.md b/docs/examples/0.14.x/server-deno/examples/database/create-document.md new file mode 100644 index 0000000000..5180caf05c --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/create-document.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.createDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/create-email-attribute.md b/docs/examples/0.14.x/server-deno/examples/database/create-email-attribute.md new file mode 100644 index 0000000000..0b192f60cc --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/create-email-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.createEmailAttribute('[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/create-enum-attribute.md b/docs/examples/0.14.x/server-deno/examples/database/create-enum-attribute.md new file mode 100644 index 0000000000..7b30a6139f --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/create-enum-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.createEnumAttribute('[COLLECTION_ID]', '', [], false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/create-float-attribute.md b/docs/examples/0.14.x/server-deno/examples/database/create-float-attribute.md new file mode 100644 index 0000000000..75a8afc0a5 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/create-float-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.createFloatAttribute('[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/create-index.md b/docs/examples/0.14.x/server-deno/examples/database/create-index.md new file mode 100644 index 0000000000..f519d1f4bb --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/create-index.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.createIndex('[COLLECTION_ID]', '', 'key', []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/create-integer-attribute.md b/docs/examples/0.14.x/server-deno/examples/database/create-integer-attribute.md new file mode 100644 index 0000000000..ef09167d6f --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/create-integer-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.createIntegerAttribute('[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/create-ip-attribute.md b/docs/examples/0.14.x/server-deno/examples/database/create-ip-attribute.md new file mode 100644 index 0000000000..c4daa5508e --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/create-ip-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.createIpAttribute('[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/create-string-attribute.md b/docs/examples/0.14.x/server-deno/examples/database/create-string-attribute.md new file mode 100644 index 0000000000..57b310105f --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/create-string-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.createStringAttribute('[COLLECTION_ID]', '', 1, false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/create-url-attribute.md b/docs/examples/0.14.x/server-deno/examples/database/create-url-attribute.md new file mode 100644 index 0000000000..f298e07baa --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/create-url-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.createUrlAttribute('[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/delete-attribute.md b/docs/examples/0.14.x/server-deno/examples/database/delete-attribute.md new file mode 100644 index 0000000000..e817850cc9 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/delete-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.deleteAttribute('[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/delete-collection.md b/docs/examples/0.14.x/server-deno/examples/database/delete-collection.md new file mode 100644 index 0000000000..d62c8d0974 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/delete-collection.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.deleteCollection('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/delete-document.md b/docs/examples/0.14.x/server-deno/examples/database/delete-document.md new file mode 100644 index 0000000000..558a4bbe67 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/delete-document.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/delete-index.md b/docs/examples/0.14.x/server-deno/examples/database/delete-index.md new file mode 100644 index 0000000000..87bf839b82 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/delete-index.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.deleteIndex('[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/get-attribute.md b/docs/examples/0.14.x/server-deno/examples/database/get-attribute.md new file mode 100644 index 0000000000..fc2e6227c6 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/get-attribute.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.getAttribute('[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/get-collection.md b/docs/examples/0.14.x/server-deno/examples/database/get-collection.md new file mode 100644 index 0000000000..0ca917a3c3 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/get-collection.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.getCollection('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/get-document.md b/docs/examples/0.14.x/server-deno/examples/database/get-document.md new file mode 100644 index 0000000000..59ec5e4141 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/get-document.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/get-index.md b/docs/examples/0.14.x/server-deno/examples/database/get-index.md new file mode 100644 index 0000000000..af51b343fe --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/get-index.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.getIndex('[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/list-attributes.md b/docs/examples/0.14.x/server-deno/examples/database/list-attributes.md new file mode 100644 index 0000000000..65ad1b197e --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/list-attributes.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.listAttributes('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/list-collections.md b/docs/examples/0.14.x/server-deno/examples/database/list-collections.md new file mode 100644 index 0000000000..0bb6bf1679 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/list-collections.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.listCollections(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/list-documents.md b/docs/examples/0.14.x/server-deno/examples/database/list-documents.md new file mode 100644 index 0000000000..ead202aaa9 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/list-documents.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.listDocuments('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/list-indexes.md b/docs/examples/0.14.x/server-deno/examples/database/list-indexes.md new file mode 100644 index 0000000000..aff6da5698 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/list-indexes.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.listIndexes('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/update-collection.md b/docs/examples/0.14.x/server-deno/examples/database/update-collection.md new file mode 100644 index 0000000000..c105fe1204 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/update-collection.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.updateCollection('[COLLECTION_ID]', '[NAME]', 'document'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/database/update-document.md b/docs/examples/0.14.x/server-deno/examples/database/update-document.md new file mode 100644 index 0000000000..de19da7f7d --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/database/update-document.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/functions/create-deployment.md b/docs/examples/0.14.x/server-deno/examples/functions/create-deployment.md new file mode 100644 index 0000000000..847a82db8c --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/functions/create-deployment.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.createDeployment('[FUNCTION_ID]', '[ENTRYPOINT]', 'file.png', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/functions/create-execution.md b/docs/examples/0.14.x/server-deno/examples/functions/create-execution.md new file mode 100644 index 0000000000..0d52be69b6 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/functions/create-execution.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.createExecution('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/functions/create.md b/docs/examples/0.14.x/server-deno/examples/functions/create.md new file mode 100644 index 0000000000..ac301b2391 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/functions/create.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.create('[FUNCTION_ID]', '[NAME]', [], 'node-14.5'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/functions/delete-deployment.md b/docs/examples/0.14.x/server-deno/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..dbab698368 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/functions/delete-deployment.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.deleteDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/functions/delete.md b/docs/examples/0.14.x/server-deno/examples/functions/delete.md new file mode 100644 index 0000000000..f2e7947b63 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/functions/delete.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.delete('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/functions/get-deployment.md b/docs/examples/0.14.x/server-deno/examples/functions/get-deployment.md new file mode 100644 index 0000000000..146503bf55 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/functions/get-deployment.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.getDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/functions/get-execution.md b/docs/examples/0.14.x/server-deno/examples/functions/get-execution.md new file mode 100644 index 0000000000..6fe7289eb9 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/functions/get-execution.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/functions/get.md b/docs/examples/0.14.x/server-deno/examples/functions/get.md new file mode 100644 index 0000000000..b6972fc91d --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/functions/get.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.get('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/functions/list-deployments.md b/docs/examples/0.14.x/server-deno/examples/functions/list-deployments.md new file mode 100644 index 0000000000..82ea21c024 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/functions/list-deployments.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.listDeployments('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/functions/list-executions.md b/docs/examples/0.14.x/server-deno/examples/functions/list-executions.md new file mode 100644 index 0000000000..347f4b7fb1 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/functions/list-executions.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.listExecutions('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/functions/list-runtimes.md b/docs/examples/0.14.x/server-deno/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..7ae999312a --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/functions/list-runtimes.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.listRuntimes(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/functions/list.md b/docs/examples/0.14.x/server-deno/examples/functions/list.md new file mode 100644 index 0000000000..89d2a49a43 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/functions/list.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.list(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/functions/retry-build.md b/docs/examples/0.14.x/server-deno/examples/functions/retry-build.md new file mode 100644 index 0000000000..1130fade30 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/functions/retry-build.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.retryBuild('[FUNCTION_ID]', '[DEPLOYMENT_ID]', '[BUILD_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/functions/update-deployment.md b/docs/examples/0.14.x/server-deno/examples/functions/update-deployment.md new file mode 100644 index 0000000000..f448107a36 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/functions/update-deployment.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.updateDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/functions/update.md b/docs/examples/0.14.x/server-deno/examples/functions/update.md new file mode 100644 index 0000000000..9177529061 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/functions/update.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = functions.update('[FUNCTION_ID]', '[NAME]', []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/health/get-antivirus.md b/docs/examples/0.14.x/server-deno/examples/health/get-antivirus.md new file mode 100644 index 0000000000..027b145d8f --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/health/get-antivirus.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getAntivirus(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/health/get-cache.md b/docs/examples/0.14.x/server-deno/examples/health/get-cache.md new file mode 100644 index 0000000000..f3e17bda8e --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/health/get-cache.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getCache(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/health/get-d-b.md b/docs/examples/0.14.x/server-deno/examples/health/get-d-b.md new file mode 100644 index 0000000000..f6ba94a496 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/health/get-d-b.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getDB(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/health/get-queue-certificates.md b/docs/examples/0.14.x/server-deno/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..9d2e325630 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/health/get-queue-certificates.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getQueueCertificates(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/health/get-queue-functions.md b/docs/examples/0.14.x/server-deno/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..c31869c55f --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/health/get-queue-functions.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getQueueFunctions(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/health/get-queue-logs.md b/docs/examples/0.14.x/server-deno/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..bb40c7a559 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/health/get-queue-logs.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getQueueLogs(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/health/get-queue-webhooks.md b/docs/examples/0.14.x/server-deno/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..ddd2735f49 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/health/get-queue-webhooks.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getQueueWebhooks(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/health/get-storage-local.md b/docs/examples/0.14.x/server-deno/examples/health/get-storage-local.md new file mode 100644 index 0000000000..76df5561d7 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/health/get-storage-local.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getStorageLocal(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/health/get-time.md b/docs/examples/0.14.x/server-deno/examples/health/get-time.md new file mode 100644 index 0000000000..17de3193cf --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/health/get-time.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getTime(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/health/get.md b/docs/examples/0.14.x/server-deno/examples/health/get.md new file mode 100644 index 0000000000..ac94e75627 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/health/get.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.get(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/locale/get-continents.md b/docs/examples/0.14.x/server-deno/examples/locale/get-continents.md new file mode 100644 index 0000000000..44c18b54f4 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/locale/get-continents.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = locale.getContinents(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/locale/get-countries-e-u.md b/docs/examples/0.14.x/server-deno/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..f14e4353ff --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/locale/get-countries-e-u.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = locale.getCountriesEU(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/locale/get-countries-phones.md b/docs/examples/0.14.x/server-deno/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..b23eff3dac --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/locale/get-countries-phones.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = locale.getCountriesPhones(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/locale/get-countries.md b/docs/examples/0.14.x/server-deno/examples/locale/get-countries.md new file mode 100644 index 0000000000..2f3facd7e8 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/locale/get-countries.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = locale.getCountries(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/locale/get-currencies.md b/docs/examples/0.14.x/server-deno/examples/locale/get-currencies.md new file mode 100644 index 0000000000..34d4e233ee --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/locale/get-currencies.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = locale.getCurrencies(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/locale/get-languages.md b/docs/examples/0.14.x/server-deno/examples/locale/get-languages.md new file mode 100644 index 0000000000..3fd5d8b8c2 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/locale/get-languages.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = locale.getLanguages(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/locale/get.md b/docs/examples/0.14.x/server-deno/examples/locale/get.md new file mode 100644 index 0000000000..30ca9a22c7 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/locale/get.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = locale.get(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/storage/create-bucket.md b/docs/examples/0.14.x/server-deno/examples/storage/create-bucket.md new file mode 100644 index 0000000000..49784e866a --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/storage/create-bucket.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.createBucket('[BUCKET_ID]', '[NAME]', 'file'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/storage/create-file.md b/docs/examples/0.14.x/server-deno/examples/storage/create-file.md new file mode 100644 index 0000000000..d49c4e2079 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/storage/create-file.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.createFile('[BUCKET_ID]', '[FILE_ID]', 'file.png'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/storage/delete-bucket.md b/docs/examples/0.14.x/server-deno/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..366c4e8973 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/storage/delete-bucket.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.deleteBucket('[BUCKET_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/storage/delete-file.md b/docs/examples/0.14.x/server-deno/examples/storage/delete-file.md new file mode 100644 index 0000000000..579920d9d0 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/storage/delete-file.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.deleteFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/storage/get-bucket.md b/docs/examples/0.14.x/server-deno/examples/storage/get-bucket.md new file mode 100644 index 0000000000..c45443866f --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/storage/get-bucket.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.getBucket('[BUCKET_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/storage/get-file-download.md b/docs/examples/0.14.x/server-deno/examples/storage/get-file-download.md new file mode 100644 index 0000000000..780dac4b49 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/storage/get-file-download.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.getFileDownload('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/storage/get-file-preview.md b/docs/examples/0.14.x/server-deno/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..cc81db1b0f --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/storage/get-file-preview.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.getFilePreview('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/storage/get-file-view.md b/docs/examples/0.14.x/server-deno/examples/storage/get-file-view.md new file mode 100644 index 0000000000..9dba58ad4f --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/storage/get-file-view.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.getFileView('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/storage/get-file.md b/docs/examples/0.14.x/server-deno/examples/storage/get-file.md new file mode 100644 index 0000000000..5494fca02c --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/storage/get-file.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.getFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/storage/list-buckets.md b/docs/examples/0.14.x/server-deno/examples/storage/list-buckets.md new file mode 100644 index 0000000000..51d9a3b9e2 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/storage/list-buckets.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.listBuckets(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/storage/list-files.md b/docs/examples/0.14.x/server-deno/examples/storage/list-files.md new file mode 100644 index 0000000000..110fba5a0c --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/storage/list-files.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.listFiles('[BUCKET_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/storage/update-bucket.md b/docs/examples/0.14.x/server-deno/examples/storage/update-bucket.md new file mode 100644 index 0000000000..7040960ee5 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/storage/update-bucket.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.updateBucket('[BUCKET_ID]', '[NAME]', 'file'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/storage/update-file.md b/docs/examples/0.14.x/server-deno/examples/storage/update-file.md new file mode 100644 index 0000000000..e29feff777 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/storage/update-file.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.updateFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/teams/create-membership.md b/docs/examples/0.14.x/server-deno/examples/teams/create-membership.md new file mode 100644 index 0000000000..b85e811d65 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/teams/create-membership.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/teams/create.md b/docs/examples/0.14.x/server-deno/examples/teams/create.md new file mode 100644 index 0000000000..728e649886 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/teams/create.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.create('[TEAM_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/teams/delete-membership.md b/docs/examples/0.14.x/server-deno/examples/teams/delete-membership.md new file mode 100644 index 0000000000..94e60ae03a --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/teams/delete-membership.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.deleteMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/teams/delete.md b/docs/examples/0.14.x/server-deno/examples/teams/delete.md new file mode 100644 index 0000000000..4b1e0bddfc --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/teams/delete.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.delete('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/teams/get-membership.md b/docs/examples/0.14.x/server-deno/examples/teams/get-membership.md new file mode 100644 index 0000000000..db60e1976f --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/teams/get-membership.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.getMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/teams/get-memberships.md b/docs/examples/0.14.x/server-deno/examples/teams/get-memberships.md new file mode 100644 index 0000000000..467101c956 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/teams/get-memberships.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.getMemberships('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/teams/get.md b/docs/examples/0.14.x/server-deno/examples/teams/get.md new file mode 100644 index 0000000000..435391a63a --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/teams/get.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.get('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/teams/list.md b/docs/examples/0.14.x/server-deno/examples/teams/list.md new file mode 100644 index 0000000000..6d00f6df54 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/teams/list.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.list(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/teams/update-membership-roles.md b/docs/examples/0.14.x/server-deno/examples/teams/update-membership-roles.md new file mode 100644 index 0000000000..3337aa0a3a --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/teams/update-membership-roles.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.updateMembershipRoles('[TEAM_ID]', '[MEMBERSHIP_ID]', []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/teams/update-membership-status.md b/docs/examples/0.14.x/server-deno/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..784f1a0349 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/teams/update-membership-status.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + + +let promise = teams.updateMembershipStatus('[TEAM_ID]', '[MEMBERSHIP_ID]', '[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/teams/update.md b/docs/examples/0.14.x/server-deno/examples/teams/update.md new file mode 100644 index 0000000000..9d73002f5c --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/teams/update.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.update('[TEAM_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/users/create.md b/docs/examples/0.14.x/server-deno/examples/users/create.md new file mode 100644 index 0000000000..3682781049 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/users/create.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.create('[USER_ID]', 'email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/users/delete-session.md b/docs/examples/0.14.x/server-deno/examples/users/delete-session.md new file mode 100644 index 0000000000..e04024e5a2 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/users/delete-session.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.deleteSession('[USER_ID]', '[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/users/delete-sessions.md b/docs/examples/0.14.x/server-deno/examples/users/delete-sessions.md new file mode 100644 index 0000000000..89dec44e39 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/users/delete-sessions.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.deleteSessions('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/users/delete.md b/docs/examples/0.14.x/server-deno/examples/users/delete.md new file mode 100644 index 0000000000..9de2296c4c --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/users/delete.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.delete('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/users/get-logs.md b/docs/examples/0.14.x/server-deno/examples/users/get-logs.md new file mode 100644 index 0000000000..5770e84525 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/users/get-logs.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.getLogs('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/users/get-memberships.md b/docs/examples/0.14.x/server-deno/examples/users/get-memberships.md new file mode 100644 index 0000000000..cc3c1e109d --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/users/get-memberships.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.getMemberships('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/users/get-prefs.md b/docs/examples/0.14.x/server-deno/examples/users/get-prefs.md new file mode 100644 index 0000000000..033c56f3db --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/users/get-prefs.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.getPrefs('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/users/get-sessions.md b/docs/examples/0.14.x/server-deno/examples/users/get-sessions.md new file mode 100644 index 0000000000..15f0b53c5c --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/users/get-sessions.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.getSessions('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/users/get.md b/docs/examples/0.14.x/server-deno/examples/users/get.md new file mode 100644 index 0000000000..acee263e2f --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/users/get.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.get('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/users/list.md b/docs/examples/0.14.x/server-deno/examples/users/list.md new file mode 100644 index 0000000000..c986039946 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/users/list.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.list(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/users/update-email.md b/docs/examples/0.14.x/server-deno/examples/users/update-email.md new file mode 100644 index 0000000000..1000604764 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/users/update-email.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.updateEmail('[USER_ID]', 'email@example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/users/update-name.md b/docs/examples/0.14.x/server-deno/examples/users/update-name.md new file mode 100644 index 0000000000..5434047853 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/users/update-name.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.updateName('[USER_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/users/update-password.md b/docs/examples/0.14.x/server-deno/examples/users/update-password.md new file mode 100644 index 0000000000..ac11596a08 --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/users/update-password.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.updatePassword('[USER_ID]', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/users/update-prefs.md b/docs/examples/0.14.x/server-deno/examples/users/update-prefs.md new file mode 100644 index 0000000000..4e88ed567a --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/users/update-prefs.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.updatePrefs('[USER_ID]', {}); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/users/update-status.md b/docs/examples/0.14.x/server-deno/examples/users/update-status.md new file mode 100644 index 0000000000..ec52d3715c --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/users/update-status.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.updateStatus('[USER_ID]', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/users/update-verification.md b/docs/examples/0.14.x/server-deno/examples/users/update-verification.md new file mode 100644 index 0000000000..4859b2c7eb --- /dev/null +++ b/docs/examples/0.14.x/server-deno/examples/users/update-verification.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.updateVerification('[USER_ID]', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/account/create-recovery.md b/docs/examples/0.14.x/server-kotlin/java/account/create-recovery.md new file mode 100644 index 0000000000..83fbe91a95 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/account/create-recovery.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + + Account account = new Account(client); + account.createRecovery( + email = "email@example.com", + url = "https://example.com" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/account/create-verification.md b/docs/examples/0.14.x/server-kotlin/java/account/create-verification.md new file mode 100644 index 0000000000..2ca770e2e1 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/account/create-verification.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + + Account account = new Account(client); + account.createVerification( + url = "https://example.com" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/account/delete-session.md b/docs/examples/0.14.x/server-kotlin/java/account/delete-session.md new file mode 100644 index 0000000000..bb925a77e3 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/account/delete-session.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + + Account account = new Account(client); + account.deleteSession( + sessionId = "[SESSION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/account/delete-sessions.md b/docs/examples/0.14.x/server-kotlin/java/account/delete-sessions.md new file mode 100644 index 0000000000..4cda782b99 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/account/delete-sessions.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + + Account account = new Account(client); + account.deleteSessions(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/account/get-logs.md b/docs/examples/0.14.x/server-kotlin/java/account/get-logs.md new file mode 100644 index 0000000000..99bab4a886 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/account/get-logs.md @@ -0,0 +1,35 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + + Account account = new Account(client); + account.getLogs( + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/account/get-prefs.md b/docs/examples/0.14.x/server-kotlin/java/account/get-prefs.md new file mode 100644 index 0000000000..501e2d08c7 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/account/get-prefs.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + + Account account = new Account(client); + account.getPrefs(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/account/get-session.md b/docs/examples/0.14.x/server-kotlin/java/account/get-session.md new file mode 100644 index 0000000000..6f3e9e1a82 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/account/get-session.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + + Account account = new Account(client); + account.getSession( + sessionId = "[SESSION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/account/get-sessions.md b/docs/examples/0.14.x/server-kotlin/java/account/get-sessions.md new file mode 100644 index 0000000000..1f42599185 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/account/get-sessions.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + + Account account = new Account(client); + account.getSessions(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/account/get.md b/docs/examples/0.14.x/server-kotlin/java/account/get.md new file mode 100644 index 0000000000..2429a5d5d9 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/account/get.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + + Account account = new Account(client); + account.get(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/account/update-email.md b/docs/examples/0.14.x/server-kotlin/java/account/update-email.md new file mode 100644 index 0000000000..187fa22e2d --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/account/update-email.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + + Account account = new Account(client); + account.updateEmail( + email = "email@example.com", + password = "password" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/account/update-name.md b/docs/examples/0.14.x/server-kotlin/java/account/update-name.md new file mode 100644 index 0000000000..6f15d10e41 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/account/update-name.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + + Account account = new Account(client); + account.updateName( + name = "[NAME]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/account/update-password.md b/docs/examples/0.14.x/server-kotlin/java/account/update-password.md new file mode 100644 index 0000000000..5058503b4c --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/account/update-password.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + + Account account = new Account(client); + account.updatePassword( + password = "password", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/account/update-prefs.md b/docs/examples/0.14.x/server-kotlin/java/account/update-prefs.md new file mode 100644 index 0000000000..ca085e904c --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/account/update-prefs.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + + Account account = new Account(client); + account.updatePrefs( + prefs = mapOf( "a" to "b" ) + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/account/update-recovery.md b/docs/examples/0.14.x/server-kotlin/java/account/update-recovery.md new file mode 100644 index 0000000000..d2b79d3dc5 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/account/update-recovery.md @@ -0,0 +1,39 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + + Account account = new Account(client); + account.updateRecovery( + userId = "[USER_ID]", + secret = "[SECRET]", + password = "password", + passwordAgain = "password" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/account/update-session.md b/docs/examples/0.14.x/server-kotlin/java/account/update-session.md new file mode 100644 index 0000000000..4e41fbb4e1 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/account/update-session.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + + Account account = new Account(client); + account.updateSession( + sessionId = "[SESSION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/account/update-status.md b/docs/examples/0.14.x/server-kotlin/java/account/update-status.md new file mode 100644 index 0000000000..6a8e86649f --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/account/update-status.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + + Account account = new Account(client); + account.updateStatus(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/account/update-verification.md b/docs/examples/0.14.x/server-kotlin/java/account/update-verification.md new file mode 100644 index 0000000000..0c0eb6c962 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/account/update-verification.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + + Account account = new Account(client); + account.updateVerification( + userId = "[USER_ID]", + secret = "[SECRET]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/avatars/get-browser.md b/docs/examples/0.14.x/server-kotlin/java/avatars/get-browser.md new file mode 100644 index 0000000000..3042e77002 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/avatars/get-browser.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Avatars avatars = new Avatars(client); + avatars.getBrowser( + code = "aa", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/avatars/get-credit-card.md b/docs/examples/0.14.x/server-kotlin/java/avatars/get-credit-card.md new file mode 100644 index 0000000000..956f6b76f3 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/avatars/get-credit-card.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Avatars avatars = new Avatars(client); + avatars.getCreditCard( + code = "amex", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/avatars/get-favicon.md b/docs/examples/0.14.x/server-kotlin/java/avatars/get-favicon.md new file mode 100644 index 0000000000..35b64fcc0b --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/avatars/get-favicon.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Avatars avatars = new Avatars(client); + avatars.getFavicon( + url = "https://example.com" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/avatars/get-flag.md b/docs/examples/0.14.x/server-kotlin/java/avatars/get-flag.md new file mode 100644 index 0000000000..ccc90df1e6 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/avatars/get-flag.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Avatars avatars = new Avatars(client); + avatars.getFlag( + code = "af", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/avatars/get-image.md b/docs/examples/0.14.x/server-kotlin/java/avatars/get-image.md new file mode 100644 index 0000000000..357f6bf29c --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/avatars/get-image.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Avatars avatars = new Avatars(client); + avatars.getImage( + url = "https://example.com", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/avatars/get-initials.md b/docs/examples/0.14.x/server-kotlin/java/avatars/get-initials.md new file mode 100644 index 0000000000..c6ef8ce8e7 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/avatars/get-initials.md @@ -0,0 +1,35 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Avatars avatars = new Avatars(client); + avatars.getInitials( + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/avatars/get-q-r.md b/docs/examples/0.14.x/server-kotlin/java/avatars/get-q-r.md new file mode 100644 index 0000000000..07031b38ce --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/avatars/get-q-r.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Avatars avatars = new Avatars(client); + avatars.getQR( + text = "[TEXT]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/create-boolean-attribute.md b/docs/examples/0.14.x/server-kotlin/java/database/create-boolean-attribute.md new file mode 100644 index 0000000000..1ab665e341 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/create-boolean-attribute.md @@ -0,0 +1,38 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.createBooleanAttribute( + collectionId = "[COLLECTION_ID]", + key = "", + required = false, + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/create-collection.md b/docs/examples/0.14.x/server-kotlin/java/database/create-collection.md new file mode 100644 index 0000000000..c028333c88 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/create-collection.md @@ -0,0 +1,40 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.createCollection( + collectionId = "[COLLECTION_ID]", + name = "[NAME]", + permission = "document", + read = ["role:all"], + write = ["role:all"] + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/create-document.md b/docs/examples/0.14.x/server-kotlin/java/database/create-document.md new file mode 100644 index 0000000000..45d80217d1 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/create-document.md @@ -0,0 +1,38 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.createDocument( + collectionId = "[COLLECTION_ID]", + documentId = "[DOCUMENT_ID]", + data = mapOf( "a" to "b" ), + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/create-email-attribute.md b/docs/examples/0.14.x/server-kotlin/java/database/create-email-attribute.md new file mode 100644 index 0000000000..82d5b3f891 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/create-email-attribute.md @@ -0,0 +1,38 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.createEmailAttribute( + collectionId = "[COLLECTION_ID]", + key = "", + required = false, + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/create-enum-attribute.md b/docs/examples/0.14.x/server-kotlin/java/database/create-enum-attribute.md new file mode 100644 index 0000000000..37c1a760b0 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/create-enum-attribute.md @@ -0,0 +1,39 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.createEnumAttribute( + collectionId = "[COLLECTION_ID]", + key = "", + elements = listOf(), + required = false, + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/create-float-attribute.md b/docs/examples/0.14.x/server-kotlin/java/database/create-float-attribute.md new file mode 100644 index 0000000000..57014cfb1c --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/create-float-attribute.md @@ -0,0 +1,38 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.createFloatAttribute( + collectionId = "[COLLECTION_ID]", + key = "", + required = false, + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/create-index.md b/docs/examples/0.14.x/server-kotlin/java/database/create-index.md new file mode 100644 index 0000000000..fd1cbfe992 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/create-index.md @@ -0,0 +1,39 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.createIndex( + collectionId = "[COLLECTION_ID]", + key = "", + type = "key", + attributes = listOf(), + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/create-integer-attribute.md b/docs/examples/0.14.x/server-kotlin/java/database/create-integer-attribute.md new file mode 100644 index 0000000000..b3aef2296b --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/create-integer-attribute.md @@ -0,0 +1,38 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.createIntegerAttribute( + collectionId = "[COLLECTION_ID]", + key = "", + required = false, + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/create-ip-attribute.md b/docs/examples/0.14.x/server-kotlin/java/database/create-ip-attribute.md new file mode 100644 index 0000000000..6cf941f05a --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/create-ip-attribute.md @@ -0,0 +1,38 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.createIpAttribute( + collectionId = "[COLLECTION_ID]", + key = "", + required = false, + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/create-string-attribute.md b/docs/examples/0.14.x/server-kotlin/java/database/create-string-attribute.md new file mode 100644 index 0000000000..05492e9f76 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/create-string-attribute.md @@ -0,0 +1,39 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.createStringAttribute( + collectionId = "[COLLECTION_ID]", + key = "", + size = 1, + required = false, + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/create-url-attribute.md b/docs/examples/0.14.x/server-kotlin/java/database/create-url-attribute.md new file mode 100644 index 0000000000..cb94279946 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/create-url-attribute.md @@ -0,0 +1,38 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.createUrlAttribute( + collectionId = "[COLLECTION_ID]", + key = "", + required = false, + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/delete-attribute.md b/docs/examples/0.14.x/server-kotlin/java/database/delete-attribute.md new file mode 100644 index 0000000000..46689fc559 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/delete-attribute.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.deleteAttribute( + collectionId = "[COLLECTION_ID]", + key = "" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/delete-collection.md b/docs/examples/0.14.x/server-kotlin/java/database/delete-collection.md new file mode 100644 index 0000000000..ea666ca565 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/delete-collection.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.deleteCollection( + collectionId = "[COLLECTION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/delete-document.md b/docs/examples/0.14.x/server-kotlin/java/database/delete-document.md new file mode 100644 index 0000000000..9bc26e85f0 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/delete-document.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.deleteDocument( + collectionId = "[COLLECTION_ID]", + documentId = "[DOCUMENT_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/delete-index.md b/docs/examples/0.14.x/server-kotlin/java/database/delete-index.md new file mode 100644 index 0000000000..1845609def --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/delete-index.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.deleteIndex( + collectionId = "[COLLECTION_ID]", + key = "" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/get-attribute.md b/docs/examples/0.14.x/server-kotlin/java/database/get-attribute.md new file mode 100644 index 0000000000..699e933601 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/get-attribute.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.getAttribute( + collectionId = "[COLLECTION_ID]", + key = "" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/get-collection.md b/docs/examples/0.14.x/server-kotlin/java/database/get-collection.md new file mode 100644 index 0000000000..1d6e96e45d --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/get-collection.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.getCollection( + collectionId = "[COLLECTION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/get-document.md b/docs/examples/0.14.x/server-kotlin/java/database/get-document.md new file mode 100644 index 0000000000..4ed6fe7ff9 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/get-document.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.getDocument( + collectionId = "[COLLECTION_ID]", + documentId = "[DOCUMENT_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/get-index.md b/docs/examples/0.14.x/server-kotlin/java/database/get-index.md new file mode 100644 index 0000000000..5399ec431b --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/get-index.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.getIndex( + collectionId = "[COLLECTION_ID]", + key = "" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/list-attributes.md b/docs/examples/0.14.x/server-kotlin/java/database/list-attributes.md new file mode 100644 index 0000000000..98a6c21732 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/list-attributes.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.listAttributes( + collectionId = "[COLLECTION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/list-collections.md b/docs/examples/0.14.x/server-kotlin/java/database/list-collections.md new file mode 100644 index 0000000000..9fbda9f9c6 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/list-collections.md @@ -0,0 +1,35 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.listCollections( + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/list-documents.md b/docs/examples/0.14.x/server-kotlin/java/database/list-documents.md new file mode 100644 index 0000000000..05e890783a --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/list-documents.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.listDocuments( + collectionId = "[COLLECTION_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/list-indexes.md b/docs/examples/0.14.x/server-kotlin/java/database/list-indexes.md new file mode 100644 index 0000000000..394b661630 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/list-indexes.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.listIndexes( + collectionId = "[COLLECTION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/update-collection.md b/docs/examples/0.14.x/server-kotlin/java/database/update-collection.md new file mode 100644 index 0000000000..f6319e0603 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/update-collection.md @@ -0,0 +1,38 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.updateCollection( + collectionId = "[COLLECTION_ID]", + name = "[NAME]", + permission = "document", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/database/update-document.md b/docs/examples/0.14.x/server-kotlin/java/database/update-document.md new file mode 100644 index 0000000000..9c06624d4b --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/database/update-document.md @@ -0,0 +1,38 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Database database = new Database(client); + database.updateDocument( + collectionId = "[COLLECTION_ID]", + documentId = "[DOCUMENT_ID]", + data = mapOf( "a" to "b" ), + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/functions/create-deployment.md b/docs/examples/0.14.x/server-kotlin/java/functions/create-deployment.md new file mode 100644 index 0000000000..1ba7bd77cd --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/functions/create-deployment.md @@ -0,0 +1,39 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.createDeployment( + functionId = "[FUNCTION_ID]", + entrypoint = "[ENTRYPOINT]", + code = File("file.png"), + activate = false + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/functions/create-execution.md b/docs/examples/0.14.x/server-kotlin/java/functions/create-execution.md new file mode 100644 index 0000000000..eb13aed5c3 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/functions/create-execution.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.createExecution( + functionId = "[FUNCTION_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/functions/create.md b/docs/examples/0.14.x/server-kotlin/java/functions/create.md new file mode 100644 index 0000000000..b13345c668 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/functions/create.md @@ -0,0 +1,39 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.create( + functionId = "[FUNCTION_ID]", + name = "[NAME]", + execute = listOf(), + runtime = "node-14.5", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/functions/delete-deployment.md b/docs/examples/0.14.x/server-kotlin/java/functions/delete-deployment.md new file mode 100644 index 0000000000..58fbc7cfee --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/functions/delete-deployment.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.deleteDeployment( + functionId = "[FUNCTION_ID]", + deploymentId = "[DEPLOYMENT_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/functions/delete.md b/docs/examples/0.14.x/server-kotlin/java/functions/delete.md new file mode 100644 index 0000000000..a51709b874 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/functions/delete.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.delete( + functionId = "[FUNCTION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/functions/get-deployment.md b/docs/examples/0.14.x/server-kotlin/java/functions/get-deployment.md new file mode 100644 index 0000000000..276e711bba --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/functions/get-deployment.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.getDeployment( + functionId = "[FUNCTION_ID]", + deploymentId = "[DEPLOYMENT_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/functions/get-execution.md b/docs/examples/0.14.x/server-kotlin/java/functions/get-execution.md new file mode 100644 index 0000000000..4161b28eaf --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/functions/get-execution.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.getExecution( + functionId = "[FUNCTION_ID]", + executionId = "[EXECUTION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/functions/get.md b/docs/examples/0.14.x/server-kotlin/java/functions/get.md new file mode 100644 index 0000000000..8e1cd5ef29 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/functions/get.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.get( + functionId = "[FUNCTION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/functions/list-deployments.md b/docs/examples/0.14.x/server-kotlin/java/functions/list-deployments.md new file mode 100644 index 0000000000..920684554c --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/functions/list-deployments.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.listDeployments( + functionId = "[FUNCTION_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/functions/list-executions.md b/docs/examples/0.14.x/server-kotlin/java/functions/list-executions.md new file mode 100644 index 0000000000..915bf64d4b --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/functions/list-executions.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.listExecutions( + functionId = "[FUNCTION_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/functions/list-runtimes.md b/docs/examples/0.14.x/server-kotlin/java/functions/list-runtimes.md new file mode 100644 index 0000000000..e70bd27f76 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/functions/list-runtimes.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.listRuntimes(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/functions/list.md b/docs/examples/0.14.x/server-kotlin/java/functions/list.md new file mode 100644 index 0000000000..e365f30f1f --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/functions/list.md @@ -0,0 +1,35 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.list( + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/functions/retry-build.md b/docs/examples/0.14.x/server-kotlin/java/functions/retry-build.md new file mode 100644 index 0000000000..e098597e63 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/functions/retry-build.md @@ -0,0 +1,38 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.retryBuild( + functionId = "[FUNCTION_ID]", + deploymentId = "[DEPLOYMENT_ID]", + buildId = "[BUILD_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/functions/update-deployment.md b/docs/examples/0.14.x/server-kotlin/java/functions/update-deployment.md new file mode 100644 index 0000000000..e13f2e2471 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/functions/update-deployment.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.updateDeployment( + functionId = "[FUNCTION_ID]", + deploymentId = "[DEPLOYMENT_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/functions/update.md b/docs/examples/0.14.x/server-kotlin/java/functions/update.md new file mode 100644 index 0000000000..80d95c2f4b --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/functions/update.md @@ -0,0 +1,38 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Functions functions = new Functions(client); + functions.update( + functionId = "[FUNCTION_ID]", + name = "[NAME]", + execute = listOf(), + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/health/get-antivirus.md b/docs/examples/0.14.x/server-kotlin/java/health/get-antivirus.md new file mode 100644 index 0000000000..3a40f730a2 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/health/get-antivirus.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Health health = new Health(client); + health.getAntivirus(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/health/get-cache.md b/docs/examples/0.14.x/server-kotlin/java/health/get-cache.md new file mode 100644 index 0000000000..e7300a34f4 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/health/get-cache.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Health health = new Health(client); + health.getCache(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/health/get-d-b.md b/docs/examples/0.14.x/server-kotlin/java/health/get-d-b.md new file mode 100644 index 0000000000..9644806bd2 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/health/get-d-b.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Health health = new Health(client); + health.getDB(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/health/get-queue-certificates.md b/docs/examples/0.14.x/server-kotlin/java/health/get-queue-certificates.md new file mode 100644 index 0000000000..084576b65a --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/health/get-queue-certificates.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Health health = new Health(client); + health.getQueueCertificates(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/health/get-queue-functions.md b/docs/examples/0.14.x/server-kotlin/java/health/get-queue-functions.md new file mode 100644 index 0000000000..9809a03d2f --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/health/get-queue-functions.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Health health = new Health(client); + health.getQueueFunctions(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/health/get-queue-logs.md b/docs/examples/0.14.x/server-kotlin/java/health/get-queue-logs.md new file mode 100644 index 0000000000..4a08fa9321 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/health/get-queue-logs.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Health health = new Health(client); + health.getQueueLogs(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/health/get-queue-webhooks.md b/docs/examples/0.14.x/server-kotlin/java/health/get-queue-webhooks.md new file mode 100644 index 0000000000..d8bc27a2bf --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/health/get-queue-webhooks.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Health health = new Health(client); + health.getQueueWebhooks(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/health/get-storage-local.md b/docs/examples/0.14.x/server-kotlin/java/health/get-storage-local.md new file mode 100644 index 0000000000..079eca49e1 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/health/get-storage-local.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Health health = new Health(client); + health.getStorageLocal(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/health/get-time.md b/docs/examples/0.14.x/server-kotlin/java/health/get-time.md new file mode 100644 index 0000000000..a8ca3b91de --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/health/get-time.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Health health = new Health(client); + health.getTime(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/health/get.md b/docs/examples/0.14.x/server-kotlin/java/health/get.md new file mode 100644 index 0000000000..30adbbbf60 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/health/get.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Health health = new Health(client); + health.get(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/locale/get-continents.md b/docs/examples/0.14.x/server-kotlin/java/locale/get-continents.md new file mode 100644 index 0000000000..836eadac9a --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/locale/get-continents.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Locale locale = new Locale(client); + locale.getContinents(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/locale/get-countries-e-u.md b/docs/examples/0.14.x/server-kotlin/java/locale/get-countries-e-u.md new file mode 100644 index 0000000000..3bb79f9482 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/locale/get-countries-e-u.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Locale locale = new Locale(client); + locale.getCountriesEU(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/locale/get-countries-phones.md b/docs/examples/0.14.x/server-kotlin/java/locale/get-countries-phones.md new file mode 100644 index 0000000000..b1596d2ccb --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/locale/get-countries-phones.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Locale locale = new Locale(client); + locale.getCountriesPhones(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/locale/get-countries.md b/docs/examples/0.14.x/server-kotlin/java/locale/get-countries.md new file mode 100644 index 0000000000..95d1fef52f --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/locale/get-countries.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Locale locale = new Locale(client); + locale.getCountries(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/locale/get-currencies.md b/docs/examples/0.14.x/server-kotlin/java/locale/get-currencies.md new file mode 100644 index 0000000000..c7495f485a --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/locale/get-currencies.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Locale locale = new Locale(client); + locale.getCurrencies(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/locale/get-languages.md b/docs/examples/0.14.x/server-kotlin/java/locale/get-languages.md new file mode 100644 index 0000000000..f59054e699 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/locale/get-languages.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Locale locale = new Locale(client); + locale.getLanguages(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/locale/get.md b/docs/examples/0.14.x/server-kotlin/java/locale/get.md new file mode 100644 index 0000000000..bf2f34fb02 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/locale/get.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Locale locale = new Locale(client); + locale.get(new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + }); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/storage/create-bucket.md b/docs/examples/0.14.x/server-kotlin/java/storage/create-bucket.md new file mode 100644 index 0000000000..54f06350c7 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/storage/create-bucket.md @@ -0,0 +1,38 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Storage storage = new Storage(client); + storage.createBucket( + bucketId = "[BUCKET_ID]", + name = "[NAME]", + permission = "file", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/storage/create-file.md b/docs/examples/0.14.x/server-kotlin/java/storage/create-file.md new file mode 100644 index 0000000000..0debf03fba --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/storage/create-file.md @@ -0,0 +1,38 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Storage storage = new Storage(client); + storage.createFile( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]", + file = File("file.png"), + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/storage/delete-bucket.md b/docs/examples/0.14.x/server-kotlin/java/storage/delete-bucket.md new file mode 100644 index 0000000000..5d00b7bc6d --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/storage/delete-bucket.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Storage storage = new Storage(client); + storage.deleteBucket( + bucketId = "[BUCKET_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/storage/delete-file.md b/docs/examples/0.14.x/server-kotlin/java/storage/delete-file.md new file mode 100644 index 0000000000..3d41866c53 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/storage/delete-file.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Storage storage = new Storage(client); + storage.deleteFile( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/storage/get-bucket.md b/docs/examples/0.14.x/server-kotlin/java/storage/get-bucket.md new file mode 100644 index 0000000000..c8b92bda98 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/storage/get-bucket.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Storage storage = new Storage(client); + storage.getBucket( + bucketId = "[BUCKET_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/storage/get-file-download.md b/docs/examples/0.14.x/server-kotlin/java/storage/get-file-download.md new file mode 100644 index 0000000000..b116d5bb7b --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/storage/get-file-download.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Storage storage = new Storage(client); + storage.getFileDownload( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/storage/get-file-preview.md b/docs/examples/0.14.x/server-kotlin/java/storage/get-file-preview.md new file mode 100644 index 0000000000..32284dc7e3 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/storage/get-file-preview.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Storage storage = new Storage(client); + storage.getFilePreview( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/storage/get-file-view.md b/docs/examples/0.14.x/server-kotlin/java/storage/get-file-view.md new file mode 100644 index 0000000000..0332da5e89 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/storage/get-file-view.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Storage storage = new Storage(client); + storage.getFileView( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/storage/get-file.md b/docs/examples/0.14.x/server-kotlin/java/storage/get-file.md new file mode 100644 index 0000000000..61e3d6c20c --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/storage/get-file.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Storage storage = new Storage(client); + storage.getFile( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/storage/list-buckets.md b/docs/examples/0.14.x/server-kotlin/java/storage/list-buckets.md new file mode 100644 index 0000000000..ffce5eb986 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/storage/list-buckets.md @@ -0,0 +1,35 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Storage storage = new Storage(client); + storage.listBuckets( + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/storage/list-files.md b/docs/examples/0.14.x/server-kotlin/java/storage/list-files.md new file mode 100644 index 0000000000..de33a00b46 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/storage/list-files.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Storage storage = new Storage(client); + storage.listFiles( + bucketId = "[BUCKET_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/storage/update-bucket.md b/docs/examples/0.14.x/server-kotlin/java/storage/update-bucket.md new file mode 100644 index 0000000000..b8b27bda14 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/storage/update-bucket.md @@ -0,0 +1,38 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Storage storage = new Storage(client); + storage.updateBucket( + bucketId = "[BUCKET_ID]", + name = "[NAME]", + permission = "file", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/storage/update-file.md b/docs/examples/0.14.x/server-kotlin/java/storage/update-file.md new file mode 100644 index 0000000000..e1c2ed440c --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/storage/update-file.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Storage storage = new Storage(client); + storage.updateFile( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/teams/create-membership.md b/docs/examples/0.14.x/server-kotlin/java/teams/create-membership.md new file mode 100644 index 0000000000..077ce3f058 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/teams/create-membership.md @@ -0,0 +1,39 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Teams teams = new Teams(client); + teams.createMembership( + teamId = "[TEAM_ID]", + email = "email@example.com", + roles = listOf(), + url = "https://example.com", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/teams/create.md b/docs/examples/0.14.x/server-kotlin/java/teams/create.md new file mode 100644 index 0000000000..3cc1f9d19d --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/teams/create.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Teams teams = new Teams(client); + teams.create( + teamId = "[TEAM_ID]", + name = "[NAME]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/teams/delete-membership.md b/docs/examples/0.14.x/server-kotlin/java/teams/delete-membership.md new file mode 100644 index 0000000000..7a57a32d9a --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/teams/delete-membership.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Teams teams = new Teams(client); + teams.deleteMembership( + teamId = "[TEAM_ID]", + membershipId = "[MEMBERSHIP_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/teams/delete.md b/docs/examples/0.14.x/server-kotlin/java/teams/delete.md new file mode 100644 index 0000000000..7ace480161 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/teams/delete.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Teams teams = new Teams(client); + teams.delete( + teamId = "[TEAM_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/teams/get-membership.md b/docs/examples/0.14.x/server-kotlin/java/teams/get-membership.md new file mode 100644 index 0000000000..5d4890693d --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/teams/get-membership.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Teams teams = new Teams(client); + teams.getMembership( + teamId = "[TEAM_ID]", + membershipId = "[MEMBERSHIP_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/teams/get-memberships.md b/docs/examples/0.14.x/server-kotlin/java/teams/get-memberships.md new file mode 100644 index 0000000000..af76419c43 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/teams/get-memberships.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Teams teams = new Teams(client); + teams.getMemberships( + teamId = "[TEAM_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/teams/get.md b/docs/examples/0.14.x/server-kotlin/java/teams/get.md new file mode 100644 index 0000000000..23f52dc5c5 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/teams/get.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Teams teams = new Teams(client); + teams.get( + teamId = "[TEAM_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/teams/list.md b/docs/examples/0.14.x/server-kotlin/java/teams/list.md new file mode 100644 index 0000000000..2a7bf89f6e --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/teams/list.md @@ -0,0 +1,35 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Teams teams = new Teams(client); + teams.list( + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/teams/update-membership-roles.md b/docs/examples/0.14.x/server-kotlin/java/teams/update-membership-roles.md new file mode 100644 index 0000000000..7e8d68283d --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/teams/update-membership-roles.md @@ -0,0 +1,38 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Teams teams = new Teams(client); + teams.updateMembershipRoles( + teamId = "[TEAM_ID]", + membershipId = "[MEMBERSHIP_ID]", + roles = listOf() + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/teams/update-membership-status.md b/docs/examples/0.14.x/server-kotlin/java/teams/update-membership-status.md new file mode 100644 index 0000000000..0a528d4d81 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/teams/update-membership-status.md @@ -0,0 +1,39 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + + Teams teams = new Teams(client); + teams.updateMembershipStatus( + teamId = "[TEAM_ID]", + membershipId = "[MEMBERSHIP_ID]", + userId = "[USER_ID]", + secret = "[SECRET]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/teams/update.md b/docs/examples/0.14.x/server-kotlin/java/teams/update.md new file mode 100644 index 0000000000..5c05d6a65f --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/teams/update.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Teams teams = new Teams(client); + teams.update( + teamId = "[TEAM_ID]", + name = "[NAME]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/users/create.md b/docs/examples/0.14.x/server-kotlin/java/users/create.md new file mode 100644 index 0000000000..d9dea45ab9 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/users/create.md @@ -0,0 +1,38 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.create( + userId = "[USER_ID]", + email = "email@example.com", + password = "password", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/users/delete-session.md b/docs/examples/0.14.x/server-kotlin/java/users/delete-session.md new file mode 100644 index 0000000000..7295506bc2 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/users/delete-session.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.deleteSession( + userId = "[USER_ID]", + sessionId = "[SESSION_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/users/delete-sessions.md b/docs/examples/0.14.x/server-kotlin/java/users/delete-sessions.md new file mode 100644 index 0000000000..6fb4028c37 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/users/delete-sessions.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.deleteSessions( + userId = "[USER_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/users/delete.md b/docs/examples/0.14.x/server-kotlin/java/users/delete.md new file mode 100644 index 0000000000..f004170a1e --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/users/delete.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.delete( + userId = "[USER_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/users/get-logs.md b/docs/examples/0.14.x/server-kotlin/java/users/get-logs.md new file mode 100644 index 0000000000..226f70a206 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/users/get-logs.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.getLogs( + userId = "[USER_ID]", + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/users/get-memberships.md b/docs/examples/0.14.x/server-kotlin/java/users/get-memberships.md new file mode 100644 index 0000000000..d87891b69c --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/users/get-memberships.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.getMemberships( + userId = "[USER_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/users/get-prefs.md b/docs/examples/0.14.x/server-kotlin/java/users/get-prefs.md new file mode 100644 index 0000000000..d45fbf4682 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/users/get-prefs.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.getPrefs( + userId = "[USER_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/users/get-sessions.md b/docs/examples/0.14.x/server-kotlin/java/users/get-sessions.md new file mode 100644 index 0000000000..cf2e06a858 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/users/get-sessions.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.getSessions( + userId = "[USER_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/users/get.md b/docs/examples/0.14.x/server-kotlin/java/users/get.md new file mode 100644 index 0000000000..98b3df0680 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/users/get.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.get( + userId = "[USER_ID]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/users/list.md b/docs/examples/0.14.x/server-kotlin/java/users/list.md new file mode 100644 index 0000000000..f0c4710b65 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/users/list.md @@ -0,0 +1,35 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.list( + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/users/update-email.md b/docs/examples/0.14.x/server-kotlin/java/users/update-email.md new file mode 100644 index 0000000000..c023caa014 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/users/update-email.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.updateEmail( + userId = "[USER_ID]", + email = "email@example.com" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/users/update-name.md b/docs/examples/0.14.x/server-kotlin/java/users/update-name.md new file mode 100644 index 0000000000..cf760ae78a --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/users/update-name.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.updateName( + userId = "[USER_ID]", + name = "[NAME]" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/users/update-password.md b/docs/examples/0.14.x/server-kotlin/java/users/update-password.md new file mode 100644 index 0000000000..a8fc3f3c50 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/users/update-password.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.updatePassword( + userId = "[USER_ID]", + password = "password" + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/users/update-prefs.md b/docs/examples/0.14.x/server-kotlin/java/users/update-prefs.md new file mode 100644 index 0000000000..393366cf10 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/users/update-prefs.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.updatePrefs( + userId = "[USER_ID]", + prefs = mapOf( "a" to "b" ) + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/users/update-status.md b/docs/examples/0.14.x/server-kotlin/java/users/update-status.md new file mode 100644 index 0000000000..e847dcedc3 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/users/update-status.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.updateStatus( + userId = "[USER_ID]", + status = false + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/java/users/update-verification.md b/docs/examples/0.14.x/server-kotlin/java/users/update-verification.md new file mode 100644 index 0000000000..cf62364845 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/java/users/update-verification.md @@ -0,0 +1,37 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +public void main() { + Client client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + + Users users = new Users(client); + users.updateVerification( + userId = "[USER_ID]", + emailVerification = false + new Continuation() { + @NotNull + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(@NotNull Object o) { + String json = ""; + try { + if (o instanceof Result.Failure) { + Result.Failure failure = (Result.Failure) o; + throw failure.exception; + } else { + Response response = (Response) o; + } + } catch (Throwable th) { + Log.e("ERROR", th.toString()); + } + } + } + ); +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/account/create-recovery.md b/docs/examples/0.14.x/server-kotlin/kotlin/account/create-recovery.md new file mode 100644 index 0000000000..e43eaf8698 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/account/create-recovery.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + + val account = Account(client) + val response = account.createRecovery( + email = "email@example.com", + url = "https://example.com" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/account/create-verification.md b/docs/examples/0.14.x/server-kotlin/kotlin/account/create-verification.md new file mode 100644 index 0000000000..41f34631b6 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/account/create-verification.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + + val account = Account(client) + val response = account.createVerification( + url = "https://example.com" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/account/delete-session.md b/docs/examples/0.14.x/server-kotlin/kotlin/account/delete-session.md new file mode 100644 index 0000000000..11b91b05eb --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/account/delete-session.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + + val account = Account(client) + val response = account.deleteSession( + sessionId = "[SESSION_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/account/delete-sessions.md b/docs/examples/0.14.x/server-kotlin/kotlin/account/delete-sessions.md new file mode 100644 index 0000000000..5ff7c5ce75 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/account/delete-sessions.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + + val account = Account(client) + val response = account.deleteSessions() + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/account/get-logs.md b/docs/examples/0.14.x/server-kotlin/kotlin/account/get-logs.md new file mode 100644 index 0000000000..8b722a2d85 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/account/get-logs.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + + val account = Account(client) + val response = account.getLogs( + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/account/get-prefs.md b/docs/examples/0.14.x/server-kotlin/kotlin/account/get-prefs.md new file mode 100644 index 0000000000..8d836f1a83 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/account/get-prefs.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + + val account = Account(client) + val response = account.getPrefs() + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/account/get-session.md b/docs/examples/0.14.x/server-kotlin/kotlin/account/get-session.md new file mode 100644 index 0000000000..3a3ae1fbb3 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/account/get-session.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + + val account = Account(client) + val response = account.getSession( + sessionId = "[SESSION_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/account/get-sessions.md b/docs/examples/0.14.x/server-kotlin/kotlin/account/get-sessions.md new file mode 100644 index 0000000000..21b26a6c08 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/account/get-sessions.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + + val account = Account(client) + val response = account.getSessions() + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/account/get.md b/docs/examples/0.14.x/server-kotlin/kotlin/account/get.md new file mode 100644 index 0000000000..4195939136 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/account/get.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + + val account = Account(client) + val response = account.get() + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/account/update-email.md b/docs/examples/0.14.x/server-kotlin/kotlin/account/update-email.md new file mode 100644 index 0000000000..b58849393d --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/account/update-email.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + + val account = Account(client) + val response = account.updateEmail( + email = "email@example.com", + password = "password" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/account/update-name.md b/docs/examples/0.14.x/server-kotlin/kotlin/account/update-name.md new file mode 100644 index 0000000000..c54140f26d --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/account/update-name.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + + val account = Account(client) + val response = account.updateName( + name = "[NAME]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/account/update-password.md b/docs/examples/0.14.x/server-kotlin/kotlin/account/update-password.md new file mode 100644 index 0000000000..3953718593 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/account/update-password.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + + val account = Account(client) + val response = account.updatePassword( + password = "password", + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/account/update-prefs.md b/docs/examples/0.14.x/server-kotlin/kotlin/account/update-prefs.md new file mode 100644 index 0000000000..39696911d8 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/account/update-prefs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + + val account = Account(client) + val response = account.updatePrefs( + prefs = mapOf( "a" to "b" ) + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/account/update-recovery.md b/docs/examples/0.14.x/server-kotlin/kotlin/account/update-recovery.md new file mode 100644 index 0000000000..8d2253a5fb --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/account/update-recovery.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + + val account = Account(client) + val response = account.updateRecovery( + userId = "[USER_ID]", + secret = "[SECRET]", + password = "password", + passwordAgain = "password" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/account/update-session.md b/docs/examples/0.14.x/server-kotlin/kotlin/account/update-session.md new file mode 100644 index 0000000000..003d80e688 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/account/update-session.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + + val account = Account(client) + val response = account.updateSession( + sessionId = "[SESSION_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/account/update-status.md b/docs/examples/0.14.x/server-kotlin/kotlin/account/update-status.md new file mode 100644 index 0000000000..c64ce0c26f --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/account/update-status.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + + val account = Account(client) + val response = account.updateStatus() + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/account/update-verification.md b/docs/examples/0.14.x/server-kotlin/kotlin/account/update-verification.md new file mode 100644 index 0000000000..f904f6d2ce --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/account/update-verification.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Account + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + + val account = Account(client) + val response = account.updateVerification( + userId = "[USER_ID]", + secret = "[SECRET]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/avatars/get-browser.md b/docs/examples/0.14.x/server-kotlin/kotlin/avatars/get-browser.md new file mode 100644 index 0000000000..d021a952e4 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/avatars/get-browser.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val avatars = Avatars(client) + val result = avatars.getBrowser( + code = "aa", + ) + println(result); // Resource URL +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/avatars/get-credit-card.md b/docs/examples/0.14.x/server-kotlin/kotlin/avatars/get-credit-card.md new file mode 100644 index 0000000000..61592bc3d9 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/avatars/get-credit-card.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val avatars = Avatars(client) + val result = avatars.getCreditCard( + code = "amex", + ) + println(result); // Resource URL +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/avatars/get-favicon.md b/docs/examples/0.14.x/server-kotlin/kotlin/avatars/get-favicon.md new file mode 100644 index 0000000000..3714ac210a --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/avatars/get-favicon.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val avatars = Avatars(client) + val result = avatars.getFavicon( + url = "https://example.com" + ) + println(result); // Resource URL +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/avatars/get-flag.md b/docs/examples/0.14.x/server-kotlin/kotlin/avatars/get-flag.md new file mode 100644 index 0000000000..0efd3c9974 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/avatars/get-flag.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val avatars = Avatars(client) + val result = avatars.getFlag( + code = "af", + ) + println(result); // Resource URL +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/avatars/get-image.md b/docs/examples/0.14.x/server-kotlin/kotlin/avatars/get-image.md new file mode 100644 index 0000000000..0d3f855617 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/avatars/get-image.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val avatars = Avatars(client) + val result = avatars.getImage( + url = "https://example.com", + ) + println(result); // Resource URL +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/avatars/get-initials.md b/docs/examples/0.14.x/server-kotlin/kotlin/avatars/get-initials.md new file mode 100644 index 0000000000..de5a30c5c1 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/avatars/get-initials.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val avatars = Avatars(client) + val result = avatars.getInitials( + ) + println(result); // Resource URL +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/avatars/get-q-r.md b/docs/examples/0.14.x/server-kotlin/kotlin/avatars/get-q-r.md new file mode 100644 index 0000000000..008922575d --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/avatars/get-q-r.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Avatars + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val avatars = Avatars(client) + val result = avatars.getQR( + text = "[TEXT]", + ) + println(result); // Resource URL +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/create-boolean-attribute.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/create-boolean-attribute.md new file mode 100644 index 0000000000..0d5cb9f9ef --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/create-boolean-attribute.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.createBooleanAttribute( + collectionId = "[COLLECTION_ID]", + key = "", + required = false, + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/create-collection.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/create-collection.md new file mode 100644 index 0000000000..2c54cff28e --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/create-collection.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.createCollection( + collectionId = "[COLLECTION_ID]", + name = "[NAME]", + permission = "document", + read = ["role:all"], + write = ["role:all"] + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/create-document.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/create-document.md new file mode 100644 index 0000000000..34e7718ac2 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/create-document.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.createDocument( + collectionId = "[COLLECTION_ID]", + documentId = "[DOCUMENT_ID]", + data = mapOf( "a" to "b" ), + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/create-email-attribute.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/create-email-attribute.md new file mode 100644 index 0000000000..8b89e8e3ee --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/create-email-attribute.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.createEmailAttribute( + collectionId = "[COLLECTION_ID]", + key = "", + required = false, + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/create-enum-attribute.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/create-enum-attribute.md new file mode 100644 index 0000000000..ceef6b79d4 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/create-enum-attribute.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.createEnumAttribute( + collectionId = "[COLLECTION_ID]", + key = "", + elements = listOf(), + required = false, + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/create-float-attribute.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/create-float-attribute.md new file mode 100644 index 0000000000..1304096185 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/create-float-attribute.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.createFloatAttribute( + collectionId = "[COLLECTION_ID]", + key = "", + required = false, + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/create-index.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/create-index.md new file mode 100644 index 0000000000..53432cef33 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/create-index.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.createIndex( + collectionId = "[COLLECTION_ID]", + key = "", + type = "key", + attributes = listOf(), + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/create-integer-attribute.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/create-integer-attribute.md new file mode 100644 index 0000000000..2f00c8d858 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/create-integer-attribute.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.createIntegerAttribute( + collectionId = "[COLLECTION_ID]", + key = "", + required = false, + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/create-ip-attribute.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/create-ip-attribute.md new file mode 100644 index 0000000000..c0d49b0a94 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/create-ip-attribute.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.createIpAttribute( + collectionId = "[COLLECTION_ID]", + key = "", + required = false, + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/create-string-attribute.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/create-string-attribute.md new file mode 100644 index 0000000000..da95ee02f6 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/create-string-attribute.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.createStringAttribute( + collectionId = "[COLLECTION_ID]", + key = "", + size = 1, + required = false, + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/create-url-attribute.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/create-url-attribute.md new file mode 100644 index 0000000000..3f151b6690 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/create-url-attribute.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.createUrlAttribute( + collectionId = "[COLLECTION_ID]", + key = "", + required = false, + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/delete-attribute.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/delete-attribute.md new file mode 100644 index 0000000000..a2d1746d78 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/delete-attribute.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.deleteAttribute( + collectionId = "[COLLECTION_ID]", + key = "" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/delete-collection.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/delete-collection.md new file mode 100644 index 0000000000..a535003ce8 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/delete-collection.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.deleteCollection( + collectionId = "[COLLECTION_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/delete-document.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/delete-document.md new file mode 100644 index 0000000000..16f652b822 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/delete-document.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.deleteDocument( + collectionId = "[COLLECTION_ID]", + documentId = "[DOCUMENT_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/delete-index.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/delete-index.md new file mode 100644 index 0000000000..e73ce5ea46 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/delete-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.deleteIndex( + collectionId = "[COLLECTION_ID]", + key = "" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/get-attribute.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/get-attribute.md new file mode 100644 index 0000000000..43a9a8f793 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/get-attribute.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.getAttribute( + collectionId = "[COLLECTION_ID]", + key = "" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/get-collection.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/get-collection.md new file mode 100644 index 0000000000..df4b735c66 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/get-collection.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.getCollection( + collectionId = "[COLLECTION_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/get-document.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/get-document.md new file mode 100644 index 0000000000..e4fd93ca6e --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/get-document.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.getDocument( + collectionId = "[COLLECTION_ID]", + documentId = "[DOCUMENT_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/get-index.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/get-index.md new file mode 100644 index 0000000000..225cc26d67 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/get-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.getIndex( + collectionId = "[COLLECTION_ID]", + key = "" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/list-attributes.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/list-attributes.md new file mode 100644 index 0000000000..7e93658a72 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/list-attributes.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.listAttributes( + collectionId = "[COLLECTION_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/list-collections.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/list-collections.md new file mode 100644 index 0000000000..731fac6a31 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/list-collections.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.listCollections( + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/list-documents.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/list-documents.md new file mode 100644 index 0000000000..45719af073 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/list-documents.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.listDocuments( + collectionId = "[COLLECTION_ID]", + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/list-indexes.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/list-indexes.md new file mode 100644 index 0000000000..df971f9957 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/list-indexes.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.listIndexes( + collectionId = "[COLLECTION_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/update-collection.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/update-collection.md new file mode 100644 index 0000000000..35a8f52866 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/update-collection.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.updateCollection( + collectionId = "[COLLECTION_ID]", + name = "[NAME]", + permission = "document", + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/database/update-document.md b/docs/examples/0.14.x/server-kotlin/kotlin/database/update-document.md new file mode 100644 index 0000000000..921a3a4b5f --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/database/update-document.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Database + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val database = Database(client) + val response = database.updateDocument( + collectionId = "[COLLECTION_ID]", + documentId = "[DOCUMENT_ID]", + data = mapOf( "a" to "b" ), + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/functions/create-deployment.md b/docs/examples/0.14.x/server-kotlin/kotlin/functions/create-deployment.md new file mode 100644 index 0000000000..efd3503705 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/functions/create-deployment.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val functions = Functions(client) + val response = functions.createDeployment( + functionId = "[FUNCTION_ID]", + entrypoint = "[ENTRYPOINT]", + code = File("file.png"), + activate = false + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/functions/create-execution.md b/docs/examples/0.14.x/server-kotlin/kotlin/functions/create-execution.md new file mode 100644 index 0000000000..eeda8daf3e --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/functions/create-execution.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val functions = Functions(client) + val response = functions.createExecution( + functionId = "[FUNCTION_ID]", + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/functions/create.md b/docs/examples/0.14.x/server-kotlin/kotlin/functions/create.md new file mode 100644 index 0000000000..a0b9600b46 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/functions/create.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val functions = Functions(client) + val response = functions.create( + functionId = "[FUNCTION_ID]", + name = "[NAME]", + execute = listOf(), + runtime = "node-14.5", + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/functions/delete-deployment.md b/docs/examples/0.14.x/server-kotlin/kotlin/functions/delete-deployment.md new file mode 100644 index 0000000000..cc90059f85 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/functions/delete-deployment.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val functions = Functions(client) + val response = functions.deleteDeployment( + functionId = "[FUNCTION_ID]", + deploymentId = "[DEPLOYMENT_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/functions/delete.md b/docs/examples/0.14.x/server-kotlin/kotlin/functions/delete.md new file mode 100644 index 0000000000..40a7e9682f --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/functions/delete.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val functions = Functions(client) + val response = functions.delete( + functionId = "[FUNCTION_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/functions/get-deployment.md b/docs/examples/0.14.x/server-kotlin/kotlin/functions/get-deployment.md new file mode 100644 index 0000000000..fa6175271e --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/functions/get-deployment.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val functions = Functions(client) + val response = functions.getDeployment( + functionId = "[FUNCTION_ID]", + deploymentId = "[DEPLOYMENT_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/functions/get-execution.md b/docs/examples/0.14.x/server-kotlin/kotlin/functions/get-execution.md new file mode 100644 index 0000000000..d23e20766e --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/functions/get-execution.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val functions = Functions(client) + val response = functions.getExecution( + functionId = "[FUNCTION_ID]", + executionId = "[EXECUTION_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/functions/get.md b/docs/examples/0.14.x/server-kotlin/kotlin/functions/get.md new file mode 100644 index 0000000000..76a45b6b26 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/functions/get.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val functions = Functions(client) + val response = functions.get( + functionId = "[FUNCTION_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/functions/list-deployments.md b/docs/examples/0.14.x/server-kotlin/kotlin/functions/list-deployments.md new file mode 100644 index 0000000000..be30acacef --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/functions/list-deployments.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val functions = Functions(client) + val response = functions.listDeployments( + functionId = "[FUNCTION_ID]", + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/functions/list-executions.md b/docs/examples/0.14.x/server-kotlin/kotlin/functions/list-executions.md new file mode 100644 index 0000000000..2427a97644 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/functions/list-executions.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val functions = Functions(client) + val response = functions.listExecutions( + functionId = "[FUNCTION_ID]", + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/functions/list-runtimes.md b/docs/examples/0.14.x/server-kotlin/kotlin/functions/list-runtimes.md new file mode 100644 index 0000000000..7236d74475 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/functions/list-runtimes.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val functions = Functions(client) + val response = functions.listRuntimes() + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/functions/list.md b/docs/examples/0.14.x/server-kotlin/kotlin/functions/list.md new file mode 100644 index 0000000000..1fb1f54a3c --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/functions/list.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val functions = Functions(client) + val response = functions.list( + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/functions/retry-build.md b/docs/examples/0.14.x/server-kotlin/kotlin/functions/retry-build.md new file mode 100644 index 0000000000..6c883145f5 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/functions/retry-build.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val functions = Functions(client) + val response = functions.retryBuild( + functionId = "[FUNCTION_ID]", + deploymentId = "[DEPLOYMENT_ID]", + buildId = "[BUILD_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/functions/update-deployment.md b/docs/examples/0.14.x/server-kotlin/kotlin/functions/update-deployment.md new file mode 100644 index 0000000000..fd7a40b2ec --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/functions/update-deployment.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val functions = Functions(client) + val response = functions.updateDeployment( + functionId = "[FUNCTION_ID]", + deploymentId = "[DEPLOYMENT_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/functions/update.md b/docs/examples/0.14.x/server-kotlin/kotlin/functions/update.md new file mode 100644 index 0000000000..e8b125fb77 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/functions/update.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Functions + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val functions = Functions(client) + val response = functions.update( + functionId = "[FUNCTION_ID]", + name = "[NAME]", + execute = listOf(), + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/health/get-antivirus.md b/docs/examples/0.14.x/server-kotlin/kotlin/health/get-antivirus.md new file mode 100644 index 0000000000..fe64ba8ee1 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/health/get-antivirus.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val health = Health(client) + val response = health.getAntivirus() + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/health/get-cache.md b/docs/examples/0.14.x/server-kotlin/kotlin/health/get-cache.md new file mode 100644 index 0000000000..91dda5e06e --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/health/get-cache.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val health = Health(client) + val response = health.getCache() + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/health/get-d-b.md b/docs/examples/0.14.x/server-kotlin/kotlin/health/get-d-b.md new file mode 100644 index 0000000000..0a15ff78b4 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/health/get-d-b.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val health = Health(client) + val response = health.getDB() + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/health/get-queue-certificates.md b/docs/examples/0.14.x/server-kotlin/kotlin/health/get-queue-certificates.md new file mode 100644 index 0000000000..4e51cc625e --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/health/get-queue-certificates.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val health = Health(client) + val response = health.getQueueCertificates() + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/health/get-queue-functions.md b/docs/examples/0.14.x/server-kotlin/kotlin/health/get-queue-functions.md new file mode 100644 index 0000000000..2f49b8f013 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/health/get-queue-functions.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val health = Health(client) + val response = health.getQueueFunctions() + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/health/get-queue-logs.md b/docs/examples/0.14.x/server-kotlin/kotlin/health/get-queue-logs.md new file mode 100644 index 0000000000..0a15075dd7 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/health/get-queue-logs.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val health = Health(client) + val response = health.getQueueLogs() + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/health/get-queue-webhooks.md b/docs/examples/0.14.x/server-kotlin/kotlin/health/get-queue-webhooks.md new file mode 100644 index 0000000000..368a4d3cc6 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/health/get-queue-webhooks.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val health = Health(client) + val response = health.getQueueWebhooks() + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/health/get-storage-local.md b/docs/examples/0.14.x/server-kotlin/kotlin/health/get-storage-local.md new file mode 100644 index 0000000000..809c4a92b9 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/health/get-storage-local.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val health = Health(client) + val response = health.getStorageLocal() + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/health/get-time.md b/docs/examples/0.14.x/server-kotlin/kotlin/health/get-time.md new file mode 100644 index 0000000000..9e2b5a9f89 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/health/get-time.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val health = Health(client) + val response = health.getTime() + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/health/get.md b/docs/examples/0.14.x/server-kotlin/kotlin/health/get.md new file mode 100644 index 0000000000..5904493e30 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/health/get.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Health + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val health = Health(client) + val response = health.get() + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/locale/get-continents.md b/docs/examples/0.14.x/server-kotlin/kotlin/locale/get-continents.md new file mode 100644 index 0000000000..946779336b --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/locale/get-continents.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val locale = Locale(client) + val response = locale.getContinents() + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/locale/get-countries-e-u.md b/docs/examples/0.14.x/server-kotlin/kotlin/locale/get-countries-e-u.md new file mode 100644 index 0000000000..70f9a39f74 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/locale/get-countries-e-u.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val locale = Locale(client) + val response = locale.getCountriesEU() + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/locale/get-countries-phones.md b/docs/examples/0.14.x/server-kotlin/kotlin/locale/get-countries-phones.md new file mode 100644 index 0000000000..ce40ab33c8 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/locale/get-countries-phones.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val locale = Locale(client) + val response = locale.getCountriesPhones() + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/locale/get-countries.md b/docs/examples/0.14.x/server-kotlin/kotlin/locale/get-countries.md new file mode 100644 index 0000000000..1f84f6637c --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/locale/get-countries.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val locale = Locale(client) + val response = locale.getCountries() + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/locale/get-currencies.md b/docs/examples/0.14.x/server-kotlin/kotlin/locale/get-currencies.md new file mode 100644 index 0000000000..19bde5d386 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/locale/get-currencies.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val locale = Locale(client) + val response = locale.getCurrencies() + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/locale/get-languages.md b/docs/examples/0.14.x/server-kotlin/kotlin/locale/get-languages.md new file mode 100644 index 0000000000..a41831fe02 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/locale/get-languages.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val locale = Locale(client) + val response = locale.getLanguages() + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/locale/get.md b/docs/examples/0.14.x/server-kotlin/kotlin/locale/get.md new file mode 100644 index 0000000000..d630031194 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/locale/get.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.services.Locale + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val locale = Locale(client) + val response = locale.get() + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/storage/create-bucket.md b/docs/examples/0.14.x/server-kotlin/kotlin/storage/create-bucket.md new file mode 100644 index 0000000000..f780e81c7f --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/storage/create-bucket.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val storage = Storage(client) + val response = storage.createBucket( + bucketId = "[BUCKET_ID]", + name = "[NAME]", + permission = "file", + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/storage/create-file.md b/docs/examples/0.14.x/server-kotlin/kotlin/storage/create-file.md new file mode 100644 index 0000000000..6b666d40a7 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/storage/create-file.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val storage = Storage(client) + val response = storage.createFile( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]", + file = File("file.png"), + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/storage/delete-bucket.md b/docs/examples/0.14.x/server-kotlin/kotlin/storage/delete-bucket.md new file mode 100644 index 0000000000..0700ffdb30 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/storage/delete-bucket.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val storage = Storage(client) + val response = storage.deleteBucket( + bucketId = "[BUCKET_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/storage/delete-file.md b/docs/examples/0.14.x/server-kotlin/kotlin/storage/delete-file.md new file mode 100644 index 0000000000..2749cc2135 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/storage/delete-file.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val storage = Storage(client) + val response = storage.deleteFile( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/storage/get-bucket.md b/docs/examples/0.14.x/server-kotlin/kotlin/storage/get-bucket.md new file mode 100644 index 0000000000..6e421e94af --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/storage/get-bucket.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val storage = Storage(client) + val response = storage.getBucket( + bucketId = "[BUCKET_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/storage/get-file-download.md b/docs/examples/0.14.x/server-kotlin/kotlin/storage/get-file-download.md new file mode 100644 index 0000000000..5186982a7c --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/storage/get-file-download.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val storage = Storage(client) + val result = storage.getFileDownload( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]" + ) + println(result); // Resource URL +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/storage/get-file-preview.md b/docs/examples/0.14.x/server-kotlin/kotlin/storage/get-file-preview.md new file mode 100644 index 0000000000..d99e28ca94 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/storage/get-file-preview.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val storage = Storage(client) + val result = storage.getFilePreview( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]", + ) + println(result); // Resource URL +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/storage/get-file-view.md b/docs/examples/0.14.x/server-kotlin/kotlin/storage/get-file-view.md new file mode 100644 index 0000000000..433364a9c2 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/storage/get-file-view.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val storage = Storage(client) + val result = storage.getFileView( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]" + ) + println(result); // Resource URL +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/storage/get-file.md b/docs/examples/0.14.x/server-kotlin/kotlin/storage/get-file.md new file mode 100644 index 0000000000..ea76d6f4ac --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/storage/get-file.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val storage = Storage(client) + val response = storage.getFile( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/storage/list-buckets.md b/docs/examples/0.14.x/server-kotlin/kotlin/storage/list-buckets.md new file mode 100644 index 0000000000..36a0d83232 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/storage/list-buckets.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val storage = Storage(client) + val response = storage.listBuckets( + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/storage/list-files.md b/docs/examples/0.14.x/server-kotlin/kotlin/storage/list-files.md new file mode 100644 index 0000000000..d84bb4e8c6 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/storage/list-files.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val storage = Storage(client) + val response = storage.listFiles( + bucketId = "[BUCKET_ID]", + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/storage/update-bucket.md b/docs/examples/0.14.x/server-kotlin/kotlin/storage/update-bucket.md new file mode 100644 index 0000000000..aeb14ffda4 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/storage/update-bucket.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val storage = Storage(client) + val response = storage.updateBucket( + bucketId = "[BUCKET_ID]", + name = "[NAME]", + permission = "file", + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/storage/update-file.md b/docs/examples/0.14.x/server-kotlin/kotlin/storage/update-file.md new file mode 100644 index 0000000000..a628b54b25 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/storage/update-file.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Storage + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val storage = Storage(client) + val response = storage.updateFile( + bucketId = "[BUCKET_ID]", + fileId = "[FILE_ID]", + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/teams/create-membership.md b/docs/examples/0.14.x/server-kotlin/kotlin/teams/create-membership.md new file mode 100644 index 0000000000..ebdd4f3034 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/teams/create-membership.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val teams = Teams(client) + val response = teams.createMembership( + teamId = "[TEAM_ID]", + email = "email@example.com", + roles = listOf(), + url = "https://example.com", + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/teams/create.md b/docs/examples/0.14.x/server-kotlin/kotlin/teams/create.md new file mode 100644 index 0000000000..4b5c5e00e8 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/teams/create.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val teams = Teams(client) + val response = teams.create( + teamId = "[TEAM_ID]", + name = "[NAME]", + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/teams/delete-membership.md b/docs/examples/0.14.x/server-kotlin/kotlin/teams/delete-membership.md new file mode 100644 index 0000000000..fd5cd7485e --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/teams/delete-membership.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val teams = Teams(client) + val response = teams.deleteMembership( + teamId = "[TEAM_ID]", + membershipId = "[MEMBERSHIP_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/teams/delete.md b/docs/examples/0.14.x/server-kotlin/kotlin/teams/delete.md new file mode 100644 index 0000000000..3806a5e7b8 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/teams/delete.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val teams = Teams(client) + val response = teams.delete( + teamId = "[TEAM_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/teams/get-membership.md b/docs/examples/0.14.x/server-kotlin/kotlin/teams/get-membership.md new file mode 100644 index 0000000000..a0788b2489 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/teams/get-membership.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val teams = Teams(client) + val response = teams.getMembership( + teamId = "[TEAM_ID]", + membershipId = "[MEMBERSHIP_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/teams/get-memberships.md b/docs/examples/0.14.x/server-kotlin/kotlin/teams/get-memberships.md new file mode 100644 index 0000000000..6dab7104fe --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/teams/get-memberships.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val teams = Teams(client) + val response = teams.getMemberships( + teamId = "[TEAM_ID]", + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/teams/get.md b/docs/examples/0.14.x/server-kotlin/kotlin/teams/get.md new file mode 100644 index 0000000000..c8802a7133 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/teams/get.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val teams = Teams(client) + val response = teams.get( + teamId = "[TEAM_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/teams/list.md b/docs/examples/0.14.x/server-kotlin/kotlin/teams/list.md new file mode 100644 index 0000000000..7aff26e811 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/teams/list.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val teams = Teams(client) + val response = teams.list( + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/teams/update-membership-roles.md b/docs/examples/0.14.x/server-kotlin/kotlin/teams/update-membership-roles.md new file mode 100644 index 0000000000..f76601adc4 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/teams/update-membership-roles.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val teams = Teams(client) + val response = teams.updateMembershipRoles( + teamId = "[TEAM_ID]", + membershipId = "[MEMBERSHIP_ID]", + roles = listOf() + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/teams/update-membership-status.md b/docs/examples/0.14.x/server-kotlin/kotlin/teams/update-membership-status.md new file mode 100644 index 0000000000..56b7dc71c3 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/teams/update-membership-status.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + + val teams = Teams(client) + val response = teams.updateMembershipStatus( + teamId = "[TEAM_ID]", + membershipId = "[MEMBERSHIP_ID]", + userId = "[USER_ID]", + secret = "[SECRET]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/teams/update.md b/docs/examples/0.14.x/server-kotlin/kotlin/teams/update.md new file mode 100644 index 0000000000..a558a35216 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/teams/update.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Teams + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val teams = Teams(client) + val response = teams.update( + teamId = "[TEAM_ID]", + name = "[NAME]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/users/create.md b/docs/examples/0.14.x/server-kotlin/kotlin/users/create.md new file mode 100644 index 0000000000..32996b9299 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/users/create.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val users = Users(client) + val response = users.create( + userId = "[USER_ID]", + email = "email@example.com", + password = "password", + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/users/delete-session.md b/docs/examples/0.14.x/server-kotlin/kotlin/users/delete-session.md new file mode 100644 index 0000000000..b02b7eda74 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/users/delete-session.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val users = Users(client) + val response = users.deleteSession( + userId = "[USER_ID]", + sessionId = "[SESSION_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/users/delete-sessions.md b/docs/examples/0.14.x/server-kotlin/kotlin/users/delete-sessions.md new file mode 100644 index 0000000000..969f5f34b2 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/users/delete-sessions.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val users = Users(client) + val response = users.deleteSessions( + userId = "[USER_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/users/delete.md b/docs/examples/0.14.x/server-kotlin/kotlin/users/delete.md new file mode 100644 index 0000000000..7d545cd5fc --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/users/delete.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val users = Users(client) + val response = users.delete( + userId = "[USER_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/users/get-logs.md b/docs/examples/0.14.x/server-kotlin/kotlin/users/get-logs.md new file mode 100644 index 0000000000..e6a26f160b --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/users/get-logs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val users = Users(client) + val response = users.getLogs( + userId = "[USER_ID]", + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/users/get-memberships.md b/docs/examples/0.14.x/server-kotlin/kotlin/users/get-memberships.md new file mode 100644 index 0000000000..f56631b175 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/users/get-memberships.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val users = Users(client) + val response = users.getMemberships( + userId = "[USER_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/users/get-prefs.md b/docs/examples/0.14.x/server-kotlin/kotlin/users/get-prefs.md new file mode 100644 index 0000000000..681bc0053a --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/users/get-prefs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val users = Users(client) + val response = users.getPrefs( + userId = "[USER_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/users/get-sessions.md b/docs/examples/0.14.x/server-kotlin/kotlin/users/get-sessions.md new file mode 100644 index 0000000000..ba5a48eadd --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/users/get-sessions.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val users = Users(client) + val response = users.getSessions( + userId = "[USER_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/users/get.md b/docs/examples/0.14.x/server-kotlin/kotlin/users/get.md new file mode 100644 index 0000000000..85cf8cd484 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/users/get.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val users = Users(client) + val response = users.get( + userId = "[USER_ID]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/users/list.md b/docs/examples/0.14.x/server-kotlin/kotlin/users/list.md new file mode 100644 index 0000000000..4c6f4a8f96 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/users/list.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val users = Users(client) + val response = users.list( + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/users/update-email.md b/docs/examples/0.14.x/server-kotlin/kotlin/users/update-email.md new file mode 100644 index 0000000000..eabab2f2af --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/users/update-email.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val users = Users(client) + val response = users.updateEmail( + userId = "[USER_ID]", + email = "email@example.com" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/users/update-name.md b/docs/examples/0.14.x/server-kotlin/kotlin/users/update-name.md new file mode 100644 index 0000000000..f4ce93b30b --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/users/update-name.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val users = Users(client) + val response = users.updateName( + userId = "[USER_ID]", + name = "[NAME]" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/users/update-password.md b/docs/examples/0.14.x/server-kotlin/kotlin/users/update-password.md new file mode 100644 index 0000000000..6e6122e297 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/users/update-password.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val users = Users(client) + val response = users.updatePassword( + userId = "[USER_ID]", + password = "password" + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/users/update-prefs.md b/docs/examples/0.14.x/server-kotlin/kotlin/users/update-prefs.md new file mode 100644 index 0000000000..27c669b141 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/users/update-prefs.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val users = Users(client) + val response = users.updatePrefs( + userId = "[USER_ID]", + prefs = mapOf( "a" to "b" ) + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/users/update-status.md b/docs/examples/0.14.x/server-kotlin/kotlin/users/update-status.md new file mode 100644 index 0000000000..927e76bee3 --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/users/update-status.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val users = Users(client) + val response = users.updateStatus( + userId = "[USER_ID]", + status = false + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/users/update-verification.md b/docs/examples/0.14.x/server-kotlin/kotlin/users/update-verification.md new file mode 100644 index 0000000000..0c46ccdf8b --- /dev/null +++ b/docs/examples/0.14.x/server-kotlin/kotlin/users/update-verification.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.services.Users + +suspend fun main() { + val client = Client(context) + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + val users = Users(client) + val response = users.updateVerification( + userId = "[USER_ID]", + emailVerification = false + ) + val json = response.body?.string() +} \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/account/create-recovery.md b/docs/examples/0.14.x/server-nodejs/examples/account/create-recovery.md new file mode 100644 index 0000000000..8d86e0fbab --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/account/create-recovery.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +let promise = account.createRecovery('email@example.com', 'https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/account/create-verification.md b/docs/examples/0.14.x/server-nodejs/examples/account/create-verification.md new file mode 100644 index 0000000000..8ec31eb060 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/account/create-verification.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +let promise = account.createVerification('https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/account/delete-session.md b/docs/examples/0.14.x/server-nodejs/examples/account/delete-session.md new file mode 100644 index 0000000000..4bcd2d2ce2 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/account/delete-session.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +let promise = account.deleteSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/account/delete-sessions.md b/docs/examples/0.14.x/server-nodejs/examples/account/delete-sessions.md new file mode 100644 index 0000000000..3ccc6556b3 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/account/delete-sessions.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +let promise = account.deleteSessions(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/account/get-logs.md b/docs/examples/0.14.x/server-nodejs/examples/account/get-logs.md new file mode 100644 index 0000000000..dd8e26a045 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/account/get-logs.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +let promise = account.getLogs(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/account/get-prefs.md b/docs/examples/0.14.x/server-nodejs/examples/account/get-prefs.md new file mode 100644 index 0000000000..a10879ddd5 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/account/get-prefs.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +let promise = account.getPrefs(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/account/get-session.md b/docs/examples/0.14.x/server-nodejs/examples/account/get-session.md new file mode 100644 index 0000000000..c6dac22365 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/account/get-session.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +let promise = account.getSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/account/get-sessions.md b/docs/examples/0.14.x/server-nodejs/examples/account/get-sessions.md new file mode 100644 index 0000000000..b25b91cfe6 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/account/get-sessions.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +let promise = account.getSessions(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/account/get.md b/docs/examples/0.14.x/server-nodejs/examples/account/get.md new file mode 100644 index 0000000000..862cfd3cd3 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/account/get.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +let promise = account.get(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/account/update-email.md b/docs/examples/0.14.x/server-nodejs/examples/account/update-email.md new file mode 100644 index 0000000000..493bad30f5 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/account/update-email.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +let promise = account.updateEmail('email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/account/update-name.md b/docs/examples/0.14.x/server-nodejs/examples/account/update-name.md new file mode 100644 index 0000000000..ef4b47a3d8 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/account/update-name.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +let promise = account.updateName('[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/account/update-password.md b/docs/examples/0.14.x/server-nodejs/examples/account/update-password.md new file mode 100644 index 0000000000..59db404cc1 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/account/update-password.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +let promise = account.updatePassword('password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/account/update-prefs.md b/docs/examples/0.14.x/server-nodejs/examples/account/update-prefs.md new file mode 100644 index 0000000000..d9c518f1a2 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/account/update-prefs.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +let promise = account.updatePrefs({}); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/account/update-recovery.md b/docs/examples/0.14.x/server-nodejs/examples/account/update-recovery.md new file mode 100644 index 0000000000..796c88ad9c --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/account/update-recovery.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +let promise = account.updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/account/update-session.md b/docs/examples/0.14.x/server-nodejs/examples/account/update-session.md new file mode 100644 index 0000000000..8d19064d12 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/account/update-session.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +let promise = account.updateSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/account/update-status.md b/docs/examples/0.14.x/server-nodejs/examples/account/update-status.md new file mode 100644 index 0000000000..e4af6e9828 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/account/update-status.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +let promise = account.updateStatus(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/account/update-verification.md b/docs/examples/0.14.x/server-nodejs/examples/account/update-verification.md new file mode 100644 index 0000000000..1e264ecdc7 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/account/update-verification.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let account = new sdk.Account(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +let promise = account.updateVerification('[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/avatars/get-browser.md b/docs/examples/0.14.x/server-nodejs/examples/avatars/get-browser.md new file mode 100644 index 0000000000..2a670ce08b --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/avatars/get-browser.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = avatars.getBrowser('aa'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/avatars/get-credit-card.md b/docs/examples/0.14.x/server-nodejs/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..afd38f5a97 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/avatars/get-credit-card.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = avatars.getCreditCard('amex'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/avatars/get-favicon.md b/docs/examples/0.14.x/server-nodejs/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..bb347371d4 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/avatars/get-favicon.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = avatars.getFavicon('https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/avatars/get-flag.md b/docs/examples/0.14.x/server-nodejs/examples/avatars/get-flag.md new file mode 100644 index 0000000000..db677bc4f8 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/avatars/get-flag.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = avatars.getFlag('af'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/avatars/get-image.md b/docs/examples/0.14.x/server-nodejs/examples/avatars/get-image.md new file mode 100644 index 0000000000..efa871ea63 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/avatars/get-image.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = avatars.getImage('https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/avatars/get-initials.md b/docs/examples/0.14.x/server-nodejs/examples/avatars/get-initials.md new file mode 100644 index 0000000000..d6175bff13 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/avatars/get-initials.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = avatars.getInitials(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/avatars/get-q-r.md b/docs/examples/0.14.x/server-nodejs/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..e79b3235af --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/avatars/get-q-r.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = avatars.getQR('[TEXT]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/create-boolean-attribute.md b/docs/examples/0.14.x/server-nodejs/examples/database/create-boolean-attribute.md new file mode 100644 index 0000000000..1f6db6a604 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/create-boolean-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.createBooleanAttribute('[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/create-collection.md b/docs/examples/0.14.x/server-nodejs/examples/database/create-collection.md new file mode 100644 index 0000000000..b39336e4f5 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/create-collection.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.createCollection('[COLLECTION_ID]', '[NAME]', 'document', ["role:all"], ["role:all"]); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/create-document.md b/docs/examples/0.14.x/server-nodejs/examples/database/create-document.md new file mode 100644 index 0000000000..6ba0670838 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/create-document.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.createDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/create-email-attribute.md b/docs/examples/0.14.x/server-nodejs/examples/database/create-email-attribute.md new file mode 100644 index 0000000000..cf49202552 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/create-email-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.createEmailAttribute('[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/create-enum-attribute.md b/docs/examples/0.14.x/server-nodejs/examples/database/create-enum-attribute.md new file mode 100644 index 0000000000..64629ec6ce --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/create-enum-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.createEnumAttribute('[COLLECTION_ID]', '', [], false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/create-float-attribute.md b/docs/examples/0.14.x/server-nodejs/examples/database/create-float-attribute.md new file mode 100644 index 0000000000..ec362226aa --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/create-float-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.createFloatAttribute('[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/create-index.md b/docs/examples/0.14.x/server-nodejs/examples/database/create-index.md new file mode 100644 index 0000000000..e23eca2292 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/create-index.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.createIndex('[COLLECTION_ID]', '', 'key', []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/create-integer-attribute.md b/docs/examples/0.14.x/server-nodejs/examples/database/create-integer-attribute.md new file mode 100644 index 0000000000..b05d0b35c5 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/create-integer-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.createIntegerAttribute('[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/create-ip-attribute.md b/docs/examples/0.14.x/server-nodejs/examples/database/create-ip-attribute.md new file mode 100644 index 0000000000..6048a2acbe --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/create-ip-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.createIpAttribute('[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/create-string-attribute.md b/docs/examples/0.14.x/server-nodejs/examples/database/create-string-attribute.md new file mode 100644 index 0000000000..ad176de552 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/create-string-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.createStringAttribute('[COLLECTION_ID]', '', 1, false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/create-url-attribute.md b/docs/examples/0.14.x/server-nodejs/examples/database/create-url-attribute.md new file mode 100644 index 0000000000..6461cb2c31 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/create-url-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.createUrlAttribute('[COLLECTION_ID]', '', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/delete-attribute.md b/docs/examples/0.14.x/server-nodejs/examples/database/delete-attribute.md new file mode 100644 index 0000000000..8704ff6d73 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/delete-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.deleteAttribute('[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/delete-collection.md b/docs/examples/0.14.x/server-nodejs/examples/database/delete-collection.md new file mode 100644 index 0000000000..503da98a73 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/delete-collection.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.deleteCollection('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/delete-document.md b/docs/examples/0.14.x/server-nodejs/examples/database/delete-document.md new file mode 100644 index 0000000000..f14c985e83 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/delete-document.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/delete-index.md b/docs/examples/0.14.x/server-nodejs/examples/database/delete-index.md new file mode 100644 index 0000000000..8e61399e3e --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/delete-index.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.deleteIndex('[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/get-attribute.md b/docs/examples/0.14.x/server-nodejs/examples/database/get-attribute.md new file mode 100644 index 0000000000..60c08084ab --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/get-attribute.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.getAttribute('[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/get-collection.md b/docs/examples/0.14.x/server-nodejs/examples/database/get-collection.md new file mode 100644 index 0000000000..a14ce0d49a --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/get-collection.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.getCollection('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/get-document.md b/docs/examples/0.14.x/server-nodejs/examples/database/get-document.md new file mode 100644 index 0000000000..55cce32b9b --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/get-document.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/get-index.md b/docs/examples/0.14.x/server-nodejs/examples/database/get-index.md new file mode 100644 index 0000000000..799eef88f7 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/get-index.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.getIndex('[COLLECTION_ID]', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/list-attributes.md b/docs/examples/0.14.x/server-nodejs/examples/database/list-attributes.md new file mode 100644 index 0000000000..23475ea654 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/list-attributes.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.listAttributes('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/list-collections.md b/docs/examples/0.14.x/server-nodejs/examples/database/list-collections.md new file mode 100644 index 0000000000..bacfdb062c --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/list-collections.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.listCollections(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/list-documents.md b/docs/examples/0.14.x/server-nodejs/examples/database/list-documents.md new file mode 100644 index 0000000000..ad02d05e2a --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/list-documents.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.listDocuments('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/list-indexes.md b/docs/examples/0.14.x/server-nodejs/examples/database/list-indexes.md new file mode 100644 index 0000000000..85b2d1f227 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/list-indexes.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.listIndexes('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/update-collection.md b/docs/examples/0.14.x/server-nodejs/examples/database/update-collection.md new file mode 100644 index 0000000000..bed47c3613 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/update-collection.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.updateCollection('[COLLECTION_ID]', '[NAME]', 'document'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/database/update-document.md b/docs/examples/0.14.x/server-nodejs/examples/database/update-document.md new file mode 100644 index 0000000000..40e9488a6b --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/database/update-document.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/functions/create-deployment.md b/docs/examples/0.14.x/server-nodejs/examples/functions/create-deployment.md new file mode 100644 index 0000000000..00717651f9 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/functions/create-deployment.md @@ -0,0 +1,21 @@ +const sdk = require('node-appwrite'); +const fs = require('fs'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.createDeployment('[FUNCTION_ID]', '[ENTRYPOINT]', 'file.png', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/functions/create-execution.md b/docs/examples/0.14.x/server-nodejs/examples/functions/create-execution.md new file mode 100644 index 0000000000..895b70cd1b --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/functions/create-execution.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.createExecution('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/functions/create.md b/docs/examples/0.14.x/server-nodejs/examples/functions/create.md new file mode 100644 index 0000000000..d1df9635f6 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/functions/create.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.create('[FUNCTION_ID]', '[NAME]', [], 'node-14.5'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/functions/delete-deployment.md b/docs/examples/0.14.x/server-nodejs/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..cab6ffde0b --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/functions/delete-deployment.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.deleteDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/functions/delete.md b/docs/examples/0.14.x/server-nodejs/examples/functions/delete.md new file mode 100644 index 0000000000..6f079cb7f7 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/functions/delete.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.delete('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/functions/get-deployment.md b/docs/examples/0.14.x/server-nodejs/examples/functions/get-deployment.md new file mode 100644 index 0000000000..dad6cf9aa7 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/functions/get-deployment.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.getDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/functions/get-execution.md b/docs/examples/0.14.x/server-nodejs/examples/functions/get-execution.md new file mode 100644 index 0000000000..1e2f5ea88a --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/functions/get-execution.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/functions/get.md b/docs/examples/0.14.x/server-nodejs/examples/functions/get.md new file mode 100644 index 0000000000..620deec88c --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/functions/get.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.get('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/functions/list-deployments.md b/docs/examples/0.14.x/server-nodejs/examples/functions/list-deployments.md new file mode 100644 index 0000000000..b2bc8853c2 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/functions/list-deployments.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.listDeployments('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/functions/list-executions.md b/docs/examples/0.14.x/server-nodejs/examples/functions/list-executions.md new file mode 100644 index 0000000000..40c44b12e5 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/functions/list-executions.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.listExecutions('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/functions/list-runtimes.md b/docs/examples/0.14.x/server-nodejs/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..e2aa34abfe --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/functions/list-runtimes.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.listRuntimes(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/functions/list.md b/docs/examples/0.14.x/server-nodejs/examples/functions/list.md new file mode 100644 index 0000000000..9ecd37237d --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/functions/list.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.list(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/functions/retry-build.md b/docs/examples/0.14.x/server-nodejs/examples/functions/retry-build.md new file mode 100644 index 0000000000..aa1daccc86 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/functions/retry-build.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.retryBuild('[FUNCTION_ID]', '[DEPLOYMENT_ID]', '[BUILD_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/functions/update-deployment.md b/docs/examples/0.14.x/server-nodejs/examples/functions/update-deployment.md new file mode 100644 index 0000000000..67ba6f94f9 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/functions/update-deployment.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.updateDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/functions/update.md b/docs/examples/0.14.x/server-nodejs/examples/functions/update.md new file mode 100644 index 0000000000..83e25b9cdc --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/functions/update.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.update('[FUNCTION_ID]', '[NAME]', []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/health/get-antivirus.md b/docs/examples/0.14.x/server-nodejs/examples/health/get-antivirus.md new file mode 100644 index 0000000000..2df53eb37f --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/health/get-antivirus.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.getAntivirus(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/health/get-cache.md b/docs/examples/0.14.x/server-nodejs/examples/health/get-cache.md new file mode 100644 index 0000000000..d19cc8abd5 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/health/get-cache.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.getCache(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/health/get-d-b.md b/docs/examples/0.14.x/server-nodejs/examples/health/get-d-b.md new file mode 100644 index 0000000000..08505367d4 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/health/get-d-b.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.getDB(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/health/get-queue-certificates.md b/docs/examples/0.14.x/server-nodejs/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..2eb69e0126 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/health/get-queue-certificates.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.getQueueCertificates(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/health/get-queue-functions.md b/docs/examples/0.14.x/server-nodejs/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..9470e11646 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/health/get-queue-functions.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.getQueueFunctions(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/health/get-queue-logs.md b/docs/examples/0.14.x/server-nodejs/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..10f1cb24e3 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/health/get-queue-logs.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.getQueueLogs(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/health/get-queue-webhooks.md b/docs/examples/0.14.x/server-nodejs/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..3a788eb895 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/health/get-queue-webhooks.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.getQueueWebhooks(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/health/get-storage-local.md b/docs/examples/0.14.x/server-nodejs/examples/health/get-storage-local.md new file mode 100644 index 0000000000..84b8fb47a6 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/health/get-storage-local.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.getStorageLocal(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/health/get-time.md b/docs/examples/0.14.x/server-nodejs/examples/health/get-time.md new file mode 100644 index 0000000000..563bf2fb52 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/health/get-time.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.getTime(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/health/get.md b/docs/examples/0.14.x/server-nodejs/examples/health/get.md new file mode 100644 index 0000000000..20c3d40801 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/health/get.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.get(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/locale/get-continents.md b/docs/examples/0.14.x/server-nodejs/examples/locale/get-continents.md new file mode 100644 index 0000000000..323237b4ab --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/locale/get-continents.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = locale.getContinents(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/locale/get-countries-e-u.md b/docs/examples/0.14.x/server-nodejs/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..fc9170dba4 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/locale/get-countries-e-u.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = locale.getCountriesEU(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/locale/get-countries-phones.md b/docs/examples/0.14.x/server-nodejs/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..42be901677 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/locale/get-countries-phones.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = locale.getCountriesPhones(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/locale/get-countries.md b/docs/examples/0.14.x/server-nodejs/examples/locale/get-countries.md new file mode 100644 index 0000000000..437c9bb502 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/locale/get-countries.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = locale.getCountries(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/locale/get-currencies.md b/docs/examples/0.14.x/server-nodejs/examples/locale/get-currencies.md new file mode 100644 index 0000000000..1b7d605760 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/locale/get-currencies.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = locale.getCurrencies(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/locale/get-languages.md b/docs/examples/0.14.x/server-nodejs/examples/locale/get-languages.md new file mode 100644 index 0000000000..b6f45311b3 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/locale/get-languages.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = locale.getLanguages(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/locale/get.md b/docs/examples/0.14.x/server-nodejs/examples/locale/get.md new file mode 100644 index 0000000000..2f2eb95d90 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/locale/get.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = locale.get(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/storage/create-bucket.md b/docs/examples/0.14.x/server-nodejs/examples/storage/create-bucket.md new file mode 100644 index 0000000000..c55f512606 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/storage/create-bucket.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = storage.createBucket('[BUCKET_ID]', '[NAME]', 'file'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/storage/create-file.md b/docs/examples/0.14.x/server-nodejs/examples/storage/create-file.md new file mode 100644 index 0000000000..185a9147c4 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/storage/create-file.md @@ -0,0 +1,21 @@ +const sdk = require('node-appwrite'); +const fs = require('fs'); + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = storage.createFile('[BUCKET_ID]', '[FILE_ID]', 'file.png'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/storage/delete-bucket.md b/docs/examples/0.14.x/server-nodejs/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..f11a5a54a6 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/storage/delete-bucket.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = storage.deleteBucket('[BUCKET_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/storage/delete-file.md b/docs/examples/0.14.x/server-nodejs/examples/storage/delete-file.md new file mode 100644 index 0000000000..88797c0695 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/storage/delete-file.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = storage.deleteFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/storage/get-bucket.md b/docs/examples/0.14.x/server-nodejs/examples/storage/get-bucket.md new file mode 100644 index 0000000000..3afe5b49cd --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/storage/get-bucket.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = storage.getBucket('[BUCKET_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/storage/get-file-download.md b/docs/examples/0.14.x/server-nodejs/examples/storage/get-file-download.md new file mode 100644 index 0000000000..6e902150ac --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/storage/get-file-download.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = storage.getFileDownload('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/storage/get-file-preview.md b/docs/examples/0.14.x/server-nodejs/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..81007a2e44 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/storage/get-file-preview.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = storage.getFilePreview('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/storage/get-file-view.md b/docs/examples/0.14.x/server-nodejs/examples/storage/get-file-view.md new file mode 100644 index 0000000000..91e5318d14 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/storage/get-file-view.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = storage.getFileView('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/storage/get-file.md b/docs/examples/0.14.x/server-nodejs/examples/storage/get-file.md new file mode 100644 index 0000000000..de5efacb14 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/storage/get-file.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = storage.getFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/storage/list-buckets.md b/docs/examples/0.14.x/server-nodejs/examples/storage/list-buckets.md new file mode 100644 index 0000000000..21edaeb226 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/storage/list-buckets.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = storage.listBuckets(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/storage/list-files.md b/docs/examples/0.14.x/server-nodejs/examples/storage/list-files.md new file mode 100644 index 0000000000..8ceada8d0f --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/storage/list-files.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = storage.listFiles('[BUCKET_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/storage/update-bucket.md b/docs/examples/0.14.x/server-nodejs/examples/storage/update-bucket.md new file mode 100644 index 0000000000..804ae0dd0a --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/storage/update-bucket.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = storage.updateBucket('[BUCKET_ID]', '[NAME]', 'file'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/storage/update-file.md b/docs/examples/0.14.x/server-nodejs/examples/storage/update-file.md new file mode 100644 index 0000000000..9fa83780c9 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/storage/update-file.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = storage.updateFile('[BUCKET_ID]', '[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/teams/create-membership.md b/docs/examples/0.14.x/server-nodejs/examples/teams/create-membership.md new file mode 100644 index 0000000000..cd17042e58 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/teams/create-membership.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/teams/create.md b/docs/examples/0.14.x/server-nodejs/examples/teams/create.md new file mode 100644 index 0000000000..2c2739bb1e --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/teams/create.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = teams.create('[TEAM_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/teams/delete-membership.md b/docs/examples/0.14.x/server-nodejs/examples/teams/delete-membership.md new file mode 100644 index 0000000000..82df7161f8 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/teams/delete-membership.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = teams.deleteMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/teams/delete.md b/docs/examples/0.14.x/server-nodejs/examples/teams/delete.md new file mode 100644 index 0000000000..e833fdfb9b --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/teams/delete.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = teams.delete('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/teams/get-membership.md b/docs/examples/0.14.x/server-nodejs/examples/teams/get-membership.md new file mode 100644 index 0000000000..920b6de0fd --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/teams/get-membership.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = teams.getMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/teams/get-memberships.md b/docs/examples/0.14.x/server-nodejs/examples/teams/get-memberships.md new file mode 100644 index 0000000000..75cdf38e5c --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/teams/get-memberships.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = teams.getMemberships('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/teams/get.md b/docs/examples/0.14.x/server-nodejs/examples/teams/get.md new file mode 100644 index 0000000000..a51322df27 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/teams/get.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = teams.get('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/teams/list.md b/docs/examples/0.14.x/server-nodejs/examples/teams/list.md new file mode 100644 index 0000000000..259bbd22b2 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/teams/list.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = teams.list(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/teams/update-membership-roles.md b/docs/examples/0.14.x/server-nodejs/examples/teams/update-membership-roles.md new file mode 100644 index 0000000000..dc78af59f8 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/teams/update-membership-roles.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = teams.updateMembershipRoles('[TEAM_ID]', '[MEMBERSHIP_ID]', []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/teams/update-membership-status.md b/docs/examples/0.14.x/server-nodejs/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..13f8578037 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/teams/update-membership-status.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +let promise = teams.updateMembershipStatus('[TEAM_ID]', '[MEMBERSHIP_ID]', '[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/teams/update.md b/docs/examples/0.14.x/server-nodejs/examples/teams/update.md new file mode 100644 index 0000000000..2118e8a90f --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/teams/update.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = teams.update('[TEAM_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/users/create.md b/docs/examples/0.14.x/server-nodejs/examples/users/create.md new file mode 100644 index 0000000000..a4a2febca9 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/users/create.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.create('[USER_ID]', 'email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/users/delete-session.md b/docs/examples/0.14.x/server-nodejs/examples/users/delete-session.md new file mode 100644 index 0000000000..22308d4fa6 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/users/delete-session.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.deleteSession('[USER_ID]', '[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/users/delete-sessions.md b/docs/examples/0.14.x/server-nodejs/examples/users/delete-sessions.md new file mode 100644 index 0000000000..75f8f96bda --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/users/delete-sessions.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.deleteSessions('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/users/delete.md b/docs/examples/0.14.x/server-nodejs/examples/users/delete.md new file mode 100644 index 0000000000..3d834c33e3 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/users/delete.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.delete('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/users/get-logs.md b/docs/examples/0.14.x/server-nodejs/examples/users/get-logs.md new file mode 100644 index 0000000000..1287b5ef5f --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/users/get-logs.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.getLogs('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/users/get-memberships.md b/docs/examples/0.14.x/server-nodejs/examples/users/get-memberships.md new file mode 100644 index 0000000000..116ae92cac --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/users/get-memberships.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.getMemberships('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/users/get-prefs.md b/docs/examples/0.14.x/server-nodejs/examples/users/get-prefs.md new file mode 100644 index 0000000000..088e6b0811 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/users/get-prefs.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.getPrefs('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/users/get-sessions.md b/docs/examples/0.14.x/server-nodejs/examples/users/get-sessions.md new file mode 100644 index 0000000000..f5ad029ebe --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/users/get-sessions.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.getSessions('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/users/get.md b/docs/examples/0.14.x/server-nodejs/examples/users/get.md new file mode 100644 index 0000000000..5b91577284 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/users/get.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.get('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/users/list.md b/docs/examples/0.14.x/server-nodejs/examples/users/list.md new file mode 100644 index 0000000000..0bc83b06bf --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/users/list.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.list(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/users/update-email.md b/docs/examples/0.14.x/server-nodejs/examples/users/update-email.md new file mode 100644 index 0000000000..7e9477656b --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/users/update-email.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.updateEmail('[USER_ID]', 'email@example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/users/update-name.md b/docs/examples/0.14.x/server-nodejs/examples/users/update-name.md new file mode 100644 index 0000000000..31366a7652 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/users/update-name.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.updateName('[USER_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/users/update-password.md b/docs/examples/0.14.x/server-nodejs/examples/users/update-password.md new file mode 100644 index 0000000000..afee0b3732 --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/users/update-password.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.updatePassword('[USER_ID]', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/users/update-prefs.md b/docs/examples/0.14.x/server-nodejs/examples/users/update-prefs.md new file mode 100644 index 0000000000..7d1011d6be --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/users/update-prefs.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.updatePrefs('[USER_ID]', {}); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/users/update-status.md b/docs/examples/0.14.x/server-nodejs/examples/users/update-status.md new file mode 100644 index 0000000000..02aa2d33ae --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/users/update-status.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.updateStatus('[USER_ID]', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/users/update-verification.md b/docs/examples/0.14.x/server-nodejs/examples/users/update-verification.md new file mode 100644 index 0000000000..c8185bf5cc --- /dev/null +++ b/docs/examples/0.14.x/server-nodejs/examples/users/update-verification.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.updateVerification('[USER_ID]', false); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/account/create-recovery.md b/docs/examples/0.14.x/server-php/examples/account/create-recovery.md new file mode 100644 index 0000000000..65823e5104 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/account/create-recovery.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->createRecovery('email@example.com', 'https://example.com'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/account/create-verification.md b/docs/examples/0.14.x/server-php/examples/account/create-verification.md new file mode 100644 index 0000000000..b22d6199a7 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/account/create-verification.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->createVerification('https://example.com'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/account/delete-session.md b/docs/examples/0.14.x/server-php/examples/account/delete-session.md new file mode 100644 index 0000000000..ac04559ca5 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/account/delete-session.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->deleteSession('[SESSION_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/account/delete-sessions.md b/docs/examples/0.14.x/server-php/examples/account/delete-sessions.md new file mode 100644 index 0000000000..3aa67f79ce --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/account/delete-sessions.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->deleteSessions(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/account/get-logs.md b/docs/examples/0.14.x/server-php/examples/account/get-logs.md new file mode 100644 index 0000000000..2fffafcc2d --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/account/get-logs.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->getLogs(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/account/get-prefs.md b/docs/examples/0.14.x/server-php/examples/account/get-prefs.md new file mode 100644 index 0000000000..efa296194f --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/account/get-prefs.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->getPrefs(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/account/get-session.md b/docs/examples/0.14.x/server-php/examples/account/get-session.md new file mode 100644 index 0000000000..549f9bed7f --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/account/get-session.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->getSession('[SESSION_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/account/get-sessions.md b/docs/examples/0.14.x/server-php/examples/account/get-sessions.md new file mode 100644 index 0000000000..2855ff4d82 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/account/get-sessions.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->getSessions(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/account/get.md b/docs/examples/0.14.x/server-php/examples/account/get.md new file mode 100644 index 0000000000..3fa0ef275e --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/account/get.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->get(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/account/update-email.md b/docs/examples/0.14.x/server-php/examples/account/update-email.md new file mode 100644 index 0000000000..72714991d7 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/account/update-email.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->updateEmail('email@example.com', 'password'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/account/update-name.md b/docs/examples/0.14.x/server-php/examples/account/update-name.md new file mode 100644 index 0000000000..c7bb1b14ea --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/account/update-name.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->updateName('[NAME]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/account/update-password.md b/docs/examples/0.14.x/server-php/examples/account/update-password.md new file mode 100644 index 0000000000..e82279859a --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/account/update-password.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->updatePassword('password'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/account/update-prefs.md b/docs/examples/0.14.x/server-php/examples/account/update-prefs.md new file mode 100644 index 0000000000..e1395d9d67 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/account/update-prefs.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->updatePrefs([]); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/account/update-recovery.md b/docs/examples/0.14.x/server-php/examples/account/update-recovery.md new file mode 100644 index 0000000000..5379d76d6d --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/account/update-recovery.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/account/update-session.md b/docs/examples/0.14.x/server-php/examples/account/update-session.md new file mode 100644 index 0000000000..222976c74f --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/account/update-session.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->updateSession('[SESSION_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/account/update-status.md b/docs/examples/0.14.x/server-php/examples/account/update-status.md new file mode 100644 index 0000000000..f19d218ec8 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/account/update-status.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->updateStatus(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/account/update-verification.md b/docs/examples/0.14.x/server-php/examples/account/update-verification.md new file mode 100644 index 0000000000..ef21c1ec4d --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/account/update-verification.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$account = new Account($client); + +$result = $account->updateVerification('[USER_ID]', '[SECRET]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/avatars/get-browser.md b/docs/examples/0.14.x/server-php/examples/avatars/get-browser.md new file mode 100644 index 0000000000..795d79157e --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/avatars/get-browser.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$avatars = new Avatars($client); + +$result = $avatars->getBrowser('aa'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/avatars/get-credit-card.md b/docs/examples/0.14.x/server-php/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..33879d0179 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/avatars/get-credit-card.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$avatars = new Avatars($client); + +$result = $avatars->getCreditCard('amex'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/avatars/get-favicon.md b/docs/examples/0.14.x/server-php/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..dee19dbf04 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/avatars/get-favicon.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$avatars = new Avatars($client); + +$result = $avatars->getFavicon('https://example.com'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/avatars/get-flag.md b/docs/examples/0.14.x/server-php/examples/avatars/get-flag.md new file mode 100644 index 0000000000..d70d7e43ec --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/avatars/get-flag.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$avatars = new Avatars($client); + +$result = $avatars->getFlag('af'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/avatars/get-image.md b/docs/examples/0.14.x/server-php/examples/avatars/get-image.md new file mode 100644 index 0000000000..a46b9fbe37 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/avatars/get-image.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$avatars = new Avatars($client); + +$result = $avatars->getImage('https://example.com'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/avatars/get-initials.md b/docs/examples/0.14.x/server-php/examples/avatars/get-initials.md new file mode 100644 index 0000000000..f5e549ace6 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/avatars/get-initials.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$avatars = new Avatars($client); + +$result = $avatars->getInitials(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/avatars/get-q-r.md b/docs/examples/0.14.x/server-php/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..95b5a6d7b3 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/avatars/get-q-r.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$avatars = new Avatars($client); + +$result = $avatars->getQR('[TEXT]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/create-boolean-attribute.md b/docs/examples/0.14.x/server-php/examples/database/create-boolean-attribute.md new file mode 100644 index 0000000000..dcbb8e2ccb --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/create-boolean-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->createBooleanAttribute('[COLLECTION_ID]', '', false); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/create-collection.md b/docs/examples/0.14.x/server-php/examples/database/create-collection.md new file mode 100644 index 0000000000..66ee4f1264 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/create-collection.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->createCollection('[COLLECTION_ID]', '[NAME]', 'document', ["role:all"], ["role:all"]); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/create-document.md b/docs/examples/0.14.x/server-php/examples/database/create-document.md new file mode 100644 index 0000000000..e3c15abc65 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/create-document.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->createDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', []); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/create-email-attribute.md b/docs/examples/0.14.x/server-php/examples/database/create-email-attribute.md new file mode 100644 index 0000000000..cc7c82290f --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/create-email-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->createEmailAttribute('[COLLECTION_ID]', '', false); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/create-enum-attribute.md b/docs/examples/0.14.x/server-php/examples/database/create-enum-attribute.md new file mode 100644 index 0000000000..92f3294a10 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/create-enum-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->createEnumAttribute('[COLLECTION_ID]', '', [], false); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/create-float-attribute.md b/docs/examples/0.14.x/server-php/examples/database/create-float-attribute.md new file mode 100644 index 0000000000..0d9e9656dd --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/create-float-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->createFloatAttribute('[COLLECTION_ID]', '', false); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/create-index.md b/docs/examples/0.14.x/server-php/examples/database/create-index.md new file mode 100644 index 0000000000..2ca255242c --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/create-index.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->createIndex('[COLLECTION_ID]', '', 'key', []); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/create-integer-attribute.md b/docs/examples/0.14.x/server-php/examples/database/create-integer-attribute.md new file mode 100644 index 0000000000..9c64c4d7e3 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/create-integer-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->createIntegerAttribute('[COLLECTION_ID]', '', false); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/create-ip-attribute.md b/docs/examples/0.14.x/server-php/examples/database/create-ip-attribute.md new file mode 100644 index 0000000000..aee0526df8 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/create-ip-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->createIpAttribute('[COLLECTION_ID]', '', false); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/create-string-attribute.md b/docs/examples/0.14.x/server-php/examples/database/create-string-attribute.md new file mode 100644 index 0000000000..e6f8b1252a --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/create-string-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->createStringAttribute('[COLLECTION_ID]', '', 1, false); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/create-url-attribute.md b/docs/examples/0.14.x/server-php/examples/database/create-url-attribute.md new file mode 100644 index 0000000000..fe8ed393e2 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/create-url-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->createUrlAttribute('[COLLECTION_ID]', '', false); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/delete-attribute.md b/docs/examples/0.14.x/server-php/examples/database/delete-attribute.md new file mode 100644 index 0000000000..036dc7304a --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/delete-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->deleteAttribute('[COLLECTION_ID]', ''); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/delete-collection.md b/docs/examples/0.14.x/server-php/examples/database/delete-collection.md new file mode 100644 index 0000000000..4018420188 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/delete-collection.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->deleteCollection('[COLLECTION_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/delete-document.md b/docs/examples/0.14.x/server-php/examples/database/delete-document.md new file mode 100644 index 0000000000..3ed45d6ee1 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/delete-document.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/delete-index.md b/docs/examples/0.14.x/server-php/examples/database/delete-index.md new file mode 100644 index 0000000000..353c03c8c0 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/delete-index.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->deleteIndex('[COLLECTION_ID]', ''); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/get-attribute.md b/docs/examples/0.14.x/server-php/examples/database/get-attribute.md new file mode 100644 index 0000000000..020f91597a --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/get-attribute.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->getAttribute('[COLLECTION_ID]', ''); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/get-collection.md b/docs/examples/0.14.x/server-php/examples/database/get-collection.md new file mode 100644 index 0000000000..a088b24bb6 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/get-collection.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->getCollection('[COLLECTION_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/get-document.md b/docs/examples/0.14.x/server-php/examples/database/get-document.md new file mode 100644 index 0000000000..d506bd8414 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/get-document.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/get-index.md b/docs/examples/0.14.x/server-php/examples/database/get-index.md new file mode 100644 index 0000000000..af700b7184 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/get-index.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->getIndex('[COLLECTION_ID]', ''); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/list-attributes.md b/docs/examples/0.14.x/server-php/examples/database/list-attributes.md new file mode 100644 index 0000000000..8d0e2b6fc5 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/list-attributes.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->listAttributes('[COLLECTION_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/list-collections.md b/docs/examples/0.14.x/server-php/examples/database/list-collections.md new file mode 100644 index 0000000000..4f4aa1b775 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/list-collections.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->listCollections(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/list-documents.md b/docs/examples/0.14.x/server-php/examples/database/list-documents.md new file mode 100644 index 0000000000..359da4ce33 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/list-documents.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->listDocuments('[COLLECTION_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/list-indexes.md b/docs/examples/0.14.x/server-php/examples/database/list-indexes.md new file mode 100644 index 0000000000..ab8e40753c --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/list-indexes.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->listIndexes('[COLLECTION_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/update-collection.md b/docs/examples/0.14.x/server-php/examples/database/update-collection.md new file mode 100644 index 0000000000..190838b949 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/update-collection.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->updateCollection('[COLLECTION_ID]', '[NAME]', 'document'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/database/update-document.md b/docs/examples/0.14.x/server-php/examples/database/update-document.md new file mode 100644 index 0000000000..b4c2eac092 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/database/update-document.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', []); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/functions/create-deployment.md b/docs/examples/0.14.x/server-php/examples/functions/create-deployment.md new file mode 100644 index 0000000000..4df1ad86f0 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/functions/create-deployment.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->createDeployment('[FUNCTION_ID]', '[ENTRYPOINT]', 'file.png', false); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/functions/create-execution.md b/docs/examples/0.14.x/server-php/examples/functions/create-execution.md new file mode 100644 index 0000000000..422331a0df --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/functions/create-execution.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->createExecution('[FUNCTION_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/functions/create.md b/docs/examples/0.14.x/server-php/examples/functions/create.md new file mode 100644 index 0000000000..69f8d7fa86 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/functions/create.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->create('[FUNCTION_ID]', '[NAME]', [], 'node-14.5'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/functions/delete-deployment.md b/docs/examples/0.14.x/server-php/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..002840bce3 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/functions/delete-deployment.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->deleteDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/functions/delete.md b/docs/examples/0.14.x/server-php/examples/functions/delete.md new file mode 100644 index 0000000000..319856522e --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/functions/delete.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->delete('[FUNCTION_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/functions/get-deployment.md b/docs/examples/0.14.x/server-php/examples/functions/get-deployment.md new file mode 100644 index 0000000000..9176e9ca3d --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/functions/get-deployment.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->getDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/functions/get-execution.md b/docs/examples/0.14.x/server-php/examples/functions/get-execution.md new file mode 100644 index 0000000000..b02cfa08f7 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/functions/get-execution.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/functions/get.md b/docs/examples/0.14.x/server-php/examples/functions/get.md new file mode 100644 index 0000000000..06ddece1ca --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/functions/get.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->get('[FUNCTION_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/functions/list-deployments.md b/docs/examples/0.14.x/server-php/examples/functions/list-deployments.md new file mode 100644 index 0000000000..ac854a61d0 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/functions/list-deployments.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->listDeployments('[FUNCTION_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/functions/list-executions.md b/docs/examples/0.14.x/server-php/examples/functions/list-executions.md new file mode 100644 index 0000000000..4417fc8860 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/functions/list-executions.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->listExecutions('[FUNCTION_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/functions/list-runtimes.md b/docs/examples/0.14.x/server-php/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..78e560ee19 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/functions/list-runtimes.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->listRuntimes(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/functions/list.md b/docs/examples/0.14.x/server-php/examples/functions/list.md new file mode 100644 index 0000000000..3eaa8c567e --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/functions/list.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->list(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/functions/retry-build.md b/docs/examples/0.14.x/server-php/examples/functions/retry-build.md new file mode 100644 index 0000000000..f0d703a28e --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/functions/retry-build.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->retryBuild('[FUNCTION_ID]', '[DEPLOYMENT_ID]', '[BUILD_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/functions/update-deployment.md b/docs/examples/0.14.x/server-php/examples/functions/update-deployment.md new file mode 100644 index 0000000000..dfcd7ae343 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/functions/update-deployment.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->updateDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/functions/update.md b/docs/examples/0.14.x/server-php/examples/functions/update.md new file mode 100644 index 0000000000..b33ac8abd2 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/functions/update.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->update('[FUNCTION_ID]', '[NAME]', []); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/health/get-antivirus.md b/docs/examples/0.14.x/server-php/examples/health/get-antivirus.md new file mode 100644 index 0000000000..0f21d5da06 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/health/get-antivirus.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getAntivirus(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/health/get-cache.md b/docs/examples/0.14.x/server-php/examples/health/get-cache.md new file mode 100644 index 0000000000..e654c26f51 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/health/get-cache.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getCache(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/health/get-d-b.md b/docs/examples/0.14.x/server-php/examples/health/get-d-b.md new file mode 100644 index 0000000000..2d37991a3d --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/health/get-d-b.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getDB(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/health/get-queue-certificates.md b/docs/examples/0.14.x/server-php/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..57f2c5793e --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/health/get-queue-certificates.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getQueueCertificates(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/health/get-queue-functions.md b/docs/examples/0.14.x/server-php/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..8ff6510e1c --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/health/get-queue-functions.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getQueueFunctions(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/health/get-queue-logs.md b/docs/examples/0.14.x/server-php/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..fa723d7391 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/health/get-queue-logs.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getQueueLogs(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/health/get-queue-webhooks.md b/docs/examples/0.14.x/server-php/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..af48a72d06 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/health/get-queue-webhooks.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getQueueWebhooks(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/health/get-storage-local.md b/docs/examples/0.14.x/server-php/examples/health/get-storage-local.md new file mode 100644 index 0000000000..eba15a1652 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/health/get-storage-local.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getStorageLocal(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/health/get-time.md b/docs/examples/0.14.x/server-php/examples/health/get-time.md new file mode 100644 index 0000000000..849f499460 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/health/get-time.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getTime(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/health/get.md b/docs/examples/0.14.x/server-php/examples/health/get.md new file mode 100644 index 0000000000..9f1ec8970c --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/health/get.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->get(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/locale/get-continents.md b/docs/examples/0.14.x/server-php/examples/locale/get-continents.md new file mode 100644 index 0000000000..bb099d31f5 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/locale/get-continents.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$locale = new Locale($client); + +$result = $locale->getContinents(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/locale/get-countries-e-u.md b/docs/examples/0.14.x/server-php/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..87287a5cea --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/locale/get-countries-e-u.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$locale = new Locale($client); + +$result = $locale->getCountriesEU(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/locale/get-countries-phones.md b/docs/examples/0.14.x/server-php/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..71a39303da --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/locale/get-countries-phones.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$locale = new Locale($client); + +$result = $locale->getCountriesPhones(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/locale/get-countries.md b/docs/examples/0.14.x/server-php/examples/locale/get-countries.md new file mode 100644 index 0000000000..1c8f863a76 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/locale/get-countries.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$locale = new Locale($client); + +$result = $locale->getCountries(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/locale/get-currencies.md b/docs/examples/0.14.x/server-php/examples/locale/get-currencies.md new file mode 100644 index 0000000000..b799bf6b80 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/locale/get-currencies.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$locale = new Locale($client); + +$result = $locale->getCurrencies(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/locale/get-languages.md b/docs/examples/0.14.x/server-php/examples/locale/get-languages.md new file mode 100644 index 0000000000..47fdc6eb34 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/locale/get-languages.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$locale = new Locale($client); + +$result = $locale->getLanguages(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/locale/get.md b/docs/examples/0.14.x/server-php/examples/locale/get.md new file mode 100644 index 0000000000..8e11f17689 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/locale/get.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$locale = new Locale($client); + +$result = $locale->get(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/storage/create-bucket.md b/docs/examples/0.14.x/server-php/examples/storage/create-bucket.md new file mode 100644 index 0000000000..8dc1498a86 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/storage/create-bucket.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->createBucket('[BUCKET_ID]', '[NAME]', 'file'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/storage/create-file.md b/docs/examples/0.14.x/server-php/examples/storage/create-file.md new file mode 100644 index 0000000000..883f565577 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/storage/create-file.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->createFile('[BUCKET_ID]', '[FILE_ID]', 'file.png'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/storage/delete-bucket.md b/docs/examples/0.14.x/server-php/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..71583fc4df --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/storage/delete-bucket.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->deleteBucket('[BUCKET_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/storage/delete-file.md b/docs/examples/0.14.x/server-php/examples/storage/delete-file.md new file mode 100644 index 0000000000..3803659548 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/storage/delete-file.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->deleteFile('[BUCKET_ID]', '[FILE_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/storage/get-bucket.md b/docs/examples/0.14.x/server-php/examples/storage/get-bucket.md new file mode 100644 index 0000000000..2eee6f017d --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/storage/get-bucket.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->getBucket('[BUCKET_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/storage/get-file-download.md b/docs/examples/0.14.x/server-php/examples/storage/get-file-download.md new file mode 100644 index 0000000000..c9dfa317d6 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/storage/get-file-download.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->getFileDownload('[BUCKET_ID]', '[FILE_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/storage/get-file-preview.md b/docs/examples/0.14.x/server-php/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..df1edac6ff --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/storage/get-file-preview.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->getFilePreview('[BUCKET_ID]', '[FILE_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/storage/get-file-view.md b/docs/examples/0.14.x/server-php/examples/storage/get-file-view.md new file mode 100644 index 0000000000..a14685cc8b --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/storage/get-file-view.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->getFileView('[BUCKET_ID]', '[FILE_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/storage/get-file.md b/docs/examples/0.14.x/server-php/examples/storage/get-file.md new file mode 100644 index 0000000000..96b2ab01be --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/storage/get-file.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->getFile('[BUCKET_ID]', '[FILE_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/storage/list-buckets.md b/docs/examples/0.14.x/server-php/examples/storage/list-buckets.md new file mode 100644 index 0000000000..d29b9373a5 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/storage/list-buckets.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->listBuckets(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/storage/list-files.md b/docs/examples/0.14.x/server-php/examples/storage/list-files.md new file mode 100644 index 0000000000..22d3dd292f --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/storage/list-files.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->listFiles('[BUCKET_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/storage/update-bucket.md b/docs/examples/0.14.x/server-php/examples/storage/update-bucket.md new file mode 100644 index 0000000000..57dca9c269 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/storage/update-bucket.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->updateBucket('[BUCKET_ID]', '[NAME]', 'file'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/storage/update-file.md b/docs/examples/0.14.x/server-php/examples/storage/update-file.md new file mode 100644 index 0000000000..dbfadb3885 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/storage/update-file.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->updateFile('[BUCKET_ID]', '[FILE_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/teams/create-membership.md b/docs/examples/0.14.x/server-php/examples/teams/create-membership.md new file mode 100644 index 0000000000..9c88b1bba5 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/teams/create-membership.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/teams/create.md b/docs/examples/0.14.x/server-php/examples/teams/create.md new file mode 100644 index 0000000000..67c7601841 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/teams/create.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->create('[TEAM_ID]', '[NAME]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/teams/delete-membership.md b/docs/examples/0.14.x/server-php/examples/teams/delete-membership.md new file mode 100644 index 0000000000..32eb37a709 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/teams/delete-membership.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->deleteMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/teams/delete.md b/docs/examples/0.14.x/server-php/examples/teams/delete.md new file mode 100644 index 0000000000..394a1940fc --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/teams/delete.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->delete('[TEAM_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/teams/get-membership.md b/docs/examples/0.14.x/server-php/examples/teams/get-membership.md new file mode 100644 index 0000000000..95992825fc --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/teams/get-membership.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->getMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/teams/get-memberships.md b/docs/examples/0.14.x/server-php/examples/teams/get-memberships.md new file mode 100644 index 0000000000..56f6d59063 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/teams/get-memberships.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->getMemberships('[TEAM_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/teams/get.md b/docs/examples/0.14.x/server-php/examples/teams/get.md new file mode 100644 index 0000000000..6f0b705707 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/teams/get.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->get('[TEAM_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/teams/list.md b/docs/examples/0.14.x/server-php/examples/teams/list.md new file mode 100644 index 0000000000..d17bb7689b --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/teams/list.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->list(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/teams/update-membership-roles.md b/docs/examples/0.14.x/server-php/examples/teams/update-membership-roles.md new file mode 100644 index 0000000000..66dcad785b --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/teams/update-membership-roles.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->updateMembershipRoles('[TEAM_ID]', '[MEMBERSHIP_ID]', []); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/teams/update-membership-status.md b/docs/examples/0.14.x/server-php/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..c37e0d408c --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/teams/update-membership-status.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token +; + +$teams = new Teams($client); + +$result = $teams->updateMembershipStatus('[TEAM_ID]', '[MEMBERSHIP_ID]', '[USER_ID]', '[SECRET]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/teams/update.md b/docs/examples/0.14.x/server-php/examples/teams/update.md new file mode 100644 index 0000000000..945001dc36 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/teams/update.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->update('[TEAM_ID]', '[NAME]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/users/create.md b/docs/examples/0.14.x/server-php/examples/users/create.md new file mode 100644 index 0000000000..5292b21349 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/users/create.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->create('[USER_ID]', 'email@example.com', 'password'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/users/delete-session.md b/docs/examples/0.14.x/server-php/examples/users/delete-session.md new file mode 100644 index 0000000000..ead6de7549 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/users/delete-session.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->deleteSession('[USER_ID]', '[SESSION_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/users/delete-sessions.md b/docs/examples/0.14.x/server-php/examples/users/delete-sessions.md new file mode 100644 index 0000000000..968d788ea7 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/users/delete-sessions.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->deleteSessions('[USER_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/users/delete.md b/docs/examples/0.14.x/server-php/examples/users/delete.md new file mode 100644 index 0000000000..8a24d63059 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/users/delete.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->delete('[USER_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/users/get-logs.md b/docs/examples/0.14.x/server-php/examples/users/get-logs.md new file mode 100644 index 0000000000..5602536920 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/users/get-logs.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->getLogs('[USER_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/users/get-memberships.md b/docs/examples/0.14.x/server-php/examples/users/get-memberships.md new file mode 100644 index 0000000000..ab2a847619 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/users/get-memberships.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->getMemberships('[USER_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/users/get-prefs.md b/docs/examples/0.14.x/server-php/examples/users/get-prefs.md new file mode 100644 index 0000000000..1c9978a0fb --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/users/get-prefs.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->getPrefs('[USER_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/users/get-sessions.md b/docs/examples/0.14.x/server-php/examples/users/get-sessions.md new file mode 100644 index 0000000000..fef9f1db74 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/users/get-sessions.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->getSessions('[USER_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/users/get.md b/docs/examples/0.14.x/server-php/examples/users/get.md new file mode 100644 index 0000000000..16c29f9a5a --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/users/get.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->get('[USER_ID]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/users/list.md b/docs/examples/0.14.x/server-php/examples/users/list.md new file mode 100644 index 0000000000..efce771ea1 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/users/list.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->list(); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/users/update-email.md b/docs/examples/0.14.x/server-php/examples/users/update-email.md new file mode 100644 index 0000000000..37efbe4244 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/users/update-email.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->updateEmail('[USER_ID]', 'email@example.com'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/users/update-name.md b/docs/examples/0.14.x/server-php/examples/users/update-name.md new file mode 100644 index 0000000000..6c552e7a35 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/users/update-name.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->updateName('[USER_ID]', '[NAME]'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/users/update-password.md b/docs/examples/0.14.x/server-php/examples/users/update-password.md new file mode 100644 index 0000000000..1959ff0694 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/users/update-password.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->updatePassword('[USER_ID]', 'password'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/users/update-prefs.md b/docs/examples/0.14.x/server-php/examples/users/update-prefs.md new file mode 100644 index 0000000000..9e9141f8a7 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/users/update-prefs.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->updatePrefs('[USER_ID]', []); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/users/update-status.md b/docs/examples/0.14.x/server-php/examples/users/update-status.md new file mode 100644 index 0000000000..6d6c7b1d26 --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/users/update-status.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->updateStatus('[USER_ID]', false); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/users/update-verification.md b/docs/examples/0.14.x/server-php/examples/users/update-verification.md new file mode 100644 index 0000000000..5b1f08693a --- /dev/null +++ b/docs/examples/0.14.x/server-php/examples/users/update-verification.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->updateVerification('[USER_ID]', false); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-python/examples/account/create-recovery.md b/docs/examples/0.14.x/server-python/examples/account/create-recovery.md new file mode 100644 index 0000000000..71026337a4 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.create_recovery('email@example.com', 'https://example.com') diff --git a/docs/examples/0.14.x/server-python/examples/account/create-verification.md b/docs/examples/0.14.x/server-python/examples/account/create-verification.md new file mode 100644 index 0000000000..53939ca669 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/account/create-verification.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.create_verification('https://example.com') diff --git a/docs/examples/0.14.x/server-python/examples/account/delete-session.md b/docs/examples/0.14.x/server-python/examples/account/delete-session.md new file mode 100644 index 0000000000..940367dfcf --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/account/delete-session.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.delete_session('[SESSION_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/account/delete-sessions.md b/docs/examples/0.14.x/server-python/examples/account/delete-sessions.md new file mode 100644 index 0000000000..317dd043d3 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/account/delete-sessions.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.delete_sessions() diff --git a/docs/examples/0.14.x/server-python/examples/account/get-logs.md b/docs/examples/0.14.x/server-python/examples/account/get-logs.md new file mode 100644 index 0000000000..3ccddc4658 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/account/get-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.get_logs() diff --git a/docs/examples/0.14.x/server-python/examples/account/get-prefs.md b/docs/examples/0.14.x/server-python/examples/account/get-prefs.md new file mode 100644 index 0000000000..616b1774b9 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/account/get-prefs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.get_prefs() diff --git a/docs/examples/0.14.x/server-python/examples/account/get-session.md b/docs/examples/0.14.x/server-python/examples/account/get-session.md new file mode 100644 index 0000000000..96fef2e50e --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/account/get-session.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.get_session('[SESSION_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/account/get-sessions.md b/docs/examples/0.14.x/server-python/examples/account/get-sessions.md new file mode 100644 index 0000000000..d35dde2378 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/account/get-sessions.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.get_sessions() diff --git a/docs/examples/0.14.x/server-python/examples/account/get.md b/docs/examples/0.14.x/server-python/examples/account/get.md new file mode 100644 index 0000000000..f561eb9446 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/account/get.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.get() diff --git a/docs/examples/0.14.x/server-python/examples/account/update-email.md b/docs/examples/0.14.x/server-python/examples/account/update-email.md new file mode 100644 index 0000000000..d18eed406f --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/account/update-email.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.update_email('email@example.com', 'password') diff --git a/docs/examples/0.14.x/server-python/examples/account/update-name.md b/docs/examples/0.14.x/server-python/examples/account/update-name.md new file mode 100644 index 0000000000..eec145325a --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/account/update-name.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.update_name('[NAME]') diff --git a/docs/examples/0.14.x/server-python/examples/account/update-password.md b/docs/examples/0.14.x/server-python/examples/account/update-password.md new file mode 100644 index 0000000000..2e89031dc8 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/account/update-password.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.update_password('password') diff --git a/docs/examples/0.14.x/server-python/examples/account/update-prefs.md b/docs/examples/0.14.x/server-python/examples/account/update-prefs.md new file mode 100644 index 0000000000..5bf6d7478b --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/account/update-prefs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.update_prefs({}) diff --git a/docs/examples/0.14.x/server-python/examples/account/update-recovery.md b/docs/examples/0.14.x/server-python/examples/account/update-recovery.md new file mode 100644 index 0000000000..badc07d0af --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.update_recovery('[USER_ID]', '[SECRET]', 'password', 'password') diff --git a/docs/examples/0.14.x/server-python/examples/account/update-session.md b/docs/examples/0.14.x/server-python/examples/account/update-session.md new file mode 100644 index 0000000000..14f3541b10 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/account/update-session.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.update_session('[SESSION_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/account/update-status.md b/docs/examples/0.14.x/server-python/examples/account/update-status.md new file mode 100644 index 0000000000..d6a36e6878 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/account/update-status.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.update_status() diff --git a/docs/examples/0.14.x/server-python/examples/account/update-verification.md b/docs/examples/0.14.x/server-python/examples/account/update-verification.md new file mode 100644 index 0000000000..02d01257c8 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/account/update-verification.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +account = Account(client) + +result = account.update_verification('[USER_ID]', '[SECRET]') diff --git a/docs/examples/0.14.x/server-python/examples/avatars/get-browser.md b/docs/examples/0.14.x/server-python/examples/avatars/get-browser.md new file mode 100644 index 0000000000..138c0d1b3e --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/avatars/get-browser.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +avatars = Avatars(client) + +result = avatars.get_browser('aa') diff --git a/docs/examples/0.14.x/server-python/examples/avatars/get-credit-card.md b/docs/examples/0.14.x/server-python/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..83f76aca42 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/avatars/get-credit-card.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +avatars = Avatars(client) + +result = avatars.get_credit_card('amex') diff --git a/docs/examples/0.14.x/server-python/examples/avatars/get-favicon.md b/docs/examples/0.14.x/server-python/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..6946080bee --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/avatars/get-favicon.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +avatars = Avatars(client) + +result = avatars.get_favicon('https://example.com') diff --git a/docs/examples/0.14.x/server-python/examples/avatars/get-flag.md b/docs/examples/0.14.x/server-python/examples/avatars/get-flag.md new file mode 100644 index 0000000000..188d6d35bd --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/avatars/get-flag.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +avatars = Avatars(client) + +result = avatars.get_flag('af') diff --git a/docs/examples/0.14.x/server-python/examples/avatars/get-image.md b/docs/examples/0.14.x/server-python/examples/avatars/get-image.md new file mode 100644 index 0000000000..29a6430eab --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/avatars/get-image.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +avatars = Avatars(client) + +result = avatars.get_image('https://example.com') diff --git a/docs/examples/0.14.x/server-python/examples/avatars/get-initials.md b/docs/examples/0.14.x/server-python/examples/avatars/get-initials.md new file mode 100644 index 0000000000..0c300af5da --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/avatars/get-initials.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +avatars = Avatars(client) + +result = avatars.get_initials() diff --git a/docs/examples/0.14.x/server-python/examples/avatars/get-q-r.md b/docs/examples/0.14.x/server-python/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..38378e9235 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/avatars/get-q-r.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +avatars = Avatars(client) + +result = avatars.get_qr('[TEXT]') diff --git a/docs/examples/0.14.x/server-python/examples/database/create-boolean-attribute.md b/docs/examples/0.14.x/server-python/examples/database/create-boolean-attribute.md new file mode 100644 index 0000000000..ca3d549876 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/create-boolean-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.create_boolean_attribute('[COLLECTION_ID]', '', False) diff --git a/docs/examples/0.14.x/server-python/examples/database/create-collection.md b/docs/examples/0.14.x/server-python/examples/database/create-collection.md new file mode 100644 index 0000000000..c1bf0b4082 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/create-collection.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.create_collection('[COLLECTION_ID]', '[NAME]', 'document', ["role:all"], ["role:all"]) diff --git a/docs/examples/0.14.x/server-python/examples/database/create-document.md b/docs/examples/0.14.x/server-python/examples/database/create-document.md new file mode 100644 index 0000000000..8cef31cfd6 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/create-document.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.create_document('[COLLECTION_ID]', '[DOCUMENT_ID]', {}) diff --git a/docs/examples/0.14.x/server-python/examples/database/create-email-attribute.md b/docs/examples/0.14.x/server-python/examples/database/create-email-attribute.md new file mode 100644 index 0000000000..339b4b7b13 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/create-email-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.create_email_attribute('[COLLECTION_ID]', '', False) diff --git a/docs/examples/0.14.x/server-python/examples/database/create-enum-attribute.md b/docs/examples/0.14.x/server-python/examples/database/create-enum-attribute.md new file mode 100644 index 0000000000..e9014ef2ce --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/create-enum-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.create_enum_attribute('[COLLECTION_ID]', '', [], False) diff --git a/docs/examples/0.14.x/server-python/examples/database/create-float-attribute.md b/docs/examples/0.14.x/server-python/examples/database/create-float-attribute.md new file mode 100644 index 0000000000..22d6ed37c5 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/create-float-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.create_float_attribute('[COLLECTION_ID]', '', False) diff --git a/docs/examples/0.14.x/server-python/examples/database/create-index.md b/docs/examples/0.14.x/server-python/examples/database/create-index.md new file mode 100644 index 0000000000..7553e75392 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/create-index.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.create_index('[COLLECTION_ID]', '', 'key', []) diff --git a/docs/examples/0.14.x/server-python/examples/database/create-integer-attribute.md b/docs/examples/0.14.x/server-python/examples/database/create-integer-attribute.md new file mode 100644 index 0000000000..5b4ae60f24 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/create-integer-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.create_integer_attribute('[COLLECTION_ID]', '', False) diff --git a/docs/examples/0.14.x/server-python/examples/database/create-ip-attribute.md b/docs/examples/0.14.x/server-python/examples/database/create-ip-attribute.md new file mode 100644 index 0000000000..6e79f0b147 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/create-ip-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.create_ip_attribute('[COLLECTION_ID]', '', False) diff --git a/docs/examples/0.14.x/server-python/examples/database/create-string-attribute.md b/docs/examples/0.14.x/server-python/examples/database/create-string-attribute.md new file mode 100644 index 0000000000..96f3410fde --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/create-string-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.create_string_attribute('[COLLECTION_ID]', '', 1, False) diff --git a/docs/examples/0.14.x/server-python/examples/database/create-url-attribute.md b/docs/examples/0.14.x/server-python/examples/database/create-url-attribute.md new file mode 100644 index 0000000000..dc8efd5beb --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/create-url-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.create_url_attribute('[COLLECTION_ID]', '', False) diff --git a/docs/examples/0.14.x/server-python/examples/database/delete-attribute.md b/docs/examples/0.14.x/server-python/examples/database/delete-attribute.md new file mode 100644 index 0000000000..9cc8b4cefb --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/delete-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.delete_attribute('[COLLECTION_ID]', '') diff --git a/docs/examples/0.14.x/server-python/examples/database/delete-collection.md b/docs/examples/0.14.x/server-python/examples/database/delete-collection.md new file mode 100644 index 0000000000..0e188ade41 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/delete-collection.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.delete_collection('[COLLECTION_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/database/delete-document.md b/docs/examples/0.14.x/server-python/examples/database/delete-document.md new file mode 100644 index 0000000000..c085547c16 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/delete-document.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.delete_document('[COLLECTION_ID]', '[DOCUMENT_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/database/delete-index.md b/docs/examples/0.14.x/server-python/examples/database/delete-index.md new file mode 100644 index 0000000000..5289b13fef --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/delete-index.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.delete_index('[COLLECTION_ID]', '') diff --git a/docs/examples/0.14.x/server-python/examples/database/get-attribute.md b/docs/examples/0.14.x/server-python/examples/database/get-attribute.md new file mode 100644 index 0000000000..584a51c77e --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/get-attribute.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.get_attribute('[COLLECTION_ID]', '') diff --git a/docs/examples/0.14.x/server-python/examples/database/get-collection.md b/docs/examples/0.14.x/server-python/examples/database/get-collection.md new file mode 100644 index 0000000000..f90f51f48b --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/get-collection.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.get_collection('[COLLECTION_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/database/get-document.md b/docs/examples/0.14.x/server-python/examples/database/get-document.md new file mode 100644 index 0000000000..79891709d1 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/get-document.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.get_document('[COLLECTION_ID]', '[DOCUMENT_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/database/get-index.md b/docs/examples/0.14.x/server-python/examples/database/get-index.md new file mode 100644 index 0000000000..0a492e1050 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/get-index.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.get_index('[COLLECTION_ID]', '') diff --git a/docs/examples/0.14.x/server-python/examples/database/list-attributes.md b/docs/examples/0.14.x/server-python/examples/database/list-attributes.md new file mode 100644 index 0000000000..ba69433b72 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/list-attributes.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.list_attributes('[COLLECTION_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/database/list-collections.md b/docs/examples/0.14.x/server-python/examples/database/list-collections.md new file mode 100644 index 0000000000..f60d4b90e5 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/list-collections.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.list_collections() diff --git a/docs/examples/0.14.x/server-python/examples/database/list-documents.md b/docs/examples/0.14.x/server-python/examples/database/list-documents.md new file mode 100644 index 0000000000..cecb57d2fa --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/list-documents.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.list_documents('[COLLECTION_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/database/list-indexes.md b/docs/examples/0.14.x/server-python/examples/database/list-indexes.md new file mode 100644 index 0000000000..0c7b7dbd51 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/list-indexes.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.list_indexes('[COLLECTION_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/database/update-collection.md b/docs/examples/0.14.x/server-python/examples/database/update-collection.md new file mode 100644 index 0000000000..adb809c942 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/update-collection.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.update_collection('[COLLECTION_ID]', '[NAME]', 'document') diff --git a/docs/examples/0.14.x/server-python/examples/database/update-document.md b/docs/examples/0.14.x/server-python/examples/database/update-document.md new file mode 100644 index 0000000000..2f4f89fc14 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/database/update-document.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.update_document('[COLLECTION_ID]', '[DOCUMENT_ID]', {}) diff --git a/docs/examples/0.14.x/server-python/examples/functions/create-deployment.md b/docs/examples/0.14.x/server-python/examples/functions/create-deployment.md new file mode 100644 index 0000000000..715c20ccf0 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/functions/create-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.create_deployment('[FUNCTION_ID]', '[ENTRYPOINT]', 'file.png', False) diff --git a/docs/examples/0.14.x/server-python/examples/functions/create-execution.md b/docs/examples/0.14.x/server-python/examples/functions/create-execution.md new file mode 100644 index 0000000000..dc4442cd84 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/functions/create-execution.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.create_execution('[FUNCTION_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/functions/create.md b/docs/examples/0.14.x/server-python/examples/functions/create.md new file mode 100644 index 0000000000..53629a58c0 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/functions/create.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.create('[FUNCTION_ID]', '[NAME]', [], 'node-14.5') diff --git a/docs/examples/0.14.x/server-python/examples/functions/delete-deployment.md b/docs/examples/0.14.x/server-python/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..ebd3877eaf --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/functions/delete-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.delete_deployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/functions/delete.md b/docs/examples/0.14.x/server-python/examples/functions/delete.md new file mode 100644 index 0000000000..52658e8c30 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/functions/delete.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.delete('[FUNCTION_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/functions/get-deployment.md b/docs/examples/0.14.x/server-python/examples/functions/get-deployment.md new file mode 100644 index 0000000000..e94bab7e33 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/functions/get-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.get_deployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/functions/get-execution.md b/docs/examples/0.14.x/server-python/examples/functions/get-execution.md new file mode 100644 index 0000000000..1e101304d3 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.get_execution('[FUNCTION_ID]', '[EXECUTION_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/functions/get.md b/docs/examples/0.14.x/server-python/examples/functions/get.md new file mode 100644 index 0000000000..0007667da6 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/functions/get.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.get('[FUNCTION_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/functions/list-deployments.md b/docs/examples/0.14.x/server-python/examples/functions/list-deployments.md new file mode 100644 index 0000000000..15e37de7e5 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/functions/list-deployments.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.list_deployments('[FUNCTION_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/functions/list-executions.md b/docs/examples/0.14.x/server-python/examples/functions/list-executions.md new file mode 100644 index 0000000000..6d75e093f4 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/functions/list-executions.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.list_executions('[FUNCTION_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/functions/list-runtimes.md b/docs/examples/0.14.x/server-python/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..a832a4dcdc --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/functions/list-runtimes.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.list_runtimes() diff --git a/docs/examples/0.14.x/server-python/examples/functions/list.md b/docs/examples/0.14.x/server-python/examples/functions/list.md new file mode 100644 index 0000000000..cc1f04d9c6 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/functions/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.list() diff --git a/docs/examples/0.14.x/server-python/examples/functions/retry-build.md b/docs/examples/0.14.x/server-python/examples/functions/retry-build.md new file mode 100644 index 0000000000..1a5e1b95da --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/functions/retry-build.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.retry_build('[FUNCTION_ID]', '[DEPLOYMENT_ID]', '[BUILD_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/functions/update-deployment.md b/docs/examples/0.14.x/server-python/examples/functions/update-deployment.md new file mode 100644 index 0000000000..473276f787 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/functions/update-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.update_deployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/functions/update.md b/docs/examples/0.14.x/server-python/examples/functions/update.md new file mode 100644 index 0000000000..675338185e --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/functions/update.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.update('[FUNCTION_ID]', '[NAME]', []) diff --git a/docs/examples/0.14.x/server-python/examples/health/get-antivirus.md b/docs/examples/0.14.x/server-python/examples/health/get-antivirus.md new file mode 100644 index 0000000000..97ee120365 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/health/get-antivirus.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_antivirus() diff --git a/docs/examples/0.14.x/server-python/examples/health/get-cache.md b/docs/examples/0.14.x/server-python/examples/health/get-cache.md new file mode 100644 index 0000000000..57c7939b7f --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/health/get-cache.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_cache() diff --git a/docs/examples/0.14.x/server-python/examples/health/get-d-b.md b/docs/examples/0.14.x/server-python/examples/health/get-d-b.md new file mode 100644 index 0000000000..4c2bafec96 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/health/get-d-b.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_db() diff --git a/docs/examples/0.14.x/server-python/examples/health/get-queue-certificates.md b/docs/examples/0.14.x/server-python/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..1f87c2758a --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/health/get-queue-certificates.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_queue_certificates() diff --git a/docs/examples/0.14.x/server-python/examples/health/get-queue-functions.md b/docs/examples/0.14.x/server-python/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..3e0b0c01e0 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/health/get-queue-functions.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_queue_functions() diff --git a/docs/examples/0.14.x/server-python/examples/health/get-queue-logs.md b/docs/examples/0.14.x/server-python/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..fdf80c6d82 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/health/get-queue-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_queue_logs() diff --git a/docs/examples/0.14.x/server-python/examples/health/get-queue-webhooks.md b/docs/examples/0.14.x/server-python/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..90c4238987 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/health/get-queue-webhooks.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_queue_webhooks() diff --git a/docs/examples/0.14.x/server-python/examples/health/get-storage-local.md b/docs/examples/0.14.x/server-python/examples/health/get-storage-local.md new file mode 100644 index 0000000000..b06dcef245 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/health/get-storage-local.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_storage_local() diff --git a/docs/examples/0.14.x/server-python/examples/health/get-time.md b/docs/examples/0.14.x/server-python/examples/health/get-time.md new file mode 100644 index 0000000000..df68c1a0f9 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/health/get-time.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_time() diff --git a/docs/examples/0.14.x/server-python/examples/health/get.md b/docs/examples/0.14.x/server-python/examples/health/get.md new file mode 100644 index 0000000000..f3416aef75 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/health/get.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get() diff --git a/docs/examples/0.14.x/server-python/examples/locale/get-continents.md b/docs/examples/0.14.x/server-python/examples/locale/get-continents.md new file mode 100644 index 0000000000..393326ddab --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/locale/get-continents.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +locale = Locale(client) + +result = locale.get_continents() diff --git a/docs/examples/0.14.x/server-python/examples/locale/get-countries-e-u.md b/docs/examples/0.14.x/server-python/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..51178ddd66 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/locale/get-countries-e-u.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +locale = Locale(client) + +result = locale.get_countries_eu() diff --git a/docs/examples/0.14.x/server-python/examples/locale/get-countries-phones.md b/docs/examples/0.14.x/server-python/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..8c7693a35c --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/locale/get-countries-phones.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +locale = Locale(client) + +result = locale.get_countries_phones() diff --git a/docs/examples/0.14.x/server-python/examples/locale/get-countries.md b/docs/examples/0.14.x/server-python/examples/locale/get-countries.md new file mode 100644 index 0000000000..8a6c7cb1c3 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/locale/get-countries.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +locale = Locale(client) + +result = locale.get_countries() diff --git a/docs/examples/0.14.x/server-python/examples/locale/get-currencies.md b/docs/examples/0.14.x/server-python/examples/locale/get-currencies.md new file mode 100644 index 0000000000..17586de230 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/locale/get-currencies.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +locale = Locale(client) + +result = locale.get_currencies() diff --git a/docs/examples/0.14.x/server-python/examples/locale/get-languages.md b/docs/examples/0.14.x/server-python/examples/locale/get-languages.md new file mode 100644 index 0000000000..292a401f75 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/locale/get-languages.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +locale = Locale(client) + +result = locale.get_languages() diff --git a/docs/examples/0.14.x/server-python/examples/locale/get.md b/docs/examples/0.14.x/server-python/examples/locale/get.md new file mode 100644 index 0000000000..752df0123d --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/locale/get.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +locale = Locale(client) + +result = locale.get() diff --git a/docs/examples/0.14.x/server-python/examples/storage/create-bucket.md b/docs/examples/0.14.x/server-python/examples/storage/create-bucket.md new file mode 100644 index 0000000000..639336fcd4 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/storage/create-bucket.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.create_bucket('[BUCKET_ID]', '[NAME]', 'file') diff --git a/docs/examples/0.14.x/server-python/examples/storage/create-file.md b/docs/examples/0.14.x/server-python/examples/storage/create-file.md new file mode 100644 index 0000000000..2ccb023a03 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/storage/create-file.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.create_file('[BUCKET_ID]', '[FILE_ID]', 'file.png') diff --git a/docs/examples/0.14.x/server-python/examples/storage/delete-bucket.md b/docs/examples/0.14.x/server-python/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..e992670f8d --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/storage/delete-bucket.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.delete_bucket('[BUCKET_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/storage/delete-file.md b/docs/examples/0.14.x/server-python/examples/storage/delete-file.md new file mode 100644 index 0000000000..d38b70b83c --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.delete_file('[BUCKET_ID]', '[FILE_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/storage/get-bucket.md b/docs/examples/0.14.x/server-python/examples/storage/get-bucket.md new file mode 100644 index 0000000000..85f870b48f --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/storage/get-bucket.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.get_bucket('[BUCKET_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/storage/get-file-download.md b/docs/examples/0.14.x/server-python/examples/storage/get-file-download.md new file mode 100644 index 0000000000..dcc5790b9c --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.get_file_download('[BUCKET_ID]', '[FILE_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/storage/get-file-preview.md b/docs/examples/0.14.x/server-python/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..cbba840ded --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/storage/get-file-preview.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.get_file_preview('[BUCKET_ID]', '[FILE_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/storage/get-file-view.md b/docs/examples/0.14.x/server-python/examples/storage/get-file-view.md new file mode 100644 index 0000000000..4648e80169 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.get_file_view('[BUCKET_ID]', '[FILE_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/storage/get-file.md b/docs/examples/0.14.x/server-python/examples/storage/get-file.md new file mode 100644 index 0000000000..818acf24a7 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/storage/get-file.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.get_file('[BUCKET_ID]', '[FILE_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/storage/list-buckets.md b/docs/examples/0.14.x/server-python/examples/storage/list-buckets.md new file mode 100644 index 0000000000..7dde490e0c --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/storage/list-buckets.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.list_buckets() diff --git a/docs/examples/0.14.x/server-python/examples/storage/list-files.md b/docs/examples/0.14.x/server-python/examples/storage/list-files.md new file mode 100644 index 0000000000..4c9891a9eb --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/storage/list-files.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.list_files('[BUCKET_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/storage/update-bucket.md b/docs/examples/0.14.x/server-python/examples/storage/update-bucket.md new file mode 100644 index 0000000000..c8d0d37c5d --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/storage/update-bucket.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.update_bucket('[BUCKET_ID]', '[NAME]', 'file') diff --git a/docs/examples/0.14.x/server-python/examples/storage/update-file.md b/docs/examples/0.14.x/server-python/examples/storage/update-file.md new file mode 100644 index 0000000000..09d371a6ca --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/storage/update-file.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.update_file('[BUCKET_ID]', '[FILE_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/teams/create-membership.md b/docs/examples/0.14.x/server-python/examples/teams/create-membership.md new file mode 100644 index 0000000000..9e2c832b3c --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/teams/create-membership.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.create_membership('[TEAM_ID]', 'email@example.com', [], 'https://example.com') diff --git a/docs/examples/0.14.x/server-python/examples/teams/create.md b/docs/examples/0.14.x/server-python/examples/teams/create.md new file mode 100644 index 0000000000..36b4494e11 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/teams/create.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.create('[TEAM_ID]', '[NAME]') diff --git a/docs/examples/0.14.x/server-python/examples/teams/delete-membership.md b/docs/examples/0.14.x/server-python/examples/teams/delete-membership.md new file mode 100644 index 0000000000..50c259a52d --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.delete_membership('[TEAM_ID]', '[MEMBERSHIP_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/teams/delete.md b/docs/examples/0.14.x/server-python/examples/teams/delete.md new file mode 100644 index 0000000000..8fb037cd4a --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/teams/delete.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.delete('[TEAM_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/teams/get-membership.md b/docs/examples/0.14.x/server-python/examples/teams/get-membership.md new file mode 100644 index 0000000000..2586e943f9 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.get_membership('[TEAM_ID]', '[MEMBERSHIP_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/teams/get-memberships.md b/docs/examples/0.14.x/server-python/examples/teams/get-memberships.md new file mode 100644 index 0000000000..6c6482418b --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/teams/get-memberships.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.get_memberships('[TEAM_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/teams/get.md b/docs/examples/0.14.x/server-python/examples/teams/get.md new file mode 100644 index 0000000000..6c2b404517 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/teams/get.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.get('[TEAM_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/teams/list.md b/docs/examples/0.14.x/server-python/examples/teams/list.md new file mode 100644 index 0000000000..c538aea340 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/teams/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.list() diff --git a/docs/examples/0.14.x/server-python/examples/teams/update-membership-roles.md b/docs/examples/0.14.x/server-python/examples/teams/update-membership-roles.md new file mode 100644 index 0000000000..d637dd6e9c --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/teams/update-membership-roles.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.update_membership_roles('[TEAM_ID]', '[MEMBERSHIP_ID]', []) diff --git a/docs/examples/0.14.x/server-python/examples/teams/update-membership-status.md b/docs/examples/0.14.x/server-python/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..357d4091c4 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/teams/update-membership-status.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token +) + +teams = Teams(client) + +result = teams.update_membership_status('[TEAM_ID]', '[MEMBERSHIP_ID]', '[USER_ID]', '[SECRET]') diff --git a/docs/examples/0.14.x/server-python/examples/teams/update.md b/docs/examples/0.14.x/server-python/examples/teams/update.md new file mode 100644 index 0000000000..2b9c222be0 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/teams/update.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.update('[TEAM_ID]', '[NAME]') diff --git a/docs/examples/0.14.x/server-python/examples/users/create.md b/docs/examples/0.14.x/server-python/examples/users/create.md new file mode 100644 index 0000000000..6fbd16f15e --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/users/create.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.create('[USER_ID]', 'email@example.com', 'password') diff --git a/docs/examples/0.14.x/server-python/examples/users/delete-session.md b/docs/examples/0.14.x/server-python/examples/users/delete-session.md new file mode 100644 index 0000000000..d25cfb3abc --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/users/delete-session.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.delete_session('[USER_ID]', '[SESSION_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/users/delete-sessions.md b/docs/examples/0.14.x/server-python/examples/users/delete-sessions.md new file mode 100644 index 0000000000..9b24db1b5c --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/users/delete-sessions.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.delete_sessions('[USER_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/users/delete.md b/docs/examples/0.14.x/server-python/examples/users/delete.md new file mode 100644 index 0000000000..820eead71f --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/users/delete.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.delete('[USER_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/users/get-logs.md b/docs/examples/0.14.x/server-python/examples/users/get-logs.md new file mode 100644 index 0000000000..c93ae244c8 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/users/get-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.get_logs('[USER_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/users/get-memberships.md b/docs/examples/0.14.x/server-python/examples/users/get-memberships.md new file mode 100644 index 0000000000..311d725b24 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/users/get-memberships.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.get_memberships('[USER_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/users/get-prefs.md b/docs/examples/0.14.x/server-python/examples/users/get-prefs.md new file mode 100644 index 0000000000..9ef100f9e6 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/users/get-prefs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.get_prefs('[USER_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/users/get-sessions.md b/docs/examples/0.14.x/server-python/examples/users/get-sessions.md new file mode 100644 index 0000000000..4de3120dfb --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/users/get-sessions.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.get_sessions('[USER_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/users/get.md b/docs/examples/0.14.x/server-python/examples/users/get.md new file mode 100644 index 0000000000..c11f96e64b --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/users/get.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.get('[USER_ID]') diff --git a/docs/examples/0.14.x/server-python/examples/users/list.md b/docs/examples/0.14.x/server-python/examples/users/list.md new file mode 100644 index 0000000000..c4a66e42d2 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/users/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.list() diff --git a/docs/examples/0.14.x/server-python/examples/users/update-email.md b/docs/examples/0.14.x/server-python/examples/users/update-email.md new file mode 100644 index 0000000000..1803623f8f --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/users/update-email.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.update_email('[USER_ID]', 'email@example.com') diff --git a/docs/examples/0.14.x/server-python/examples/users/update-name.md b/docs/examples/0.14.x/server-python/examples/users/update-name.md new file mode 100644 index 0000000000..728940d2a0 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/users/update-name.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.update_name('[USER_ID]', '[NAME]') diff --git a/docs/examples/0.14.x/server-python/examples/users/update-password.md b/docs/examples/0.14.x/server-python/examples/users/update-password.md new file mode 100644 index 0000000000..56b15e7dba --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/users/update-password.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.update_password('[USER_ID]', 'password') diff --git a/docs/examples/0.14.x/server-python/examples/users/update-prefs.md b/docs/examples/0.14.x/server-python/examples/users/update-prefs.md new file mode 100644 index 0000000000..7e0fe7c35a --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/users/update-prefs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.update_prefs('[USER_ID]', {}) diff --git a/docs/examples/0.14.x/server-python/examples/users/update-status.md b/docs/examples/0.14.x/server-python/examples/users/update-status.md new file mode 100644 index 0000000000..55b32b1c1c --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/users/update-status.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.update_status('[USER_ID]', False) diff --git a/docs/examples/0.14.x/server-python/examples/users/update-verification.md b/docs/examples/0.14.x/server-python/examples/users/update-verification.md new file mode 100644 index 0000000000..6923e034d8 --- /dev/null +++ b/docs/examples/0.14.x/server-python/examples/users/update-verification.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.update_verification('[USER_ID]', False) diff --git a/docs/examples/0.14.x/server-ruby/examples/account/create-recovery.md b/docs/examples/0.14.x/server-ruby/examples/account/create-recovery.md new file mode 100644 index 0000000000..e8d2e55435 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Appwrite::Account.new(client) + +response = account.create_recovery(email: 'email@example.com', url: 'https://example.com') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/account/create-verification.md b/docs/examples/0.14.x/server-ruby/examples/account/create-verification.md new file mode 100644 index 0000000000..e2793d190f --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/account/create-verification.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Appwrite::Account.new(client) + +response = account.create_verification(url: 'https://example.com') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/account/delete-session.md b/docs/examples/0.14.x/server-ruby/examples/account/delete-session.md new file mode 100644 index 0000000000..31eb776cb1 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/account/delete-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Appwrite::Account.new(client) + +response = account.delete_session(session_id: '[SESSION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/account/delete-sessions.md b/docs/examples/0.14.x/server-ruby/examples/account/delete-sessions.md new file mode 100644 index 0000000000..b2cd8719bb --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/account/delete-sessions.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Appwrite::Account.new(client) + +response = account.delete_sessions() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/account/get-logs.md b/docs/examples/0.14.x/server-ruby/examples/account/get-logs.md new file mode 100644 index 0000000000..31d1aebd12 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/account/get-logs.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Appwrite::Account.new(client) + +response = account.get_logs() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/account/get-prefs.md b/docs/examples/0.14.x/server-ruby/examples/account/get-prefs.md new file mode 100644 index 0000000000..399b02f84e --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/account/get-prefs.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Appwrite::Account.new(client) + +response = account.get_prefs() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/account/get-session.md b/docs/examples/0.14.x/server-ruby/examples/account/get-session.md new file mode 100644 index 0000000000..c5da75976e --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/account/get-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Appwrite::Account.new(client) + +response = account.get_session(session_id: '[SESSION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/account/get-sessions.md b/docs/examples/0.14.x/server-ruby/examples/account/get-sessions.md new file mode 100644 index 0000000000..67302aa556 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/account/get-sessions.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Appwrite::Account.new(client) + +response = account.get_sessions() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/account/get.md b/docs/examples/0.14.x/server-ruby/examples/account/get.md new file mode 100644 index 0000000000..15feca12b5 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/account/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Appwrite::Account.new(client) + +response = account.get() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/account/update-email.md b/docs/examples/0.14.x/server-ruby/examples/account/update-email.md new file mode 100644 index 0000000000..a036b30974 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/account/update-email.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Appwrite::Account.new(client) + +response = account.update_email(email: 'email@example.com', password: 'password') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/account/update-name.md b/docs/examples/0.14.x/server-ruby/examples/account/update-name.md new file mode 100644 index 0000000000..217be57b15 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/account/update-name.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Appwrite::Account.new(client) + +response = account.update_name(name: '[NAME]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/account/update-password.md b/docs/examples/0.14.x/server-ruby/examples/account/update-password.md new file mode 100644 index 0000000000..0e6914d26a --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/account/update-password.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Appwrite::Account.new(client) + +response = account.update_password(password: 'password') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/account/update-prefs.md b/docs/examples/0.14.x/server-ruby/examples/account/update-prefs.md new file mode 100644 index 0000000000..6a78546b15 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/account/update-prefs.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Appwrite::Account.new(client) + +response = account.update_prefs(prefs: {}) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/account/update-recovery.md b/docs/examples/0.14.x/server-ruby/examples/account/update-recovery.md new file mode 100644 index 0000000000..d6d0050fe3 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Appwrite::Account.new(client) + +response = account.update_recovery(user_id: '[USER_ID]', secret: '[SECRET]', password: 'password', password_again: 'password') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/account/update-session.md b/docs/examples/0.14.x/server-ruby/examples/account/update-session.md new file mode 100644 index 0000000000..281efc72f7 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/account/update-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Appwrite::Account.new(client) + +response = account.update_session(session_id: '[SESSION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/account/update-status.md b/docs/examples/0.14.x/server-ruby/examples/account/update-status.md new file mode 100644 index 0000000000..c609271182 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/account/update-status.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Appwrite::Account.new(client) + +response = account.update_status() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/account/update-verification.md b/docs/examples/0.14.x/server-ruby/examples/account/update-verification.md new file mode 100644 index 0000000000..c2079c05b5 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/account/update-verification.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +account = Appwrite::Account.new(client) + +response = account.update_verification(user_id: '[USER_ID]', secret: '[SECRET]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/avatars/get-browser.md b/docs/examples/0.14.x/server-ruby/examples/avatars/get-browser.md new file mode 100644 index 0000000000..e339445186 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/avatars/get-browser.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +avatars = Appwrite::Avatars.new(client) + +response = avatars.get_browser(code: 'aa') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/avatars/get-credit-card.md b/docs/examples/0.14.x/server-ruby/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..bf2d103536 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/avatars/get-credit-card.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +avatars = Appwrite::Avatars.new(client) + +response = avatars.get_credit_card(code: 'amex') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/avatars/get-favicon.md b/docs/examples/0.14.x/server-ruby/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..3b3d14ab1d --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/avatars/get-favicon.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +avatars = Appwrite::Avatars.new(client) + +response = avatars.get_favicon(url: 'https://example.com') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/avatars/get-flag.md b/docs/examples/0.14.x/server-ruby/examples/avatars/get-flag.md new file mode 100644 index 0000000000..37a0bc8577 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/avatars/get-flag.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +avatars = Appwrite::Avatars.new(client) + +response = avatars.get_flag(code: 'af') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/avatars/get-image.md b/docs/examples/0.14.x/server-ruby/examples/avatars/get-image.md new file mode 100644 index 0000000000..251573ece7 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/avatars/get-image.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +avatars = Appwrite::Avatars.new(client) + +response = avatars.get_image(url: 'https://example.com') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/avatars/get-initials.md b/docs/examples/0.14.x/server-ruby/examples/avatars/get-initials.md new file mode 100644 index 0000000000..6e30f179d9 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/avatars/get-initials.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +avatars = Appwrite::Avatars.new(client) + +response = avatars.get_initials() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/avatars/get-q-r.md b/docs/examples/0.14.x/server-ruby/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..3714d545eb --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/avatars/get-q-r.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +avatars = Appwrite::Avatars.new(client) + +response = avatars.get_qr(text: '[TEXT]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/create-boolean-attribute.md b/docs/examples/0.14.x/server-ruby/examples/database/create-boolean-attribute.md new file mode 100644 index 0000000000..b3228f27fe --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/create-boolean-attribute.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.create_boolean_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/create-collection.md b/docs/examples/0.14.x/server-ruby/examples/database/create-collection.md new file mode 100644 index 0000000000..81325a8b79 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/create-collection.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.create_collection(collection_id: '[COLLECTION_ID]', name: '[NAME]', permission: 'document', read: ["role:all"], write: ["role:all"]) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/create-document.md b/docs/examples/0.14.x/server-ruby/examples/database/create-document.md new file mode 100644 index 0000000000..97300f92d8 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/create-document.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.create_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]', data: {}) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/create-email-attribute.md b/docs/examples/0.14.x/server-ruby/examples/database/create-email-attribute.md new file mode 100644 index 0000000000..fbf9d4fbe0 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/create-email-attribute.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.create_email_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/create-enum-attribute.md b/docs/examples/0.14.x/server-ruby/examples/database/create-enum-attribute.md new file mode 100644 index 0000000000..9d0c372f4c --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/create-enum-attribute.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.create_enum_attribute(collection_id: '[COLLECTION_ID]', key: '', elements: [], required: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/create-float-attribute.md b/docs/examples/0.14.x/server-ruby/examples/database/create-float-attribute.md new file mode 100644 index 0000000000..753191b586 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/create-float-attribute.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.create_float_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/create-index.md b/docs/examples/0.14.x/server-ruby/examples/database/create-index.md new file mode 100644 index 0000000000..3404c76763 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/create-index.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.create_index(collection_id: '[COLLECTION_ID]', key: '', type: 'key', attributes: []) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/create-integer-attribute.md b/docs/examples/0.14.x/server-ruby/examples/database/create-integer-attribute.md new file mode 100644 index 0000000000..870405e478 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/create-integer-attribute.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.create_integer_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/create-ip-attribute.md b/docs/examples/0.14.x/server-ruby/examples/database/create-ip-attribute.md new file mode 100644 index 0000000000..f956cb1eb8 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/create-ip-attribute.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.create_ip_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/create-string-attribute.md b/docs/examples/0.14.x/server-ruby/examples/database/create-string-attribute.md new file mode 100644 index 0000000000..5d42170fa4 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/create-string-attribute.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.create_string_attribute(collection_id: '[COLLECTION_ID]', key: '', size: 1, required: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/create-url-attribute.md b/docs/examples/0.14.x/server-ruby/examples/database/create-url-attribute.md new file mode 100644 index 0000000000..a91948f1d5 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/create-url-attribute.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.create_url_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/delete-attribute.md b/docs/examples/0.14.x/server-ruby/examples/database/delete-attribute.md new file mode 100644 index 0000000000..2b38d31bea --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/delete-attribute.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.delete_attribute(collection_id: '[COLLECTION_ID]', key: '') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/delete-collection.md b/docs/examples/0.14.x/server-ruby/examples/database/delete-collection.md new file mode 100644 index 0000000000..9694d36cc0 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/delete-collection.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.delete_collection(collection_id: '[COLLECTION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/delete-document.md b/docs/examples/0.14.x/server-ruby/examples/database/delete-document.md new file mode 100644 index 0000000000..87a6436550 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/delete-document.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.delete_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/delete-index.md b/docs/examples/0.14.x/server-ruby/examples/database/delete-index.md new file mode 100644 index 0000000000..50b8a8d1f4 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/delete-index.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.delete_index(collection_id: '[COLLECTION_ID]', key: '') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/get-attribute.md b/docs/examples/0.14.x/server-ruby/examples/database/get-attribute.md new file mode 100644 index 0000000000..7315a50ae3 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/get-attribute.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.get_attribute(collection_id: '[COLLECTION_ID]', key: '') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/get-collection.md b/docs/examples/0.14.x/server-ruby/examples/database/get-collection.md new file mode 100644 index 0000000000..213c19cc7f --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/get-collection.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.get_collection(collection_id: '[COLLECTION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/get-document.md b/docs/examples/0.14.x/server-ruby/examples/database/get-document.md new file mode 100644 index 0000000000..c2d3da2a78 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/get-document.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.get_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/get-index.md b/docs/examples/0.14.x/server-ruby/examples/database/get-index.md new file mode 100644 index 0000000000..69d190d8fd --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/get-index.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.get_index(collection_id: '[COLLECTION_ID]', key: '') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/list-attributes.md b/docs/examples/0.14.x/server-ruby/examples/database/list-attributes.md new file mode 100644 index 0000000000..84162b9087 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/list-attributes.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.list_attributes(collection_id: '[COLLECTION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/list-collections.md b/docs/examples/0.14.x/server-ruby/examples/database/list-collections.md new file mode 100644 index 0000000000..f26ad8f281 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/list-collections.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.list_collections() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/list-documents.md b/docs/examples/0.14.x/server-ruby/examples/database/list-documents.md new file mode 100644 index 0000000000..4e4e9ab5ab --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/list-documents.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.list_documents(collection_id: '[COLLECTION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/list-indexes.md b/docs/examples/0.14.x/server-ruby/examples/database/list-indexes.md new file mode 100644 index 0000000000..bf6df474f4 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/list-indexes.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.list_indexes(collection_id: '[COLLECTION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/update-collection.md b/docs/examples/0.14.x/server-ruby/examples/database/update-collection.md new file mode 100644 index 0000000000..0cbda72a3f --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/update-collection.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.update_collection(collection_id: '[COLLECTION_ID]', name: '[NAME]', permission: 'document') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/database/update-document.md b/docs/examples/0.14.x/server-ruby/examples/database/update-document.md new file mode 100644 index 0000000000..4b5344b5d7 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/database/update-document.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +database = Appwrite::Database.new(client) + +response = database.update_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]', data: {}) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/functions/create-deployment.md b/docs/examples/0.14.x/server-ruby/examples/functions/create-deployment.md new file mode 100644 index 0000000000..1df2a286c5 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/functions/create-deployment.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Appwrite::Functions.new(client) + +response = functions.create_deployment(function_id: '[FUNCTION_ID]', entrypoint: '[ENTRYPOINT]', code: 'dir/file.png', activate: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/functions/create-execution.md b/docs/examples/0.14.x/server-ruby/examples/functions/create-execution.md new file mode 100644 index 0000000000..25d48ddadf --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/functions/create-execution.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Appwrite::Functions.new(client) + +response = functions.create_execution(function_id: '[FUNCTION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/functions/create.md b/docs/examples/0.14.x/server-ruby/examples/functions/create.md new file mode 100644 index 0000000000..7834441203 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/functions/create.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Appwrite::Functions.new(client) + +response = functions.create(function_id: '[FUNCTION_ID]', name: '[NAME]', execute: [], runtime: 'node-14.5') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/functions/delete-deployment.md b/docs/examples/0.14.x/server-ruby/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..6ae40f76f4 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/functions/delete-deployment.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Appwrite::Functions.new(client) + +response = functions.delete_deployment(function_id: '[FUNCTION_ID]', deployment_id: '[DEPLOYMENT_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/functions/delete.md b/docs/examples/0.14.x/server-ruby/examples/functions/delete.md new file mode 100644 index 0000000000..33d2154958 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/functions/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Appwrite::Functions.new(client) + +response = functions.delete(function_id: '[FUNCTION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/functions/get-deployment.md b/docs/examples/0.14.x/server-ruby/examples/functions/get-deployment.md new file mode 100644 index 0000000000..f9cbff3800 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/functions/get-deployment.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Appwrite::Functions.new(client) + +response = functions.get_deployment(function_id: '[FUNCTION_ID]', deployment_id: '[DEPLOYMENT_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/functions/get-execution.md b/docs/examples/0.14.x/server-ruby/examples/functions/get-execution.md new file mode 100644 index 0000000000..dd43307553 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Appwrite::Functions.new(client) + +response = functions.get_execution(function_id: '[FUNCTION_ID]', execution_id: '[EXECUTION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/functions/get.md b/docs/examples/0.14.x/server-ruby/examples/functions/get.md new file mode 100644 index 0000000000..463f6a406b --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/functions/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Appwrite::Functions.new(client) + +response = functions.get(function_id: '[FUNCTION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/functions/list-deployments.md b/docs/examples/0.14.x/server-ruby/examples/functions/list-deployments.md new file mode 100644 index 0000000000..36df28c8ab --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/functions/list-deployments.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Appwrite::Functions.new(client) + +response = functions.list_deployments(function_id: '[FUNCTION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/functions/list-executions.md b/docs/examples/0.14.x/server-ruby/examples/functions/list-executions.md new file mode 100644 index 0000000000..da66723679 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/functions/list-executions.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Appwrite::Functions.new(client) + +response = functions.list_executions(function_id: '[FUNCTION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/functions/list-runtimes.md b/docs/examples/0.14.x/server-ruby/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..b8f0a75aff --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/functions/list-runtimes.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Appwrite::Functions.new(client) + +response = functions.list_runtimes() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/functions/list.md b/docs/examples/0.14.x/server-ruby/examples/functions/list.md new file mode 100644 index 0000000000..ce82a162a5 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/functions/list.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Appwrite::Functions.new(client) + +response = functions.list() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/functions/retry-build.md b/docs/examples/0.14.x/server-ruby/examples/functions/retry-build.md new file mode 100644 index 0000000000..1e27f85af4 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/functions/retry-build.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Appwrite::Functions.new(client) + +response = functions.retry_build(function_id: '[FUNCTION_ID]', deployment_id: '[DEPLOYMENT_ID]', build_id: '[BUILD_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/functions/update-deployment.md b/docs/examples/0.14.x/server-ruby/examples/functions/update-deployment.md new file mode 100644 index 0000000000..02a5bb5014 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/functions/update-deployment.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Appwrite::Functions.new(client) + +response = functions.update_deployment(function_id: '[FUNCTION_ID]', deployment_id: '[DEPLOYMENT_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/functions/update.md b/docs/examples/0.14.x/server-ruby/examples/functions/update.md new file mode 100644 index 0000000000..606e336343 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/functions/update.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +functions = Appwrite::Functions.new(client) + +response = functions.update(function_id: '[FUNCTION_ID]', name: '[NAME]', execute: []) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/health/get-antivirus.md b/docs/examples/0.14.x/server-ruby/examples/health/get-antivirus.md new file mode 100644 index 0000000000..c9c0bd45f5 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/health/get-antivirus.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +health = Appwrite::Health.new(client) + +response = health.get_antivirus() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/health/get-cache.md b/docs/examples/0.14.x/server-ruby/examples/health/get-cache.md new file mode 100644 index 0000000000..cbaa4b959f --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/health/get-cache.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +health = Appwrite::Health.new(client) + +response = health.get_cache() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/health/get-d-b.md b/docs/examples/0.14.x/server-ruby/examples/health/get-d-b.md new file mode 100644 index 0000000000..9f7bedd7f5 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/health/get-d-b.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +health = Appwrite::Health.new(client) + +response = health.get_db() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/health/get-queue-certificates.md b/docs/examples/0.14.x/server-ruby/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..db44d4da4e --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/health/get-queue-certificates.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +health = Appwrite::Health.new(client) + +response = health.get_queue_certificates() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/health/get-queue-functions.md b/docs/examples/0.14.x/server-ruby/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..14b2043cd2 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/health/get-queue-functions.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +health = Appwrite::Health.new(client) + +response = health.get_queue_functions() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/health/get-queue-logs.md b/docs/examples/0.14.x/server-ruby/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..9c19ac25d2 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/health/get-queue-logs.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +health = Appwrite::Health.new(client) + +response = health.get_queue_logs() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/health/get-queue-webhooks.md b/docs/examples/0.14.x/server-ruby/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..288b27207e --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/health/get-queue-webhooks.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +health = Appwrite::Health.new(client) + +response = health.get_queue_webhooks() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/health/get-storage-local.md b/docs/examples/0.14.x/server-ruby/examples/health/get-storage-local.md new file mode 100644 index 0000000000..fc7ae24da4 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/health/get-storage-local.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +health = Appwrite::Health.new(client) + +response = health.get_storage_local() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/health/get-time.md b/docs/examples/0.14.x/server-ruby/examples/health/get-time.md new file mode 100644 index 0000000000..b29672255f --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/health/get-time.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +health = Appwrite::Health.new(client) + +response = health.get_time() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/health/get.md b/docs/examples/0.14.x/server-ruby/examples/health/get.md new file mode 100644 index 0000000000..b7a82e6c2b --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/health/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +health = Appwrite::Health.new(client) + +response = health.get() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/locale/get-continents.md b/docs/examples/0.14.x/server-ruby/examples/locale/get-continents.md new file mode 100644 index 0000000000..8857911dab --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/locale/get-continents.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +locale = Appwrite::Locale.new(client) + +response = locale.get_continents() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/locale/get-countries-e-u.md b/docs/examples/0.14.x/server-ruby/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..92e593edf0 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/locale/get-countries-e-u.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +locale = Appwrite::Locale.new(client) + +response = locale.get_countries_eu() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/locale/get-countries-phones.md b/docs/examples/0.14.x/server-ruby/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..d3ae0c4e8a --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/locale/get-countries-phones.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +locale = Appwrite::Locale.new(client) + +response = locale.get_countries_phones() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/locale/get-countries.md b/docs/examples/0.14.x/server-ruby/examples/locale/get-countries.md new file mode 100644 index 0000000000..895917e42d --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/locale/get-countries.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +locale = Appwrite::Locale.new(client) + +response = locale.get_countries() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/locale/get-currencies.md b/docs/examples/0.14.x/server-ruby/examples/locale/get-currencies.md new file mode 100644 index 0000000000..48278af4ed --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/locale/get-currencies.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +locale = Appwrite::Locale.new(client) + +response = locale.get_currencies() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/locale/get-languages.md b/docs/examples/0.14.x/server-ruby/examples/locale/get-languages.md new file mode 100644 index 0000000000..dccf02d769 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/locale/get-languages.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +locale = Appwrite::Locale.new(client) + +response = locale.get_languages() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/locale/get.md b/docs/examples/0.14.x/server-ruby/examples/locale/get.md new file mode 100644 index 0000000000..f8e37d34a8 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/locale/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +locale = Appwrite::Locale.new(client) + +response = locale.get() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/storage/create-bucket.md b/docs/examples/0.14.x/server-ruby/examples/storage/create-bucket.md new file mode 100644 index 0000000000..121796809c --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/storage/create-bucket.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Appwrite::Storage.new(client) + +response = storage.create_bucket(bucket_id: '[BUCKET_ID]', name: '[NAME]', permission: 'file') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/storage/create-file.md b/docs/examples/0.14.x/server-ruby/examples/storage/create-file.md new file mode 100644 index 0000000000..066cc51c51 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/storage/create-file.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Appwrite::Storage.new(client) + +response = storage.create_file(bucket_id: '[BUCKET_ID]', file_id: '[FILE_ID]', file: 'dir/file.png') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/storage/delete-bucket.md b/docs/examples/0.14.x/server-ruby/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..e44be3581e --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/storage/delete-bucket.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Appwrite::Storage.new(client) + +response = storage.delete_bucket(bucket_id: '[BUCKET_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/storage/delete-file.md b/docs/examples/0.14.x/server-ruby/examples/storage/delete-file.md new file mode 100644 index 0000000000..bba6c6e8da --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Appwrite::Storage.new(client) + +response = storage.delete_file(bucket_id: '[BUCKET_ID]', file_id: '[FILE_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/storage/get-bucket.md b/docs/examples/0.14.x/server-ruby/examples/storage/get-bucket.md new file mode 100644 index 0000000000..d1d6b9a4cd --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/storage/get-bucket.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Appwrite::Storage.new(client) + +response = storage.get_bucket(bucket_id: '[BUCKET_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/storage/get-file-download.md b/docs/examples/0.14.x/server-ruby/examples/storage/get-file-download.md new file mode 100644 index 0000000000..f3903072a3 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Appwrite::Storage.new(client) + +response = storage.get_file_download(bucket_id: '[BUCKET_ID]', file_id: '[FILE_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/storage/get-file-preview.md b/docs/examples/0.14.x/server-ruby/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..6f2f249d5f --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/storage/get-file-preview.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Appwrite::Storage.new(client) + +response = storage.get_file_preview(bucket_id: '[BUCKET_ID]', file_id: '[FILE_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/storage/get-file-view.md b/docs/examples/0.14.x/server-ruby/examples/storage/get-file-view.md new file mode 100644 index 0000000000..ea59ce1e25 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Appwrite::Storage.new(client) + +response = storage.get_file_view(bucket_id: '[BUCKET_ID]', file_id: '[FILE_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/storage/get-file.md b/docs/examples/0.14.x/server-ruby/examples/storage/get-file.md new file mode 100644 index 0000000000..a7758d0855 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/storage/get-file.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Appwrite::Storage.new(client) + +response = storage.get_file(bucket_id: '[BUCKET_ID]', file_id: '[FILE_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/storage/list-buckets.md b/docs/examples/0.14.x/server-ruby/examples/storage/list-buckets.md new file mode 100644 index 0000000000..81ee829897 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/storage/list-buckets.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Appwrite::Storage.new(client) + +response = storage.list_buckets() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/storage/list-files.md b/docs/examples/0.14.x/server-ruby/examples/storage/list-files.md new file mode 100644 index 0000000000..f7c6bb88b4 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/storage/list-files.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Appwrite::Storage.new(client) + +response = storage.list_files(bucket_id: '[BUCKET_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/storage/update-bucket.md b/docs/examples/0.14.x/server-ruby/examples/storage/update-bucket.md new file mode 100644 index 0000000000..d946c80732 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/storage/update-bucket.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Appwrite::Storage.new(client) + +response = storage.update_bucket(bucket_id: '[BUCKET_ID]', name: '[NAME]', permission: 'file') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/storage/update-file.md b/docs/examples/0.14.x/server-ruby/examples/storage/update-file.md new file mode 100644 index 0000000000..bf42b7e886 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/storage/update-file.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +storage = Appwrite::Storage.new(client) + +response = storage.update_file(bucket_id: '[BUCKET_ID]', file_id: '[FILE_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/teams/create-membership.md b/docs/examples/0.14.x/server-ruby/examples/teams/create-membership.md new file mode 100644 index 0000000000..5c82311054 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/teams/create-membership.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +teams = Appwrite::Teams.new(client) + +response = teams.create_membership(team_id: '[TEAM_ID]', email: 'email@example.com', roles: [], url: 'https://example.com') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/teams/create.md b/docs/examples/0.14.x/server-ruby/examples/teams/create.md new file mode 100644 index 0000000000..58f09d8918 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/teams/create.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +teams = Appwrite::Teams.new(client) + +response = teams.create(team_id: '[TEAM_ID]', name: '[NAME]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/teams/delete-membership.md b/docs/examples/0.14.x/server-ruby/examples/teams/delete-membership.md new file mode 100644 index 0000000000..5d415622ed --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +teams = Appwrite::Teams.new(client) + +response = teams.delete_membership(team_id: '[TEAM_ID]', membership_id: '[MEMBERSHIP_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/teams/delete.md b/docs/examples/0.14.x/server-ruby/examples/teams/delete.md new file mode 100644 index 0000000000..792abc25cd --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/teams/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +teams = Appwrite::Teams.new(client) + +response = teams.delete(team_id: '[TEAM_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/teams/get-membership.md b/docs/examples/0.14.x/server-ruby/examples/teams/get-membership.md new file mode 100644 index 0000000000..be37320c11 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +teams = Appwrite::Teams.new(client) + +response = teams.get_membership(team_id: '[TEAM_ID]', membership_id: '[MEMBERSHIP_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/teams/get-memberships.md b/docs/examples/0.14.x/server-ruby/examples/teams/get-memberships.md new file mode 100644 index 0000000000..de0d1a7ae3 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/teams/get-memberships.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +teams = Appwrite::Teams.new(client) + +response = teams.get_memberships(team_id: '[TEAM_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/teams/get.md b/docs/examples/0.14.x/server-ruby/examples/teams/get.md new file mode 100644 index 0000000000..eb42acfdb9 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/teams/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +teams = Appwrite::Teams.new(client) + +response = teams.get(team_id: '[TEAM_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/teams/list.md b/docs/examples/0.14.x/server-ruby/examples/teams/list.md new file mode 100644 index 0000000000..f660fd7f95 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/teams/list.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +teams = Appwrite::Teams.new(client) + +response = teams.list() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/teams/update-membership-roles.md b/docs/examples/0.14.x/server-ruby/examples/teams/update-membership-roles.md new file mode 100644 index 0000000000..e754ec42f4 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/teams/update-membership-roles.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +teams = Appwrite::Teams.new(client) + +response = teams.update_membership_roles(team_id: '[TEAM_ID]', membership_id: '[MEMBERSHIP_ID]', roles: []) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/teams/update-membership-status.md b/docs/examples/0.14.x/server-ruby/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..7f539905d5 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/teams/update-membership-status.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + +teams = Appwrite::Teams.new(client) + +response = teams.update_membership_status(team_id: '[TEAM_ID]', membership_id: '[MEMBERSHIP_ID]', user_id: '[USER_ID]', secret: '[SECRET]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/teams/update.md b/docs/examples/0.14.x/server-ruby/examples/teams/update.md new file mode 100644 index 0000000000..2fb0e774e4 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/teams/update.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +teams = Appwrite::Teams.new(client) + +response = teams.update(team_id: '[TEAM_ID]', name: '[NAME]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/users/create.md b/docs/examples/0.14.x/server-ruby/examples/users/create.md new file mode 100644 index 0000000000..b8302e02f8 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/users/create.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Appwrite::Users.new(client) + +response = users.create(user_id: '[USER_ID]', email: 'email@example.com', password: 'password') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/users/delete-session.md b/docs/examples/0.14.x/server-ruby/examples/users/delete-session.md new file mode 100644 index 0000000000..676d8dda8f --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/users/delete-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Appwrite::Users.new(client) + +response = users.delete_session(user_id: '[USER_ID]', session_id: '[SESSION_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/users/delete-sessions.md b/docs/examples/0.14.x/server-ruby/examples/users/delete-sessions.md new file mode 100644 index 0000000000..8578572dc1 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/users/delete-sessions.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Appwrite::Users.new(client) + +response = users.delete_sessions(user_id: '[USER_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/users/delete.md b/docs/examples/0.14.x/server-ruby/examples/users/delete.md new file mode 100644 index 0000000000..2504751dd2 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/users/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Appwrite::Users.new(client) + +response = users.delete(user_id: '[USER_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/users/get-logs.md b/docs/examples/0.14.x/server-ruby/examples/users/get-logs.md new file mode 100644 index 0000000000..e010503c3c --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/users/get-logs.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Appwrite::Users.new(client) + +response = users.get_logs(user_id: '[USER_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/users/get-memberships.md b/docs/examples/0.14.x/server-ruby/examples/users/get-memberships.md new file mode 100644 index 0000000000..e842039404 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/users/get-memberships.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Appwrite::Users.new(client) + +response = users.get_memberships(user_id: '[USER_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/users/get-prefs.md b/docs/examples/0.14.x/server-ruby/examples/users/get-prefs.md new file mode 100644 index 0000000000..d818802801 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/users/get-prefs.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Appwrite::Users.new(client) + +response = users.get_prefs(user_id: '[USER_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/users/get-sessions.md b/docs/examples/0.14.x/server-ruby/examples/users/get-sessions.md new file mode 100644 index 0000000000..8a4b0e902e --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/users/get-sessions.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Appwrite::Users.new(client) + +response = users.get_sessions(user_id: '[USER_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/users/get.md b/docs/examples/0.14.x/server-ruby/examples/users/get.md new file mode 100644 index 0000000000..93d1063178 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/users/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Appwrite::Users.new(client) + +response = users.get(user_id: '[USER_ID]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/users/list.md b/docs/examples/0.14.x/server-ruby/examples/users/list.md new file mode 100644 index 0000000000..5a17e194d9 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/users/list.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Appwrite::Users.new(client) + +response = users.list() + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/users/update-email.md b/docs/examples/0.14.x/server-ruby/examples/users/update-email.md new file mode 100644 index 0000000000..5d798145b6 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/users/update-email.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Appwrite::Users.new(client) + +response = users.update_email(user_id: '[USER_ID]', email: 'email@example.com') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/users/update-name.md b/docs/examples/0.14.x/server-ruby/examples/users/update-name.md new file mode 100644 index 0000000000..6ddfe659ec --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/users/update-name.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Appwrite::Users.new(client) + +response = users.update_name(user_id: '[USER_ID]', name: '[NAME]') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/users/update-password.md b/docs/examples/0.14.x/server-ruby/examples/users/update-password.md new file mode 100644 index 0000000000..020893f76e --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/users/update-password.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Appwrite::Users.new(client) + +response = users.update_password(user_id: '[USER_ID]', password: 'password') + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/users/update-prefs.md b/docs/examples/0.14.x/server-ruby/examples/users/update-prefs.md new file mode 100644 index 0000000000..bd2055e079 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/users/update-prefs.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Appwrite::Users.new(client) + +response = users.update_prefs(user_id: '[USER_ID]', prefs: {}) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/users/update-status.md b/docs/examples/0.14.x/server-ruby/examples/users/update-status.md new file mode 100644 index 0000000000..4ff25309ef --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/users/update-status.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Appwrite::Users.new(client) + +response = users.update_status(user_id: '[USER_ID]', status: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/users/update-verification.md b/docs/examples/0.14.x/server-ruby/examples/users/update-verification.md new file mode 100644 index 0000000000..714eeec218 --- /dev/null +++ b/docs/examples/0.14.x/server-ruby/examples/users/update-verification.md @@ -0,0 +1,14 @@ +require 'appwrite' + +client = Appwrite::Client.new + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key + +users = Appwrite::Users.new(client) + +response = users.update_verification(user_id: '[USER_ID]', email_verification: false) + +puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-swift/examples/account/create-recovery.md b/docs/examples/0.14.x/server-swift/examples/account/create-recovery.md new file mode 100644 index 0000000000..e0048ea302 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/account/create-recovery.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + let account = Account(client) + let token = try await account.createRecovery( + email: "email@example.com", + url: "https://example.com" + ) + + print(String(describing: token) +} diff --git a/docs/examples/0.14.x/server-swift/examples/account/create-verification.md b/docs/examples/0.14.x/server-swift/examples/account/create-verification.md new file mode 100644 index 0000000000..530dc6638d --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/account/create-verification.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + let account = Account(client) + let token = try await account.createVerification( + url: "https://example.com" + ) + + print(String(describing: token) +} diff --git a/docs/examples/0.14.x/server-swift/examples/account/delete-session.md b/docs/examples/0.14.x/server-swift/examples/account/delete-session.md new file mode 100644 index 0000000000..38cdf4ac38 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/account/delete-session.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + let account = Account(client) + let result = try await account.deleteSession( + sessionId: "[SESSION_ID]" + ) + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/server-swift/examples/account/delete-sessions.md b/docs/examples/0.14.x/server-swift/examples/account/delete-sessions.md new file mode 100644 index 0000000000..3ea9dc10d8 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/account/delete-sessions.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + let account = Account(client) + let result = try await account.deleteSessions() + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/server-swift/examples/account/get-logs.md b/docs/examples/0.14.x/server-swift/examples/account/get-logs.md new file mode 100644 index 0000000000..ef45c16fb5 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/account/get-logs.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + let account = Account(client) + let logList = try await account.getLogs() + + print(String(describing: logList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/account/get-prefs.md b/docs/examples/0.14.x/server-swift/examples/account/get-prefs.md new file mode 100644 index 0000000000..1585b2b940 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/account/get-prefs.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + let account = Account(client) + let preferences = try await account.getPrefs() + + print(String(describing: preferences) +} diff --git a/docs/examples/0.14.x/server-swift/examples/account/get-session.md b/docs/examples/0.14.x/server-swift/examples/account/get-session.md new file mode 100644 index 0000000000..d21b42a702 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/account/get-session.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + let account = Account(client) + let session = try await account.getSession( + sessionId: "[SESSION_ID]" + ) + + print(String(describing: session) +} diff --git a/docs/examples/0.14.x/server-swift/examples/account/get-sessions.md b/docs/examples/0.14.x/server-swift/examples/account/get-sessions.md new file mode 100644 index 0000000000..279657d2da --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/account/get-sessions.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + let account = Account(client) + let sessionList = try await account.getSessions() + + print(String(describing: sessionList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/account/get.md b/docs/examples/0.14.x/server-swift/examples/account/get.md new file mode 100644 index 0000000000..cd5e53f2d9 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/account/get.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + let account = Account(client) + let user = try await account.get() + + print(String(describing: user) +} diff --git a/docs/examples/0.14.x/server-swift/examples/account/update-email.md b/docs/examples/0.14.x/server-swift/examples/account/update-email.md new file mode 100644 index 0000000000..82c0fc3a4f --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/account/update-email.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + let account = Account(client) + let user = try await account.updateEmail( + email: "email@example.com", + password: "password" + ) + + print(String(describing: user) +} diff --git a/docs/examples/0.14.x/server-swift/examples/account/update-name.md b/docs/examples/0.14.x/server-swift/examples/account/update-name.md new file mode 100644 index 0000000000..ce1c35d606 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/account/update-name.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + let account = Account(client) + let user = try await account.updateName( + name: "[NAME]" + ) + + print(String(describing: user) +} diff --git a/docs/examples/0.14.x/server-swift/examples/account/update-password.md b/docs/examples/0.14.x/server-swift/examples/account/update-password.md new file mode 100644 index 0000000000..188610bcbe --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/account/update-password.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + let account = Account(client) + let user = try await account.updatePassword( + password: "password" + ) + + print(String(describing: user) +} diff --git a/docs/examples/0.14.x/server-swift/examples/account/update-prefs.md b/docs/examples/0.14.x/server-swift/examples/account/update-prefs.md new file mode 100644 index 0000000000..95de4632dd --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/account/update-prefs.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + let account = Account(client) + let user = try await account.updatePrefs( + prefs: + ) + + print(String(describing: user) +} diff --git a/docs/examples/0.14.x/server-swift/examples/account/update-recovery.md b/docs/examples/0.14.x/server-swift/examples/account/update-recovery.md new file mode 100644 index 0000000000..2814bf124f --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/account/update-recovery.md @@ -0,0 +1,17 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + let account = Account(client) + let token = try await account.updateRecovery( + userId: "[USER_ID]", + secret: "[SECRET]", + password: "password", + passwordAgain: "password" + ) + + print(String(describing: token) +} diff --git a/docs/examples/0.14.x/server-swift/examples/account/update-session.md b/docs/examples/0.14.x/server-swift/examples/account/update-session.md new file mode 100644 index 0000000000..8ce9c3ce79 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/account/update-session.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + let account = Account(client) + let session = try await account.updateSession( + sessionId: "[SESSION_ID]" + ) + + print(String(describing: session) +} diff --git a/docs/examples/0.14.x/server-swift/examples/account/update-status.md b/docs/examples/0.14.x/server-swift/examples/account/update-status.md new file mode 100644 index 0000000000..7ec39466f8 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/account/update-status.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + let account = Account(client) + let user = try await account.updateStatus() + + print(String(describing: user) +} diff --git a/docs/examples/0.14.x/server-swift/examples/account/update-verification.md b/docs/examples/0.14.x/server-swift/examples/account/update-verification.md new file mode 100644 index 0000000000..b8255614e6 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/account/update-verification.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + let account = Account(client) + let token = try await account.updateVerification( + userId: "[USER_ID]", + secret: "[SECRET]" + ) + + print(String(describing: token) +} diff --git a/docs/examples/0.14.x/server-swift/examples/avatars/get-browser.md b/docs/examples/0.14.x/server-swift/examples/avatars/get-browser.md new file mode 100644 index 0000000000..fe5be8cfa4 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/avatars/get-browser.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let avatars = Avatars(client) + let byteBuffer = try await avatars.getBrowser( + code: "aa" + ) + + print(String(describing: byteBuffer) +} diff --git a/docs/examples/0.14.x/server-swift/examples/avatars/get-credit-card.md b/docs/examples/0.14.x/server-swift/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..ad5296d06c --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/avatars/get-credit-card.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let avatars = Avatars(client) + let byteBuffer = try await avatars.getCreditCard( + code: "amex" + ) + + print(String(describing: byteBuffer) +} diff --git a/docs/examples/0.14.x/server-swift/examples/avatars/get-favicon.md b/docs/examples/0.14.x/server-swift/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..c7cdfa7142 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/avatars/get-favicon.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let avatars = Avatars(client) + let byteBuffer = try await avatars.getFavicon( + url: "https://example.com" + ) + + print(String(describing: byteBuffer) +} diff --git a/docs/examples/0.14.x/server-swift/examples/avatars/get-flag.md b/docs/examples/0.14.x/server-swift/examples/avatars/get-flag.md new file mode 100644 index 0000000000..7e8e94b4c5 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/avatars/get-flag.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let avatars = Avatars(client) + let byteBuffer = try await avatars.getFlag( + code: "af" + ) + + print(String(describing: byteBuffer) +} diff --git a/docs/examples/0.14.x/server-swift/examples/avatars/get-image.md b/docs/examples/0.14.x/server-swift/examples/avatars/get-image.md new file mode 100644 index 0000000000..63ba881d4b --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/avatars/get-image.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let avatars = Avatars(client) + let byteBuffer = try await avatars.getImage( + url: "https://example.com" + ) + + print(String(describing: byteBuffer) +} diff --git a/docs/examples/0.14.x/server-swift/examples/avatars/get-initials.md b/docs/examples/0.14.x/server-swift/examples/avatars/get-initials.md new file mode 100644 index 0000000000..e783f5b47d --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/avatars/get-initials.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let avatars = Avatars(client) + let byteBuffer = try await avatars.getInitials() + + print(String(describing: byteBuffer) +} diff --git a/docs/examples/0.14.x/server-swift/examples/avatars/get-q-r.md b/docs/examples/0.14.x/server-swift/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..ae8d51c0a3 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/avatars/get-q-r.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let avatars = Avatars(client) + let byteBuffer = try await avatars.getQR( + text: "[TEXT]" + ) + + print(String(describing: byteBuffer) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/create-boolean-attribute.md b/docs/examples/0.14.x/server-swift/examples/database/create-boolean-attribute.md new file mode 100644 index 0000000000..1a59923305 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/create-boolean-attribute.md @@ -0,0 +1,16 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let attributeBoolean = try await database.createBooleanAttribute( + collectionId: "[COLLECTION_ID]", + key: "", + required: xfalse + ) + + print(String(describing: attributeBoolean) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/create-collection.md b/docs/examples/0.14.x/server-swift/examples/database/create-collection.md new file mode 100644 index 0000000000..4c5e2987a5 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/create-collection.md @@ -0,0 +1,18 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let collection = try await database.createCollection( + collectionId: "[COLLECTION_ID]", + name: "[NAME]", + permission: "document", + read: ["role:all"], + write: ["role:all"] + ) + + print(String(describing: collection) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/create-document.md b/docs/examples/0.14.x/server-swift/examples/database/create-document.md new file mode 100644 index 0000000000..c2b4c47759 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/create-document.md @@ -0,0 +1,16 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let document = try await database.createDocument( + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]", + data: + ) + + print(String(describing: document) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/create-email-attribute.md b/docs/examples/0.14.x/server-swift/examples/database/create-email-attribute.md new file mode 100644 index 0000000000..90ce11c6e4 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/create-email-attribute.md @@ -0,0 +1,16 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let attributeEmail = try await database.createEmailAttribute( + collectionId: "[COLLECTION_ID]", + key: "", + required: xfalse + ) + + print(String(describing: attributeEmail) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/create-enum-attribute.md b/docs/examples/0.14.x/server-swift/examples/database/create-enum-attribute.md new file mode 100644 index 0000000000..6595e2b002 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/create-enum-attribute.md @@ -0,0 +1,17 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let attributeEnum = try await database.createEnumAttribute( + collectionId: "[COLLECTION_ID]", + key: "", + elements: [], + required: xfalse + ) + + print(String(describing: attributeEnum) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/create-float-attribute.md b/docs/examples/0.14.x/server-swift/examples/database/create-float-attribute.md new file mode 100644 index 0000000000..573e201648 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/create-float-attribute.md @@ -0,0 +1,16 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let attributeFloat = try await database.createFloatAttribute( + collectionId: "[COLLECTION_ID]", + key: "", + required: xfalse + ) + + print(String(describing: attributeFloat) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/create-index.md b/docs/examples/0.14.x/server-swift/examples/database/create-index.md new file mode 100644 index 0000000000..0ee0ceb9a0 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/create-index.md @@ -0,0 +1,17 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let index = try await database.createIndex( + collectionId: "[COLLECTION_ID]", + key: "", + type: "key", + attributes: [] + ) + + print(String(describing: index) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/create-integer-attribute.md b/docs/examples/0.14.x/server-swift/examples/database/create-integer-attribute.md new file mode 100644 index 0000000000..a893203994 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/create-integer-attribute.md @@ -0,0 +1,16 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let attributeInteger = try await database.createIntegerAttribute( + collectionId: "[COLLECTION_ID]", + key: "", + required: xfalse + ) + + print(String(describing: attributeInteger) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/create-ip-attribute.md b/docs/examples/0.14.x/server-swift/examples/database/create-ip-attribute.md new file mode 100644 index 0000000000..26b14ab126 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/create-ip-attribute.md @@ -0,0 +1,16 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let attributeIp = try await database.createIpAttribute( + collectionId: "[COLLECTION_ID]", + key: "", + required: xfalse + ) + + print(String(describing: attributeIp) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/create-string-attribute.md b/docs/examples/0.14.x/server-swift/examples/database/create-string-attribute.md new file mode 100644 index 0000000000..126415bac0 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/create-string-attribute.md @@ -0,0 +1,17 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let attributeString = try await database.createStringAttribute( + collectionId: "[COLLECTION_ID]", + key: "", + size: 1, + required: xfalse + ) + + print(String(describing: attributeString) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/create-url-attribute.md b/docs/examples/0.14.x/server-swift/examples/database/create-url-attribute.md new file mode 100644 index 0000000000..24d7f668af --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/create-url-attribute.md @@ -0,0 +1,16 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let attributeUrl = try await database.createUrlAttribute( + collectionId: "[COLLECTION_ID]", + key: "", + required: xfalse + ) + + print(String(describing: attributeUrl) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/delete-attribute.md b/docs/examples/0.14.x/server-swift/examples/database/delete-attribute.md new file mode 100644 index 0000000000..1202fd4147 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/delete-attribute.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let result = try await database.deleteAttribute( + collectionId: "[COLLECTION_ID]", + key: "" + ) + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/delete-collection.md b/docs/examples/0.14.x/server-swift/examples/database/delete-collection.md new file mode 100644 index 0000000000..63c7261758 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/delete-collection.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let result = try await database.deleteCollection( + collectionId: "[COLLECTION_ID]" + ) + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/delete-document.md b/docs/examples/0.14.x/server-swift/examples/database/delete-document.md new file mode 100644 index 0000000000..d481ca5828 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/delete-document.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let result = try await database.deleteDocument( + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]" + ) + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/delete-index.md b/docs/examples/0.14.x/server-swift/examples/database/delete-index.md new file mode 100644 index 0000000000..317de6a3df --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/delete-index.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let result = try await database.deleteIndex( + collectionId: "[COLLECTION_ID]", + key: "" + ) + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/get-attribute.md b/docs/examples/0.14.x/server-swift/examples/database/get-attribute.md new file mode 100644 index 0000000000..9bcbf53f61 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/get-attribute.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let result = try await database.getAttribute( + collectionId: "[COLLECTION_ID]", + key: "" + ) + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/get-collection.md b/docs/examples/0.14.x/server-swift/examples/database/get-collection.md new file mode 100644 index 0000000000..08206a8241 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/get-collection.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let collection = try await database.getCollection( + collectionId: "[COLLECTION_ID]" + ) + + print(String(describing: collection) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/get-document.md b/docs/examples/0.14.x/server-swift/examples/database/get-document.md new file mode 100644 index 0000000000..f10b7da615 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/get-document.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let document = try await database.getDocument( + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]" + ) + + print(String(describing: document) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/get-index.md b/docs/examples/0.14.x/server-swift/examples/database/get-index.md new file mode 100644 index 0000000000..c7ef827359 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/get-index.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let index = try await database.getIndex( + collectionId: "[COLLECTION_ID]", + key: "" + ) + + print(String(describing: index) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/list-attributes.md b/docs/examples/0.14.x/server-swift/examples/database/list-attributes.md new file mode 100644 index 0000000000..d51bb9577b --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/list-attributes.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let attributeList = try await database.listAttributes( + collectionId: "[COLLECTION_ID]" + ) + + print(String(describing: attributeList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/list-collections.md b/docs/examples/0.14.x/server-swift/examples/database/list-collections.md new file mode 100644 index 0000000000..87dc2386ed --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/list-collections.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let collectionList = try await database.listCollections() + + print(String(describing: collectionList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/list-documents.md b/docs/examples/0.14.x/server-swift/examples/database/list-documents.md new file mode 100644 index 0000000000..27c32f5e27 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/list-documents.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let documentList = try await database.listDocuments( + collectionId: "[COLLECTION_ID]" + ) + + print(String(describing: documentList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/list-indexes.md b/docs/examples/0.14.x/server-swift/examples/database/list-indexes.md new file mode 100644 index 0000000000..6210d6f79c --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/list-indexes.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let indexList = try await database.listIndexes( + collectionId: "[COLLECTION_ID]" + ) + + print(String(describing: indexList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/update-collection.md b/docs/examples/0.14.x/server-swift/examples/database/update-collection.md new file mode 100644 index 0000000000..817be46374 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/update-collection.md @@ -0,0 +1,16 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let collection = try await database.updateCollection( + collectionId: "[COLLECTION_ID]", + name: "[NAME]", + permission: "document" + ) + + print(String(describing: collection) +} diff --git a/docs/examples/0.14.x/server-swift/examples/database/update-document.md b/docs/examples/0.14.x/server-swift/examples/database/update-document.md new file mode 100644 index 0000000000..82222ddb20 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/database/update-document.md @@ -0,0 +1,16 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let database = Database(client) + let document = try await database.updateDocument( + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]", + data: + ) + + print(String(describing: document) +} diff --git a/docs/examples/0.14.x/server-swift/examples/functions/create-deployment.md b/docs/examples/0.14.x/server-swift/examples/functions/create-deployment.md new file mode 100644 index 0000000000..9e580fe807 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/functions/create-deployment.md @@ -0,0 +1,17 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let functions = Functions(client) + let deployment = try await functions.createDeployment( + functionId: "[FUNCTION_ID]", + entrypoint: "[ENTRYPOINT]", + code: File(name: "image.jpg", buffer: yourByteBuffer), + activate: xfalse + ) + + print(String(describing: deployment) +} diff --git a/docs/examples/0.14.x/server-swift/examples/functions/create-execution.md b/docs/examples/0.14.x/server-swift/examples/functions/create-execution.md new file mode 100644 index 0000000000..02dde0c312 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/functions/create-execution.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let functions = Functions(client) + let execution = try await functions.createExecution( + functionId: "[FUNCTION_ID]" + ) + + print(String(describing: execution) +} diff --git a/docs/examples/0.14.x/server-swift/examples/functions/create.md b/docs/examples/0.14.x/server-swift/examples/functions/create.md new file mode 100644 index 0000000000..e6775116f3 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/functions/create.md @@ -0,0 +1,17 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let functions = Functions(client) + let function = try await functions.create( + functionId: "[FUNCTION_ID]", + name: "[NAME]", + execute: [], + runtime: "node-14.5" + ) + + print(String(describing: function) +} diff --git a/docs/examples/0.14.x/server-swift/examples/functions/delete-deployment.md b/docs/examples/0.14.x/server-swift/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..322c52b7ed --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/functions/delete-deployment.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let functions = Functions(client) + let result = try await functions.deleteDeployment( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]" + ) + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/server-swift/examples/functions/delete.md b/docs/examples/0.14.x/server-swift/examples/functions/delete.md new file mode 100644 index 0000000000..c5628163da --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/functions/delete.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let functions = Functions(client) + let result = try await functions.delete( + functionId: "[FUNCTION_ID]" + ) + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/server-swift/examples/functions/get-deployment.md b/docs/examples/0.14.x/server-swift/examples/functions/get-deployment.md new file mode 100644 index 0000000000..897d5315d2 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/functions/get-deployment.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let functions = Functions(client) + let deploymentList = try await functions.getDeployment( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]" + ) + + print(String(describing: deploymentList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/functions/get-execution.md b/docs/examples/0.14.x/server-swift/examples/functions/get-execution.md new file mode 100644 index 0000000000..d5bcf092ac --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/functions/get-execution.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let functions = Functions(client) + let execution = try await functions.getExecution( + functionId: "[FUNCTION_ID]", + executionId: "[EXECUTION_ID]" + ) + + print(String(describing: execution) +} diff --git a/docs/examples/0.14.x/server-swift/examples/functions/get.md b/docs/examples/0.14.x/server-swift/examples/functions/get.md new file mode 100644 index 0000000000..6675916a47 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/functions/get.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let functions = Functions(client) + let function = try await functions.get( + functionId: "[FUNCTION_ID]" + ) + + print(String(describing: function) +} diff --git a/docs/examples/0.14.x/server-swift/examples/functions/list-deployments.md b/docs/examples/0.14.x/server-swift/examples/functions/list-deployments.md new file mode 100644 index 0000000000..fce719736a --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/functions/list-deployments.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let functions = Functions(client) + let deploymentList = try await functions.listDeployments( + functionId: "[FUNCTION_ID]" + ) + + print(String(describing: deploymentList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/functions/list-executions.md b/docs/examples/0.14.x/server-swift/examples/functions/list-executions.md new file mode 100644 index 0000000000..95d27cbc05 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/functions/list-executions.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let functions = Functions(client) + let executionList = try await functions.listExecutions( + functionId: "[FUNCTION_ID]" + ) + + print(String(describing: executionList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/functions/list-runtimes.md b/docs/examples/0.14.x/server-swift/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..e87ad2c46c --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/functions/list-runtimes.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let functions = Functions(client) + let runtimeList = try await functions.listRuntimes() + + print(String(describing: runtimeList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/functions/list.md b/docs/examples/0.14.x/server-swift/examples/functions/list.md new file mode 100644 index 0000000000..695350d95a --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/functions/list.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let functions = Functions(client) + let functionList = try await functions.list() + + print(String(describing: functionList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/functions/retry-build.md b/docs/examples/0.14.x/server-swift/examples/functions/retry-build.md new file mode 100644 index 0000000000..ba995313c5 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/functions/retry-build.md @@ -0,0 +1,16 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let functions = Functions(client) + let result = try await functions.retryBuild( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]", + buildId: "[BUILD_ID]" + ) + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/server-swift/examples/functions/update-deployment.md b/docs/examples/0.14.x/server-swift/examples/functions/update-deployment.md new file mode 100644 index 0000000000..37d8cbb8fd --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/functions/update-deployment.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let functions = Functions(client) + let function = try await functions.updateDeployment( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]" + ) + + print(String(describing: function) +} diff --git a/docs/examples/0.14.x/server-swift/examples/functions/update.md b/docs/examples/0.14.x/server-swift/examples/functions/update.md new file mode 100644 index 0000000000..7a7e5ed6d0 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/functions/update.md @@ -0,0 +1,16 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let functions = Functions(client) + let function = try await functions.update( + functionId: "[FUNCTION_ID]", + name: "[NAME]", + execute: [] + ) + + print(String(describing: function) +} diff --git a/docs/examples/0.14.x/server-swift/examples/health/get-antivirus.md b/docs/examples/0.14.x/server-swift/examples/health/get-antivirus.md new file mode 100644 index 0000000000..3eafa2c2f1 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/health/get-antivirus.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let health = Health(client) + let healthAntivirus = try await health.getAntivirus() + + print(String(describing: healthAntivirus) +} diff --git a/docs/examples/0.14.x/server-swift/examples/health/get-cache.md b/docs/examples/0.14.x/server-swift/examples/health/get-cache.md new file mode 100644 index 0000000000..20831b4d39 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/health/get-cache.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let health = Health(client) + let healthStatus = try await health.getCache() + + print(String(describing: healthStatus) +} diff --git a/docs/examples/0.14.x/server-swift/examples/health/get-d-b.md b/docs/examples/0.14.x/server-swift/examples/health/get-d-b.md new file mode 100644 index 0000000000..5808c99a73 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/health/get-d-b.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let health = Health(client) + let healthStatus = try await health.getDB() + + print(String(describing: healthStatus) +} diff --git a/docs/examples/0.14.x/server-swift/examples/health/get-queue-certificates.md b/docs/examples/0.14.x/server-swift/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..123b452f99 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/health/get-queue-certificates.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let health = Health(client) + let healthQueue = try await health.getQueueCertificates() + + print(String(describing: healthQueue) +} diff --git a/docs/examples/0.14.x/server-swift/examples/health/get-queue-functions.md b/docs/examples/0.14.x/server-swift/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..c3949a769c --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/health/get-queue-functions.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let health = Health(client) + let healthQueue = try await health.getQueueFunctions() + + print(String(describing: healthQueue) +} diff --git a/docs/examples/0.14.x/server-swift/examples/health/get-queue-logs.md b/docs/examples/0.14.x/server-swift/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..6a36fa966c --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/health/get-queue-logs.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let health = Health(client) + let healthQueue = try await health.getQueueLogs() + + print(String(describing: healthQueue) +} diff --git a/docs/examples/0.14.x/server-swift/examples/health/get-queue-webhooks.md b/docs/examples/0.14.x/server-swift/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..bc6b7bcb14 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/health/get-queue-webhooks.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let health = Health(client) + let healthQueue = try await health.getQueueWebhooks() + + print(String(describing: healthQueue) +} diff --git a/docs/examples/0.14.x/server-swift/examples/health/get-storage-local.md b/docs/examples/0.14.x/server-swift/examples/health/get-storage-local.md new file mode 100644 index 0000000000..773d8dd483 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/health/get-storage-local.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let health = Health(client) + let healthStatus = try await health.getStorageLocal() + + print(String(describing: healthStatus) +} diff --git a/docs/examples/0.14.x/server-swift/examples/health/get-time.md b/docs/examples/0.14.x/server-swift/examples/health/get-time.md new file mode 100644 index 0000000000..edbc171ea9 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/health/get-time.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let health = Health(client) + let healthTime = try await health.getTime() + + print(String(describing: healthTime) +} diff --git a/docs/examples/0.14.x/server-swift/examples/health/get.md b/docs/examples/0.14.x/server-swift/examples/health/get.md new file mode 100644 index 0000000000..770c09aa66 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/health/get.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let health = Health(client) + let healthStatus = try await health.get() + + print(String(describing: healthStatus) +} diff --git a/docs/examples/0.14.x/server-swift/examples/locale/get-continents.md b/docs/examples/0.14.x/server-swift/examples/locale/get-continents.md new file mode 100644 index 0000000000..a7f89e0176 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/locale/get-continents.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let locale = Locale(client) + let continentList = try await locale.getContinents() + + print(String(describing: continentList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/locale/get-countries-e-u.md b/docs/examples/0.14.x/server-swift/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..f357bd3990 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/locale/get-countries-e-u.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let locale = Locale(client) + let countryList = try await locale.getCountriesEU() + + print(String(describing: countryList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/locale/get-countries-phones.md b/docs/examples/0.14.x/server-swift/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..052caa1dda --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/locale/get-countries-phones.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let locale = Locale(client) + let phoneList = try await locale.getCountriesPhones() + + print(String(describing: phoneList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/locale/get-countries.md b/docs/examples/0.14.x/server-swift/examples/locale/get-countries.md new file mode 100644 index 0000000000..3e37c4b22b --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/locale/get-countries.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let locale = Locale(client) + let countryList = try await locale.getCountries() + + print(String(describing: countryList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/locale/get-currencies.md b/docs/examples/0.14.x/server-swift/examples/locale/get-currencies.md new file mode 100644 index 0000000000..a548db9b2e --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/locale/get-currencies.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let locale = Locale(client) + let currencyList = try await locale.getCurrencies() + + print(String(describing: currencyList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/locale/get-languages.md b/docs/examples/0.14.x/server-swift/examples/locale/get-languages.md new file mode 100644 index 0000000000..23d9b44245 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/locale/get-languages.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let locale = Locale(client) + let languageList = try await locale.getLanguages() + + print(String(describing: languageList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/locale/get.md b/docs/examples/0.14.x/server-swift/examples/locale/get.md new file mode 100644 index 0000000000..fd0a9dd1e7 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/locale/get.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let locale = Locale(client) + let locale = try await locale.get() + + print(String(describing: locale) +} diff --git a/docs/examples/0.14.x/server-swift/examples/storage/create-bucket.md b/docs/examples/0.14.x/server-swift/examples/storage/create-bucket.md new file mode 100644 index 0000000000..d930c56b65 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/storage/create-bucket.md @@ -0,0 +1,16 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let storage = Storage(client) + let bucket = try await storage.createBucket( + bucketId: "[BUCKET_ID]", + name: "[NAME]", + permission: "file" + ) + + print(String(describing: bucket) +} diff --git a/docs/examples/0.14.x/server-swift/examples/storage/create-file.md b/docs/examples/0.14.x/server-swift/examples/storage/create-file.md new file mode 100644 index 0000000000..e55bca79a1 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/storage/create-file.md @@ -0,0 +1,16 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let storage = Storage(client) + let file = try await storage.createFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]", + file: File(name: "image.jpg", buffer: yourByteBuffer) + ) + + print(String(describing: file) +} diff --git a/docs/examples/0.14.x/server-swift/examples/storage/delete-bucket.md b/docs/examples/0.14.x/server-swift/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..18687fb278 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/storage/delete-bucket.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let storage = Storage(client) + let result = try await storage.deleteBucket( + bucketId: "[BUCKET_ID]" + ) + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/server-swift/examples/storage/delete-file.md b/docs/examples/0.14.x/server-swift/examples/storage/delete-file.md new file mode 100644 index 0000000000..305d6e1d81 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/storage/delete-file.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let storage = Storage(client) + let result = try await storage.deleteFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/server-swift/examples/storage/get-bucket.md b/docs/examples/0.14.x/server-swift/examples/storage/get-bucket.md new file mode 100644 index 0000000000..f04e2db3c9 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/storage/get-bucket.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let storage = Storage(client) + let bucket = try await storage.getBucket( + bucketId: "[BUCKET_ID]" + ) + + print(String(describing: bucket) +} diff --git a/docs/examples/0.14.x/server-swift/examples/storage/get-file-download.md b/docs/examples/0.14.x/server-swift/examples/storage/get-file-download.md new file mode 100644 index 0000000000..28c427c620 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/storage/get-file-download.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let storage = Storage(client) + let byteBuffer = try await storage.getFileDownload( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) + + print(String(describing: byteBuffer) +} diff --git a/docs/examples/0.14.x/server-swift/examples/storage/get-file-preview.md b/docs/examples/0.14.x/server-swift/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..20b87191e1 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/storage/get-file-preview.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let storage = Storage(client) + let byteBuffer = try await storage.getFilePreview( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) + + print(String(describing: byteBuffer) +} diff --git a/docs/examples/0.14.x/server-swift/examples/storage/get-file-view.md b/docs/examples/0.14.x/server-swift/examples/storage/get-file-view.md new file mode 100644 index 0000000000..a17fba0a14 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/storage/get-file-view.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let storage = Storage(client) + let byteBuffer = try await storage.getFileView( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) + + print(String(describing: byteBuffer) +} diff --git a/docs/examples/0.14.x/server-swift/examples/storage/get-file.md b/docs/examples/0.14.x/server-swift/examples/storage/get-file.md new file mode 100644 index 0000000000..6b02fcd0ee --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/storage/get-file.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let storage = Storage(client) + let file = try await storage.getFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) + + print(String(describing: file) +} diff --git a/docs/examples/0.14.x/server-swift/examples/storage/list-buckets.md b/docs/examples/0.14.x/server-swift/examples/storage/list-buckets.md new file mode 100644 index 0000000000..361ef626b5 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/storage/list-buckets.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let storage = Storage(client) + let bucketList = try await storage.listBuckets() + + print(String(describing: bucketList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/storage/list-files.md b/docs/examples/0.14.x/server-swift/examples/storage/list-files.md new file mode 100644 index 0000000000..68a6ca40c4 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/storage/list-files.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let storage = Storage(client) + let fileList = try await storage.listFiles( + bucketId: "[BUCKET_ID]" + ) + + print(String(describing: fileList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/storage/update-bucket.md b/docs/examples/0.14.x/server-swift/examples/storage/update-bucket.md new file mode 100644 index 0000000000..259ac6ad64 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/storage/update-bucket.md @@ -0,0 +1,16 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let storage = Storage(client) + let bucket = try await storage.updateBucket( + bucketId: "[BUCKET_ID]", + name: "[NAME]", + permission: "file" + ) + + print(String(describing: bucket) +} diff --git a/docs/examples/0.14.x/server-swift/examples/storage/update-file.md b/docs/examples/0.14.x/server-swift/examples/storage/update-file.md new file mode 100644 index 0000000000..12f8150085 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/storage/update-file.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let storage = Storage(client) + let file = try await storage.updateFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]" + ) + + print(String(describing: file) +} diff --git a/docs/examples/0.14.x/server-swift/examples/teams/create-membership.md b/docs/examples/0.14.x/server-swift/examples/teams/create-membership.md new file mode 100644 index 0000000000..a732ec676a --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/teams/create-membership.md @@ -0,0 +1,17 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let teams = Teams(client) + let membership = try await teams.createMembership( + teamId: "[TEAM_ID]", + email: "email@example.com", + roles: [], + url: "https://example.com" + ) + + print(String(describing: membership) +} diff --git a/docs/examples/0.14.x/server-swift/examples/teams/create.md b/docs/examples/0.14.x/server-swift/examples/teams/create.md new file mode 100644 index 0000000000..80edd0cadc --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/teams/create.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let teams = Teams(client) + let team = try await teams.create( + teamId: "[TEAM_ID]", + name: "[NAME]" + ) + + print(String(describing: team) +} diff --git a/docs/examples/0.14.x/server-swift/examples/teams/delete-membership.md b/docs/examples/0.14.x/server-swift/examples/teams/delete-membership.md new file mode 100644 index 0000000000..84f3157550 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/teams/delete-membership.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let teams = Teams(client) + let result = try await teams.deleteMembership( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]" + ) + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/server-swift/examples/teams/delete.md b/docs/examples/0.14.x/server-swift/examples/teams/delete.md new file mode 100644 index 0000000000..d8808a6565 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/teams/delete.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let teams = Teams(client) + let result = try await teams.delete( + teamId: "[TEAM_ID]" + ) + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/server-swift/examples/teams/get-membership.md b/docs/examples/0.14.x/server-swift/examples/teams/get-membership.md new file mode 100644 index 0000000000..b85d7dc0de --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/teams/get-membership.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let teams = Teams(client) + let membershipList = try await teams.getMembership( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]" + ) + + print(String(describing: membershipList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/teams/get-memberships.md b/docs/examples/0.14.x/server-swift/examples/teams/get-memberships.md new file mode 100644 index 0000000000..06ca6761eb --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/teams/get-memberships.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let teams = Teams(client) + let membershipList = try await teams.getMemberships( + teamId: "[TEAM_ID]" + ) + + print(String(describing: membershipList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/teams/get.md b/docs/examples/0.14.x/server-swift/examples/teams/get.md new file mode 100644 index 0000000000..d1c4500442 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/teams/get.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let teams = Teams(client) + let team = try await teams.get( + teamId: "[TEAM_ID]" + ) + + print(String(describing: team) +} diff --git a/docs/examples/0.14.x/server-swift/examples/teams/list.md b/docs/examples/0.14.x/server-swift/examples/teams/list.md new file mode 100644 index 0000000000..3a9fa822ae --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/teams/list.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let teams = Teams(client) + let teamList = try await teams.list() + + print(String(describing: teamList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/teams/update-membership-roles.md b/docs/examples/0.14.x/server-swift/examples/teams/update-membership-roles.md new file mode 100644 index 0000000000..fd0084786a --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/teams/update-membership-roles.md @@ -0,0 +1,16 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let teams = Teams(client) + let membership = try await teams.updateMembershipRoles( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]", + roles: [] + ) + + print(String(describing: membership) +} diff --git a/docs/examples/0.14.x/server-swift/examples/teams/update-membership-status.md b/docs/examples/0.14.x/server-swift/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..4b6f3eda43 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/teams/update-membership-status.md @@ -0,0 +1,17 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token + let teams = Teams(client) + let membership = try await teams.updateMembershipStatus( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]", + userId: "[USER_ID]", + secret: "[SECRET]" + ) + + print(String(describing: membership) +} diff --git a/docs/examples/0.14.x/server-swift/examples/teams/update.md b/docs/examples/0.14.x/server-swift/examples/teams/update.md new file mode 100644 index 0000000000..683dfd4e30 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/teams/update.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let teams = Teams(client) + let team = try await teams.update( + teamId: "[TEAM_ID]", + name: "[NAME]" + ) + + print(String(describing: team) +} diff --git a/docs/examples/0.14.x/server-swift/examples/users/create.md b/docs/examples/0.14.x/server-swift/examples/users/create.md new file mode 100644 index 0000000000..8aa45d4e3a --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/users/create.md @@ -0,0 +1,16 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let users = Users(client) + let user = try await users.create( + userId: "[USER_ID]", + email: "email@example.com", + password: "password" + ) + + print(String(describing: user) +} diff --git a/docs/examples/0.14.x/server-swift/examples/users/delete-session.md b/docs/examples/0.14.x/server-swift/examples/users/delete-session.md new file mode 100644 index 0000000000..50cbf470d3 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/users/delete-session.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let users = Users(client) + let result = try await users.deleteSession( + userId: "[USER_ID]", + sessionId: "[SESSION_ID]" + ) + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/server-swift/examples/users/delete-sessions.md b/docs/examples/0.14.x/server-swift/examples/users/delete-sessions.md new file mode 100644 index 0000000000..a8b7802577 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/users/delete-sessions.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let users = Users(client) + let result = try await users.deleteSessions( + userId: "[USER_ID]" + ) + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/server-swift/examples/users/delete.md b/docs/examples/0.14.x/server-swift/examples/users/delete.md new file mode 100644 index 0000000000..f970492afa --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/users/delete.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let users = Users(client) + let result = try await users.delete( + userId: "[USER_ID]" + ) + + print(String(describing: result) +} diff --git a/docs/examples/0.14.x/server-swift/examples/users/get-logs.md b/docs/examples/0.14.x/server-swift/examples/users/get-logs.md new file mode 100644 index 0000000000..62554054ed --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/users/get-logs.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let users = Users(client) + let logList = try await users.getLogs( + userId: "[USER_ID]" + ) + + print(String(describing: logList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/users/get-memberships.md b/docs/examples/0.14.x/server-swift/examples/users/get-memberships.md new file mode 100644 index 0000000000..b1343c7439 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/users/get-memberships.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let users = Users(client) + let membershipList = try await users.getMemberships( + userId: "[USER_ID]" + ) + + print(String(describing: membershipList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/users/get-prefs.md b/docs/examples/0.14.x/server-swift/examples/users/get-prefs.md new file mode 100644 index 0000000000..d664dbbb0d --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/users/get-prefs.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let users = Users(client) + let preferences = try await users.getPrefs( + userId: "[USER_ID]" + ) + + print(String(describing: preferences) +} diff --git a/docs/examples/0.14.x/server-swift/examples/users/get-sessions.md b/docs/examples/0.14.x/server-swift/examples/users/get-sessions.md new file mode 100644 index 0000000000..dc37960c32 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/users/get-sessions.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let users = Users(client) + let sessionList = try await users.getSessions( + userId: "[USER_ID]" + ) + + print(String(describing: sessionList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/users/get.md b/docs/examples/0.14.x/server-swift/examples/users/get.md new file mode 100644 index 0000000000..dc57a924ba --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/users/get.md @@ -0,0 +1,14 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let users = Users(client) + let user = try await users.get( + userId: "[USER_ID]" + ) + + print(String(describing: user) +} diff --git a/docs/examples/0.14.x/server-swift/examples/users/list.md b/docs/examples/0.14.x/server-swift/examples/users/list.md new file mode 100644 index 0000000000..7ea73d0515 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/users/list.md @@ -0,0 +1,12 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let users = Users(client) + let userList = try await users.list() + + print(String(describing: userList) +} diff --git a/docs/examples/0.14.x/server-swift/examples/users/update-email.md b/docs/examples/0.14.x/server-swift/examples/users/update-email.md new file mode 100644 index 0000000000..602191c6f0 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/users/update-email.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let users = Users(client) + let user = try await users.updateEmail( + userId: "[USER_ID]", + email: "email@example.com" + ) + + print(String(describing: user) +} diff --git a/docs/examples/0.14.x/server-swift/examples/users/update-name.md b/docs/examples/0.14.x/server-swift/examples/users/update-name.md new file mode 100644 index 0000000000..7fa3b543ec --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/users/update-name.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let users = Users(client) + let user = try await users.updateName( + userId: "[USER_ID]", + name: "[NAME]" + ) + + print(String(describing: user) +} diff --git a/docs/examples/0.14.x/server-swift/examples/users/update-password.md b/docs/examples/0.14.x/server-swift/examples/users/update-password.md new file mode 100644 index 0000000000..5a3bde40b6 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/users/update-password.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let users = Users(client) + let user = try await users.updatePassword( + userId: "[USER_ID]", + password: "password" + ) + + print(String(describing: user) +} diff --git a/docs/examples/0.14.x/server-swift/examples/users/update-prefs.md b/docs/examples/0.14.x/server-swift/examples/users/update-prefs.md new file mode 100644 index 0000000000..9fee0fc012 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/users/update-prefs.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let users = Users(client) + let preferences = try await users.updatePrefs( + userId: "[USER_ID]", + prefs: + ) + + print(String(describing: preferences) +} diff --git a/docs/examples/0.14.x/server-swift/examples/users/update-status.md b/docs/examples/0.14.x/server-swift/examples/users/update-status.md new file mode 100644 index 0000000000..28dc7d7844 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/users/update-status.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let users = Users(client) + let user = try await users.updateStatus( + userId: "[USER_ID]", + status: xfalse + ) + + print(String(describing: user) +} diff --git a/docs/examples/0.14.x/server-swift/examples/users/update-verification.md b/docs/examples/0.14.x/server-swift/examples/users/update-verification.md new file mode 100644 index 0000000000..8c711370e4 --- /dev/null +++ b/docs/examples/0.14.x/server-swift/examples/users/update-verification.md @@ -0,0 +1,15 @@ +import Appwrite + +func main() async throws { + let client = Client() + .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + let users = Users(client) + let user = try await users.updateVerification( + userId: "[USER_ID]", + emailVerification: xfalse + ) + + print(String(describing: user) +} diff --git a/docs/references/account/delete.md b/docs/references/account/delete.md deleted file mode 100644 index 9e601d88a3..0000000000 --- a/docs/references/account/delete.md +++ /dev/null @@ -1 +0,0 @@ -Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately. \ No newline at end of file diff --git a/docs/references/account/update-status.md b/docs/references/account/update-status.md new file mode 100644 index 0000000000..5c857395c4 --- /dev/null +++ b/docs/references/account/update-status.md @@ -0,0 +1 @@ +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. \ No newline at end of file diff --git a/docs/references/avatars/get-browser.md b/docs/references/avatars/get-browser.md index 8bc41911e8..616439a470 100644 --- a/docs/references/avatars/get-browser.md +++ b/docs/references/avatars/get-browser.md @@ -1 +1,3 @@ -You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user /account/sessions endpoint. Use width, height and quality arguments to change the output settings. \ No newline at end of file +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. + +When 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. \ No newline at end of file diff --git a/docs/references/avatars/get-credit-card.md b/docs/references/avatars/get-credit-card.md index 8e7fb59bbd..5cf76176d3 100644 --- a/docs/references/avatars/get-credit-card.md +++ b/docs/references/avatars/get-credit-card.md @@ -1 +1,3 @@ -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. \ No newline at end of file +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. + +When 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. diff --git a/docs/references/avatars/get-flag.md b/docs/references/avatars/get-flag.md index ba7f230e14..04a8bbca64 100644 --- a/docs/references/avatars/get-flag.md +++ b/docs/references/avatars/get-flag.md @@ -1 +1,3 @@ -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. \ No newline at end of file +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. + +When 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. diff --git a/docs/references/avatars/get-image.md b/docs/references/avatars/get-image.md index 508ece8a34..efd654b362 100644 --- a/docs/references/avatars/get-image.md +++ b/docs/references/avatars/get-image.md @@ -1 +1,3 @@ -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. \ No newline at end of file +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. + +When 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. diff --git a/docs/references/avatars/get-initials.md b/docs/references/avatars/get-initials.md index 87dafd3afb..610e2611e8 100644 --- a/docs/references/avatars/get-initials.md +++ b/docs/references/avatars/get-initials.md @@ -1,3 +1,5 @@ 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. -You 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. \ No newline at end of file +You 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. + +When 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. diff --git a/docs/references/avatars/get-qr.md b/docs/references/avatars/get-qr.md index 54c6c3588a..3218d28cf9 100644 --- a/docs/references/avatars/get-qr.md +++ b/docs/references/avatars/get-qr.md @@ -1 +1 @@ -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. \ No newline at end of file +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. diff --git a/docs/references/health/get-queue-usage.md b/docs/references/health/get-queue-usage.md deleted file mode 100644 index a066a11e89..0000000000 --- a/docs/references/health/get-queue-usage.md +++ /dev/null @@ -1 +0,0 @@ -Get the number of usage stats that are waiting to be processed in the Appwrite internal queue server. \ No newline at end of file diff --git a/docs/references/teams/get-team-logs.md b/docs/references/teams/get-team-logs.md new file mode 100644 index 0000000000..65e685499d --- /dev/null +++ b/docs/references/teams/get-team-logs.md @@ -0,0 +1 @@ +Get the team activity logs list by its unique ID. \ No newline at end of file diff --git a/docs/references/users/delete.md b/docs/references/users/delete.md index 7eb4963485..c529407854 100644 --- a/docs/references/users/delete.md +++ b/docs/references/users/delete.md @@ -1 +1 @@ -Delete a user by its unique ID. \ No newline at end of file +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. \ No newline at end of file diff --git a/docs/references/users/get-user-memberships.md b/docs/references/users/get-user-memberships.md new file mode 100644 index 0000000000..4e06560800 --- /dev/null +++ b/docs/references/users/get-user-memberships.md @@ -0,0 +1 @@ +Get the user membership list by its unique ID. \ No newline at end of file diff --git a/docs/references/users/update-user-status.md b/docs/references/users/update-user-status.md index 0eee46ec51..a2d784a490 100644 --- a/docs/references/users/update-user-status.md +++ b/docs/references/users/update-user-status.md @@ -1 +1 @@ -Update the user status by its unique ID. \ No newline at end of file +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. \ No newline at end of file diff --git a/docs/sdks/dart/CHANGELOG.md b/docs/sdks/dart/CHANGELOG.md index 77b54fa608..7103bfa733 100644 --- a/docs/sdks/dart/CHANGELOG.md +++ b/docs/sdks/dart/CHANGELOG.md @@ -1,3 +1,11 @@ +## 5.0.0 +* Support for Appwrite 0.14 +* **BREAKING** `account.delete()` -> `account.updateStatus()` +* **BREAKING** Execution model `stdout` renamed to `response` +* **BREAKING** Membership model `name` renamed to `userName` and `email` renamed to `userEmail` +* Added `teamName` to Membership model +* New `users.getMemberships` function + ## 4.0.2 * Fix null issues with float attributes (https://github.com/appwrite/sdk-for-dart/issues/17 and https://github.com/appwrite/sdk-for-dart/issues/16) diff --git a/docs/sdks/flutter/CHANGELOG.md b/docs/sdks/flutter/CHANGELOG.md index 515e15f78f..f93b030c23 100644 --- a/docs/sdks/flutter/CHANGELOG.md +++ b/docs/sdks/flutter/CHANGELOG.md @@ -1,3 +1,10 @@ +## 5.0.0 +* Support for Appwrite 0.14 +* **BREAKING** `account.delete()` -> `account.updateStatus()` +* **BREAKING** Execution model `stdout` renamed to `response` +* **BREAKING** Membership model `name` renamed to `userName` and `email` renamed to `userEmail` +* Added `teamName` to Membership model + ## 4.0.2 * Upgrade dependencies diff --git a/gulpfile.js b/gulpfile.js index 781f7bad4d..8bd41ece4c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -34,6 +34,7 @@ const configApp = { 'public/scripts/filters.js', 'public/scripts/app.js', 'public/scripts/upload-modal.js', + 'public/scripts/events.js', 'public/scripts/views/service.js', diff --git a/package-lock.json b/package-lock.json index e3f483af6a..999afa76a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2950,6 +2950,15 @@ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, + "node_modules/meow/node_modules/trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -4601,18 +4610,6 @@ "xtend": "~4.0.1" } }, - "node_modules/trim-newlines": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-4.0.2.tgz", - "integrity": "sha512-GJtWyq9InR/2HRiLZgpIKv+ufIKrVrvjQWEj7PxAXNc5dwbNJkqhAUoAGgzRmULAnoOM5EIpveYd3J2VeSAIew==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", @@ -7490,6 +7487,12 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true } } }, @@ -8837,11 +8840,6 @@ } } }, - "trim-newlines": { - "version": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-4.0.2.tgz", - "integrity": "sha512-GJtWyq9InR/2HRiLZgpIKv+ufIKrVrvjQWEj7PxAXNc5dwbNJkqhAUoAGgzRmULAnoOM5EIpveYd3J2VeSAIew==", - "dev": true - }, "tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", diff --git a/phpunit.xml b/phpunit.xml index 2fbb75e221..11436083ce 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -6,7 +6,7 @@ convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" - stopOnFailure="false" + stopOnFailure="true" > @@ -29,7 +29,6 @@ ./tests/e2e/Services/Storage ./tests/e2e/Services/Teams ./tests/e2e/Services/Users - ./tests/e2e/Services/Workers ./tests/e2e/Services/Webhooks ./tests/e2e/Services/Functions/FunctionsBase.php ./tests/e2e/Services/Functions/FunctionsCustomServerTest.php diff --git a/public/dist/scripts/app-all.js b/public/dist/scripts/app-all.js index 23968d7bbe..f07848a3a8 100644 --- a/public/dist/scripts/app-all.js +++ b/public/dist/scripts/app-all.js @@ -5,7 +5,7 @@ function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e) function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);} step((generator=generator.apply(thisArg,_arguments||[])).next());});} class AppwriteException extends Error{constructor(message,code=0,type='',response=''){super(message);this.name='AppwriteException';this.message=message;this.code=code;this.type=type;this.response=response;}} -class Appwrite{constructor(){this.config={endpoint:'https://HOSTNAME/v1',endpointRealtime:'',project:'',key:'',jwt:'',locale:'',mode:'',};this.headers={'x-sdk-version':'appwrite:web:4.0.4','X-Appwrite-Response-Format':'0.13.0',};this.realtime={socket:undefined,timeout:undefined,url:'',channels:new Set(),subscriptions:new Map(),subscriptionsCounter:0,reconnect:true,reconnectAttempts:0,lastMessage:undefined,connect:()=>{clearTimeout(this.realtime.timeout);this.realtime.timeout=window===null||window===void 0?void 0:window.setTimeout(()=>{this.realtime.createSocket();},50);},getTimeout:()=>{switch(true){case this.realtime.reconnectAttempts<5:return 1000;case this.realtime.reconnectAttempts<15:return 5000;case this.realtime.reconnectAttempts<100:return 10000;default:return 60000;}},createSocket:()=>{var _a,_b;if(this.realtime.channels.size<1) +class Appwrite{constructor(){this.config={endpoint:'https://HOSTNAME/v1',endpointRealtime:'',project:'',key:'',jwt:'',locale:'',mode:'',};this.headers={'x-sdk-version':'appwrite:web:5.0.0','X-Appwrite-Response-Format':'0.14.0',};this.realtime={socket:undefined,timeout:undefined,url:'',channels:new Set(),subscriptions:new Map(),subscriptionsCounter:0,reconnect:true,reconnectAttempts:0,lastMessage:undefined,connect:()=>{clearTimeout(this.realtime.timeout);this.realtime.timeout=window===null||window===void 0?void 0:window.setTimeout(()=>{this.realtime.createSocket();},50);},getTimeout:()=>{switch(true){case this.realtime.reconnectAttempts<5:return 1000;case this.realtime.reconnectAttempts<15:return 5000;case this.realtime.reconnectAttempts<100:return 10000;default:return 60000;}},createSocket:()=>{var _a,_b;if(this.realtime.channels.size<1) return;const channels=new URLSearchParams();channels.set('project',this.config.project);this.realtime.channels.forEach(channel=>{channels.append('channels[]',channel);});const url=this.config.endpointRealtime+'/realtime?'+channels.toString();if(url!==this.realtime.url||!this.realtime.socket||((_a=this.realtime.socket)===null||_a===void 0?void 0:_a.readyState)>WebSocket.OPEN){if(this.realtime.socket&&((_b=this.realtime.socket)===null||_b===void 0?void 0:_b.readyState){this.realtime.reconnectAttempts=0;});this.realtime.socket.addEventListener('close',event=>{var _a,_b,_c;if(!this.realtime.reconnect||(((_b=(_a=this.realtime)===null||_a===void 0?void 0:_a.lastMessage)===null||_b===void 0?void 0:_b.type)==='error'&&((_c=this.realtime)===null||_c===void 0?void 0:_c.lastMessage.data).code===1008)){this.realtime.reconnect=true;return;} const timeout=this.realtime.getTimeout();console.error(`Realtime got disconnected. Reconnect will be attempted in ${timeout / 1000} seconds.`,event.reason);setTimeout(()=>{this.realtime.reconnectAttempts++;this.realtime.createSocket();},timeout);});}},onMessage:(event)=>{var _a,_b;try{const message=JSON.parse(event.data);this.realtime.lastMessage=message;switch(message.type){case'connected':const cookie=JSON.parse((_a=window.localStorage.getItem('cookieFallback'))!==null&&_a!==void 0?_a:'{}');const session=cookie===null||cookie===void 0?void 0:cookie[`a_session_${this.config.project}`];const messageData=message.data;if(session&&!messageData.user){(_b=this.realtime.socket)===null||_b===void 0?void 0:_b.send(JSON.stringify({type:'authentication',data:{session}}));} @@ -19,7 +19,7 @@ let path='/account';let payload={};if(typeof userId!=='undefined'){payload['user if(typeof email!=='undefined'){payload['email']=email;} if(typeof password!=='undefined'){payload['password']=password;} if(typeof name!=='undefined'){payload['name']=name;} -const uri=new URL(this.config.endpoint+path);return yield this.call('post',uri,{'content-type':'application/json',},payload);}),delete:()=>__awaiter(this,void 0,void 0,function*(){let path='/account';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('delete',uri,{'content-type':'application/json',},payload);}),updateEmail:(email,password)=>__awaiter(this,void 0,void 0,function*(){if(typeof email==='undefined'){throw new AppwriteException('Missing required parameter: "email"');} +const uri=new URL(this.config.endpoint+path);return yield this.call('post',uri,{'content-type':'application/json',},payload);}),updateEmail:(email,password)=>__awaiter(this,void 0,void 0,function*(){if(typeof email==='undefined'){throw new AppwriteException('Missing required parameter: "email"');} if(typeof password==='undefined'){throw new AppwriteException('Missing required parameter: "password"');} let path='/account/email';let payload={};if(typeof email!=='undefined'){payload['email']=email;} if(typeof password!=='undefined'){payload['password']=password;} @@ -66,7 +66,7 @@ if(typeof window!=='undefined'&&(window===null||window===void 0?void 0:window.lo else{return uri;}},getSession:(sessionId)=>__awaiter(this,void 0,void 0,function*(){if(typeof sessionId==='undefined'){throw new AppwriteException('Missing required parameter: "sessionId"');} let path='/account/sessions/{sessionId}'.replace('{sessionId}',sessionId);let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),updateSession:(sessionId)=>__awaiter(this,void 0,void 0,function*(){if(typeof sessionId==='undefined'){throw new AppwriteException('Missing required parameter: "sessionId"');} let path='/account/sessions/{sessionId}'.replace('{sessionId}',sessionId);let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('patch',uri,{'content-type':'application/json',},payload);}),deleteSession:(sessionId)=>__awaiter(this,void 0,void 0,function*(){if(typeof sessionId==='undefined'){throw new AppwriteException('Missing required parameter: "sessionId"');} -let path='/account/sessions/{sessionId}'.replace('{sessionId}',sessionId);let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('delete',uri,{'content-type':'application/json',},payload);}),createVerification:(url)=>__awaiter(this,void 0,void 0,function*(){if(typeof url==='undefined'){throw new AppwriteException('Missing required parameter: "url"');} +let path='/account/sessions/{sessionId}'.replace('{sessionId}',sessionId);let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('delete',uri,{'content-type':'application/json',},payload);}),updateStatus:()=>__awaiter(this,void 0,void 0,function*(){let path='/account/status';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('patch',uri,{'content-type':'application/json',},payload);}),createVerification:(url)=>__awaiter(this,void 0,void 0,function*(){if(typeof url==='undefined'){throw new AppwriteException('Missing required parameter: "url"');} let path='/account/verification';let payload={};if(typeof url!=='undefined'){payload['url']=url;} const uri=new URL(this.config.endpoint+path);return yield this.call('post',uri,{'content-type':'application/json',},payload);}),updateVerification:(userId,secret)=>__awaiter(this,void 0,void 0,function*(){if(typeof userId==='undefined'){throw new AppwriteException('Missing required parameter: "userId"');} if(typeof secret==='undefined'){throw new AppwriteException('Missing required parameter: "secret"');} @@ -296,7 +296,7 @@ if(typeof activate!=='undefined'){payload['activate']=activate;} const uri=new URL(this.config.endpoint+path);const size=code.size;if(size<=Appwrite.CHUNK_SIZE){return yield this.call('post',uri,{'content-type':'multipart/form-data',},payload);} let id=undefined;let response=undefined;const headers={'content-type':'multipart/form-data',};let counter=0;const totalCounters=Math.ceil(size/Appwrite.CHUNK_SIZE);for(counter;counter__awaiter(this,void 0,void 0,function*(){if(typeof functionId==='undefined'){throw new AppwriteException('Missing required parameter: "functionId"');} if(typeof deploymentId==='undefined'){throw new AppwriteException('Missing required parameter: "deploymentId"');} let path='/functions/{functionId}/deployments/{deploymentId}'.replace('{functionId}',functionId).replace('{deploymentId}',deploymentId);let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),updateDeployment:(functionId,deploymentId)=>__awaiter(this,void 0,void 0,function*(){if(typeof functionId==='undefined'){throw new AppwriteException('Missing required parameter: "functionId"');} @@ -319,7 +319,7 @@ const uri=new URL(this.config.endpoint+path);return yield this.call('post',uri,{ if(typeof executionId==='undefined'){throw new AppwriteException('Missing required parameter: "executionId"');} let path='/functions/{functionId}/executions/{executionId}'.replace('{functionId}',functionId).replace('{executionId}',executionId);let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getUsage:(functionId,range)=>__awaiter(this,void 0,void 0,function*(){if(typeof functionId==='undefined'){throw new AppwriteException('Missing required parameter: "functionId"');} let path='/functions/{functionId}/usage'.replace('{functionId}',functionId);let payload={};if(typeof range!=='undefined'){payload['range']=range;} -const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);})};this.health={get:()=>__awaiter(this,void 0,void 0,function*(){let path='/health';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getAntivirus:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/anti-virus';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getCache:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/cache';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getDB:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/db';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getQueueCertificates:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/queue/certificates';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getQueueFunctions:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/queue/functions';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getQueueLogs:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/queue/logs';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getQueueUsage:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/queue/usage';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getQueueWebhooks:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/queue/webhooks';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getStorageLocal:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/storage/local';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getTime:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/time';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);})};this.locale={get:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getContinents:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/continents';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getCountries:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/countries';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getCountriesEU:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/countries/eu';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getCountriesPhones:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/countries/phones';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getCurrencies:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/currencies';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getLanguages:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/languages';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);})};this.projects={list:(search,limit,offset,cursor,cursorDirection,orderType)=>__awaiter(this,void 0,void 0,function*(){let path='/projects';let payload={};if(typeof search!=='undefined'){payload['search']=search;} +const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);})};this.health={get:()=>__awaiter(this,void 0,void 0,function*(){let path='/health';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getAntivirus:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/anti-virus';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getCache:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/cache';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getDB:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/db';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getQueueCertificates:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/queue/certificates';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getQueueFunctions:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/queue/functions';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getQueueLogs:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/queue/logs';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getQueueWebhooks:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/queue/webhooks';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getStorageLocal:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/storage/local';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getTime:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/time';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);})};this.locale={get:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getContinents:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/continents';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getCountries:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/countries';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getCountriesEU:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/countries/eu';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getCountriesPhones:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/countries/phones';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getCurrencies:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/currencies';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getLanguages:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/languages';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);})};this.projects={list:(search,limit,offset,cursor,cursorDirection,orderType)=>__awaiter(this,void 0,void 0,function*(){let path='/projects';let payload={};if(typeof search!=='undefined'){payload['search']=search;} if(typeof limit!=='undefined'){payload['limit']=limit;} if(typeof offset!=='undefined'){payload['offset']=offset;} if(typeof cursor!=='undefined'){payload['cursor']=cursor;} @@ -501,7 +501,7 @@ let id=undefined;let response=undefined;const headers={'content-type':'multipart catch(e){}} for(counter;counter__awaiter(this,void 0,void 0,function*(){if(typeof bucketId==='undefined'){throw new AppwriteException('Missing required parameter: "bucketId"');} if(typeof fileId==='undefined'){throw new AppwriteException('Missing required parameter: "fileId"');} let path='/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}',bucketId).replace('{fileId}',fileId);let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),updateFile:(bucketId,fileId,read,write)=>__awaiter(this,void 0,void 0,function*(){if(typeof bucketId==='undefined'){throw new AppwriteException('Missing required parameter: "bucketId"');} @@ -549,7 +549,10 @@ let path='/teams/{teamId}'.replace('{teamId}',teamId);let payload={};const uri=n if(typeof name==='undefined'){throw new AppwriteException('Missing required parameter: "name"');} let path='/teams/{teamId}'.replace('{teamId}',teamId);let payload={};if(typeof name!=='undefined'){payload['name']=name;} const uri=new URL(this.config.endpoint+path);return yield this.call('put',uri,{'content-type':'application/json',},payload);}),delete:(teamId)=>__awaiter(this,void 0,void 0,function*(){if(typeof teamId==='undefined'){throw new AppwriteException('Missing required parameter: "teamId"');} -let path='/teams/{teamId}'.replace('{teamId}',teamId);let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('delete',uri,{'content-type':'application/json',},payload);}),getMemberships:(teamId,search,limit,offset,cursor,cursorDirection,orderType)=>__awaiter(this,void 0,void 0,function*(){if(typeof teamId==='undefined'){throw new AppwriteException('Missing required parameter: "teamId"');} +let path='/teams/{teamId}'.replace('{teamId}',teamId);let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('delete',uri,{'content-type':'application/json',},payload);}),listLogs:(teamId,limit,offset)=>__awaiter(this,void 0,void 0,function*(){if(typeof teamId==='undefined'){throw new AppwriteException('Missing required parameter: "teamId"');} +let path='/teams/{teamId}/logs'.replace('{teamId}',teamId);let payload={};if(typeof limit!=='undefined'){payload['limit']=limit;} +if(typeof offset!=='undefined'){payload['offset']=offset;} +const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getMemberships:(teamId,search,limit,offset,cursor,cursorDirection,orderType)=>__awaiter(this,void 0,void 0,function*(){if(typeof teamId==='undefined'){throw new AppwriteException('Missing required parameter: "teamId"');} let path='/teams/{teamId}/memberships'.replace('{teamId}',teamId);let payload={};if(typeof search!=='undefined'){payload['search']=search;} if(typeof limit!=='undefined'){payload['limit']=limit;} if(typeof offset!=='undefined'){payload['offset']=offset;} @@ -601,7 +604,8 @@ let path='/users/{userId}/email'.replace('{userId}',userId);let payload={};if(ty const uri=new URL(this.config.endpoint+path);return yield this.call('patch',uri,{'content-type':'application/json',},payload);}),getLogs:(userId,limit,offset)=>__awaiter(this,void 0,void 0,function*(){if(typeof userId==='undefined'){throw new AppwriteException('Missing required parameter: "userId"');} let path='/users/{userId}/logs'.replace('{userId}',userId);let payload={};if(typeof limit!=='undefined'){payload['limit']=limit;} if(typeof offset!=='undefined'){payload['offset']=offset;} -const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),updateName:(userId,name)=>__awaiter(this,void 0,void 0,function*(){if(typeof userId==='undefined'){throw new AppwriteException('Missing required parameter: "userId"');} +const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getMemberships:(userId)=>__awaiter(this,void 0,void 0,function*(){if(typeof userId==='undefined'){throw new AppwriteException('Missing required parameter: "userId"');} +let path='/users/{userId}/memberships'.replace('{userId}',userId);let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),updateName:(userId,name)=>__awaiter(this,void 0,void 0,function*(){if(typeof userId==='undefined'){throw new AppwriteException('Missing required parameter: "userId"');} if(typeof name==='undefined'){throw new AppwriteException('Missing required parameter: "name"');} let path='/users/{userId}/name'.replace('{userId}',userId);let payload={};if(typeof name!=='undefined'){payload['name']=name;} const uri=new URL(this.config.endpoint+path);return yield this.call('patch',uri,{'content-type':'application/json',},payload);}),updatePassword:(userId,password)=>__awaiter(this,void 0,void 0,function*(){if(typeof userId==='undefined'){throw new AppwriteException('Missing required parameter: "userId"');} @@ -630,7 +634,7 @@ setJWT(value){this.headers['X-Appwrite-JWT']=value;this.config.jwt=value;return setLocale(value){this.headers['X-Appwrite-Locale']=value;this.config.locale=value;return this;} setMode(value){this.headers['X-Appwrite-Mode']=value;this.config.mode=value;return this;} subscribe(channels,callback){let channelArray=typeof channels==='string'?[channels]:channels;channelArray.forEach(channel=>this.realtime.channels.add(channel));const counter=this.realtime.subscriptionsCounter++;this.realtime.subscriptions.set(counter,{channels:channelArray,callback});this.realtime.connect();return()=>{this.realtime.subscriptions.delete(counter);this.realtime.cleanUp(channelArray);this.realtime.connect();};} -call(method,url,headers={},params={}){var _a,_b;return __awaiter(this,void 0,void 0,function*(){method=method.toUpperCase();headers=Object.assign(Object.assign({},headers),this.headers);let options={method,headers,credentials:'include'};if(typeof window!=='undefined'&&window.localStorage){headers['X-Fallback-Cookies']=(_a=window.localStorage.getItem('cookieFallback'))!==null&&_a!==void 0?_a:'';} +call(method,url,headers={},params={}){var _a,_b;return __awaiter(this,void 0,void 0,function*(){method=method.toUpperCase();headers=Object.assign({},this.headers,headers);let options={method,headers,credentials:'include'};if(typeof window!=='undefined'&&window.localStorage){headers['X-Fallback-Cookies']=(_a=window.localStorage.getItem('cookieFallback'))!==null&&_a!==void 0?_a:'';} if(method==='GET'){for(const[key,value]of Object.entries(this.flatten(params))){url.searchParams.append(key,value);}} else{switch(headers['content-type']){case'application/json':options.body=JSON.stringify(params);break;case'multipart/form-data':let formData=new FormData();for(const key in params){if(Array.isArray(params[key])){params[key].forEach((value)=>{formData.append(key+'[]',value);});} else{formData.append(key,params[key]);}} @@ -3047,7 +3051,7 @@ rule.replacement(content,node,this.options)+ whitespace.trailing)} function join(output,replacement){var s1=trimTrailingNewlines(output);var s2=trimLeadingNewlines(replacement);var nls=Math.max(output.length-s1.length,replacement.length-s2.length);var separator='\n\n'.substring(0,nls);return s1+separator+s2} function canConvert(input){return(input!=null&&(typeof input==='string'||(input.nodeType&&(input.nodeType===1||input.nodeType===9||input.nodeType===11))))} -return TurndownService;}());var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,e={},M={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof W?new W(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=l.reach);y+=m.value.length,m=m.next){var k=m.value;if(t.length>n.length)return;if(!(k instanceof W)){var x,b=1;if(h){if(!(x=z(p,y,n,f))||x.index>=n.length)break;var w=x.index,A=x.index+x[0].length,E=y;for(E+=m.value.length;E<=w;)m=m.next,E+=m.value.length;if(E-=m.value.length,y=E,m.value instanceof W)continue;for(var P=m;P!==t.tail&&(El.reach&&(l.reach=j);var C=m.prev;S&&(C=I(t,C,S),y+=S.length),T(t,C,b);var N=new W(o,g?M.tokenize(L,g):L,d,L);if(m=I(t,C,N),O&&I(t,m,O),1l.reach&&(l.reach=_.reach)}}}}}}(e,a,n,a.head,0),function(e){var n=[],t=e.head.next;for(;t!==e.tail;)n.push(t.value),t=t.next;return n}(a)},hooks:{all:{},add:function(e,n){var t=M.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=M.hooks.all[e];if(t&&t.length)for(var r,a=0;r=t[a++];)r(n)}},Token:W};function W(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=0|(r||"").length}function z(e,n,t,r){e.lastIndex=n;var a=e.exec(t);if(a&&r&&a[1]){var i=a[1].length;a.index+=i,a[0]=a[0].slice(i)}return a}function i(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function I(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function T(e,n,t){for(var r=n.next,a=0;a"+a.content+""},!u.document)return u.addEventListener&&(M.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(M.highlight(r,M.languages[t],t)),a&&u.close()},!1)),M;var r=M.util.currentScript();function a(){M.manual||M.highlightAll()}if(r&&(M.filename=r.src,r.hasAttribute("data-manual")&&(M.manual=!0)),!M.manual){var l=document.readyState;"loading"===l||"interactive"===l&&r&&r.defer?document.addEventListener("DOMContentLoaded",a):window.requestAnimationFrame?window.requestAnimationFrame(a):window.setTimeout(a,16)}return M}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var t={"included-cdata":{pattern://i,inside:s}};t["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var n={};n[a]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:t},Prism.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp("(^|[\"'\\s])(?:"+a+")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))","i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml;!function(s){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var t=s.languages.markup;t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(Prism);Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript;!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},a={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:a.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],s=a.variable[1].inside,i=0;i>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",r="class enum interface record struct",i="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(r),p=RegExp(l(n+" "+r+" "+i+" "+o)),c=l(r+" "+i+" "+o),u=l(n+" "+r+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("<<0>>(?:\\s*(?:\\?\\s*)?<<1>>)*(?:\\s*\\?)?",[m,k]),w=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),v={keyword:p,punctuation:/[<>()?,.:[\]]/},x="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",$='"(?:\\\\.|[^\\\\"\r\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[^]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[$]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:v},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,w]),lookbehind:!0,inside:v},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:v},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:v},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is(?:\\s+not)?|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:v},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>|with\\s*\\{)<<2>>(?:\\s*[=,;:{)\\]]|\\s+(?:in|when)\\b))",[w,u,h]),inside:v}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|sizeof|typeof)\\s*\\(\\s*(?!\\s))(?:[^()\\s]|\\s(?!\\s)|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:v},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[w,m]),inside:v,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[w]),lookbehind:!0,inside:v,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:v}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|record\\s+<<1>>\\s*<<5>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>|<<1>>\\s*<<5>>|<<6>>)(?:\\s*,\\s*(?:<<3>>|<<4>>|<<6>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,w,p.source,b,"\\bnew\\s*\\(\\s*\\)"]),lookbehind:!0,inside:{"record-arguments":{pattern:t("(^(?!new\\s*\\()<<0>>\\s*)<<1>>",[f,b]),lookbehind:!0,greedy:!0,inside:s.languages.csharp},keyword:p,"class-name":{pattern:RegExp(w),greedy:!0,inside:v},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var _=$+"|"+x,B=a("/(?![*/])|//[^\r\n]*[\r\n]|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>",[_]),E=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[B]),2),R="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",z=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,E]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[R,z]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[R]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[E]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var S=":[^}\r\n]+",j=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[B]),2),A=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[j,S]),F=e(a("[^\"'/()]|/(?!\\*)|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>|\\(<>*\\)",[_]),2),P=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[F,S]);function U(e,n){return{interpolation:{pattern:t("((?:^|[^{])(?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,S]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[^]|\\{\\{|<<0>>|[^\\\\{"])*"',[A]),lookbehind:!0,greedy:!0,inside:U(A,j)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[P]),lookbehind:!0,greedy:!0,inside:U(P,F)}],char:{pattern:RegExp(x),greedy:!0}}),s.languages.dotnet=s.languages.cs=s.languages.csharp}(Prism);!function(e){var a=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],n="(^|[^\\w.])(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*",s={pattern:RegExp(n+"[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b"),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};e.languages.dart=e.languages.extend("clike",{"class-name":[s,{pattern:RegExp(n+"[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()])"),lookbehind:!0,inside:s.inside}],keyword:a,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),e.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.dart}}},string:/[\s\S]+/}},string:void 0}),e.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),e.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":s,keyword:a,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism);Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"];Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},Prism.hooks.add("after-tokenize",function(n){if("graphql"===n.language)for(var o=n.tokens.filter(function(n){return"string"!=typeof n&&"comment"!==n.type&&"scalar"!==n.type}),s=0;s>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":a,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},namespace:{pattern:RegExp("(\\b(?:exports|import(?:\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\s+)(?!)[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?".replace(//g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json;!function(n){n.languages.kotlin=n.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete n.languages.kotlin["class-name"];var e={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:n.languages.kotlin}};n.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:e},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:e},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete n.languages.kotlin.string,n.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),n.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),n.languages.kt=n.languages.kotlin,n.languages.kts=n.languages.kotlin}(Prism);!function(h){function v(e,n){return"___"+e.toUpperCase()+n+"___"}Object.defineProperties(h.languages["markup-templating"]={},{buildPlaceholders:{value:function(a,r,e,o){if(a.language===r){var c=a.tokenStack=[];a.code=a.code.replace(e,function(e){if("function"==typeof o&&!o(e))return e;for(var n,t=c.length;-1!==a.code.indexOf(n=v(r,t));)++t;return c[t]=e,n}),a.grammar=h.languages.markup}}},tokenizePlaceholders:{value:function(p,k){if(p.language===k&&p.tokenStack){p.grammar=h.languages[k];var m=0,d=Object.keys(p.tokenStack);!function e(n){for(var t=0;t=d.length);t++){var a=n[t];if("string"==typeof a||a.content&&"string"==typeof a.content){var r=d[m],o=p.tokenStack[r],c="string"==typeof a?a:a.content,i=v(k,r),u=c.indexOf(i);if(-1|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism);!function(e){var i=Prism.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};i.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:i},boolean:i.boolean,variable:i.variable}}();Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python;!function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var n={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var t="(?:"+["([^a-zA-Z0-9\\s{(\\[<=])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1","\\((?:[^()\\\\]|\\\\[^]|\\((?:[^()\\\\]|\\\\[^])*\\))*\\)","\\{(?:[^{}\\\\]|\\\\[^]|\\{(?:[^{}\\\\]|\\\\[^])*\\})*\\}","\\[(?:[^\\[\\]\\\\]|\\\\[^]|\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\])*\\]","<(?:[^<>\\\\]|\\\\[^]|<(?:[^<>\\\\]|\\\\[^])*>)*>"].join("|")+")",i='(?:"(?:\\\\.|[^"\\\\\r\n])*"|(?:\\b[a-zA-Z_]\\w*|[^\\s\0-\\x7F]+)[?!]?|\\$.)';e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp("%r"+t+"[egimnosux]{0,6}"),greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp("(^|[^:]):"+i),lookbehind:!0,greedy:!0},{pattern:RegExp("([\r\n{(,][ \t]*)"+i+"(?=:(?!:))"),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp("%[qQiIwWs]?"+t),greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp("%x"+t),greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(Prism);Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp('(^|[^"#])(?:"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^(])|[^\\\\\r\n"])*"|"""(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|[^(])|[^\\\\"]|"(?!""))*""")(?!["#])'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp('(^|[^"#])(#+)(?:"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^#])|[^\\\\\r\n])*?"|"""(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|[^#])|[^\\\\])*?""")\\2'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp("#(?:(?:elseif|if)\\b(?:[ \t]*(?:![ \t]*)?(?:\\b\\w+\\b(?:[ \t]*\\((?:[^()]|\\([^()]*\\))*\\))?|\\((?:[^()]|\\([^()]*\\))*\\))(?:[ \t]*(?:&&|\\|\\|))?)+|(?:else|endif)\\b)"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift});!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var s=e.languages.extend("typescript",{});delete s["class-name"],e.languages.typescript["class-name"].inside=s,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:s}}}}),e.languages.ts=e.languages.typescript}(Prism);!function(e){var n=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,t="(?:"+r.source+"(?:[ \t]+"+n.source+")?|"+n.source+"(?:[ \t]+"+r.source+")?)",a="(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*".replace(//g,function(){return"[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]"}),d="\"(?:[^\"\\\\\r\n]|\\\\.)*\"|'(?:[^'\\\\\r\n]|\\\\.)*'";function o(e,n){n=(n||"").replace(/m/g,"")+"m";var r="([:\\-,[{]\\s*(?:\\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\\]|\\}|(?:[\r\n]\\s*)?#))".replace(/<>/g,function(){return t}).replace(/<>/g,function(){return e});return RegExp(r,n)}e.languages.yaml={scalar:{pattern:RegExp("([\\-:]\\s*(?:\\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\\S[^\r\n]*(?:\\2[^\r\n]+)*)".replace(/<>/g,function(){return t})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp("((?:^|[:\\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\\s*:\\s)".replace(/<>/g,function(){return t}).replace(/<>/g,function(){return"(?:"+a+"|"+d+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o("\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ \t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?"),lookbehind:!0,alias:"number"},boolean:{pattern:o("false|true","i"),lookbehind:!0,alias:"important"},null:{pattern:o("null|~","i"),lookbehind:!0,alias:"important"},string:{pattern:o(d),lookbehind:!0,greedy:!0},number:{pattern:o("[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)","i"),lookbehind:!0},tag:r,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(Prism);!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var o="line-numbers",a=/\n(?!$)/g,e=Prism.plugins.lineNumbers={getLine:function(e,n){if("PRE"===e.tagName&&e.classList.contains(o)){var t=e.querySelector(".line-numbers-rows");if(t){var i=parseInt(e.getAttribute("data-start"),10)||1,r=i+(t.children.length-1);n");(i=document.createElement("span")).setAttribute("aria-hidden","true"),i.className="line-numbers-rows",i.innerHTML=l,t.hasAttribute("data-start")&&(t.style.counterReset="linenumber "+(parseInt(t.getAttribute("data-start"),10)-1)),e.element.appendChild(i),u([t]),Prism.hooks.run("line-numbers",e)}}}),Prism.hooks.add("line-numbers",function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0})}function u(e){if(0!=(e=e.filter(function(e){var n=function(e){return e?window.getComputedStyle?getComputedStyle(e):e.currentStyle||null:null}(e)["white-space"];return"pre-wrap"===n||"pre-line"===n})).length){var n=e.map(function(e){var n=e.querySelector("code"),t=e.querySelector(".line-numbers-rows");if(n&&t){var i=e.querySelector(".line-numbers-sizer"),r=n.textContent.split(a);i||((i=document.createElement("span")).className="line-numbers-sizer",n.appendChild(i)),i.innerHTML="0",i.style.display="block";var s=i.getBoundingClientRect().height;return i.innerHTML="",{element:e,lines:r,lineHeights:[],oneLinerHeight:s,sizer:i}}}).filter(Boolean);n.forEach(function(e){var i=e.sizer,n=e.lines,r=e.lineHeights,s=e.oneLinerHeight;r[n.length-1]=void 0,n.forEach(function(e,n){if(e&&1=g.reach);A+=w.value.length,w=w.next){var E=w.value;if(n.length>e.length)return;if(!(E instanceof i)){var P,L=1;if(y){if(!(P=l(b,A,e,m))||P.index>=e.length)break;var S=P.index,O=P.index+P[0].length,j=A;for(j+=w.value.length;S>=j;)j+=(w=w.next).value.length;if(A=j-=w.value.length,w.value instanceof i)continue;for(var C=w;C!==n.tail&&(jg.reach&&(g.reach=W);var z=w.prev;if(_&&(z=u(n,z,_),A+=_.length),c(n,z,L),w=u(n,z,new i(f,p?a.tokenize(N,p):N,k,N)),M&&u(n,w,M),L>1){var I={cause:f+","+d,reach:W};o(e,n,t,w.prev,A,I),g&&I.reach>g.reach&&(g.reach=I.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function u(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function c(e,n,t){for(var r=n.next,a=0;a"+i.content+""},!e.document)return e.addEventListener?(a.disableWorkerMessageHandler||e.addEventListener("message",(function(n){var t=JSON.parse(n.data),r=t.language,i=t.code,l=t.immediateClose;e.postMessage(a.highlight(i,a.languages[r],r)),l&&e.close()}),!1),a):a;var g=a.util.currentScript();function f(){a.manual||a.highlightAll()}if(g&&(a.filename=g.src,g.hasAttribute("data-manual")&&(a.manual=!0)),!a.manual){var h=document.readyState;"loading"===h||"interactive"===h&&g&&g.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return a}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var t={"included-cdata":{pattern://i,inside:s}};t["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var n={};n[a]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,(function(){return a})),"i"),lookbehind:!0,greedy:!0,inside:t},Prism.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp("(^|[\"'\\s])(?:"+a+")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))","i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml;!function(s){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var t=s.languages.markup;t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(Prism);Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp("((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))"),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript;!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},a={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:a.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],s=a.variable[1].inside,i=0;i>/g,(function(e,s){return"(?:"+n[+s]+")"}))}function s(e,s,a){return RegExp(n(e,s),a||"")}function a(e,n){for(var s=0;s>/g,(function(){return"(?:"+e+")"}));return e.replace(/<>/g,"[^\\s\\S]")}var t="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",r="class enum interface record struct",i="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(r),p=RegExp(l(t+" "+r+" "+i+" "+o)),c=l(r+" "+i+" "+o),u=l(t+" "+r+" "+o),g=a("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=a("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=n("<<0>>(?:\\s*<<1>>)?",[h,g]),m=n("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=n("<<0>>(?:\\s*(?:\\?\\s*)?<<1>>)*(?:\\s*\\?)?",[m,k]),w=n("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k]),v=n("\\(<<0>>+(?:,<<0>>+)+\\)",[w]),x=n("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[v,m,k]),$={keyword:p,punctuation:/[<>()?,.:[\]]/},_="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",B='"(?:\\\\.|[^\\\\"\r\n])*"';e.languages.csharp=e.languages.extend("clike",{string:[{pattern:s("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[^]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:s("(^|[^@$\\\\])<<0>>",[B]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:s("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:$},{pattern:s("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,x]),lookbehind:!0,inside:$},{pattern:s("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:s("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:$},{pattern:s("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:$},{pattern:s("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:s("(\\b(?:is(?:\\s+not)?|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:$},{pattern:s("\\b<<0>>(?=\\s+(?!<<1>>|with\\s*\\{)<<2>>(?:\\s*[=,;:{)\\]]|\\s+(?:in|when)\\b))",[x,u,h]),inside:$}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:s("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:s("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:s("(\\b(?:default|sizeof|typeof)\\s*\\(\\s*(?!\\s))(?:[^()\\s]|\\s(?!\\s)|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:$},"return-type":{pattern:s("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[x,m]),inside:$,alias:"class-name"},"constructor-invocation":{pattern:s("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[x]),lookbehind:!0,inside:$,alias:"class-name"},"generic-method":{pattern:s("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:s("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:$}}},"type-list":{pattern:s("\\b((?:<<0>>\\s+<<1>>|record\\s+<<1>>\\s*<<5>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>|<<1>>\\s*<<5>>|<<6>>)(?:\\s*,\\s*(?:<<3>>|<<4>>|<<6>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,x,p.source,b,"\\bnew\\s*\\(\\s*\\)"]),lookbehind:!0,inside:{"record-arguments":{pattern:s("(^(?!new\\s*\\()<<0>>\\s*)<<1>>",[f,b]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:p,"class-name":{pattern:RegExp(x),greedy:!0,inside:$},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var E=B+"|"+_,R=n("/(?![*/])|//[^\r\n]*[\r\n]|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>",[E]),z=a(n("[^\"'/()]|<<0>>|\\(<>*\\)",[R]),2),S="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",j=n("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,z]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:s("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[S,j]),lookbehind:!0,greedy:!0,inside:{target:{pattern:s("^<<0>>(?=\\s*:)",[S]),alias:"keyword"},"attribute-arguments":{pattern:s("\\(<<0>>*\\)",[z]),inside:e.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var A=":[^}\r\n]+",F=a(n("[^\"'/()]|<<0>>|\\(<>*\\)",[R]),2),P=n("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[F,A]),U=a(n("[^\"'/()]|/(?!\\*)|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>|\\(<>*\\)",[E]),2),Z=n("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[U,A]);function q(n,a){return{interpolation:{pattern:s("((?:^|[^{])(?:\\{\\{)*)<<0>>",[n]),lookbehind:!0,inside:{"format-string":{pattern:s("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[a,A]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:s('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[^]|\\{\\{|<<0>>|[^\\\\{"])*"',[P]),lookbehind:!0,greedy:!0,inside:q(P,F)},{pattern:s('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[Z]),lookbehind:!0,greedy:!0,inside:q(Z,U)}],char:{pattern:RegExp(_),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(Prism);!function(e){var a=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],n="(^|[^\\w.])(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*",s={pattern:RegExp(n+"[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b"),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};e.languages.dart=e.languages.extend("clike",{"class-name":[s,{pattern:RegExp(n+"[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()])"),lookbehind:!0,inside:s.inside}],keyword:a,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),e.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.dart}}},string:/[\s\S]+/}},string:void 0}),e.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),e.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":s,keyword:a,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism);Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"];Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},Prism.hooks.add("after-tokenize",(function(n){if("graphql"===n.language)for(var t=n.tokens.filter((function(n){return"string"!=typeof n&&"comment"!==n.type&&"scalar"!==n.type})),e=0;e0)){var s=f(/^\{$/,/^\}$/);if(-1===s)continue;for(var u=e;u=0&&b(p,"variable-input")}}}}function l(n){return t[e+n]}function c(n,t){t=t||0;for(var e=0;e=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,t="(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*",s={pattern:RegExp("(^|[^\\w.])"+t+"[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b"),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[s,{pattern:RegExp("(^|[^\\w.])"+t+"[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()]|\\s*(?:\\[[\\s,]*\\]\\s*)?::\\s*new\\b)"),lookbehind:!0,inside:s.inside},{pattern:RegExp("(\\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\\s+)"+t+"[A-Z]\\w*\\b"),lookbehind:!0,inside:s.inside}],keyword:n,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":s,keyword:n,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp("(\\bimport\\s+)"+t+"(?:[A-Z]\\w*|\\*)(?=\\s*;)"),lookbehind:!0,inside:{namespace:s.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp("(\\bimport\\s+static\\s+)"+t+"(?:\\w+|\\*)(?=\\s*;)"),lookbehind:!0,alias:"static",inside:{namespace:s.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp("(\\b(?:exports|import(?:\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\s+)(?!)[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?".replace(//g,(function(){return n.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json;!function(n){n.languages.kotlin=n.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete n.languages.kotlin["class-name"];var e={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:n.languages.kotlin}};n.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:e},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:e},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete n.languages.kotlin.string,n.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),n.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),n.languages.kt=n.languages.kotlin,n.languages.kts=n.languages.kotlin}(Prism);!function(e){function n(e,n){return"___"+e.toUpperCase()+n+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(t,a,r,o){if(t.language===a){var c=t.tokenStack=[];t.code=t.code.replace(r,(function(e){if("function"==typeof o&&!o(e))return e;for(var r,i=c.length;-1!==t.code.indexOf(r=n(a,i));)++i;return c[i]=e,r})),t.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(t,a){if(t.language===a&&t.tokenStack){t.grammar=e.languages[a];var r=0,o=Object.keys(t.tokenStack);!function c(i){for(var u=0;u=o.length);u++){var g=i[u];if("string"==typeof g||g.content&&"string"==typeof g.content){var l=o[r],s=t.tokenStack[l],f="string"==typeof g?g:g.content,p=n(a,l),k=f.indexOf(p);if(k>-1){++r;var m=f.substring(0,k),d=new e.Token(a,e.tokenize(s,t.grammar),"language-"+a,s),h=f.substring(k+p.length),v=[];m&&v.push.apply(v,c([m])),v.push(d),h&&v.push.apply(v,c([h])),"string"==typeof g?i.splice.apply(i,[u,1].concat(v)):g.content=v}}else g.content&&c(g.content)}return i}(t.tokens)}}}})}(Prism);!function(e){var a=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:a,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];e.languages.insertBefore("php","variable",{string:r,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:a,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",(function(a){/<\?/.test(a.code)&&e.languages["markup-templating"].buildPlaceholders(a,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)})),e.hooks.add("after-tokenize",(function(a){e.languages["markup-templating"].tokenizePlaceholders(a,"php")}))}(Prism);!function(e){var i=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};i.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:i},boolean:i.boolean,variable:i.variable}}(Prism);Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python;!function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var n={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var t="(?:"+["([^a-zA-Z0-9\\s{(\\[<=])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1","\\((?:[^()\\\\]|\\\\[^]|\\((?:[^()\\\\]|\\\\[^])*\\))*\\)","\\{(?:[^{}\\\\]|\\\\[^]|\\{(?:[^{}\\\\]|\\\\[^])*\\})*\\}","\\[(?:[^\\[\\]\\\\]|\\\\[^]|\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\])*\\]","<(?:[^<>\\\\]|\\\\[^]|<(?:[^<>\\\\]|\\\\[^])*>)*>"].join("|")+")",i='(?:"(?:\\\\.|[^"\\\\\r\n])*"|(?:\\b[a-zA-Z_]\\w*|[^\\s\0-\\x7F]+)[?!]?|\\$.)';e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp("%r"+t+"[egimnosux]{0,6}"),greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp("(^|[^:]):"+i),lookbehind:!0,greedy:!0},{pattern:RegExp("([\r\n{(,][ \t]*)"+i+"(?=:(?!:))"),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp("%[qQiIwWs]?"+t),greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp("%x"+t),greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(Prism);Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp('(^|[^"#])(?:"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^(])|[^\\\\\r\n"])*"|"""(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|[^(])|[^\\\\"]|"(?!""))*""")(?!["#])'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp('(^|[^"#])(#+)(?:"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^#])|[^\\\\\r\n])*?"|"""(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|[^#])|[^\\\\])*?""")\\2'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp("#(?:(?:elseif|if)\\b(?:[ \t]*(?:![ \t]*)?(?:\\b\\w+\\b(?:[ \t]*\\((?:[^()]|\\([^()]*\\))*\\))?|\\((?:[^()]|\\([^()]*\\))*\\))(?:[ \t]*(?:&&|\\|\\|))?)+|(?:else|endif)\\b)"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=Prism.languages.swift}));!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var s=e.languages.extend("typescript",{});delete s["class-name"],e.languages.typescript["class-name"].inside=s,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:s}}}}),e.languages.ts=e.languages.typescript}(Prism);!function(e){var n=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,t="(?:"+r.source+"(?:[ \t]+"+n.source+")?|"+n.source+"(?:[ \t]+"+r.source+")?)",a="(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*".replace(//g,(function(){return"[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]"})),d="\"(?:[^\"\\\\\r\n]|\\\\.)*\"|'(?:[^'\\\\\r\n]|\\\\.)*'";function o(e,n){n=(n||"").replace(/m/g,"")+"m";var r="([:\\-,[{]\\s*(?:\\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\\]|\\}|(?:[\r\n]\\s*)?#))".replace(/<>/g,(function(){return t})).replace(/<>/g,(function(){return e}));return RegExp(r,n)}e.languages.yaml={scalar:{pattern:RegExp("([\\-:]\\s*(?:\\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\\S[^\r\n]*(?:\\2[^\r\n]+)*)".replace(/<>/g,(function(){return t}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp("((?:^|[:\\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\\s*:\\s)".replace(/<>/g,(function(){return t})).replace(/<>/g,(function(){return"(?:"+a+"|"+d+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o("\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ \t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?"),lookbehind:!0,alias:"number"},boolean:{pattern:o("false|true","i"),lookbehind:!0,alias:"important"},null:{pattern:o("null|~","i"),lookbehind:!0,alias:"important"},string:{pattern:o(d),lookbehind:!0,greedy:!0},number:{pattern:o("[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)","i"),lookbehind:!0},tag:r,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(Prism);!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var e="line-numbers",n=/\n(?!$)/g,t=Prism.plugins.lineNumbers={getLine:function(n,t){if("PRE"===n.tagName&&n.classList.contains(e)){var i=n.querySelector(".line-numbers-rows");if(i){var r=parseInt(n.getAttribute("data-start"),10)||1,s=r+(i.children.length-1);ts&&(t=s);var l=t-r;return i.children[l]}}},resize:function(e){r([e])},assumeViewportIndependence:!0},i=void 0;window.addEventListener("resize",(function(){t.assumeViewportIndependence&&i===window.innerWidth||(i=window.innerWidth,r(Array.prototype.slice.call(document.querySelectorAll("pre.line-numbers"))))})),Prism.hooks.add("complete",(function(t){if(t.code){var i=t.element,s=i.parentNode;if(s&&/pre/i.test(s.nodeName)&&!i.querySelector(".line-numbers-rows")&&Prism.util.isActive(i,e)){i.classList.remove(e),s.classList.add(e);var l,o=t.code.match(n),a=o?o.length+1:1,u=new Array(a+1).join("");(l=document.createElement("span")).setAttribute("aria-hidden","true"),l.className="line-numbers-rows",l.innerHTML=u,s.hasAttribute("data-start")&&(s.style.counterReset="linenumber "+(parseInt(s.getAttribute("data-start"),10)-1)),t.element.appendChild(l),r([s]),Prism.hooks.run("line-numbers",t)}}})),Prism.hooks.add("line-numbers",(function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0}))}function r(e){if(0!=(e=e.filter((function(e){var n,t=(n=e,n?window.getComputedStyle?getComputedStyle(n):n.currentStyle||null:null)["white-space"];return"pre-wrap"===t||"pre-line"===t}))).length){var t=e.map((function(e){var t=e.querySelector("code"),i=e.querySelector(".line-numbers-rows");if(t&&i){var r=e.querySelector(".line-numbers-sizer"),s=t.textContent.split(n);r||((r=document.createElement("span")).className="line-numbers-sizer",t.appendChild(r)),r.innerHTML="0",r.style.display="block";var l=r.getBoundingClientRect().height;return r.innerHTML="",{element:e,lines:s,lineHeights:[],oneLinerHeight:l,sizer:r}}})).filter(Boolean);t.forEach((function(e){var n=e.sizer,t=e.lines,i=e.lineHeights,r=e.oneLinerHeight;i[t.length-1]=void 0,t.forEach((function(e,t){if(e&&e.length>1){var s=n.appendChild(document.createElement("span"));s.style.display="block",s.textContent=e}else i[t]=r}))})),t.forEach((function(e){for(var n=e.sizer,t=e.lineHeights,i=0,r=0;r{let root=closestRoot(el);if(!root._x_refs) root._x_refs={};root._x_refs[expression]=el;cleanup2(()=>delete root._x_refs[expression]);};directive("ref",handler2);directive("if",(el,{expression},{effect:effect3,cleanup:cleanup2})=>{let evaluate2=evaluateLater(el,expression);let show=()=>{if(el._x_currentIfEl) return el._x_currentIfEl;let clone2=el.content.cloneNode(true).firstElementChild;addScopeToNode(clone2,{},el);mutateDom(()=>{el.after(clone2);initTree(clone2);});el._x_currentIfEl=clone2;el._x_undoIf=()=>{clone2.remove();delete el._x_currentIfEl;};return clone2;};let hide=()=>{if(!el._x_undoIf) -return;el._x_undoIf();delete el._x_undoIf;};effect3(()=>evaluate2((value)=>{value?show():hide();}));cleanup2(()=>el._x_undoIf&&el._x_undoIf());});mapAttributes(startingWith("@",into(prefix("on:"))));directive("on",skipDuringClone((el,{value,modifiers,expression},{cleanup:cleanup2})=>{let evaluate2=expression?evaluateLater(el,expression):()=>{};let removeListener=on(el,value,modifiers,(e)=>{evaluate2(()=>{},{scope:{$event:e},params:[e]});});cleanup2(()=>removeListener());}));alpine_default.setEvaluator(normalEvaluator);alpine_default.setReactivityEngine({reactive:reactive2,effect:effect2,release:stop,raw:toRaw});var src_default=alpine_default;window.Alpine=src_default;queueMicrotask(()=>{src_default.start();});})();window.ls.error=function(){return function(error){window.console.error(error);if(window.location.pathname!=='/console'){window.location='/console';}};};window.addEventListener("error",function(event){console.error("ERROR-EVENT:",event.error.message,event.error.stack);});document.addEventListener("account.deleteSession",function(){window.location="/auth/signin";});document.addEventListener("account.create",function(){let container=window.ls.container;let form=container.get('serviceForm');let sdk=container.get('console');let promise=sdk.account.createSession(form.email,form.password);container.set("serviceForm",{},true,true);promise.then(function(){var subscribe=document.getElementById('newsletter').checked;if(subscribe){let alerts=container.get('alerts');let loaderId=alerts.add({text:'Loading...',class:""},0);fetch('https://appwrite.io/v1/newsletter/subscribe',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({name:form.name,email:form.email,}),}).finally(function(){alerts.remove(loaderId);window.location='/console';});}else{window.location='/console';}},function(error){window.location='/auth/signup?failure=1';});});window.addEventListener("load",async()=>{const bars=12;const realtime=window.ls.container.get('realtime');const sleep=ms=>new Promise(resolve=>setTimeout(resolve,ms));let current={};window.ls.container.get('console').subscribe(['project','console'],response=>{switch(response.event){case'stats.connections':for(let project in response.payload){current[project]=response.payload[project]??0;} -break;case'database.attributes.create':case'database.attributes.update':case'database.attributes.delete':document.dispatchEvent(new CustomEvent('database.createAttribute'));break;case'database.indexes.create':case'database.indexes.update':case'database.indexes.delete':document.dispatchEvent(new CustomEvent('database.createIndex'));break;case'functions.deployments.create':case'functions.deployments.update':case'functions.deployments.delete':document.dispatchEvent(new CustomEvent('functions.createDeployment'));break;case'functions.executions.create':case'functions.executions.update':case'functions.executions.delete':document.dispatchEvent(new CustomEvent('functions.createExecution'));break;}});while(true){let newHistory={};let createdHistory=false;for(const project in current){let history=realtime?.history??{};if(!(project in history)){history[project]=new Array(bars).fill({percentage:0,value:0});} +return;el._x_undoIf();delete el._x_undoIf;};effect3(()=>evaluate2((value)=>{value?show():hide();}));cleanup2(()=>el._x_undoIf&&el._x_undoIf());});mapAttributes(startingWith("@",into(prefix("on:"))));directive("on",skipDuringClone((el,{value,modifiers,expression},{cleanup:cleanup2})=>{let evaluate2=expression?evaluateLater(el,expression):()=>{};let removeListener=on(el,value,modifiers,(e)=>{evaluate2(()=>{},{scope:{$event:e},params:[e]});});cleanup2(()=>removeListener());}));alpine_default.setEvaluator(normalEvaluator);alpine_default.setReactivityEngine({reactive:reactive2,effect:effect2,release:stop,raw:toRaw});var src_default=alpine_default;window.Alpine=src_default;queueMicrotask(()=>{src_default.start();});})();window.ls.error=function(){return function(error){window.console.error(error);if(window.location.pathname!=='/console'){window.location='/console';}};};window.addEventListener("error",function(event){console.error("ERROR-EVENT:",event.error.message,event.error.stack);});document.addEventListener("account.deleteSession",function(){window.location="/auth/signin";});document.addEventListener("account.create",function(){let container=window.ls.container;let form=container.get('serviceForm');let sdk=container.get('console');let promise=sdk.account.createSession(form.email,form.password);container.set("serviceForm",{},true,true);promise.then(function(){var subscribe=document.getElementById('newsletter').checked;if(subscribe){let alerts=container.get('alerts');let loaderId=alerts.add({text:'Loading...',class:""},0);fetch('https://appwrite.io/v1/newsletter/subscribe',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({name:form.name,email:form.email,}),}).finally(function(){alerts.remove(loaderId);window.location='/console';});}else{window.location='/console';}},function(error){window.location='/auth/signup?failure=1';});});window.addEventListener("load",async()=>{const bars=12;const realtime=window.ls.container.get('realtime');const sleep=ms=>new Promise(resolve=>setTimeout(resolve,ms));let current={};window.ls.container.get('console').subscribe(['project','console'],response=>{if(response.events.includes('stats.connections')){for(let project in response.payload){current[project]=response.payload[project]??0;} +return;} +if(response.events.includes('collections.*.attributes.*')){document.dispatchEvent(new CustomEvent('database.createAttribute'));return;} +if(response.events.includes('collections.*.indexes.*')){document.dispatchEvent(new CustomEvent('database.createIndex'));return;} +if(response.events.includes('functions.*.deployments.*')){document.dispatchEvent(new CustomEvent('functions.createDeployment'));return;} +if(response.events.includes('functions.*.executions.*')){document.dispatchEvent(new CustomEvent('functions.createExecution'));return;}});while(true){let newHistory={};for(const project in current){let history=realtime?.history??{};if(!(project in history)){history[project]=new Array(bars).fill({percentage:0,value:0});} history=history[project];history.push({percentage:0,value:current[project]});if(history.length>=bars){history.shift();} const highest=history.reduce((prev,curr)=>{return(curr.value>prev)?curr.value:prev;},0);history=history.map(({percentage,value})=>{createdHistory=true;percentage=value===0?0:((Math.round((value/highest)*10)/10)*100);if(percentage>100)percentage=100;else if(percentage==0&&value!=0)percentage=5;return{percentage:percentage,value:value};}) newHistory[project]=history;} @@ -3697,7 +3705,7 @@ return slf.renderToken(tokens,idx,opts);} md.renderer.rules.strong_open=renderEm;md.renderer.rules.strong_close=renderEm;return md;},true);})(window);(function(window){"use strict";window.ls.container.set('rtl',function(){var rtlStock="^ا^ب^ت^ث^ج^ح^خ^د^ذ^ر^ز^س^ش^ص^ض^ط^ظ^ع^غ^ف^ق^ك^ل^م^ن^ه^و^ي^א^ב^ג^ד^ה^ו^ז^ח^ט^י^כ^ך^ל^מ^ם^נ^ן^ס^ע^פ^ף^צ^ץ^ק^ר^ש^ת^";var special=["\n"," "," ","״",'"',"_","'","!","@","#","$","^","&","%","*","(",")","+","=","-","[","]","\\","/","{","}","|",":","<",">","?",",",".","0","1","2","3","4","5","6","7","8","9"];var isRTL=function(value){for(var i=0;i{return{current:null,history:null,setCurrent:function(currentConnections){var scope=this;scope.current=currentConnections;return scope.current;},setHistory:function(history){var scope=this;scope.history=history;return scope.history;}};},true,true);})(window);window.ls.router.add("/auth/signin",{template:"/auth/signin?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/signup",{template:"/auth/signup?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/recovery",{template:"/auth/recovery?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/recovery/reset",{template:"/auth/recovery/reset?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/confirm",{template:"/auth/confirm?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/join",{template:"/auth/join?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/magic-url",{template:"/auth/magic-url?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/oauth2/success",{template:"/auth/oauth2/success?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/oauth2/failure",{template:"/auth/oauth2/failure?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/console",{template:"/console?version="+APP_ENV.CACHEBUSTER,scope:"console"}).add("/console/account",{template:"/console/account?version="+APP_ENV.CACHEBUSTER,scope:"console"}).add("/console/account/:tab",{template:"/console/account?version="+APP_ENV.CACHEBUSTER,scope:"console"}).add("/console/home",{template:"/console/home?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/home/:tab",{template:"/console/home?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/platforms/:platform",{template:function(window){return window.location.pathname+"?version="+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/notifications",{template:"/console/notifications?version="+APP_ENV.CACHEBUSTER,scope:"console"}).add("/console/settings",{template:"/console/settings?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/settings/:tab",{template:"/console/settings?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/webhooks",{template:"/console/webhooks?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/webhooks/:tab",{template:"/console/webhooks?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/keys",{template:"/console/keys?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/keys/:tab",{template:"/console/keys?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/tasks",{template:"/console/tasks?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/tasks/:tab",{template:"/console/tasks?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/database",{template:"/console/database?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/database/usage",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/database/collection",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/database/collection/:tab",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/database/document",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/database/document/:tab",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/storage",{template:"/console/storage?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/storage/usage",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/storage/bucket",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/storage/bucket/:tab",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/users",{template:"/console/users?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/users/user",{template:"/console/users/user?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/users/user/:tab",{template:"/console/users/user?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/users/teams/team",{template:"/console/users/teams/team?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/users/teams/team/:tab",{template:"/console/users/teams/team?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/users/:tab",{template:"/console/users?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/functions",{template:"/console/functions?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/functions/function",{template:"/console/functions/function?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/functions/function/:tab",{template:"/console/functions/function?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/functions/:tab",{template:"/console/functions?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true});window.ls.filter.add("avatar",function($value,element){if(!$value){return"";} +return false;};return{isRTL:isRTL,};},true);})(window);(function(window){"use strict";window.ls.container.set('sdk',function(window,router){var sdk=new window.Appwrite();var endpoint=window.location.origin+'/v1';sdk.setEndpoint(endpoint).setProject(router.params.project||'').setLocale(APP_ENV.LOCALE).setMode('admin');return sdk;},false);})(window);(function(window){"use strict";window.ls.container.set('search',function(window){return{params:{},path:'',pointer:'',selected:'',};},true,true);})(window);(function(window){"use strict";window.ls.container.set('timezone',function(){return{convert:function(unixTime){var timezoneMinutes=new Date().getTimezoneOffset();timezoneMinutes=(timezoneMinutes===0)?0:-timezoneMinutes;return parseInt(unixTime)+(timezoneMinutes*60);}};},true);})(window);(function(window){"use strict";window.ls.container.set('realtime',()=>{return{current:null,history:null,setCurrent:function(currentConnections){var scope=this;scope.current=currentConnections;return scope.current;},setHistory:function(history){var scope=this;scope.history=history;return scope.history;}};},true,true);})(window);window.ls.router.add("/auth/signin",{template:"/auth/signin?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/signup",{template:"/auth/signup?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/recovery",{template:"/auth/recovery?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/recovery/reset",{template:"/auth/recovery/reset?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/confirm",{template:"/auth/confirm?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/join",{template:"/auth/join?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/magic-url",{template:"/auth/magic-url?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/oauth2/success",{template:"/auth/oauth2/success?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/oauth2/failure",{template:"/auth/oauth2/failure?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/console",{template:"/console?version="+APP_ENV.CACHEBUSTER,scope:"console"}).add("/console/account",{template:"/console/account?version="+APP_ENV.CACHEBUSTER,scope:"console"}).add("/console/account/:tab",{template:"/console/account?version="+APP_ENV.CACHEBUSTER,scope:"console"}).add("/console/home",{template:"/console/home?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/home/:tab",{template:"/console/home?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/platforms/:platform",{template:function(window){return window.location.pathname+"?version="+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/notifications",{template:"/console/notifications?version="+APP_ENV.CACHEBUSTER,scope:"console"}).add("/console/settings",{template:"/console/settings?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/settings/:tab",{template:"/console/settings?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/webhooks",{template:"/console/webhooks?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/webhooks/webhook",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/webhooks/webhook/new",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/keys",{template:"/console/keys?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/keys/:tab",{template:"/console/keys?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/tasks",{template:"/console/tasks?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/tasks/:tab",{template:"/console/tasks?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/database",{template:"/console/database?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/database/usage",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/database/collection",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/database/collection/:tab",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/database/document",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/database/document/:tab",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/storage",{template:"/console/storage?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/storage/usage",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/storage/bucket",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/storage/bucket/:tab",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/users",{template:"/console/users?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/users/user",{template:"/console/users/user?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/users/user/:tab",{template:"/console/users/user?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/users/teams/team",{template:"/console/users/teams/team?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/users/teams/team/:tab",{template:"/console/users/teams/team?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/users/:tab",{template:"/console/users?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/functions",{template:"/console/functions?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/functions/function",{template:"/console/functions/function?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/functions/function/:tab",{template:"/console/functions/function?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/functions/:tab",{template:"/console/functions?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true});window.ls.filter.add("avatar",function($value,element){if(!$value){return"";} let size=element.dataset["size"]||80;let name=$value.name||$value||"";name=(typeof name!=='string')?'--':name;return def="/v1/avatars/initials?project=console"+"&name="+ encodeURIComponent(name)+"&width="+ size+"&height="+ @@ -3745,8 +3753,15 @@ let write=formData.get('write');if(write){write=JSON.parse(write);} if(this.getFile(id)){this.updateFile(id,{name:file.name,completed:false,failed:false,cancelled:false,error:"",});}else{this.addFile({id:id,name:file.name,progress:0,completed:false,failed:false,cancelled:false,error:"",});} target.reset();try{const response=await sdk.storage.createFile(bucketId,fileId,file,read,write,(progress)=>{this.updateFile(id,{id:progress.$id,progress:Math.round(progress.progress),error:"",});id=progress.$id;const file=this.getFile(id)??{};if(file.cancelled===true){throw'USER_CANCELLED';}});const existingFile=this.getFile(id)??{};if(existingFile.cancelled){this.updateFile(id,{id:response.$id,name:response.name,failed:false,});id=response.$id;throw'USER_CANCELLED'}else{this.updateFile(id,{id:response.$id,name:response.name,progress:100,completed:true,failed:false,});id=response.$id;} document.dispatchEvent(new CustomEvent('storage.createFile'));}catch(error){if(error==='USER_CANCELLED'){await sdk.storage.deleteFile(bucketId,id);this.updateFile(id,{cancelled:false,failed:true,});this.removeFile(id);}else{this.updateFile(id,{id:id,failed:true,error:error.message??error});} -document.dispatchEvent(new CustomEvent('storage.createFile'));}}});});})(window);(function(window){"use strict";window.ls.view.add({selector:"data-service",controller:function(element,view,container,form,alerts,expression,window){let action=element.dataset["service"];let service=element.dataset["name"]||null;let event=expression.parse(element.dataset["event"]);let confirm=element.dataset["confirm"]||"";let loading=element.dataset["loading"]||"";let loaderId=null;let scope=element.dataset["scope"]||"sdk";let success=element.dataset["success"]||"";let failure=element.dataset["failure"]||"";let running=false;let callbacks={hide:function(){return function(){return element.style.opacity='0';};},reset:function(){return function(){if("FORM"===element.tagName){return element.reset();} -throw new Error("This callback is only valid for forms");};},alert:function(text,classname){return function(alerts){alerts.add({text:text,class:classname||"success"},3000);};},redirect:function(url){return function(router){if(url==="/console"){window.location=url;return;} +document.dispatchEvent(new CustomEvent('storage.createFile'));}}});});})(window);(function(window){document.addEventListener('alpine:init',()=>{Alpine.data('events',()=>({events:new Set(),selected:null,action:null,type:null,subType:null,resource:null,resourceName:'',subResource:null,subResourceName:'',hasResource:false,hasSubResource:false,attribute:null,hasAttribute:false,attributes:[],load(events){this.events=new Set(events);},reset(){this.hasResource=this.hasSubResource=this.hasAttribute=false;this.type=this.subType=this.subResource=this.resource=this.attribute=this.selected=this.action=null;},setEvent(){this.hasResource=this.hasSubResource=this.hasAttribute=this.action=false;if(!this.selected){this.reset();return;} +let[type,action]=this.selected.split('.');switch(type){case'users':if(action==='update'){this.hasAttribute=true;this.attributes=['email','name','password','status','prefs']} +this.hasResource=true;this.type=type;this.resourceName='User ID';break;case'collections':this.hasResource=true;this.type=type;this.resourceName='Collection ID';break;case'teams':this.hasResource=true;this.type=type;this.resourceName='Team ID';break;case'buckets':this.hasResource=true;this.type=type;this.resourceName='Bucket ID';break;case'functions':this.hasResource=true;this.type=type;this.resourceName='Function ID';break;case'sessions':this.hasResource=this.hasSubResource=true;this.type='users';this.subType=type;this.resourceName='User ID';this.subResourceName='Session ID';break;case'verification':this.hasResource=this.hasSubResource=true;this.type='users';this.subType=type;this.resourceName='User ID';this.subResourceName='Verification ID';break;case'recovery':this.hasResource=this.hasSubResource=true;this.type='users';this.subType=type;this.resourceName='User ID';this.subResourceName='Recovery ID';break;case'documents':this.hasResource=this.hasSubResource=true;this.type='collections';this.subType=type;this.resourceName='Collection ID';this.subResourceName='Document ID';break;case'attributes':this.hasResource=this.hasSubResource=true;this.type='collections';this.subType=type;this.resourceName='Collection ID';this.subResourceName='Attribute ID';break;case'indexes':this.hasResource=this.hasSubResource=true;this.type='collections';this.subType=type;this.resourceName='Collection ID';this.subResourceName='Index ID';break;case'files':this.hasResource=this.hasSubResource=true;this.type='buckets';this.subType=type;this.resourceName='Bucket ID';this.subResourceName='File ID';break;case'memberships':if(action==='update'){this.hasAttribute=true;this.attributes=['status']} +this.hasResource=this.hasSubResource=true;this.type='teams';this.subType=type;this.resourceName='Team ID';this.subResourceName='Membership ID';break;case'executions':this.hasResource=this.hasSubResource=true;this.type='functions';this.subType=type;this.resourceName='Function ID';this.subResourceName='Execution ID';break;case'deployments':this.hasResource=this.hasSubResource=true;this.type='functions';this.subType=type;this.resourceName='Function ID';this.subResourceName='Deployment ID';break;default:this.hasResource=true;this.hasSubResource=true;break;} +this.action=action;},showModal(modal){document.documentElement.classList.add("modal-open");modal.classList.remove("close");modal.classList.add("open");},closeModal(modal){document.documentElement.classList.remove("modal-open");modal.classList.add("close");modal.classList.remove("open");},addEvent(modal){this.closeModal(modal);let event=`${this.type}.${this.resource ? this.resource : '*'}`;if(this.hasSubResource){event+=`.${this.subType}.${this.subResource ? this.subResource : '*'}`;} +if(this.action){event+=`.${this.action}`;} +if(this.attribute){event+=`.${this.attribute}`;} +this.events.add(event);this.reset();},removeEvent(value){this.events.delete(value);}}));});})(window);(function(window){"use strict";window.ls.view.add({selector:"data-service",controller:function(element,view,container,form,alerts,expression,window){let action=element.dataset["service"];let service=element.dataset["name"]||null;let event=expression.parse(element.dataset["event"]);let confirm=element.dataset["confirm"]||"";let loading=element.dataset["loading"]||"";let loaderId=null;let scope=element.dataset["scope"]||"sdk";let success=element.dataset["success"]||"";let failure=element.dataset["failure"]||"";let running=false;let callbacks={hide:function(){return function(){return element.style.opacity='0';};},reset:function(){return function(){if("FORM"===element.tagName){return element.reset();} +throw new Error("This callback is only valid for forms");};},alert:function(text,classname){return function(alerts){alerts.add({text:text,class:classname||"success"},6000);};},redirect:function(url){return function(router){if(url==="/console"){window.location=url;return;} router.change(url||"/");};},reload:function(){return function(router){router.reload();};},state:function(keys){let updateQueryString=function(key,value,url){var re=new RegExp("([?&])"+key+"=.*?(&|#|$)(.*)","gi"),hash;if(re.test(url)){if(typeof value!=="undefined"&&value!==null){return url.replace(re,"$1"+key+"="+value+"$2$3");}else{hash=url.split("#");url=hash[0].replace(re,"$1$3").replace(/(&|\?)$/,"");if(typeof hash[1]!=="undefined"&&hash[1]!==null){url+="#"+hash[1];} return url;}}else{if(typeof value!=="undefined"&&value!==null){var separator=url.indexOf("?")!==-1?"&":"?";hash=url.split("#");url=hash[0]+separator+key+"="+value;if(typeof hash[1]!=="undefined"&&hash[1]!==null){url+="#"+hash[1];} return url;}else{return url;}}};keys=keys.split(",").map(element=>element.trim());return function(serviceForm,router,window){let url=window.location.href;keys.map(node=>{node=node.split("=");let key=node[0]||"";let name=node[1]||key;let value=getValue(key,"param",serviceForm);url=updateQueryString(name,value?value:null,url);});if(url!==window.location.href){window.history.pushState({},"",url);router.reset();}};},trigger:function(events){return function(document){events=events.trim().split(",");for(let i=0;i=distance)&&(distance>=0)){if(minLink){minLink.classList.remove('selected');} -console.log('old',minLink);minDistance=distance;minElement=title;minLink=links[i];minLink.classList.add('selected');console.log('new',minLink);}}};window.addEventListener('scroll',check);check();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-oauth-custom",controller:function(element){let providers={"Microsoft":{"clientSecret":"oauth2MicrosoftClientSecret","tenantID":"oauth2MicrosoftTenantId"},"Apple":{"keyID":"oauth2AppleKeyId","teamID":"oauth2AppleTeamId","p8":"oauth2AppleP8"}} -let provider=element.getAttribute("data-forms-oauth-custom");if(!provider||!providers.hasOwnProperty(provider)){console.error("Provider for custom form not set or unkown")} +console.log('old',minLink);minDistance=distance;minElement=title;minLink=links[i];minLink.classList.add('selected');console.log('new',minLink);}}};window.addEventListener('scroll',check);check();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-oauth-custom",controller:function(element){let providers={"Microsoft":{"clientSecret":"oauth2MicrosoftClientSecret","tenantID":"oauth2MicrosoftTenantId"},"Apple":{"keyID":"oauth2AppleKeyId","teamID":"oauth2AppleTeamId","p8":"oauth2AppleP8"},"Okta":{"clientSecret":"oauth2OktaClientSecret","oktaDomain":"oauth2OktaDomain","authorizationServerId":"oauth2OktaAuthorizationServerId"},"Auth0":{"clientSecret":"oauth2Auth0ClientSecret","auth0Domain":"oauth2Auth0Domain"}} +let provider=element.getAttribute("data-forms-oauth-custom");if(!provider||!providers.hasOwnProperty(provider)){console.error("Provider for custom form not set or unknown")} let config=providers[provider];element.addEventListener('change',sync);let elements={};for(const key in config){if(Object.hasOwnProperty.call(config,key)){elements[key]=document.getElementById(config[key]);elements[key].addEventListener('change',update);}} function update(){let json={};for(const key in elements){if(Object.hasOwnProperty.call(elements,key)){json[key]=elements[key].value}} element.value=JSON.stringify(json);} diff --git a/public/dist/scripts/app-dep.js b/public/dist/scripts/app-dep.js index 07160ea78b..1a30b4c707 100644 --- a/public/dist/scripts/app-dep.js +++ b/public/dist/scripts/app-dep.js @@ -5,7 +5,7 @@ function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e) function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);} step((generator=generator.apply(thisArg,_arguments||[])).next());});} class AppwriteException extends Error{constructor(message,code=0,type='',response=''){super(message);this.name='AppwriteException';this.message=message;this.code=code;this.type=type;this.response=response;}} -class Appwrite{constructor(){this.config={endpoint:'https://HOSTNAME/v1',endpointRealtime:'',project:'',key:'',jwt:'',locale:'',mode:'',};this.headers={'x-sdk-version':'appwrite:web:4.0.4','X-Appwrite-Response-Format':'0.13.0',};this.realtime={socket:undefined,timeout:undefined,url:'',channels:new Set(),subscriptions:new Map(),subscriptionsCounter:0,reconnect:true,reconnectAttempts:0,lastMessage:undefined,connect:()=>{clearTimeout(this.realtime.timeout);this.realtime.timeout=window===null||window===void 0?void 0:window.setTimeout(()=>{this.realtime.createSocket();},50);},getTimeout:()=>{switch(true){case this.realtime.reconnectAttempts<5:return 1000;case this.realtime.reconnectAttempts<15:return 5000;case this.realtime.reconnectAttempts<100:return 10000;default:return 60000;}},createSocket:()=>{var _a,_b;if(this.realtime.channels.size<1) +class Appwrite{constructor(){this.config={endpoint:'https://HOSTNAME/v1',endpointRealtime:'',project:'',key:'',jwt:'',locale:'',mode:'',};this.headers={'x-sdk-version':'appwrite:web:5.0.0','X-Appwrite-Response-Format':'0.14.0',};this.realtime={socket:undefined,timeout:undefined,url:'',channels:new Set(),subscriptions:new Map(),subscriptionsCounter:0,reconnect:true,reconnectAttempts:0,lastMessage:undefined,connect:()=>{clearTimeout(this.realtime.timeout);this.realtime.timeout=window===null||window===void 0?void 0:window.setTimeout(()=>{this.realtime.createSocket();},50);},getTimeout:()=>{switch(true){case this.realtime.reconnectAttempts<5:return 1000;case this.realtime.reconnectAttempts<15:return 5000;case this.realtime.reconnectAttempts<100:return 10000;default:return 60000;}},createSocket:()=>{var _a,_b;if(this.realtime.channels.size<1) return;const channels=new URLSearchParams();channels.set('project',this.config.project);this.realtime.channels.forEach(channel=>{channels.append('channels[]',channel);});const url=this.config.endpointRealtime+'/realtime?'+channels.toString();if(url!==this.realtime.url||!this.realtime.socket||((_a=this.realtime.socket)===null||_a===void 0?void 0:_a.readyState)>WebSocket.OPEN){if(this.realtime.socket&&((_b=this.realtime.socket)===null||_b===void 0?void 0:_b.readyState){this.realtime.reconnectAttempts=0;});this.realtime.socket.addEventListener('close',event=>{var _a,_b,_c;if(!this.realtime.reconnect||(((_b=(_a=this.realtime)===null||_a===void 0?void 0:_a.lastMessage)===null||_b===void 0?void 0:_b.type)==='error'&&((_c=this.realtime)===null||_c===void 0?void 0:_c.lastMessage.data).code===1008)){this.realtime.reconnect=true;return;} const timeout=this.realtime.getTimeout();console.error(`Realtime got disconnected. Reconnect will be attempted in ${timeout / 1000} seconds.`,event.reason);setTimeout(()=>{this.realtime.reconnectAttempts++;this.realtime.createSocket();},timeout);});}},onMessage:(event)=>{var _a,_b;try{const message=JSON.parse(event.data);this.realtime.lastMessage=message;switch(message.type){case'connected':const cookie=JSON.parse((_a=window.localStorage.getItem('cookieFallback'))!==null&&_a!==void 0?_a:'{}');const session=cookie===null||cookie===void 0?void 0:cookie[`a_session_${this.config.project}`];const messageData=message.data;if(session&&!messageData.user){(_b=this.realtime.socket)===null||_b===void 0?void 0:_b.send(JSON.stringify({type:'authentication',data:{session}}));} @@ -19,7 +19,7 @@ let path='/account';let payload={};if(typeof userId!=='undefined'){payload['user if(typeof email!=='undefined'){payload['email']=email;} if(typeof password!=='undefined'){payload['password']=password;} if(typeof name!=='undefined'){payload['name']=name;} -const uri=new URL(this.config.endpoint+path);return yield this.call('post',uri,{'content-type':'application/json',},payload);}),delete:()=>__awaiter(this,void 0,void 0,function*(){let path='/account';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('delete',uri,{'content-type':'application/json',},payload);}),updateEmail:(email,password)=>__awaiter(this,void 0,void 0,function*(){if(typeof email==='undefined'){throw new AppwriteException('Missing required parameter: "email"');} +const uri=new URL(this.config.endpoint+path);return yield this.call('post',uri,{'content-type':'application/json',},payload);}),updateEmail:(email,password)=>__awaiter(this,void 0,void 0,function*(){if(typeof email==='undefined'){throw new AppwriteException('Missing required parameter: "email"');} if(typeof password==='undefined'){throw new AppwriteException('Missing required parameter: "password"');} let path='/account/email';let payload={};if(typeof email!=='undefined'){payload['email']=email;} if(typeof password!=='undefined'){payload['password']=password;} @@ -66,7 +66,7 @@ if(typeof window!=='undefined'&&(window===null||window===void 0?void 0:window.lo else{return uri;}},getSession:(sessionId)=>__awaiter(this,void 0,void 0,function*(){if(typeof sessionId==='undefined'){throw new AppwriteException('Missing required parameter: "sessionId"');} let path='/account/sessions/{sessionId}'.replace('{sessionId}',sessionId);let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),updateSession:(sessionId)=>__awaiter(this,void 0,void 0,function*(){if(typeof sessionId==='undefined'){throw new AppwriteException('Missing required parameter: "sessionId"');} let path='/account/sessions/{sessionId}'.replace('{sessionId}',sessionId);let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('patch',uri,{'content-type':'application/json',},payload);}),deleteSession:(sessionId)=>__awaiter(this,void 0,void 0,function*(){if(typeof sessionId==='undefined'){throw new AppwriteException('Missing required parameter: "sessionId"');} -let path='/account/sessions/{sessionId}'.replace('{sessionId}',sessionId);let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('delete',uri,{'content-type':'application/json',},payload);}),createVerification:(url)=>__awaiter(this,void 0,void 0,function*(){if(typeof url==='undefined'){throw new AppwriteException('Missing required parameter: "url"');} +let path='/account/sessions/{sessionId}'.replace('{sessionId}',sessionId);let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('delete',uri,{'content-type':'application/json',},payload);}),updateStatus:()=>__awaiter(this,void 0,void 0,function*(){let path='/account/status';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('patch',uri,{'content-type':'application/json',},payload);}),createVerification:(url)=>__awaiter(this,void 0,void 0,function*(){if(typeof url==='undefined'){throw new AppwriteException('Missing required parameter: "url"');} let path='/account/verification';let payload={};if(typeof url!=='undefined'){payload['url']=url;} const uri=new URL(this.config.endpoint+path);return yield this.call('post',uri,{'content-type':'application/json',},payload);}),updateVerification:(userId,secret)=>__awaiter(this,void 0,void 0,function*(){if(typeof userId==='undefined'){throw new AppwriteException('Missing required parameter: "userId"');} if(typeof secret==='undefined'){throw new AppwriteException('Missing required parameter: "secret"');} @@ -296,7 +296,7 @@ if(typeof activate!=='undefined'){payload['activate']=activate;} const uri=new URL(this.config.endpoint+path);const size=code.size;if(size<=Appwrite.CHUNK_SIZE){return yield this.call('post',uri,{'content-type':'multipart/form-data',},payload);} let id=undefined;let response=undefined;const headers={'content-type':'multipart/form-data',};let counter=0;const totalCounters=Math.ceil(size/Appwrite.CHUNK_SIZE);for(counter;counter__awaiter(this,void 0,void 0,function*(){if(typeof functionId==='undefined'){throw new AppwriteException('Missing required parameter: "functionId"');} if(typeof deploymentId==='undefined'){throw new AppwriteException('Missing required parameter: "deploymentId"');} let path='/functions/{functionId}/deployments/{deploymentId}'.replace('{functionId}',functionId).replace('{deploymentId}',deploymentId);let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),updateDeployment:(functionId,deploymentId)=>__awaiter(this,void 0,void 0,function*(){if(typeof functionId==='undefined'){throw new AppwriteException('Missing required parameter: "functionId"');} @@ -319,7 +319,7 @@ const uri=new URL(this.config.endpoint+path);return yield this.call('post',uri,{ if(typeof executionId==='undefined'){throw new AppwriteException('Missing required parameter: "executionId"');} let path='/functions/{functionId}/executions/{executionId}'.replace('{functionId}',functionId).replace('{executionId}',executionId);let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getUsage:(functionId,range)=>__awaiter(this,void 0,void 0,function*(){if(typeof functionId==='undefined'){throw new AppwriteException('Missing required parameter: "functionId"');} let path='/functions/{functionId}/usage'.replace('{functionId}',functionId);let payload={};if(typeof range!=='undefined'){payload['range']=range;} -const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);})};this.health={get:()=>__awaiter(this,void 0,void 0,function*(){let path='/health';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getAntivirus:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/anti-virus';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getCache:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/cache';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getDB:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/db';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getQueueCertificates:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/queue/certificates';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getQueueFunctions:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/queue/functions';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getQueueLogs:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/queue/logs';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getQueueUsage:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/queue/usage';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getQueueWebhooks:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/queue/webhooks';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getStorageLocal:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/storage/local';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getTime:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/time';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);})};this.locale={get:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getContinents:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/continents';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getCountries:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/countries';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getCountriesEU:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/countries/eu';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getCountriesPhones:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/countries/phones';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getCurrencies:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/currencies';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getLanguages:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/languages';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);})};this.projects={list:(search,limit,offset,cursor,cursorDirection,orderType)=>__awaiter(this,void 0,void 0,function*(){let path='/projects';let payload={};if(typeof search!=='undefined'){payload['search']=search;} +const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);})};this.health={get:()=>__awaiter(this,void 0,void 0,function*(){let path='/health';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getAntivirus:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/anti-virus';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getCache:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/cache';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getDB:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/db';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getQueueCertificates:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/queue/certificates';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getQueueFunctions:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/queue/functions';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getQueueLogs:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/queue/logs';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getQueueWebhooks:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/queue/webhooks';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getStorageLocal:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/storage/local';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getTime:()=>__awaiter(this,void 0,void 0,function*(){let path='/health/time';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);})};this.locale={get:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getContinents:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/continents';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getCountries:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/countries';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getCountriesEU:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/countries/eu';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getCountriesPhones:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/countries/phones';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getCurrencies:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/currencies';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getLanguages:()=>__awaiter(this,void 0,void 0,function*(){let path='/locale/languages';let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);})};this.projects={list:(search,limit,offset,cursor,cursorDirection,orderType)=>__awaiter(this,void 0,void 0,function*(){let path='/projects';let payload={};if(typeof search!=='undefined'){payload['search']=search;} if(typeof limit!=='undefined'){payload['limit']=limit;} if(typeof offset!=='undefined'){payload['offset']=offset;} if(typeof cursor!=='undefined'){payload['cursor']=cursor;} @@ -501,7 +501,7 @@ let id=undefined;let response=undefined;const headers={'content-type':'multipart catch(e){}} for(counter;counter__awaiter(this,void 0,void 0,function*(){if(typeof bucketId==='undefined'){throw new AppwriteException('Missing required parameter: "bucketId"');} if(typeof fileId==='undefined'){throw new AppwriteException('Missing required parameter: "fileId"');} let path='/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}',bucketId).replace('{fileId}',fileId);let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),updateFile:(bucketId,fileId,read,write)=>__awaiter(this,void 0,void 0,function*(){if(typeof bucketId==='undefined'){throw new AppwriteException('Missing required parameter: "bucketId"');} @@ -549,7 +549,10 @@ let path='/teams/{teamId}'.replace('{teamId}',teamId);let payload={};const uri=n if(typeof name==='undefined'){throw new AppwriteException('Missing required parameter: "name"');} let path='/teams/{teamId}'.replace('{teamId}',teamId);let payload={};if(typeof name!=='undefined'){payload['name']=name;} const uri=new URL(this.config.endpoint+path);return yield this.call('put',uri,{'content-type':'application/json',},payload);}),delete:(teamId)=>__awaiter(this,void 0,void 0,function*(){if(typeof teamId==='undefined'){throw new AppwriteException('Missing required parameter: "teamId"');} -let path='/teams/{teamId}'.replace('{teamId}',teamId);let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('delete',uri,{'content-type':'application/json',},payload);}),getMemberships:(teamId,search,limit,offset,cursor,cursorDirection,orderType)=>__awaiter(this,void 0,void 0,function*(){if(typeof teamId==='undefined'){throw new AppwriteException('Missing required parameter: "teamId"');} +let path='/teams/{teamId}'.replace('{teamId}',teamId);let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('delete',uri,{'content-type':'application/json',},payload);}),listLogs:(teamId,limit,offset)=>__awaiter(this,void 0,void 0,function*(){if(typeof teamId==='undefined'){throw new AppwriteException('Missing required parameter: "teamId"');} +let path='/teams/{teamId}/logs'.replace('{teamId}',teamId);let payload={};if(typeof limit!=='undefined'){payload['limit']=limit;} +if(typeof offset!=='undefined'){payload['offset']=offset;} +const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getMemberships:(teamId,search,limit,offset,cursor,cursorDirection,orderType)=>__awaiter(this,void 0,void 0,function*(){if(typeof teamId==='undefined'){throw new AppwriteException('Missing required parameter: "teamId"');} let path='/teams/{teamId}/memberships'.replace('{teamId}',teamId);let payload={};if(typeof search!=='undefined'){payload['search']=search;} if(typeof limit!=='undefined'){payload['limit']=limit;} if(typeof offset!=='undefined'){payload['offset']=offset;} @@ -601,7 +604,8 @@ let path='/users/{userId}/email'.replace('{userId}',userId);let payload={};if(ty const uri=new URL(this.config.endpoint+path);return yield this.call('patch',uri,{'content-type':'application/json',},payload);}),getLogs:(userId,limit,offset)=>__awaiter(this,void 0,void 0,function*(){if(typeof userId==='undefined'){throw new AppwriteException('Missing required parameter: "userId"');} let path='/users/{userId}/logs'.replace('{userId}',userId);let payload={};if(typeof limit!=='undefined'){payload['limit']=limit;} if(typeof offset!=='undefined'){payload['offset']=offset;} -const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),updateName:(userId,name)=>__awaiter(this,void 0,void 0,function*(){if(typeof userId==='undefined'){throw new AppwriteException('Missing required parameter: "userId"');} +const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),getMemberships:(userId)=>__awaiter(this,void 0,void 0,function*(){if(typeof userId==='undefined'){throw new AppwriteException('Missing required parameter: "userId"');} +let path='/users/{userId}/memberships'.replace('{userId}',userId);let payload={};const uri=new URL(this.config.endpoint+path);return yield this.call('get',uri,{'content-type':'application/json',},payload);}),updateName:(userId,name)=>__awaiter(this,void 0,void 0,function*(){if(typeof userId==='undefined'){throw new AppwriteException('Missing required parameter: "userId"');} if(typeof name==='undefined'){throw new AppwriteException('Missing required parameter: "name"');} let path='/users/{userId}/name'.replace('{userId}',userId);let payload={};if(typeof name!=='undefined'){payload['name']=name;} const uri=new URL(this.config.endpoint+path);return yield this.call('patch',uri,{'content-type':'application/json',},payload);}),updatePassword:(userId,password)=>__awaiter(this,void 0,void 0,function*(){if(typeof userId==='undefined'){throw new AppwriteException('Missing required parameter: "userId"');} @@ -630,7 +634,7 @@ setJWT(value){this.headers['X-Appwrite-JWT']=value;this.config.jwt=value;return setLocale(value){this.headers['X-Appwrite-Locale']=value;this.config.locale=value;return this;} setMode(value){this.headers['X-Appwrite-Mode']=value;this.config.mode=value;return this;} subscribe(channels,callback){let channelArray=typeof channels==='string'?[channels]:channels;channelArray.forEach(channel=>this.realtime.channels.add(channel));const counter=this.realtime.subscriptionsCounter++;this.realtime.subscriptions.set(counter,{channels:channelArray,callback});this.realtime.connect();return()=>{this.realtime.subscriptions.delete(counter);this.realtime.cleanUp(channelArray);this.realtime.connect();};} -call(method,url,headers={},params={}){var _a,_b;return __awaiter(this,void 0,void 0,function*(){method=method.toUpperCase();headers=Object.assign(Object.assign({},headers),this.headers);let options={method,headers,credentials:'include'};if(typeof window!=='undefined'&&window.localStorage){headers['X-Fallback-Cookies']=(_a=window.localStorage.getItem('cookieFallback'))!==null&&_a!==void 0?_a:'';} +call(method,url,headers={},params={}){var _a,_b;return __awaiter(this,void 0,void 0,function*(){method=method.toUpperCase();headers=Object.assign({},this.headers,headers);let options={method,headers,credentials:'include'};if(typeof window!=='undefined'&&window.localStorage){headers['X-Fallback-Cookies']=(_a=window.localStorage.getItem('cookieFallback'))!==null&&_a!==void 0?_a:'';} if(method==='GET'){for(const[key,value]of Object.entries(this.flatten(params))){url.searchParams.append(key,value);}} else{switch(headers['content-type']){case'application/json':options.body=JSON.stringify(params);break;case'multipart/form-data':let formData=new FormData();for(const key in params){if(Array.isArray(params[key])){params[key].forEach((value)=>{formData.append(key+'[]',value);});} else{formData.append(key,params[key]);}} @@ -3047,4 +3051,4 @@ rule.replacement(content,node,this.options)+ whitespace.trailing)} function join(output,replacement){var s1=trimTrailingNewlines(output);var s2=trimLeadingNewlines(replacement);var nls=Math.max(output.length-s1.length,replacement.length-s2.length);var separator='\n\n'.substring(0,nls);return s1+separator+s2} function canConvert(input){return(input!=null&&(typeof input==='string'||(input.nodeType&&(input.nodeType===1||input.nodeType===9||input.nodeType===11))))} -return TurndownService;}());var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,e={},M={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof W?new W(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=l.reach);y+=m.value.length,m=m.next){var k=m.value;if(t.length>n.length)return;if(!(k instanceof W)){var x,b=1;if(h){if(!(x=z(p,y,n,f))||x.index>=n.length)break;var w=x.index,A=x.index+x[0].length,E=y;for(E+=m.value.length;E<=w;)m=m.next,E+=m.value.length;if(E-=m.value.length,y=E,m.value instanceof W)continue;for(var P=m;P!==t.tail&&(El.reach&&(l.reach=j);var C=m.prev;S&&(C=I(t,C,S),y+=S.length),T(t,C,b);var N=new W(o,g?M.tokenize(L,g):L,d,L);if(m=I(t,C,N),O&&I(t,m,O),1l.reach&&(l.reach=_.reach)}}}}}}(e,a,n,a.head,0),function(e){var n=[],t=e.head.next;for(;t!==e.tail;)n.push(t.value),t=t.next;return n}(a)},hooks:{all:{},add:function(e,n){var t=M.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=M.hooks.all[e];if(t&&t.length)for(var r,a=0;r=t[a++];)r(n)}},Token:W};function W(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=0|(r||"").length}function z(e,n,t,r){e.lastIndex=n;var a=e.exec(t);if(a&&r&&a[1]){var i=a[1].length;a.index+=i,a[0]=a[0].slice(i)}return a}function i(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function I(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function T(e,n,t){for(var r=n.next,a=0;a"+a.content+""},!u.document)return u.addEventListener&&(M.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(M.highlight(r,M.languages[t],t)),a&&u.close()},!1)),M;var r=M.util.currentScript();function a(){M.manual||M.highlightAll()}if(r&&(M.filename=r.src,r.hasAttribute("data-manual")&&(M.manual=!0)),!M.manual){var l=document.readyState;"loading"===l||"interactive"===l&&r&&r.defer?document.addEventListener("DOMContentLoaded",a):window.requestAnimationFrame?window.requestAnimationFrame(a):window.setTimeout(a,16)}return M}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var t={"included-cdata":{pattern://i,inside:s}};t["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var n={};n[a]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:t},Prism.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp("(^|[\"'\\s])(?:"+a+")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))","i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml;!function(s){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var t=s.languages.markup;t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(Prism);Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript;!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},a={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:a.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],s=a.variable[1].inside,i=0;i>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",r="class enum interface record struct",i="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(r),p=RegExp(l(n+" "+r+" "+i+" "+o)),c=l(r+" "+i+" "+o),u=l(n+" "+r+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("<<0>>(?:\\s*(?:\\?\\s*)?<<1>>)*(?:\\s*\\?)?",[m,k]),w=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),v={keyword:p,punctuation:/[<>()?,.:[\]]/},x="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",$='"(?:\\\\.|[^\\\\"\r\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[^]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[$]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:v},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,w]),lookbehind:!0,inside:v},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:v},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:v},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is(?:\\s+not)?|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:v},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>|with\\s*\\{)<<2>>(?:\\s*[=,;:{)\\]]|\\s+(?:in|when)\\b))",[w,u,h]),inside:v}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|sizeof|typeof)\\s*\\(\\s*(?!\\s))(?:[^()\\s]|\\s(?!\\s)|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:v},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[w,m]),inside:v,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[w]),lookbehind:!0,inside:v,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:v}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|record\\s+<<1>>\\s*<<5>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>|<<1>>\\s*<<5>>|<<6>>)(?:\\s*,\\s*(?:<<3>>|<<4>>|<<6>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,w,p.source,b,"\\bnew\\s*\\(\\s*\\)"]),lookbehind:!0,inside:{"record-arguments":{pattern:t("(^(?!new\\s*\\()<<0>>\\s*)<<1>>",[f,b]),lookbehind:!0,greedy:!0,inside:s.languages.csharp},keyword:p,"class-name":{pattern:RegExp(w),greedy:!0,inside:v},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var _=$+"|"+x,B=a("/(?![*/])|//[^\r\n]*[\r\n]|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>",[_]),E=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[B]),2),R="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",z=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,E]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[R,z]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[R]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[E]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var S=":[^}\r\n]+",j=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[B]),2),A=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[j,S]),F=e(a("[^\"'/()]|/(?!\\*)|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>|\\(<>*\\)",[_]),2),P=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[F,S]);function U(e,n){return{interpolation:{pattern:t("((?:^|[^{])(?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,S]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[^]|\\{\\{|<<0>>|[^\\\\{"])*"',[A]),lookbehind:!0,greedy:!0,inside:U(A,j)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[P]),lookbehind:!0,greedy:!0,inside:U(P,F)}],char:{pattern:RegExp(x),greedy:!0}}),s.languages.dotnet=s.languages.cs=s.languages.csharp}(Prism);!function(e){var a=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],n="(^|[^\\w.])(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*",s={pattern:RegExp(n+"[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b"),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};e.languages.dart=e.languages.extend("clike",{"class-name":[s,{pattern:RegExp(n+"[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()])"),lookbehind:!0,inside:s.inside}],keyword:a,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),e.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.dart}}},string:/[\s\S]+/}},string:void 0}),e.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),e.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":s,keyword:a,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism);Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"];Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},Prism.hooks.add("after-tokenize",function(n){if("graphql"===n.language)for(var o=n.tokens.filter(function(n){return"string"!=typeof n&&"comment"!==n.type&&"scalar"!==n.type}),s=0;s>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":a,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},namespace:{pattern:RegExp("(\\b(?:exports|import(?:\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\s+)(?!)[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?".replace(//g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json;!function(n){n.languages.kotlin=n.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete n.languages.kotlin["class-name"];var e={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:n.languages.kotlin}};n.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:e},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:e},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete n.languages.kotlin.string,n.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),n.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),n.languages.kt=n.languages.kotlin,n.languages.kts=n.languages.kotlin}(Prism);!function(h){function v(e,n){return"___"+e.toUpperCase()+n+"___"}Object.defineProperties(h.languages["markup-templating"]={},{buildPlaceholders:{value:function(a,r,e,o){if(a.language===r){var c=a.tokenStack=[];a.code=a.code.replace(e,function(e){if("function"==typeof o&&!o(e))return e;for(var n,t=c.length;-1!==a.code.indexOf(n=v(r,t));)++t;return c[t]=e,n}),a.grammar=h.languages.markup}}},tokenizePlaceholders:{value:function(p,k){if(p.language===k&&p.tokenStack){p.grammar=h.languages[k];var m=0,d=Object.keys(p.tokenStack);!function e(n){for(var t=0;t=d.length);t++){var a=n[t];if("string"==typeof a||a.content&&"string"==typeof a.content){var r=d[m],o=p.tokenStack[r],c="string"==typeof a?a:a.content,i=v(k,r),u=c.indexOf(i);if(-1|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism);!function(e){var i=Prism.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};i.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:i},boolean:i.boolean,variable:i.variable}}();Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python;!function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var n={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var t="(?:"+["([^a-zA-Z0-9\\s{(\\[<=])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1","\\((?:[^()\\\\]|\\\\[^]|\\((?:[^()\\\\]|\\\\[^])*\\))*\\)","\\{(?:[^{}\\\\]|\\\\[^]|\\{(?:[^{}\\\\]|\\\\[^])*\\})*\\}","\\[(?:[^\\[\\]\\\\]|\\\\[^]|\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\])*\\]","<(?:[^<>\\\\]|\\\\[^]|<(?:[^<>\\\\]|\\\\[^])*>)*>"].join("|")+")",i='(?:"(?:\\\\.|[^"\\\\\r\n])*"|(?:\\b[a-zA-Z_]\\w*|[^\\s\0-\\x7F]+)[?!]?|\\$.)';e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp("%r"+t+"[egimnosux]{0,6}"),greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp("(^|[^:]):"+i),lookbehind:!0,greedy:!0},{pattern:RegExp("([\r\n{(,][ \t]*)"+i+"(?=:(?!:))"),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp("%[qQiIwWs]?"+t),greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp("%x"+t),greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(Prism);Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp('(^|[^"#])(?:"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^(])|[^\\\\\r\n"])*"|"""(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|[^(])|[^\\\\"]|"(?!""))*""")(?!["#])'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp('(^|[^"#])(#+)(?:"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^#])|[^\\\\\r\n])*?"|"""(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|[^#])|[^\\\\])*?""")\\2'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp("#(?:(?:elseif|if)\\b(?:[ \t]*(?:![ \t]*)?(?:\\b\\w+\\b(?:[ \t]*\\((?:[^()]|\\([^()]*\\))*\\))?|\\((?:[^()]|\\([^()]*\\))*\\))(?:[ \t]*(?:&&|\\|\\|))?)+|(?:else|endif)\\b)"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift});!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var s=e.languages.extend("typescript",{});delete s["class-name"],e.languages.typescript["class-name"].inside=s,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:s}}}}),e.languages.ts=e.languages.typescript}(Prism);!function(e){var n=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,t="(?:"+r.source+"(?:[ \t]+"+n.source+")?|"+n.source+"(?:[ \t]+"+r.source+")?)",a="(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*".replace(//g,function(){return"[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]"}),d="\"(?:[^\"\\\\\r\n]|\\\\.)*\"|'(?:[^'\\\\\r\n]|\\\\.)*'";function o(e,n){n=(n||"").replace(/m/g,"")+"m";var r="([:\\-,[{]\\s*(?:\\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\\]|\\}|(?:[\r\n]\\s*)?#))".replace(/<>/g,function(){return t}).replace(/<>/g,function(){return e});return RegExp(r,n)}e.languages.yaml={scalar:{pattern:RegExp("([\\-:]\\s*(?:\\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\\S[^\r\n]*(?:\\2[^\r\n]+)*)".replace(/<>/g,function(){return t})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp("((?:^|[:\\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\\s*:\\s)".replace(/<>/g,function(){return t}).replace(/<>/g,function(){return"(?:"+a+"|"+d+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o("\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ \t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?"),lookbehind:!0,alias:"number"},boolean:{pattern:o("false|true","i"),lookbehind:!0,alias:"important"},null:{pattern:o("null|~","i"),lookbehind:!0,alias:"important"},string:{pattern:o(d),lookbehind:!0,greedy:!0},number:{pattern:o("[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)","i"),lookbehind:!0},tag:r,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(Prism);!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var o="line-numbers",a=/\n(?!$)/g,e=Prism.plugins.lineNumbers={getLine:function(e,n){if("PRE"===e.tagName&&e.classList.contains(o)){var t=e.querySelector(".line-numbers-rows");if(t){var i=parseInt(e.getAttribute("data-start"),10)||1,r=i+(t.children.length-1);n");(i=document.createElement("span")).setAttribute("aria-hidden","true"),i.className="line-numbers-rows",i.innerHTML=l,t.hasAttribute("data-start")&&(t.style.counterReset="linenumber "+(parseInt(t.getAttribute("data-start"),10)-1)),e.element.appendChild(i),u([t]),Prism.hooks.run("line-numbers",e)}}}),Prism.hooks.add("line-numbers",function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0})}function u(e){if(0!=(e=e.filter(function(e){var n=function(e){return e?window.getComputedStyle?getComputedStyle(e):e.currentStyle||null:null}(e)["white-space"];return"pre-wrap"===n||"pre-line"===n})).length){var n=e.map(function(e){var n=e.querySelector("code"),t=e.querySelector(".line-numbers-rows");if(n&&t){var i=e.querySelector(".line-numbers-sizer"),r=n.textContent.split(a);i||((i=document.createElement("span")).className="line-numbers-sizer",n.appendChild(i)),i.innerHTML="0",i.style.display="block";var s=i.getBoundingClientRect().height;return i.innerHTML="",{element:e,lines:r,lineHeights:[],oneLinerHeight:s,sizer:i}}}).filter(Boolean);n.forEach(function(e){var i=e.sizer,n=e.lines,r=e.lineHeights,s=e.oneLinerHeight;r[n.length-1]=void 0,n.forEach(function(e,n){if(e&&1=g.reach);A+=w.value.length,w=w.next){var E=w.value;if(n.length>e.length)return;if(!(E instanceof i)){var P,L=1;if(y){if(!(P=l(b,A,e,m))||P.index>=e.length)break;var S=P.index,O=P.index+P[0].length,j=A;for(j+=w.value.length;S>=j;)j+=(w=w.next).value.length;if(A=j-=w.value.length,w.value instanceof i)continue;for(var C=w;C!==n.tail&&(jg.reach&&(g.reach=W);var z=w.prev;if(_&&(z=u(n,z,_),A+=_.length),c(n,z,L),w=u(n,z,new i(f,p?a.tokenize(N,p):N,k,N)),M&&u(n,w,M),L>1){var I={cause:f+","+d,reach:W};o(e,n,t,w.prev,A,I),g&&I.reach>g.reach&&(g.reach=I.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function u(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function c(e,n,t){for(var r=n.next,a=0;a"+i.content+""},!e.document)return e.addEventListener?(a.disableWorkerMessageHandler||e.addEventListener("message",(function(n){var t=JSON.parse(n.data),r=t.language,i=t.code,l=t.immediateClose;e.postMessage(a.highlight(i,a.languages[r],r)),l&&e.close()}),!1),a):a;var g=a.util.currentScript();function f(){a.manual||a.highlightAll()}if(g&&(a.filename=g.src,g.hasAttribute("data-manual")&&(a.manual=!0)),!a.manual){var h=document.readyState;"loading"===h||"interactive"===h&&g&&g.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return a}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var t={"included-cdata":{pattern://i,inside:s}};t["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var n={};n[a]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,(function(){return a})),"i"),lookbehind:!0,greedy:!0,inside:t},Prism.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp("(^|[\"'\\s])(?:"+a+")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))","i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml;!function(s){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var t=s.languages.markup;t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(Prism);Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp("((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))"),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript;!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},a={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:a.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],s=a.variable[1].inside,i=0;i>/g,(function(e,s){return"(?:"+n[+s]+")"}))}function s(e,s,a){return RegExp(n(e,s),a||"")}function a(e,n){for(var s=0;s>/g,(function(){return"(?:"+e+")"}));return e.replace(/<>/g,"[^\\s\\S]")}var t="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",r="class enum interface record struct",i="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(r),p=RegExp(l(t+" "+r+" "+i+" "+o)),c=l(r+" "+i+" "+o),u=l(t+" "+r+" "+o),g=a("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=a("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=n("<<0>>(?:\\s*<<1>>)?",[h,g]),m=n("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=n("<<0>>(?:\\s*(?:\\?\\s*)?<<1>>)*(?:\\s*\\?)?",[m,k]),w=n("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k]),v=n("\\(<<0>>+(?:,<<0>>+)+\\)",[w]),x=n("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[v,m,k]),$={keyword:p,punctuation:/[<>()?,.:[\]]/},_="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",B='"(?:\\\\.|[^\\\\"\r\n])*"';e.languages.csharp=e.languages.extend("clike",{string:[{pattern:s("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[^]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:s("(^|[^@$\\\\])<<0>>",[B]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:s("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:$},{pattern:s("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,x]),lookbehind:!0,inside:$},{pattern:s("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:s("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:$},{pattern:s("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:$},{pattern:s("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:s("(\\b(?:is(?:\\s+not)?|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:$},{pattern:s("\\b<<0>>(?=\\s+(?!<<1>>|with\\s*\\{)<<2>>(?:\\s*[=,;:{)\\]]|\\s+(?:in|when)\\b))",[x,u,h]),inside:$}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:s("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:s("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:s("(\\b(?:default|sizeof|typeof)\\s*\\(\\s*(?!\\s))(?:[^()\\s]|\\s(?!\\s)|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:$},"return-type":{pattern:s("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[x,m]),inside:$,alias:"class-name"},"constructor-invocation":{pattern:s("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[x]),lookbehind:!0,inside:$,alias:"class-name"},"generic-method":{pattern:s("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:s("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:$}}},"type-list":{pattern:s("\\b((?:<<0>>\\s+<<1>>|record\\s+<<1>>\\s*<<5>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>|<<1>>\\s*<<5>>|<<6>>)(?:\\s*,\\s*(?:<<3>>|<<4>>|<<6>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,x,p.source,b,"\\bnew\\s*\\(\\s*\\)"]),lookbehind:!0,inside:{"record-arguments":{pattern:s("(^(?!new\\s*\\()<<0>>\\s*)<<1>>",[f,b]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:p,"class-name":{pattern:RegExp(x),greedy:!0,inside:$},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var E=B+"|"+_,R=n("/(?![*/])|//[^\r\n]*[\r\n]|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>",[E]),z=a(n("[^\"'/()]|<<0>>|\\(<>*\\)",[R]),2),S="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",j=n("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,z]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:s("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[S,j]),lookbehind:!0,greedy:!0,inside:{target:{pattern:s("^<<0>>(?=\\s*:)",[S]),alias:"keyword"},"attribute-arguments":{pattern:s("\\(<<0>>*\\)",[z]),inside:e.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var A=":[^}\r\n]+",F=a(n("[^\"'/()]|<<0>>|\\(<>*\\)",[R]),2),P=n("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[F,A]),U=a(n("[^\"'/()]|/(?!\\*)|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>|\\(<>*\\)",[E]),2),Z=n("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[U,A]);function q(n,a){return{interpolation:{pattern:s("((?:^|[^{])(?:\\{\\{)*)<<0>>",[n]),lookbehind:!0,inside:{"format-string":{pattern:s("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[a,A]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:s('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[^]|\\{\\{|<<0>>|[^\\\\{"])*"',[P]),lookbehind:!0,greedy:!0,inside:q(P,F)},{pattern:s('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[Z]),lookbehind:!0,greedy:!0,inside:q(Z,U)}],char:{pattern:RegExp(_),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(Prism);!function(e){var a=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],n="(^|[^\\w.])(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*",s={pattern:RegExp(n+"[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b"),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};e.languages.dart=e.languages.extend("clike",{"class-name":[s,{pattern:RegExp(n+"[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()])"),lookbehind:!0,inside:s.inside}],keyword:a,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),e.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.dart}}},string:/[\s\S]+/}},string:void 0}),e.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),e.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":s,keyword:a,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism);Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"];Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},Prism.hooks.add("after-tokenize",(function(n){if("graphql"===n.language)for(var t=n.tokens.filter((function(n){return"string"!=typeof n&&"comment"!==n.type&&"scalar"!==n.type})),e=0;e0)){var s=f(/^\{$/,/^\}$/);if(-1===s)continue;for(var u=e;u=0&&b(p,"variable-input")}}}}function l(n){return t[e+n]}function c(n,t){t=t||0;for(var e=0;e=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,t="(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*",s={pattern:RegExp("(^|[^\\w.])"+t+"[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b"),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[s,{pattern:RegExp("(^|[^\\w.])"+t+"[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()]|\\s*(?:\\[[\\s,]*\\]\\s*)?::\\s*new\\b)"),lookbehind:!0,inside:s.inside},{pattern:RegExp("(\\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\\s+)"+t+"[A-Z]\\w*\\b"),lookbehind:!0,inside:s.inside}],keyword:n,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":s,keyword:n,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp("(\\bimport\\s+)"+t+"(?:[A-Z]\\w*|\\*)(?=\\s*;)"),lookbehind:!0,inside:{namespace:s.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp("(\\bimport\\s+static\\s+)"+t+"(?:\\w+|\\*)(?=\\s*;)"),lookbehind:!0,alias:"static",inside:{namespace:s.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp("(\\b(?:exports|import(?:\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\s+)(?!)[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?".replace(//g,(function(){return n.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json;!function(n){n.languages.kotlin=n.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete n.languages.kotlin["class-name"];var e={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:n.languages.kotlin}};n.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:e},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:e},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete n.languages.kotlin.string,n.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),n.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),n.languages.kt=n.languages.kotlin,n.languages.kts=n.languages.kotlin}(Prism);!function(e){function n(e,n){return"___"+e.toUpperCase()+n+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(t,a,r,o){if(t.language===a){var c=t.tokenStack=[];t.code=t.code.replace(r,(function(e){if("function"==typeof o&&!o(e))return e;for(var r,i=c.length;-1!==t.code.indexOf(r=n(a,i));)++i;return c[i]=e,r})),t.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(t,a){if(t.language===a&&t.tokenStack){t.grammar=e.languages[a];var r=0,o=Object.keys(t.tokenStack);!function c(i){for(var u=0;u=o.length);u++){var g=i[u];if("string"==typeof g||g.content&&"string"==typeof g.content){var l=o[r],s=t.tokenStack[l],f="string"==typeof g?g:g.content,p=n(a,l),k=f.indexOf(p);if(k>-1){++r;var m=f.substring(0,k),d=new e.Token(a,e.tokenize(s,t.grammar),"language-"+a,s),h=f.substring(k+p.length),v=[];m&&v.push.apply(v,c([m])),v.push(d),h&&v.push.apply(v,c([h])),"string"==typeof g?i.splice.apply(i,[u,1].concat(v)):g.content=v}}else g.content&&c(g.content)}return i}(t.tokens)}}}})}(Prism);!function(e){var a=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:a,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];e.languages.insertBefore("php","variable",{string:r,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:a,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",(function(a){/<\?/.test(a.code)&&e.languages["markup-templating"].buildPlaceholders(a,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)})),e.hooks.add("after-tokenize",(function(a){e.languages["markup-templating"].tokenizePlaceholders(a,"php")}))}(Prism);!function(e){var i=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};i.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:i},boolean:i.boolean,variable:i.variable}}(Prism);Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python;!function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var n={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var t="(?:"+["([^a-zA-Z0-9\\s{(\\[<=])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1","\\((?:[^()\\\\]|\\\\[^]|\\((?:[^()\\\\]|\\\\[^])*\\))*\\)","\\{(?:[^{}\\\\]|\\\\[^]|\\{(?:[^{}\\\\]|\\\\[^])*\\})*\\}","\\[(?:[^\\[\\]\\\\]|\\\\[^]|\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\])*\\]","<(?:[^<>\\\\]|\\\\[^]|<(?:[^<>\\\\]|\\\\[^])*>)*>"].join("|")+")",i='(?:"(?:\\\\.|[^"\\\\\r\n])*"|(?:\\b[a-zA-Z_]\\w*|[^\\s\0-\\x7F]+)[?!]?|\\$.)';e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp("%r"+t+"[egimnosux]{0,6}"),greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp("(^|[^:]):"+i),lookbehind:!0,greedy:!0},{pattern:RegExp("([\r\n{(,][ \t]*)"+i+"(?=:(?!:))"),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp("%[qQiIwWs]?"+t),greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp("%x"+t),greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(Prism);Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp('(^|[^"#])(?:"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^(])|[^\\\\\r\n"])*"|"""(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|[^(])|[^\\\\"]|"(?!""))*""")(?!["#])'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp('(^|[^"#])(#+)(?:"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^#])|[^\\\\\r\n])*?"|"""(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|[^#])|[^\\\\])*?""")\\2'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp("#(?:(?:elseif|if)\\b(?:[ \t]*(?:![ \t]*)?(?:\\b\\w+\\b(?:[ \t]*\\((?:[^()]|\\([^()]*\\))*\\))?|\\((?:[^()]|\\([^()]*\\))*\\))(?:[ \t]*(?:&&|\\|\\|))?)+|(?:else|endif)\\b)"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=Prism.languages.swift}));!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var s=e.languages.extend("typescript",{});delete s["class-name"],e.languages.typescript["class-name"].inside=s,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:s}}}}),e.languages.ts=e.languages.typescript}(Prism);!function(e){var n=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,t="(?:"+r.source+"(?:[ \t]+"+n.source+")?|"+n.source+"(?:[ \t]+"+r.source+")?)",a="(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*".replace(//g,(function(){return"[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]"})),d="\"(?:[^\"\\\\\r\n]|\\\\.)*\"|'(?:[^'\\\\\r\n]|\\\\.)*'";function o(e,n){n=(n||"").replace(/m/g,"")+"m";var r="([:\\-,[{]\\s*(?:\\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\\]|\\}|(?:[\r\n]\\s*)?#))".replace(/<>/g,(function(){return t})).replace(/<>/g,(function(){return e}));return RegExp(r,n)}e.languages.yaml={scalar:{pattern:RegExp("([\\-:]\\s*(?:\\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\\S[^\r\n]*(?:\\2[^\r\n]+)*)".replace(/<>/g,(function(){return t}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp("((?:^|[:\\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\\s*:\\s)".replace(/<>/g,(function(){return t})).replace(/<>/g,(function(){return"(?:"+a+"|"+d+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o("\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ \t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?"),lookbehind:!0,alias:"number"},boolean:{pattern:o("false|true","i"),lookbehind:!0,alias:"important"},null:{pattern:o("null|~","i"),lookbehind:!0,alias:"important"},string:{pattern:o(d),lookbehind:!0,greedy:!0},number:{pattern:o("[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)","i"),lookbehind:!0},tag:r,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(Prism);!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var e="line-numbers",n=/\n(?!$)/g,t=Prism.plugins.lineNumbers={getLine:function(n,t){if("PRE"===n.tagName&&n.classList.contains(e)){var i=n.querySelector(".line-numbers-rows");if(i){var r=parseInt(n.getAttribute("data-start"),10)||1,s=r+(i.children.length-1);ts&&(t=s);var l=t-r;return i.children[l]}}},resize:function(e){r([e])},assumeViewportIndependence:!0},i=void 0;window.addEventListener("resize",(function(){t.assumeViewportIndependence&&i===window.innerWidth||(i=window.innerWidth,r(Array.prototype.slice.call(document.querySelectorAll("pre.line-numbers"))))})),Prism.hooks.add("complete",(function(t){if(t.code){var i=t.element,s=i.parentNode;if(s&&/pre/i.test(s.nodeName)&&!i.querySelector(".line-numbers-rows")&&Prism.util.isActive(i,e)){i.classList.remove(e),s.classList.add(e);var l,o=t.code.match(n),a=o?o.length+1:1,u=new Array(a+1).join("");(l=document.createElement("span")).setAttribute("aria-hidden","true"),l.className="line-numbers-rows",l.innerHTML=u,s.hasAttribute("data-start")&&(s.style.counterReset="linenumber "+(parseInt(s.getAttribute("data-start"),10)-1)),t.element.appendChild(l),r([s]),Prism.hooks.run("line-numbers",t)}}})),Prism.hooks.add("line-numbers",(function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0}))}function r(e){if(0!=(e=e.filter((function(e){var n,t=(n=e,n?window.getComputedStyle?getComputedStyle(n):n.currentStyle||null:null)["white-space"];return"pre-wrap"===t||"pre-line"===t}))).length){var t=e.map((function(e){var t=e.querySelector("code"),i=e.querySelector(".line-numbers-rows");if(t&&i){var r=e.querySelector(".line-numbers-sizer"),s=t.textContent.split(n);r||((r=document.createElement("span")).className="line-numbers-sizer",t.appendChild(r)),r.innerHTML="0",r.style.display="block";var l=r.getBoundingClientRect().height;return r.innerHTML="",{element:e,lines:s,lineHeights:[],oneLinerHeight:l,sizer:r}}})).filter(Boolean);t.forEach((function(e){var n=e.sizer,t=e.lines,i=e.lineHeights,r=e.oneLinerHeight;i[t.length-1]=void 0,t.forEach((function(e,t){if(e&&e.length>1){var s=n.appendChild(document.createElement("span"));s.style.display="block",s.textContent=e}else i[t]=r}))})),t.forEach((function(e){for(var n=e.sizer,t=e.lineHeights,i=0,r=0;r{let root=closestRoot(el);if(!root._x_refs) root._x_refs={};root._x_refs[expression]=el;cleanup2(()=>delete root._x_refs[expression]);};directive("ref",handler2);directive("if",(el,{expression},{effect:effect3,cleanup:cleanup2})=>{let evaluate2=evaluateLater(el,expression);let show=()=>{if(el._x_currentIfEl) return el._x_currentIfEl;let clone2=el.content.cloneNode(true).firstElementChild;addScopeToNode(clone2,{},el);mutateDom(()=>{el.after(clone2);initTree(clone2);});el._x_currentIfEl=clone2;el._x_undoIf=()=>{clone2.remove();delete el._x_currentIfEl;};return clone2;};let hide=()=>{if(!el._x_undoIf) -return;el._x_undoIf();delete el._x_undoIf;};effect3(()=>evaluate2((value)=>{value?show():hide();}));cleanup2(()=>el._x_undoIf&&el._x_undoIf());});mapAttributes(startingWith("@",into(prefix("on:"))));directive("on",skipDuringClone((el,{value,modifiers,expression},{cleanup:cleanup2})=>{let evaluate2=expression?evaluateLater(el,expression):()=>{};let removeListener=on(el,value,modifiers,(e)=>{evaluate2(()=>{},{scope:{$event:e},params:[e]});});cleanup2(()=>removeListener());}));alpine_default.setEvaluator(normalEvaluator);alpine_default.setReactivityEngine({reactive:reactive2,effect:effect2,release:stop,raw:toRaw});var src_default=alpine_default;window.Alpine=src_default;queueMicrotask(()=>{src_default.start();});})();window.ls.error=function(){return function(error){window.console.error(error);if(window.location.pathname!=='/console'){window.location='/console';}};};window.addEventListener("error",function(event){console.error("ERROR-EVENT:",event.error.message,event.error.stack);});document.addEventListener("account.deleteSession",function(){window.location="/auth/signin";});document.addEventListener("account.create",function(){let container=window.ls.container;let form=container.get('serviceForm');let sdk=container.get('console');let promise=sdk.account.createSession(form.email,form.password);container.set("serviceForm",{},true,true);promise.then(function(){var subscribe=document.getElementById('newsletter').checked;if(subscribe){let alerts=container.get('alerts');let loaderId=alerts.add({text:'Loading...',class:""},0);fetch('https://appwrite.io/v1/newsletter/subscribe',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({name:form.name,email:form.email,}),}).finally(function(){alerts.remove(loaderId);window.location='/console';});}else{window.location='/console';}},function(error){window.location='/auth/signup?failure=1';});});window.addEventListener("load",async()=>{const bars=12;const realtime=window.ls.container.get('realtime');const sleep=ms=>new Promise(resolve=>setTimeout(resolve,ms));let current={};window.ls.container.get('console').subscribe(['project','console'],response=>{switch(response.event){case'stats.connections':for(let project in response.payload){current[project]=response.payload[project]??0;} -break;case'database.attributes.create':case'database.attributes.update':case'database.attributes.delete':document.dispatchEvent(new CustomEvent('database.createAttribute'));break;case'database.indexes.create':case'database.indexes.update':case'database.indexes.delete':document.dispatchEvent(new CustomEvent('database.createIndex'));break;case'functions.deployments.create':case'functions.deployments.update':case'functions.deployments.delete':document.dispatchEvent(new CustomEvent('functions.createDeployment'));break;case'functions.executions.create':case'functions.executions.update':case'functions.executions.delete':document.dispatchEvent(new CustomEvent('functions.createExecution'));break;}});while(true){let newHistory={};let createdHistory=false;for(const project in current){let history=realtime?.history??{};if(!(project in history)){history[project]=new Array(bars).fill({percentage:0,value:0});} +return;el._x_undoIf();delete el._x_undoIf;};effect3(()=>evaluate2((value)=>{value?show():hide();}));cleanup2(()=>el._x_undoIf&&el._x_undoIf());});mapAttributes(startingWith("@",into(prefix("on:"))));directive("on",skipDuringClone((el,{value,modifiers,expression},{cleanup:cleanup2})=>{let evaluate2=expression?evaluateLater(el,expression):()=>{};let removeListener=on(el,value,modifiers,(e)=>{evaluate2(()=>{},{scope:{$event:e},params:[e]});});cleanup2(()=>removeListener());}));alpine_default.setEvaluator(normalEvaluator);alpine_default.setReactivityEngine({reactive:reactive2,effect:effect2,release:stop,raw:toRaw});var src_default=alpine_default;window.Alpine=src_default;queueMicrotask(()=>{src_default.start();});})();window.ls.error=function(){return function(error){window.console.error(error);if(window.location.pathname!=='/console'){window.location='/console';}};};window.addEventListener("error",function(event){console.error("ERROR-EVENT:",event.error.message,event.error.stack);});document.addEventListener("account.deleteSession",function(){window.location="/auth/signin";});document.addEventListener("account.create",function(){let container=window.ls.container;let form=container.get('serviceForm');let sdk=container.get('console');let promise=sdk.account.createSession(form.email,form.password);container.set("serviceForm",{},true,true);promise.then(function(){var subscribe=document.getElementById('newsletter').checked;if(subscribe){let alerts=container.get('alerts');let loaderId=alerts.add({text:'Loading...',class:""},0);fetch('https://appwrite.io/v1/newsletter/subscribe',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({name:form.name,email:form.email,}),}).finally(function(){alerts.remove(loaderId);window.location='/console';});}else{window.location='/console';}},function(error){window.location='/auth/signup?failure=1';});});window.addEventListener("load",async()=>{const bars=12;const realtime=window.ls.container.get('realtime');const sleep=ms=>new Promise(resolve=>setTimeout(resolve,ms));let current={};window.ls.container.get('console').subscribe(['project','console'],response=>{if(response.events.includes('stats.connections')){for(let project in response.payload){current[project]=response.payload[project]??0;} +return;} +if(response.events.includes('collections.*.attributes.*')){document.dispatchEvent(new CustomEvent('database.createAttribute'));return;} +if(response.events.includes('collections.*.indexes.*')){document.dispatchEvent(new CustomEvent('database.createIndex'));return;} +if(response.events.includes('functions.*.deployments.*')){document.dispatchEvent(new CustomEvent('functions.createDeployment'));return;} +if(response.events.includes('functions.*.executions.*')){document.dispatchEvent(new CustomEvent('functions.createExecution'));return;}});while(true){let newHistory={};for(const project in current){let history=realtime?.history??{};if(!(project in history)){history[project]=new Array(bars).fill({percentage:0,value:0});} history=history[project];history.push({percentage:0,value:current[project]});if(history.length>=bars){history.shift();} const highest=history.reduce((prev,curr)=>{return(curr.value>prev)?curr.value:prev;},0);history=history.map(({percentage,value})=>{createdHistory=true;percentage=value===0?0:((Math.round((value/highest)*10)/10)*100);if(percentage>100)percentage=100;else if(percentage==0&&value!=0)percentage=5;return{percentage:percentage,value:value};}) newHistory[project]=history;} @@ -647,7 +651,7 @@ return slf.renderToken(tokens,idx,opts);} md.renderer.rules.strong_open=renderEm;md.renderer.rules.strong_close=renderEm;return md;},true);})(window);(function(window){"use strict";window.ls.container.set('rtl',function(){var rtlStock="^ا^ب^ت^ث^ج^ح^خ^د^ذ^ر^ز^س^ش^ص^ض^ط^ظ^ع^غ^ف^ق^ك^ل^م^ن^ه^و^ي^א^ב^ג^ד^ה^ו^ז^ח^ט^י^כ^ך^ל^מ^ם^נ^ן^ס^ע^פ^ף^צ^ץ^ק^ר^ש^ת^";var special=["\n"," "," ","״",'"',"_","'","!","@","#","$","^","&","%","*","(",")","+","=","-","[","]","\\","/","{","}","|",":","<",">","?",",",".","0","1","2","3","4","5","6","7","8","9"];var isRTL=function(value){for(var i=0;i{return{current:null,history:null,setCurrent:function(currentConnections){var scope=this;scope.current=currentConnections;return scope.current;},setHistory:function(history){var scope=this;scope.history=history;return scope.history;}};},true,true);})(window);window.ls.router.add("/auth/signin",{template:"/auth/signin?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/signup",{template:"/auth/signup?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/recovery",{template:"/auth/recovery?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/recovery/reset",{template:"/auth/recovery/reset?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/confirm",{template:"/auth/confirm?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/join",{template:"/auth/join?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/magic-url",{template:"/auth/magic-url?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/oauth2/success",{template:"/auth/oauth2/success?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/oauth2/failure",{template:"/auth/oauth2/failure?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/console",{template:"/console?version="+APP_ENV.CACHEBUSTER,scope:"console"}).add("/console/account",{template:"/console/account?version="+APP_ENV.CACHEBUSTER,scope:"console"}).add("/console/account/:tab",{template:"/console/account?version="+APP_ENV.CACHEBUSTER,scope:"console"}).add("/console/home",{template:"/console/home?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/home/:tab",{template:"/console/home?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/platforms/:platform",{template:function(window){return window.location.pathname+"?version="+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/notifications",{template:"/console/notifications?version="+APP_ENV.CACHEBUSTER,scope:"console"}).add("/console/settings",{template:"/console/settings?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/settings/:tab",{template:"/console/settings?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/webhooks",{template:"/console/webhooks?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/webhooks/:tab",{template:"/console/webhooks?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/keys",{template:"/console/keys?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/keys/:tab",{template:"/console/keys?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/tasks",{template:"/console/tasks?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/tasks/:tab",{template:"/console/tasks?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/database",{template:"/console/database?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/database/usage",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/database/collection",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/database/collection/:tab",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/database/document",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/database/document/:tab",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/storage",{template:"/console/storage?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/storage/usage",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/storage/bucket",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/storage/bucket/:tab",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/users",{template:"/console/users?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/users/user",{template:"/console/users/user?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/users/user/:tab",{template:"/console/users/user?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/users/teams/team",{template:"/console/users/teams/team?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/users/teams/team/:tab",{template:"/console/users/teams/team?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/users/:tab",{template:"/console/users?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/functions",{template:"/console/functions?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/functions/function",{template:"/console/functions/function?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/functions/function/:tab",{template:"/console/functions/function?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/functions/:tab",{template:"/console/functions?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true});window.ls.filter.add("avatar",function($value,element){if(!$value){return"";} +return false;};return{isRTL:isRTL,};},true);})(window);(function(window){"use strict";window.ls.container.set('sdk',function(window,router){var sdk=new window.Appwrite();var endpoint=window.location.origin+'/v1';sdk.setEndpoint(endpoint).setProject(router.params.project||'').setLocale(APP_ENV.LOCALE).setMode('admin');return sdk;},false);})(window);(function(window){"use strict";window.ls.container.set('search',function(window){return{params:{},path:'',pointer:'',selected:'',};},true,true);})(window);(function(window){"use strict";window.ls.container.set('timezone',function(){return{convert:function(unixTime){var timezoneMinutes=new Date().getTimezoneOffset();timezoneMinutes=(timezoneMinutes===0)?0:-timezoneMinutes;return parseInt(unixTime)+(timezoneMinutes*60);}};},true);})(window);(function(window){"use strict";window.ls.container.set('realtime',()=>{return{current:null,history:null,setCurrent:function(currentConnections){var scope=this;scope.current=currentConnections;return scope.current;},setHistory:function(history){var scope=this;scope.history=history;return scope.history;}};},true,true);})(window);window.ls.router.add("/auth/signin",{template:"/auth/signin?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/signup",{template:"/auth/signup?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/recovery",{template:"/auth/recovery?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/recovery/reset",{template:"/auth/recovery/reset?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/confirm",{template:"/auth/confirm?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/join",{template:"/auth/join?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/magic-url",{template:"/auth/magic-url?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/oauth2/success",{template:"/auth/oauth2/success?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/auth/oauth2/failure",{template:"/auth/oauth2/failure?version="+APP_ENV.CACHEBUSTER,scope:"home"}).add("/console",{template:"/console?version="+APP_ENV.CACHEBUSTER,scope:"console"}).add("/console/account",{template:"/console/account?version="+APP_ENV.CACHEBUSTER,scope:"console"}).add("/console/account/:tab",{template:"/console/account?version="+APP_ENV.CACHEBUSTER,scope:"console"}).add("/console/home",{template:"/console/home?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/home/:tab",{template:"/console/home?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/platforms/:platform",{template:function(window){return window.location.pathname+"?version="+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/notifications",{template:"/console/notifications?version="+APP_ENV.CACHEBUSTER,scope:"console"}).add("/console/settings",{template:"/console/settings?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/settings/:tab",{template:"/console/settings?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/webhooks",{template:"/console/webhooks?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/webhooks/webhook",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/webhooks/webhook/new",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/keys",{template:"/console/keys?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/keys/:tab",{template:"/console/keys?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/tasks",{template:"/console/tasks?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/tasks/:tab",{template:"/console/tasks?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/database",{template:"/console/database?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/database/usage",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/database/collection",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/database/collection/:tab",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/database/document",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/database/document/:tab",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/storage",{template:"/console/storage?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/storage/usage",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/storage/bucket",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/storage/bucket/:tab",{template:function(window){return window.location.pathname+window.location.search+'&version='+APP_ENV.CACHEBUSTER;},scope:"console",project:true}).add("/console/users",{template:"/console/users?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/users/user",{template:"/console/users/user?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/users/user/:tab",{template:"/console/users/user?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/users/teams/team",{template:"/console/users/teams/team?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/users/teams/team/:tab",{template:"/console/users/teams/team?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/users/:tab",{template:"/console/users?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/functions",{template:"/console/functions?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/functions/function",{template:"/console/functions/function?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/functions/function/:tab",{template:"/console/functions/function?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true}).add("/console/functions/:tab",{template:"/console/functions?version="+APP_ENV.CACHEBUSTER,scope:"console",project:true});window.ls.filter.add("avatar",function($value,element){if(!$value){return"";} let size=element.dataset["size"]||80;let name=$value.name||$value||"";name=(typeof name!=='string')?'--':name;return def="/v1/avatars/initials?project=console"+"&name="+ encodeURIComponent(name)+"&width="+ size+"&height="+ @@ -695,8 +699,15 @@ let write=formData.get('write');if(write){write=JSON.parse(write);} if(this.getFile(id)){this.updateFile(id,{name:file.name,completed:false,failed:false,cancelled:false,error:"",});}else{this.addFile({id:id,name:file.name,progress:0,completed:false,failed:false,cancelled:false,error:"",});} target.reset();try{const response=await sdk.storage.createFile(bucketId,fileId,file,read,write,(progress)=>{this.updateFile(id,{id:progress.$id,progress:Math.round(progress.progress),error:"",});id=progress.$id;const file=this.getFile(id)??{};if(file.cancelled===true){throw'USER_CANCELLED';}});const existingFile=this.getFile(id)??{};if(existingFile.cancelled){this.updateFile(id,{id:response.$id,name:response.name,failed:false,});id=response.$id;throw'USER_CANCELLED'}else{this.updateFile(id,{id:response.$id,name:response.name,progress:100,completed:true,failed:false,});id=response.$id;} document.dispatchEvent(new CustomEvent('storage.createFile'));}catch(error){if(error==='USER_CANCELLED'){await sdk.storage.deleteFile(bucketId,id);this.updateFile(id,{cancelled:false,failed:true,});this.removeFile(id);}else{this.updateFile(id,{id:id,failed:true,error:error.message??error});} -document.dispatchEvent(new CustomEvent('storage.createFile'));}}});});})(window);(function(window){"use strict";window.ls.view.add({selector:"data-service",controller:function(element,view,container,form,alerts,expression,window){let action=element.dataset["service"];let service=element.dataset["name"]||null;let event=expression.parse(element.dataset["event"]);let confirm=element.dataset["confirm"]||"";let loading=element.dataset["loading"]||"";let loaderId=null;let scope=element.dataset["scope"]||"sdk";let success=element.dataset["success"]||"";let failure=element.dataset["failure"]||"";let running=false;let callbacks={hide:function(){return function(){return element.style.opacity='0';};},reset:function(){return function(){if("FORM"===element.tagName){return element.reset();} -throw new Error("This callback is only valid for forms");};},alert:function(text,classname){return function(alerts){alerts.add({text:text,class:classname||"success"},3000);};},redirect:function(url){return function(router){if(url==="/console"){window.location=url;return;} +document.dispatchEvent(new CustomEvent('storage.createFile'));}}});});})(window);(function(window){document.addEventListener('alpine:init',()=>{Alpine.data('events',()=>({events:new Set(),selected:null,action:null,type:null,subType:null,resource:null,resourceName:'',subResource:null,subResourceName:'',hasResource:false,hasSubResource:false,attribute:null,hasAttribute:false,attributes:[],load(events){this.events=new Set(events);},reset(){this.hasResource=this.hasSubResource=this.hasAttribute=false;this.type=this.subType=this.subResource=this.resource=this.attribute=this.selected=this.action=null;},setEvent(){this.hasResource=this.hasSubResource=this.hasAttribute=this.action=false;if(!this.selected){this.reset();return;} +let[type,action]=this.selected.split('.');switch(type){case'users':if(action==='update'){this.hasAttribute=true;this.attributes=['email','name','password','status','prefs']} +this.hasResource=true;this.type=type;this.resourceName='User ID';break;case'collections':this.hasResource=true;this.type=type;this.resourceName='Collection ID';break;case'teams':this.hasResource=true;this.type=type;this.resourceName='Team ID';break;case'buckets':this.hasResource=true;this.type=type;this.resourceName='Bucket ID';break;case'functions':this.hasResource=true;this.type=type;this.resourceName='Function ID';break;case'sessions':this.hasResource=this.hasSubResource=true;this.type='users';this.subType=type;this.resourceName='User ID';this.subResourceName='Session ID';break;case'verification':this.hasResource=this.hasSubResource=true;this.type='users';this.subType=type;this.resourceName='User ID';this.subResourceName='Verification ID';break;case'recovery':this.hasResource=this.hasSubResource=true;this.type='users';this.subType=type;this.resourceName='User ID';this.subResourceName='Recovery ID';break;case'documents':this.hasResource=this.hasSubResource=true;this.type='collections';this.subType=type;this.resourceName='Collection ID';this.subResourceName='Document ID';break;case'attributes':this.hasResource=this.hasSubResource=true;this.type='collections';this.subType=type;this.resourceName='Collection ID';this.subResourceName='Attribute ID';break;case'indexes':this.hasResource=this.hasSubResource=true;this.type='collections';this.subType=type;this.resourceName='Collection ID';this.subResourceName='Index ID';break;case'files':this.hasResource=this.hasSubResource=true;this.type='buckets';this.subType=type;this.resourceName='Bucket ID';this.subResourceName='File ID';break;case'memberships':if(action==='update'){this.hasAttribute=true;this.attributes=['status']} +this.hasResource=this.hasSubResource=true;this.type='teams';this.subType=type;this.resourceName='Team ID';this.subResourceName='Membership ID';break;case'executions':this.hasResource=this.hasSubResource=true;this.type='functions';this.subType=type;this.resourceName='Function ID';this.subResourceName='Execution ID';break;case'deployments':this.hasResource=this.hasSubResource=true;this.type='functions';this.subType=type;this.resourceName='Function ID';this.subResourceName='Deployment ID';break;default:this.hasResource=true;this.hasSubResource=true;break;} +this.action=action;},showModal(modal){document.documentElement.classList.add("modal-open");modal.classList.remove("close");modal.classList.add("open");},closeModal(modal){document.documentElement.classList.remove("modal-open");modal.classList.add("close");modal.classList.remove("open");},addEvent(modal){this.closeModal(modal);let event=`${this.type}.${this.resource ? this.resource : '*'}`;if(this.hasSubResource){event+=`.${this.subType}.${this.subResource ? this.subResource : '*'}`;} +if(this.action){event+=`.${this.action}`;} +if(this.attribute){event+=`.${this.attribute}`;} +this.events.add(event);this.reset();},removeEvent(value){this.events.delete(value);}}));});})(window);(function(window){"use strict";window.ls.view.add({selector:"data-service",controller:function(element,view,container,form,alerts,expression,window){let action=element.dataset["service"];let service=element.dataset["name"]||null;let event=expression.parse(element.dataset["event"]);let confirm=element.dataset["confirm"]||"";let loading=element.dataset["loading"]||"";let loaderId=null;let scope=element.dataset["scope"]||"sdk";let success=element.dataset["success"]||"";let failure=element.dataset["failure"]||"";let running=false;let callbacks={hide:function(){return function(){return element.style.opacity='0';};},reset:function(){return function(){if("FORM"===element.tagName){return element.reset();} +throw new Error("This callback is only valid for forms");};},alert:function(text,classname){return function(alerts){alerts.add({text:text,class:classname||"success"},6000);};},redirect:function(url){return function(router){if(url==="/console"){window.location=url;return;} router.change(url||"/");};},reload:function(){return function(router){router.reload();};},state:function(keys){let updateQueryString=function(key,value,url){var re=new RegExp("([?&])"+key+"=.*?(&|#|$)(.*)","gi"),hash;if(re.test(url)){if(typeof value!=="undefined"&&value!==null){return url.replace(re,"$1"+key+"="+value+"$2$3");}else{hash=url.split("#");url=hash[0].replace(re,"$1$3").replace(/(&|\?)$/,"");if(typeof hash[1]!=="undefined"&&hash[1]!==null){url+="#"+hash[1];} return url;}}else{if(typeof value!=="undefined"&&value!==null){var separator=url.indexOf("?")!==-1?"&":"?";hash=url.split("#");url=hash[0]+separator+key+"="+value;if(typeof hash[1]!=="undefined"&&hash[1]!==null){url+="#"+hash[1];} return url;}else{return url;}}};keys=keys.split(",").map(element=>element.trim());return function(serviceForm,router,window){let url=window.location.href;keys.map(node=>{node=node.split("=");let key=node[0]||"";let name=node[1]||key;let value=getValue(key,"param",serviceForm);url=updateQueryString(name,value?value:null,url);});if(url!==window.location.href){window.history.pushState({},"",url);router.reset();}};},trigger:function(events){return function(document){events=events.trim().split(",");for(let i=0;i=distance)&&(distance>=0)){if(minLink){minLink.classList.remove('selected');} -console.log('old',minLink);minDistance=distance;minElement=title;minLink=links[i];minLink.classList.add('selected');console.log('new',minLink);}}};window.addEventListener('scroll',check);check();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-oauth-custom",controller:function(element){let providers={"Microsoft":{"clientSecret":"oauth2MicrosoftClientSecret","tenantID":"oauth2MicrosoftTenantId"},"Apple":{"keyID":"oauth2AppleKeyId","teamID":"oauth2AppleTeamId","p8":"oauth2AppleP8"}} -let provider=element.getAttribute("data-forms-oauth-custom");if(!provider||!providers.hasOwnProperty(provider)){console.error("Provider for custom form not set or unkown")} +console.log('old',minLink);minDistance=distance;minElement=title;minLink=links[i];minLink.classList.add('selected');console.log('new',minLink);}}};window.addEventListener('scroll',check);check();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-oauth-custom",controller:function(element){let providers={"Microsoft":{"clientSecret":"oauth2MicrosoftClientSecret","tenantID":"oauth2MicrosoftTenantId"},"Apple":{"keyID":"oauth2AppleKeyId","teamID":"oauth2AppleTeamId","p8":"oauth2AppleP8"},"Okta":{"clientSecret":"oauth2OktaClientSecret","oktaDomain":"oauth2OktaDomain","authorizationServerId":"oauth2OktaAuthorizationServerId"},"Auth0":{"clientSecret":"oauth2Auth0ClientSecret","auth0Domain":"oauth2Auth0Domain"}} +let provider=element.getAttribute("data-forms-oauth-custom");if(!provider||!providers.hasOwnProperty(provider)){console.error("Provider for custom form not set or unknown")} let config=providers[provider];element.addEventListener('change',sync);let elements={};for(const key in config){if(Object.hasOwnProperty.call(config,key)){elements[key]=document.getElementById(config[key]);elements[key].addEventListener('change',update);}} function update(){let json={};for(const key in elements){if(Object.hasOwnProperty.call(elements,key)){json[key]=elements[key].value}} element.value=JSON.stringify(json);} diff --git a/public/dist/styles/default-ltr.css b/public/dist/styles/default-ltr.css index 61d487b9d5..c9c0eb6245 100644 --- a/public/dist/styles/default-ltr.css +++ b/public/dist/styles/default-ltr.css @@ -1 +1 @@ -.pull-start{float:left}.pull-end{float:right}img[src=""]{visibility:hidden;display:inline-block}:root{--config-width:910px;--config-width-xxl:1000px;--config-width-xl:910px;--config-width-large:700px;--config-width-medium:550px;--config-width-small:320px;--config-color-primary:#f02e65;--config-color-link:#1e849e;--config-color-background:#eceff1;--config-color-background-dark:#dfe2e4;--config-color-background-fade:#ffffff;--config-color-background-fade-super:#fdfdfd;--config-color-background-focus:#f5f5f5;--config-color-background-input:#ffffff;--config-color-placeholder:#868686;--config-color-tooltip-text:#dce8f5;--config-color-tooltip-background:#333333;--config-color-focus:#f02e65;--config-color-focus-fade:#fef8fa;--config-color-focus-hover:#ff729b;--config-color-focus-glow:#fce5ec;--config-color-focus-dark:#c52653;--config-color-normal:#40404c;--config-color-dark:#313131;--config-color-fade:#8f8f8f;--config-color-fade-dark:#6e6e6e;--config-color-fade-light:#e2e2e2;--config-color-fade-super:#f1f3f5;--config-color-danger:#f53d3d;--config-color-success:#1bbf61;--config-color-warning:#fffbdd;--config-color-info:#386fd2;--config-color-chart:#29b5d9;--config-color-chart-fade:#d4f0f7;--config-border-color:#f3f3f3;--config-border-fade:#e0e3e4;--config-border-fade-super:#f7f7f7;--config-border-radius:10px;--config-prism-background:#373738;--config-prism-numbers:#39393c;--config-note-background:#f1fbff;--config-note-border:#5bceff;--config-warning-background:#fdf7d9;--config-warning-border:#f8e380;--config-social-twitter:#1da1f2;--config-social-github:#000000;--config-social-discord:#7189dc;--config-social-facebook:#4070b4;--config-language-bash:#2b2626;--config-language-bash-contrast:#fff;--config-language-javascript:#fff054;--config-language-javascript-contrast:#333232;--config-language-web:#fff054;--config-language-web-contrast:#333232;--config-language-html:#ff895b;--config-language-html-contrast:#ffffff;--config-language-yaml:#ca3333;--config-language-yaml-contrast:#ffffff;--config-language-php:#6182bb;--config-language-php-contrast:#ffffff;--config-language-nodejs:#8cc500;--config-language-nodejs-contrast:#ffffff;--config-language-ruby:#fc3f48;--config-language-ruby-contrast:#ffffff;--config-language-python:#3873a2;--config-language-python-contrast:#ffffff;--config-language-go:#00add8;--config-language-go-contrast:#ffffff;--config-language-dart:#035698;--config-language-dart-contrast:#ffffff;--config-language-flutter:#035698;--config-language-flutter-contrast:#ffffff;--config-language-android:#a4c439;--config-language-android-contrast:#ffffff;--config-language-kotlin:#766DB2;--config-language-kotlin-contrast:#ffffff;--config-language-swift:#f2624c;--config-language-swift-contrast:#ffffff;--config-language-java:#0074bd;--config-language-java-contrast:#ffffff;--config-modal-note-background:#f5fbff;--config-modal-note-border:#eaf2f7;--config-modal-note-color:#3b5d73;--config-switch-background:#e2e2e2;--config-console-background:#eceff1;--config-console-nav-start:#143650;--config-console-nav-end:#302839;--config-console-nav-border:#2a253a;--config-console-nav-switch-background:#ececec;--config-console-nav-switch-color:#868686;--config-console-nav-switch-arrow:url("data:image/svg+xml;utf8,");--config-defalut-color-hsl:0 0% 62%;--config-disabled-color-hsl:0 0% 62%;--config-pending-color-hsl:36 100% 47%;--config-failed-color-hsl:0 74% 42%}:root .theme-dark{--config-color-primary:#f02e65;--config-color-background:#061F2F;--config-color-background-dark:#262d50;--config-color-background-fade:#1c223a;--config-color-background-fade-super:#1a1f35;--config-color-background-focus:#1a1f35;--config-color-background-input:#dce8f5;--config-color-tooltip-text:#061F2F;--config-color-tooltip-background:#dce8f5;--config-color-link:#4caedb;--config-color-placeholder:#9ea1af;--config-color-focus:#c7d8eb;--config-color-focus-fade:#1e233e;--config-color-focus-hover:#d3deea;--config-color-focus-glow:#d3deea;--config-color-focus-dark:#657586;--config-color-normal:#c7d8eb;--config-color-dark:#c7d8eb;--config-color-fade:#bec3e0;--config-color-fade-dark:#81859b;--config-color-fade-light:#181818;--config-color-fade-super:#262D50;--config-color-danger:#d84a4a;--config-color-success:#34b86d;--config-color-warning:#e0d56d;--config-color-info:#386fd2;--config-color-chart:#29b5d9;--config-color-chart-fade:#c7d8eb;--config-border-color:#262D50;--config-border-fade:#19203a;--config-border-fade-super:#262D50;--config-prism-background:#1F253F;--config-prism-numbers:#1F253F;--config-note-background:#171e33;--config-note-border:#262D50;--config-warning-background:#1F253F;--config-warning-border:#262D50;--config-social-twitter:var(--config-color-normal);--config-social-github:var(--config-color-normal);--config-social-discord:var(--config-color-normal);--config-social-facebook:var(--config-color-normal);--config-language-bash:var(--config-color-normal);--config-language-bash-contrast:var(--config-color-background);--config-language-javascript:var(--config-color-normal);--config-language-javascript-contrast:var(--config-color-background);--config-language-web:var(--config-color-normal);--config-language-web-contrast:var(--config-color-background);--config-language-yaml:var(--config-color-normal);--config-language-yaml-contrast:var(--config-color-background);--config-language-html:var(--config-color-normal);--config-language-html-contrast:var(--config-color-background);--config-language-php:var(--config-color-normal);--config-language-php-contrast:var(--config-color-background);--config-language-nodejs:var(--config-color-normal);--config-language-nodejs-contrast:var(--config-color-background);--config-language-ruby:var(--config-color-normal);--config-language-ruby-contrast:var(--config-color-background);--config-language-python:var(--config-color-normal);--config-language-python-contrast:var(--config-color-background);--config-language-go:var(--config-color-normal);--config-language-go-contrast:var(--config-color-background);--config-language-dart:var(--config-color-normal);--config-language-dart-contrast:var(--config-color-background);--config-language-flutter:var(--config-color-normal);--config-language-flutter-contrast:var(--config-color-background);--config-language-android:var(--config-color-normal);--config-language-android-contrast:var(--config-color-background);--config-language-kotlin:var(--config-color-normal);--config-language-kotlin-contrast:var(--config-color-background);--config-language-swift:var(--config-color-normal);--config-language-swift-contrast:var(--config-color-background);--config-language-java:var(--config-color-normal);--config-language-java-contrast:var(--config-color-background);--config-modal-note-background:#15192b;--config-modal-note-border:#161b31;--config-modal-note-color:var(--config-color-normal);--config-switch-background:var(--config-color-normal);--config-console-background:#20263f;--config-console-nav-start:#1c2139;--config-console-nav-end:#151929;--config-console-nav-border:#171b30;--config-console-nav-switch-background:var(--config-color-focus);--config-console-nav-switch-color:var(--config-color-background);--config-console-nav-switch-arrow:url("data:image/svg+xml;utf8,")}.theme-light .force-light{display:block!important}.theme-dark .force-dark{display:block!important}.force-dark{display:none!important}.force-light{display:none!important}@font-face{font-family:Poppins;font-style:normal;font-weight:100;src:url(/fonts/poppins-v9-latin-100.eot);src:local('Poppins Thin'),local('Poppins-Thin'),url(/fonts/poppins-v9-latin-100.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-100.woff2) format('woff2'),url(/fonts/poppins-v9-latin-100.woff) format('woff'),url(/fonts/poppins-v9-latin-100.ttf) format('truetype'),url(/fonts/poppins-v9-latin-100.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:300;src:url(/fonts/poppins-v9-latin-300.eot);src:local('Poppins Light'),local('Poppins-Light'),url(/fonts/poppins-v9-latin-300.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-300.woff2) format('woff2'),url(/fonts/poppins-v9-latin-300.woff) format('woff'),url(/fonts/poppins-v9-latin-300.ttf) format('truetype'),url(/fonts/poppins-v9-latin-300.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:400;src:url(/fonts/poppins-v9-latin-regular.eot);src:local('Poppins Regular'),local('Poppins-Regular'),url(/fonts/poppins-v9-latin-regular.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-regular.woff2) format('woff2'),url(/fonts/poppins-v9-latin-regular.woff) format('woff'),url(/fonts/poppins-v9-latin-regular.ttf) format('truetype'),url(/fonts/poppins-v9-latin-regular.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:500;src:url(/fonts/poppins-v9-latin-500.eot);src:local('Poppins Medium'),local('Poppins-Medium'),url(/fonts/poppins-v9-latin-500.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-500.woff2) format('woff2'),url(/fonts/poppins-v9-latin-500.woff) format('woff'),url(/fonts/poppins-v9-latin-500.ttf) format('truetype'),url(/fonts/poppins-v9-latin-500.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:600;src:url(/fonts/poppins-v9-latin-600.eot);src:local('Poppins SemiBold'),local('Poppins-SemiBold'),url(/fonts/poppins-v9-latin-600.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-600.woff2) format('woff2'),url(/fonts/poppins-v9-latin-600.woff) format('woff'),url(/fonts/poppins-v9-latin-600.ttf) format('truetype'),url(/fonts/poppins-v9-latin-600.svg#Poppins) format('svg')}@font-face{font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url(/fonts/source-code-pro-v11-latin-regular.eot);src:local('Source Code Pro Regular'),local('SourceCodePro-Regular'),url(/fonts/source-code-pro-v11-latin-regular.eot?#iefix) format('embedded-opentype'),url(/fonts/source-code-pro-v11-latin-regular.woff2) format('woff2'),url(/fonts/source-code-pro-v11-latin-regular.woff) format('woff'),url(/fonts/source-code-pro-v11-latin-regular.ttf) format('truetype'),url(/fonts/source-code-pro-v11-latin-regular.svg#SourceCodePro) format('svg')}.padding{padding:30px}.padding-top{padding-top:30px!important}.padding-top-large{padding-top:50px!important}.padding-top-xl{padding-top:80px!important}.padding-bottom{padding-bottom:30px!important}.padding-bottom-large{padding-bottom:50px!important}.padding-bottom-xl{padding-bottom:80px!important}.margin-end{margin-right:20px!important}.margin-start{margin-left:20px!important}.margin-end-small{margin-right:10px!important}.margin-start-small{margin-left:10px!important}.margin-end-large{margin-right:50px!important}.margin-start-large{margin-left:50px!important}.margin-end-no{margin-right:0!important}.margin-start-no{margin-left:0!important}.margin-end-negative{margin-right:-30px!important}.margin-start-negative{margin-left:-30px!important}.margin-end-negative-small{margin-right:-15px!important}.margin-start-negative-small{margin-left:-15px!important}.margin-end-negative-tiny{margin-right:-5px!important}.margin-start-negative-tiny{margin-left:-5px!important}.margin-top{margin-top:30px!important}.margin-bottom{margin-bottom:30px!important}.margin-top-no{margin-top:0!important}.margin-bottom-no{margin-bottom:0!important}.margin-top-xxl{margin-top:140px!important}.margin-top-xl{margin-top:80px!important}.margin-top-large{margin-top:50px!important}.margin-top-small{margin-top:15px!important}.margin-top-tiny{margin-top:5px!important}.margin-top-negative{margin-top:-30px!important}.margin-top-negative-tiny{margin-top:-5px!important}.margin-top-negative-small{margin-top:-15px!important}.margin-top-negative-large{margin-top:-50px!important}.margin-top-negative-xl{margin-top:-80px!important}.margin-top-negative-xxl{margin-top:-100px!important}.margin-top-negative-xxxl{margin-top:-150px!important}.margin-bottom-xxl{margin-bottom:140px!important}.margin-bottom-xl{margin-bottom:80px!important}.margin-bottom-large{margin-bottom:50px!important}.margin-bottom-small{margin-bottom:15px!important}.margin-bottom-tiny{margin-bottom:5px!important}.margin-bottom-negative{margin-bottom:-30px!important}.margin-bottom-negative-tiny{margin-bottom:-5px!important}.margin-bottom-negative-small{margin-bottom:-15px!important}.margin-bottom-negative-large{margin-bottom:-50px!important}.margin-bottom-negative-xl{margin-bottom:-80px!important}.margin-bottom-negative-xl{margin-bottom:-100px!important}.force-left,.ide{direction:ltr;text-align:left}.force-right{direction:rtl;text-align:right}.pull-left{float:left}.pull-right{float:right}.ratio-wide{height:0;overflow:hidden;padding-top:56%;position:relative;width:100%}.ratio-wide>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-square{height:0;overflow:hidden;padding-top:56%;position:relative;width:100%}.ratio-square>*{position:absolute;top:0;left:0;width:100%;height:100%}.clear:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.phones-only{display:none}@media only screen and (max-width:550px){.phones-only{display:inherit!important}}.tablets-only{display:none}@media only screen and (min-width:551px) and (max-width:1198px){.tablets-only{display:inherit!important}}.desktops-only{display:none}@media only screen and (min-width:1199px){.desktops-only{display:inherit!important}}.phones-only-inline{display:none}@media only screen and (max-width:550px){.phones-only-inline{display:inline-block!important}}.tablets-only-inline{display:none}@media only screen and (min-width:551px) and (max-width:1198px){.tablets-only-inline{display:inline-block!important}}.desktops-only-inline{display:none}@media only screen and (min-width:1199px){.desktops-only-inline{display:inline-block!important}}*{font-family:Poppins,sans-serif;-webkit-font-smoothing:antialiased;font-weight:300}h1,h2,h3,h4,h5,h6{margin:0}h4,h5,h6{font-weight:400}.link,a{color:var(--config-color-link);text-decoration:none;border-left:2px solid transparent;border-right:2px solid transparent;transition:.2s;cursor:pointer}.link.disabled,a.disabled{opacity:.5}.link.tag:hover,a.tag:hover{opacity:.9}.link.danger,a.danger{color:var(--config-color-danger)}.link.link-animation-enabled,a.link-animation-enabled{display:inline-flex}.link.link-animation-enabled:hover,a.link-animation-enabled:hover{transform:translateY(-2px)}.link-return-animation--start>i{display:inline-block;transition:.2s}.link-return-animation--start:hover>i{transform:translateX(-2px)}.link-return-animation--end>i{display:inline-block;transition:.2s}.link-return-animation--end:hover>i{transform:translateX(2px)}b,strong{font-weight:500}p{margin:0 0 20px 0;line-height:26px}small{font-size:16px;color:var(--config-color-fade)}.text-size-small{font-size:13px}.text-size-smaller{font-size:11.5px}.text-size-xs{font-size:10px}.text-size-normal{font-size:16px}.text-height-large{height:30px;line-height:30px}.text-height-small{line-height:13px}.text-one-liner{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text-bold{font-weight:400!important}.text-bold-large{font-weight:500!important}.text-bold-xl{font-weight:600!important}.text-danger{color:var(--config-color-danger)!important}.text-success{color:var(--config-color-success)!important}.text-upper{text-transform:uppercase}.text-warning{color:var(--config-color-warning)}.text-focus{color:var(--config-color-focus)}.text-fade{color:var(--config-color-fade)}.text-fade-dark{color:var(--config-color-fade-dark)}.text-green{color:var(--config-color-success)}.text-red{color:var(--config-color-danger)}.text-info{color:var(--config-color-info)}.text-yellow{color:#ffe28b}.text-disclaimer{font-size:11px;color:var(--config-color-fade)}.text-fade-extra{color:var(--config-color-fade);opacity:.5}.text-line-high-large{line-height:30px}.text-line-high-xl{line-height:40px}.text-sign{margin:5px 0;font-size:25px;width:25px;height:25px;line-height:25px;display:inline-block}.text-align-center{text-align:center}.text-align-start{text-align:left}.text-align-end{text-align:right}.text-align-left{text-align:left}.text-align-right{text-align:right}.text-dir-ltr{direction:ltr;display:inline-block}.text-dir-rtl{direction:rtl;display:inline-block}i[class*=' icon-']:before,i[class^=icon-]:before{display:inline;line-height:unset}table{width:calc(100% + 60px);border-collapse:collapse;margin:-30px;border-radius:10px;overflow:hidden;position:relative;table-layout:fixed}table.y-scroll{overflow-y:auto}table.multi-line tbody td,table.multi-line thead th{line-height:inherit;text-overflow:inherit;white-space:inherit}table.borders td,table.borders th{border-right:solid 1px var(--config-border-fade-super)}table.borders td:last-child,table.borders th:last-child{border:none}table thead{border-bottom:solid 1px var(--config-color-fade-super);font-size:14px}table.small{font-size:14px}table.open-end tbody tr:last-child{border-bottom:none;font-weight:700;background:#f7fbf7}table.full tbody td,table.full tbody th{vertical-align:top;white-space:normal;overflow:auto;line-height:24px;padding-top:20px;padding-bottom:20px;height:auto}table .avatar{width:30px;height:30px}table tr{border-bottom:solid 1px var(--config-color-fade-super)}table tr:last-child{border-bottom:none}table tr:last-child td:first-child{border-bottom-left-radius:6px}table tr:last-child td:last-child{border-bottom-right-radius:6px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){table tr:nth-child(even){background:var(--config-color-background-fade-super)}}@media only screen and (min-width:1199px){table tr:nth-child(even) td{background:var(--config-color-background-fade-super)}}table tr.selected{background:var(--config-note-background)}table tr.selected td,table tr.selected td span{font-weight:500}table th{text-align:left;font-weight:400}table th i{color:var(--config-color-fade);font-size:10px;display:inline-block;vertical-align:top;line-height:16px;padding:0 3px}table td,table th{height:65px;padding:0 15px;line-height:50px}table td:first-child,table th:first-child{padding-left:30px}table td,table th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){table.vertical{border-top:solid 1px var(--config-color-fade-super);display:block;overflow:hidden;padding-top:12px}table.vertical .hide{display:none}table.vertical tbody,table.vertical td,table.vertical th,table.vertical thead,table.vertical tr{width:100%;display:block}table.vertical tr{position:relative}table.vertical th,table.vertical tr{padding-top:12px;padding-bottom:12px}table.vertical th:first-child,table.vertical tr:first-child{padding-top:0}table.vertical td,table.vertical th{padding:5px 20px!important;text-overflow:ellipsis;white-space:normal;height:40px;line-height:40px;width:calc(100% - 40px)}table.vertical td.col-name,table.vertical th.col-name{width:calc(100% - 110px)}table.vertical td:first-child,table.vertical td:last-child,table.vertical th:first-child,table.vertical th:last-child{padding:0 10px}table.vertical td:last-child,table.vertical th:last-child{padding-bottom:0}table.vertical td p,table.vertical th p{display:inline-block;width:calc(100% - 40px)}table.vertical td:not([data-title=""]):before{content:attr(data-title);margin-right:4px;font-weight:400}table.vertical thead{display:none}table.vertical .cell-options-more{position:absolute;inset-block-start:0;inset-inline-end:0;width:auto}}table .trim-inner-text{display:inline-flex;align-items:center;gap:8px}@media only screen and (min-width:1199px){table .trim-inner-text{width:100%}}table .cell-options-more button{padding:0 12px;background-color:transparent;color:var(--config-color-fade)}table .cell-options-more button:focus-visible{outline:solid 1px var(--config-color-focus)}.zone{max-width:var(--config-width-xl);margin:0 auto 40px auto}.zone.xxxl{max-width:calc(1400px - 100px)}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.zone.xxxl{max-width:100%}}.zone.xxl{max-width:var(--config-width-xxl)}.zone.xl{max-width:var(--config-width-xl)}.zone.large{max-width:var(--config-width-large)}.zone.medium{max-width:var(--config-width-medium)}.zone.small{max-width:var(--config-width-small)}.row{position:relative;margin:0 -50px;padding-left:50px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.row{margin:0 -30px;padding-left:30px}}.row.force-ltr>.col{float:left}.row.force-rtl>.col{float:right}.row.force-reverse>.col{float:right}.row.wide{margin:0 -100px;padding-left:100px}.row.wide>.span-1{width:calc(8.33333333% * 1 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-2{width:calc(8.33333333% * 2 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-3{width:calc(8.33333333% * 3 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-4{width:calc(8.33333333% * 4 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-5{width:calc(8.33333333% * 5 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-6{width:calc(8.33333333% * 6 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-7{width:calc(8.33333333% * 7 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-8{width:calc(8.33333333% * 8 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-9{width:calc(8.33333333% * 9 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-10{width:calc(8.33333333% * 10 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-11{width:calc(8.33333333% * 11 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-12{width:calc(8.33333333% * 12 - 100px);box-sizing:content-box;padding-right:100px}.row.thin{margin:0 -20px;padding-left:20px}.row.thin>.span-1{width:calc(8.33333333% * 1 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-2{width:calc(8.33333333% * 2 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-3{width:calc(8.33333333% * 3 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-4{width:calc(8.33333333% * 4 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-5{width:calc(8.33333333% * 5 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-6{width:calc(8.33333333% * 6 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-7{width:calc(8.33333333% * 7 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-8{width:calc(8.33333333% * 8 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-9{width:calc(8.33333333% * 9 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-10{width:calc(8.33333333% * 10 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-11{width:calc(8.33333333% * 11 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-12{width:calc(8.33333333% * 12 - 20px);box-sizing:content-box;padding-right:20px}.row.modalize{margin:0 -30px;padding-left:30px}.row.modalize>.span-1{width:calc(8.33333333% * 1 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-2{width:calc(8.33333333% * 2 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-3{width:calc(8.33333333% * 3 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-4{width:calc(8.33333333% * 4 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-5{width:calc(8.33333333% * 5 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-6{width:calc(8.33333333% * 6 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-7{width:calc(8.33333333% * 7 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-8{width:calc(8.33333333% * 8 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-9{width:calc(8.33333333% * 9 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-10{width:calc(8.33333333% * 10 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-11{width:calc(8.33333333% * 11 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-12{width:calc(8.33333333% * 12 - 30px);box-sizing:content-box;padding-right:30px}.row:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.row .col{float:left;box-sizing:border-box}.row .col.sticky-top{position:sticky;top:90px}.row .col.sticky-bottom{position:sticky;bottom:0}.row .span-1{width:calc(8.33333333% * 1 - 40px);box-sizing:content-box;padding-right:40px}.row .span-2{width:calc(8.33333333% * 2 - 40px);box-sizing:content-box;padding-right:40px}.row .span-3{width:calc(8.33333333% * 3 - 40px);box-sizing:content-box;padding-right:40px}.row .span-4{width:calc(8.33333333% * 4 - 40px);box-sizing:content-box;padding-right:40px}.row .span-5{width:calc(8.33333333% * 5 - 40px);box-sizing:content-box;padding-right:40px}.row .span-6{width:calc(8.33333333% * 6 - 40px);box-sizing:content-box;padding-right:40px}.row .span-7{width:calc(8.33333333% * 7 - 40px);box-sizing:content-box;padding-right:40px}.row .span-8{width:calc(8.33333333% * 8 - 40px);box-sizing:content-box;padding-right:40px}.row .span-9{width:calc(8.33333333% * 9 - 40px);box-sizing:content-box;padding-right:40px}.row .span-10{width:calc(8.33333333% * 10 - 40px);box-sizing:content-box;padding-right:40px}.row .span-11{width:calc(8.33333333% * 11 - 40px);box-sizing:content-box;padding-right:40px}.row .span-12{width:calc(8.33333333% * 12 - 40px);box-sizing:content-box;padding-right:40px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.row.responsive{width:100%;padding:0;margin:0}.row.responsive>.span-1,.row.responsive>.span-10,.row.responsive>.span-11,.row.responsive>.span-12,.row.responsive>.span-2,.row.responsive>.span-3,.row.responsive>.span-4,.row.responsive>.span-5,.row.responsive>.span-6,.row.responsive>.span-7,.row.responsive>.span-8,.row.responsive>.span-9{width:calc(8.33333333% * 12 - 0px)!important;box-sizing:content-box!important;padding-right:0!important;width:100%!important}}.tiles{position:relative}.tiles:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.tiles .box hr{margin:15px -15px}.tiles>*{margin-right:50px!important;float:left;width:calc(33.3333% - 33.3333px)}.tiles>* .photo-title{width:calc(100% + 30px);height:15px;margin:-15px -15px 10px -15px;border-radius:10px 10px 0 0;background:var(--config-color-fade-super);border-bottom:solid 1px var(--config-color-fade-super)}.tiles>:nth-child(3n){margin-right:0!important}@media only screen and (min-width:551px) and (max-width:1198px){.tiles>li{width:calc(50% - 25px)}.tiles>li:nth-child(3n){margin-right:50px!important}.tiles>li:nth-child(2n){margin-right:0!important}}@media only screen and (max-width:550px){.tiles>li{width:100%;margin-right:0!important}}@font-face{font-family:icon;src:url(/fonts/icon.eot?t=1645269945236);src:url(/fonts/icon.eot?t=1645269945236#iefix) format('embedded-opentype'),url(/fonts/icon.woff2?t=1645269945236) format("woff2"),url(/fonts/icon.woff?t=1645269945236) format("woff"),url(/fonts/icon.ttf?t=1645269945236) format('truetype'),url(/fonts/icon.svg?t=1645269945236#icon) format('svg');font-weight:400;font-style:normal}[class*=" icon-"]:before,[class^=icon-]:before{font-family:icon!important;font-style:normal;font-weight:400;speak:never;vertical-align:middle;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-angle-circled-left:before{content:"\ea01"}.icon-angle-circled-right:before{content:"\ea02"}.icon-archive:before{content:"\ea03"}.icon-article:before{content:"\ea04"}.icon-asterisk:before{content:"\ea05"}.icon-bank:before{content:"\ea06"}.icon-bell:before{content:"\ea07"}.icon-binoculars:before{content:"\ea08"}.icon-bitbucket:before{content:"\ea09"}.icon-bold:before{content:"\ea0a"}.icon-book-open:before{content:"\ea0b"}.icon-boolean:before{content:"\ea0c"}.icon-briefcase:before{content:"\ea0d"}.icon-building-filled:before{content:"\ea0e"}.icon-calendar:before{content:"\ea0f"}.icon-cancel-circled:before{content:"\ea10"}.icon-cancel:before{content:"\ea11"}.icon-chart-area:before{content:"\ea12"}.icon-chat-alt:before{content:"\ea13"}.icon-check:before{content:"\ea14"}.icon-chevron-down:before{content:"\ea15"}.icon-clock:before{content:"\ea16"}.icon-code:before{content:"\ea17"}.icon-cog:before{content:"\ea18"}.icon-comment:before{content:"\ea19"}.icon-database:before{content:"\ea1a"}.icon-dev:before{content:"\ea1b"}.icon-discord:before{content:"\ea1c"}.icon-docs:before{content:"\ea1d"}.icon-dot-3:before{content:"\ea1e"}.icon-dot-circled:before{content:"\ea1f"}.icon-double:before{content:"\ea20"}.icon-down-dir:before{content:"\ea21"}.icon-down-open:before{content:"\ea22"}.icon-download:before{content:"\ea23"}.icon-edit:before{content:"\ea24"}.icon-enum:before{content:"\ea25"}.icon-export:before{content:"\ea26"}.icon-eye:before{content:"\ea27"}.icon-facebook:before{content:"\ea28"}.icon-file:before{content:"\ea29"}.icon-film:before{content:"\ea2a"}.icon-filter:before{content:"\ea2b"}.icon-fire:before{content:"\ea2c"}.icon-float:before{content:"\ea2d"}.icon-folder:before{content:"\ea2e"}.icon-github:before{content:"\ea2f"}.icon-gitlab:before{content:"\ea30"}.icon-glasses:before{content:"\ea31"}.icon-google:before{content:"\ea32"}.icon-hackernews:before{content:"\ea33"}.icon-header:before{content:"\ea34"}.icon-heart:before{content:"\ea35"}.icon-home:before{content:"\ea36"}.icon-image:before{content:"\ea37"}.icon-inbox:before{content:"\ea38"}.icon-info-circled:before{content:"\ea39"}.icon-instagram:before{content:"\ea3a"}.icon-integer:before{content:"\ea3b"}.icon-ip:before{content:"\ea3c"}.icon-italic:before{content:"\ea3d"}.icon-key-inv:before{content:"\ea3e"}.icon-key:before{content:"\ea3f"}.icon-keyboard:before{content:"\ea40"}.icon-lamp:before{content:"\ea41"}.icon-left-dir:before{content:"\ea42"}.icon-left-open:before{content:"\ea43"}.icon-lifebuoy:before{content:"\ea44"}.icon-lightning:before{content:"\ea45"}.icon-link-ext:before{content:"\ea46"}.icon-link:before{content:"\ea47"}.icon-url:before{content:"\ea47"}.icon-linkedin:before{content:"\ea48"}.icon-list-bullet:before{content:"\ea49"}.icon-list-numbered:before{content:"\ea4a"}.icon-list:before{content:"\ea4b"}.icon-location:before{content:"\ea4c"}.icon-lock:before{content:"\ea4d"}.icon-login:before{content:"\ea4e"}.icon-mail:before{content:"\ea4f"}.icon-email:before{content:"\ea4f"}.icon-medium:before{content:"\ea50"}.icon-menu:before{content:"\ea51"}.icon-minus:before{content:"\ea52"}.icon-moon-inv:before{content:"\ea53"}.icon-moon:before{content:"\ea54"}.icon-more:before{content:"\ea55"}.icon-network:before{content:"\ea56"}.icon-ok-circled:before{content:"\ea57"}.icon-ok:before{content:"\ea58"}.icon-palette:before{content:"\ea59"}.icon-pause:before{content:"\ea5a"}.icon-phone:before{content:"\ea5b"}.icon-photograph:before{content:"\ea5c"}.icon-picture:before{content:"\ea5d"}.icon-pinterest:before{content:"\ea5e"}.icon-play:before{content:"\ea5f"}.icon-plus:before{content:"\ea60"}.icon-qrcode:before{content:"\ea61"}.icon-question:before{content:"\ea62"}.icon-quote-right:before{content:"\ea63"}.icon-random:before{content:"\ea64"}.icon-reddit:before{content:"\ea65"}.icon-refresh:before{content:"\ea66"}.icon-right-dir:before{content:"\ea67"}.icon-right-open:before{content:"\ea68"}.icon-rocket:before{content:"\ea69"}.icon-search:before{content:"\ea6a"}.icon-shield:before{content:"\ea6b"}.icon-shuffle:before{content:"\ea6c"}.icon-smile-o:before{content:"\ea6d"}.icon-sort:before{content:"\ea6e"}.icon-stackoverflow:before{content:"\ea6f"}.icon-stopwatch:before{content:"\ea70"}.icon-string:before{content:"\ea71"}.icon-sun-inv:before{content:"\ea72"}.icon-telegram:before{content:"\ea73"}.icon-trash-2:before{content:"\ea74"}.icon-trash:before{content:"\ea75"}.icon-twitter:before{content:"\ea76"}.icon-underline:before{content:"\ea77"}.icon-up-dir:before{content:"\ea78"}.icon-up-open:before{content:"\ea79"}.icon-upload:before{content:"\ea7a"}.icon-user:before{content:"\ea7b"}.icon-users:before{content:"\ea7c"}.icon-videocam:before{content:"\ea7d"}.icon-warning:before{content:"\ea7e"}.icon-whatsapp:before{content:"\ea7f"}.icon-wheelchair:before{content:"\ea80"}.icon-windows:before{content:"\ea81"}.icon-wrench:before{content:"\ea82"}.icon-x:before{content:"\ea83"}.icon-youtube-play:before{content:"\ea84"}.datalist-polyfill{list-style:none;display:none;background:#fff;box-shadow:0 2px 2px #999;position:absolute;left:0;top:0;margin:0;padding:0;max-height:300px;overflow-y:auto}.datalist-polyfill:empty{display:none!important}.datalist-polyfill>li{padding:3px;font:13px "Lucida Grande",Sans-Serif}.datalist-polyfill__active{background:#3875d7;color:#fff}date-input-polyfill{z-index:1000!important;max-width:320px!important;width:320px!important}date-input-polyfill .monthSelect-wrapper,date-input-polyfill .yearSelect-wrapper{height:50px;line-height:50px;padding:0;width:40%!important;margin-bottom:10px!important}date-input-polyfill .monthSelect-wrapper select,date-input-polyfill .yearSelect-wrapper select{padding:0 12px;height:50px;line-height:50px;box-sizing:border-box}date-input-polyfill .yearSelect-wrapper{width:35%!important}date-input-polyfill table{width:100%!important;max-width:100%!important;padding:0 12px 12px 12px!important;box-sizing:border-box;margin:0}date-input-polyfill table td:first-child,date-input-polyfill table td:last-child,date-input-polyfill table th:first-child,date-input-polyfill table th:last-child{width:32px!important;padding:4px!important}date-input-polyfill select{margin-bottom:10px}date-input-polyfill button{width:25%!important;height:50px!important;line-height:50px!important;margin-bottom:10px!important;background:inherit;position:relative;color:inherit;padding:inherit;box-sizing:inherit;border-radius:inherit;font-size:inherit;box-shadow:none;border:none;border-bottom:none!important}::placeholder{color:var(--config-color-placeholder);text-align:left}::-webkit-input-placeholder{text-align:left}input:-moz-placeholder{text-align:left}form.inline{display:inline-block}input,textarea{background:var(--config-color-background-input)}input[type=file],input[type=file]::-webkit-file-upload-button{cursor:pointer}.button,button{display:inline-block;background:var(--config-color-focus);border-radius:26px;border:none;color:var(--config-color-background-fade);height:52px;line-height:52px;padding:0 25px;cursor:pointer;font-size:16px;box-sizing:border-box;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.button:focus,.button:hover,button:focus,button:hover{background:var(--config-color-focus-hover)}.button.fly,button.fly{position:fixed;z-index:2;bottom:30px;right:30px}@media only screen and (max-width:550px){.button.fly,button.fly{right:15px}}.button.fill,button.fill{display:block;width:100%;text-align:center;padding:0 10px!important}.button.fill-aligned,button.fill-aligned{display:block;width:100%;text-align:left;padding:0 20px!important}.button.icon,button.icon{padding-right:30px!important}.button.icon-reduce,button.icon-reduce{padding-left:15px!important}.button.reverse,button.reverse{background:0 0;height:50px;line-height:48px;padding:0 23px;color:var(--config-color-focus);border:solid 2px var(--config-color-focus)}.button.reverse:focus,.button.reverse:hover,button.reverse:focus,button.reverse:hover{color:var(--config-color-focus-hover);border-color:var(--config-color-focus-hover)}.button.small,button.small{padding:0 15px;height:40px;line-height:36px;font-size:13px}.button.tick,button.tick{background:var(--config-color-fade-light);color:var(--config-color-dark);border-radius:20px;padding:0 10px;line-height:30px;height:30px;font-size:12px;display:inline-block}.button.tick.selected,button.tick.selected{background:var(--config-color-dark);color:var(--config-color-fade)}.button.round,button.round{width:52px;padding:0}.button.round.small,button.round.small{font-size:12px;width:30px;height:30px;line-height:30px}.button.white,button.white{background:#fff;color:var(--config-color-focus)}.button.white.reverse,button.white.reverse{color:#fff;background:0 0;border:solid 2px #fff}.button.trans,button.trans{background:0 0!important}.button.trans.reverse,button.trans.reverse{background:0 0!important}.button.success,button.success{background:var(--config-color-success)}.button.success.reverse,button.success.reverse{color:var(--config-color-success);background:#fff;border:solid 2px var(--config-color-success)}.button.danger,button.danger{background:var(--config-color-danger);color:#fff}.button.danger.reverse,button.danger.reverse{color:var(--config-color-danger);background:var(--config-color-background-fade);border:solid 2px var(--config-color-danger)}.button.dark,button.dark{background:var(--config-color-dark);color:var(--config-color-background-fade)}.button.dark.reverse,button.dark.reverse{color:var(--config-color-dark);background:var(--config-color-background-fade);border:solid 2px var(--config-color-dark)}.button .disabled,.button.disabled,.button:disabled,button .disabled,button.disabled,button:disabled{color:var(--config-color-normal);background:var(--config-color-background-dark);opacity:.6;cursor:default}.button.link,button.link{background:0 0;border-radius:0;color:var(--config-color-link);height:auto;line-height:normal;padding:0;padding-right:0!important}.button.link:focus,button.link:focus{box-shadow:inherit}.button.strip,button.strip{background:0 0;height:auto;line-height:16px;color:inherit;padding:0 5px}.button.facebook,button.facebook{color:#fff!important;background:#4070b4!important}.button.twitter,button.twitter{color:#fff!important;background:#56c2ea!important}.button.linkedin,button.linkedin{color:#fff!important;background:#0076b5!important}.button.github,button.github{color:#fff!important;background:#7e7c7c!important}.button:focus,button:focus{outline:0}button.close{width:30px;height:30px;line-height:30px;padding:0;margin:0;background:var(--config-color-normal);color:var(--config-color-background-fade);border-radius:50%}button.close .icon-cancel::before{line-height:1}button.close.is-margin-top-10{margin-top:10px}label{margin-bottom:15px;display:block;line-height:normal}label.inline{display:inline}.input,input[type=date],input[type=datetime-local],input[type=email],input[type=file],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=url],select,textarea{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px}.input[type=file],input[type=date][type=file],input[type=datetime-local][type=file],input[type=email][type=file],input[type=file][type=file],input[type=number][type=file],input[type=password][type=file],input[type=search][type=file],input[type=tel][type=file],input[type=text][type=file],input[type=url][type=file],select[type=file],textarea[type=file]{line-height:0;padding:15px;height:auto}.input:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=file]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus,select:focus,textarea:focus{outline:0;border-color:#b3d7fd}.input:disabled,input[type=date]:disabled,input[type=datetime-local]:disabled,input[type=email]:disabled,input[type=file]:disabled,input[type=number]:disabled,input[type=password]:disabled,input[type=search]:disabled,input[type=tel]:disabled,input[type=text]:disabled,input[type=url]:disabled,select:disabled,textarea:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.input.strip,input[type=date].strip,input[type=datetime-local].strip,input[type=email].strip,input[type=file].strip,input[type=number].strip,input[type=password].strip,input[type=search].strip,input[type=tel].strip,input[type=text].strip,input[type=url].strip,select.strip,textarea.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:right 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.input.strip:focus,input[type=date].strip:focus,input[type=datetime-local].strip:focus,input[type=email].strip:focus,input[type=file].strip:focus,input[type=number].strip:focus,input[type=password].strip:focus,input[type=search].strip:focus,input[type=tel].strip:focus,input[type=text].strip:focus,input[type=url].strip:focus,select.strip:focus,textarea.strip:focus{border-color:#b3d7fd}.input:-webkit-autofill::first-line,input[type=date]:-webkit-autofill::first-line,input[type=datetime-local]:-webkit-autofill::first-line,input[type=email]:-webkit-autofill::first-line,input[type=file]:-webkit-autofill::first-line,input[type=number]:-webkit-autofill::first-line,input[type=password]:-webkit-autofill::first-line,input[type=search]:-webkit-autofill::first-line,input[type=tel]:-webkit-autofill::first-line,input[type=text]:-webkit-autofill::first-line,input[type=url]:-webkit-autofill::first-line,select:-webkit-autofill::first-line,textarea:-webkit-autofill::first-line{font-weight:300;font-size:16px}input[type=email],input[type=url]{direction:ltr}input[type=email]::placeholder,input[type=url]::placeholder{text-align:left;direction:ltr}select{background:0 0;-webkit-appearance:none;background-image:var(--config-console-nav-switch-arrow);background-position:right 15px top 50%;background-repeat:no-repeat;background-color:var(--config-color-background-input);width:calc(100% - 62px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:45px}select:-webkit-autofill{background-image:url("data:image/svg+xml;utf8,")!important;background-position:100% 50%!important;background-repeat:no-repeat!important}input[type=search],input[type=search].strip{background:0 0;-webkit-appearance:none;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAdZJREFUWIXt1s2LjWEYBvDfnDMzFpNIamZIFrMiJYMyFmKhZKfOwoiFr2LFn2BByG6WVrKwMcjWxgoLIlKIUk6RrzAjZWZ8LO731FlwvB+PUbjq6X0X7/VeV/d9P9fz8IdRL8Hpw3x8w0xaOz9GNxq4gJeZcGs1cRab0fU7xLfgMSYzoT3YgNXYhIO4iM+4iTWphGs4jikcFSXvhEGczr4/UFW8C2N4jXUFudvwCYeqGNgnSr6yJH8rpkWLCqMfE9hdUryFE3iC3qLEk7ij+kT34Q32FiHV8Qr7K4q3cArXihCGxd5elMjARnzBvE4f1dreV+AtnicycC/7/7K8BhaIvqXCO3zFwrwGZtCT0EAtW9N5DTSxWGR/CizNns/yEgbFEK5NZGCnaEPHE7e9Ai9wA6OJDIzistgJubFdxHB/RfFVYgCHixJruI5x5dNwDm6J47sUhkTvjpUw0Y1zeOrXR3hHjOA9zmBuTs4Arog4/yhuUZWwHPdFMh7280BZgiP4ILJ/UuymqRQmejPxphiquzgvKnMJDzOxB9glZqiRiecykbfHdawX98EhcdxO4BGu4nYm2EJDzEKPSMIdYrBnFYUq8d/EP2di1gey3cS4ErflvxffASbhcakIINaMAAAAAElFTkSuQmCC);background-color:var(--config-color-background-input);background-position:left 15px top 50%;background-repeat:no-repeat;background-size:20px 20px;width:calc(100% - 60px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-left:45px}select[multiple]{min-height:75px;padding:5px 10px!important;padding-right:50px!important}select[multiple] option{padding:10px 4px;border-bottom:solid 1px #f1f1f1}select[multiple] option:last-child{border-bottom:none}textarea{min-height:75px;resize:vertical;line-height:32px;padding:5px 15px}textarea.tall{min-height:180px}fieldset{border:none;margin:0;padding:0}.counter{font-size:13px;text-align:right;color:var(--config-color-fade);margin-top:-20px;margin-bottom:20px}.file-preview{background:var(--config-color-background-input) url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAIElEQVQoU2NkYGAwZsAEZ9GFGIeIQix+wfQgyDODXSEAcUwGCrDSHgkAAAAASUVORK5CYII=)!important;box-shadow:inset 0 0 3px #a0a0a0;border-radius:8px;width:calc(100% - 2px);max-height:180px;visibility:visible!important;object-fit:contain}.video-preview{padding-top:56%;position:relative;border-radius:10px;background:#e7e7e7;overflow:hidden;margin:0}.video-preview iframe{position:absolute;top:0;width:100%;height:100%;border:none}.map-preview{padding-top:50%;position:relative;margin-bottom:10px;border-radius:10px;background:#e7e7e7;overflow:hidden;box-shadow:0 0 30px rgba(218,218,218,.5)}.map-preview iframe{position:absolute;top:0;width:100%;height:100%;border:none}.tooltip{position:relative}.tooltip.large:hover:after{white-space:normal;width:280px}.tooltip.small:hover:after{white-space:normal;width:180px}.tooltip:hover:after{white-space:nowrap;background:var(--config-color-tooltip-background);border-radius:5px;bottom:calc(100% + 6px);color:var(--config-color-tooltip-text);content:attr(data-tooltip);padding:5px 15px;position:absolute;font-size:13px;line-height:20px;z-index:98;left:20%;margin-left:-30px;word-break:break-word}.tooltip:hover:before{border:solid;border-color:var(--config-color-tooltip-background) transparent;border-width:6px 6px 0 6px;bottom:100%;content:"";position:absolute;z-index:99;left:3px}.tooltip.down:hover:after{top:calc(100% + 6px);bottom:inherit}.tooltip.down:hover:before{top:100%;border-width:0 6px 6px 6px;bottom:inherit}.tag{display:inline-block;background:var(--config-color-fade-light);color:var(--config-color-fade);border-radius:12px;line-height:24px;padding:0 8px;font-size:12px;box-shadow:none!important;border:none;height:auto;width:auto;white-space:nowrap;text-overflow:ellipsis}.tag:hover{border:none}.tag.green{background:var(--config-color-success);color:#fff}.tag.red{background:var(--config-color-danger);color:#fff}.tag.yellow{background:#ffe28b;color:#494949}.tag.focus{background:var(--config-color-focus);color:#fff}.tag.dark{background:var(--config-color-dark);color:#e7e7e7}.tag.blue{background:var(--config-color-info);color:#fff}.tag.link{background:var(--config-color-link);color:#fff}input[type=checkbox],input[type=radio]{width:26px;height:16px;position:relative;-webkit-appearance:none;border-radius:0;border:none;background:0 0;vertical-align:middle;margin:0}input[type=checkbox]:after,input[type=radio]:after{content:"";display:block;width:20px;height:20px;background:var(--config-color-background-fade);top:-5px;border-radius:50%;position:absolute;border:solid 3px var(--config-color-focus);vertical-align:middle}input[type=checkbox]:checked:after,input[type=radio]:checked:after{text-align:center;font-family:icon;content:'\ea14';font-size:16px;line-height:20px;color:var(--config-color-background-fade);background:var(--config-color-focus)}input[type=checkbox][type=radio]:checked:after,input[type=radio][type=radio]:checked:after{content:'';display:block;width:10px;height:10px;border-radius:50%;background:var(--config-color-background-fade);border:solid 8px var(--config-color-focus)}input[type=checkbox]:focus,input[type=radio]:focus{outline:0}input[type=checkbox]:focus:after,input[type=checkbox]:hover:after,input[type=radio]:focus:after,input[type=radio]:hover:after{outline:0;border-color:#000}input[type=checkbox]:checked:focus:after,input[type=checkbox]:checked:hover:after,input[type=radio]:checked:focus:after,input[type=radio]:checked:hover:after{border-color:var(--config-color-focus)}input[type=checkbox]:after{border-radius:4px}.input-copy{position:relative}.input-copy::before{content:'';display:block;position:absolute;height:50px;background:var(--config-color-fade-light);width:50px;right:0;border-radius:8px;z-index:1;margin:1px}.input-copy input,.input-copy textarea{padding-right:65px;width:calc(100% - 82px);resize:none}.input-copy .copy{position:absolute;z-index:2;top:0;right:0;border-left:solid 1px var(--config-color-fade-light);height:calc(100% - 2px);width:50px;line-height:50px;text-align:center;background:var(--config-color-background-focus);margin:1px;border-radius:0 9px 9px 0}.paging{color:var(--config-color-fade);padding:0;font-size:12px}.paging form{display:inline-block}.paging button:disabled{color:var(--config-color-background-fade);opacity:.6}.blue-snap iframe{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px;float:none!important;height:40px!important;width:calc(100% - 32px)!important;border:solid 1px #e2e2e2!important;background:0 0!important;position:static!important}.blue-snap iframe[type=file]{line-height:0;padding:15px;height:auto}.blue-snap iframe:focus{outline:0;border-color:#b3d7fd}.blue-snap iframe:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.blue-snap iframe.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:right 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.blue-snap iframe.strip:focus{border-color:#b3d7fd}.blue-snap iframe:-webkit-autofill::first-line{font-weight:300;font-size:16px}.blue-snap .error{font-size:12px;margin-top:-25px;color:var(--config-color-danger);height:40px;padding-left:2px}.pell{height:auto;padding-bottom:0;margin-bottom:0;padding-top:0;background:var(--config-color-background-input);line-height:normal!important;position:relative}.pell.hide{padding:0!important;height:1px;min-height:1px;max-height:1px;border:none;box-shadow:none;margin-bottom:20px;opacity:0}.pell [contenteditable=true]:empty:before{content:attr(placeholder);display:block;color:var(--config-color-placeholder)}.pell .pell-actionbar{border-bottom:solid 1px var(--config-color-fade-light);margin:0 -15px 15px -15px;padding:10px 15px;position:sticky;top:70px;background:var(--config-color-background-input);border-radius:10px 10px 0 0}.pell .pell-content{min-height:100px;display:block;padding:10px;margin:-10px;cursor:text}.pell .pell-content:focus{outline:0}.pell button{background:inherit;color:inherit;margin:0;padding:0;padding-right:15px;height:40px;line-height:40px;box-shadow:none;cursor:pointer;font-size:13px;border-radius:0}.pell button.pell-button-selected,.pell button:focus,.pell button:hover{color:var(--config-color-link)}.pell h1,.pell h2,.pell h3,.pell h4,.pell h5,.pell h6{text-align:inherit;margin-bottom:30px}.pell b,.pell strong{font-weight:700}.pell ol,.pell ul{margin:0 0 20px 0}.pell ol li,.pell ul li{display:list-item!important;list-style:inherit;list-style-position:inside!important;margin:0 20px 2px 20px}.pell ol li p,.pell ul li p{margin:0;display:inline}.pell ol li{list-style:decimal}.pell ol li::before{content:'';display:none}label.switch{line-height:42px}.switch,input[type=checkbox].button.switch,input[type=checkbox].switch{width:52px;height:32px;line-height:32px;border-radius:21px;background:var(--config-color-fade);display:inline-block;margin:0;padding:5px;padding-left:5px;padding-right:30px}.switch.on,.switch:checked,input[type=checkbox].button.switch.on,input[type=checkbox].button.switch:checked,input[type=checkbox].switch.on,input[type=checkbox].switch:checked{background-color:var(--config-color-success);padding-left:25px;padding-right:5px}.switch.on:focus,.switch.on:hover,.switch:checked:focus,.switch:checked:hover,input[type=checkbox].button.switch.on:focus,input[type=checkbox].button.switch.on:hover,input[type=checkbox].button.switch:checked:focus,input[type=checkbox].button.switch:checked:hover,input[type=checkbox].switch.on:focus,input[type=checkbox].switch.on:hover,input[type=checkbox].switch:checked:focus,input[type=checkbox].switch:checked:hover{background:var(--config-color-success)}.switch:focus,.switch:hover,input[type=checkbox].button.switch:focus,input[type=checkbox].button.switch:hover,input[type=checkbox].switch:focus,input[type=checkbox].switch:hover{background:var(--config-color-fade)}.switch:focus:after,.switch:hover:after,input[type=checkbox].button.switch:focus:after,input[type=checkbox].button.switch:hover:after,input[type=checkbox].switch:focus:after,input[type=checkbox].switch:hover:after{background:#fff}.switch:after,input[type=checkbox].button.switch:after,input[type=checkbox].switch:after{content:"";display:block;width:22px;height:22px;background:#fff;border-radius:50%;border:none;position:static;top:0}.password-meter{margin:-41px 10px 30px 10px;height:2px;background:0 0;max-width:100%;z-index:2;position:relative}.password-meter.weak{background:var(--config-color-danger)}.password-meter.medium{background:var(--config-color-success)}.password-meter.strong{background:var(--config-color-success)}.color-input:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.color-input .color-preview{width:53px;height:53px;float:left;margin-right:10px;background:#000;border-radius:10px;box-shadow:inset 0 0 3px #a0a0a0;position:relative}.color-input .color-preview input{opacity:0;position:absolute;top:0;bottom:0;left:0;right:0;width:100%;height:100%;cursor:pointer}.color-input input{text-transform:uppercase;float:left;width:calc(100% - 95px)}.grecaptcha-badge{box-shadow:none!important;border-radius:10px!important;overflow:hidden!important;background:#4d92df!important;bottom:25px}.grecaptcha-badge:hover{width:256px!important}.back{font-size:15px;line-height:24px;height:24px;margin-left:-15px;margin-top:-25px;margin-bottom:20px}.back span{font-weight:inherit!important}@media only screen and (max-width:550px){.back{margin-left:-5px}}hr{height:1px;background:var(--config-border-color)!important;border:none}hr.fade{opacity:.7}.upload{position:relative}.upload:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.upload input{position:absolute;top:0;left:0;opacity:0;cursor:pointer}.upload.single .preview{height:0;position:relative;padding-top:100%;width:100%;margin-bottom:15px!important}.upload.single .preview li{position:absolute;top:0;width:calc(100% - 20px);height:calc(100% - 20px);margin-right:0!important;margin-bottom:0!important}.upload .button{float:left;margin-right:10px!important}.upload .button.disabled,.upload .button.disabled:hover{background:0 0;color:inherit;border-color:inherit}.upload .count{float:left;line-height:52px}.upload .progress{background:var(--config-color-success);height:6px;border-radius:3px;margin-bottom:15px!important}.upload .preview:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.upload .preview li{float:left;margin-right:20px!important;margin-bottom:15px!important;background:var(--config-color-background-fade-super);width:150px;height:150px;line-height:148px;text-align:center;border-radius:20px;overflow:hidden;position:relative;cursor:pointer;border:solid 1px var(--config-color-background-dark)}.upload .preview li:hover:before{background:var(--config-color-focus)}.upload .preview li:before{content:'\ea11';font-family:icon;font-size:12px;position:absolute;width:20px;height:20px;display:block;top:8px;right:8px;text-align:center;line-height:20px;vertical-align:middle;border-radius:50%;background:#484848;color:#fff;z-index:1}.upload .preview li img{vertical-align:middle;max-height:150px;max-width:150px;-webkit-filter:drop-shadow(0 0 6px rgba(0, 0, 0, .3));filter:drop-shadow(0 0 1px rgba(0, 0, 0, .3))}.upload.wide .preview li{height:0;width:100%;position:relative;padding-top:30.547%;background:#e7e7e7;border-radius:10px;overflow:hidden;border:solid 1px #f9f9f9;margin:0}.upload.wide .preview li img{border-radius:10px;position:absolute;top:0;width:100%;display:block;opacity:1;max-width:inherit;max-height:inherit}ol{list-style:none;counter-reset:x-counter;padding:0}ol li{counter-increment:x-counter;line-height:30px;margin-bottom:30px;margin-left:45px}ol li::before{display:inline-block;content:counter(x-counter);color:var(--config-color-background-fade);background:var(--config-color-focus);border:solid 2px var(--config-color-focus);margin-right:15px;margin-left:-45px;width:26px;height:26px;border-radius:50%;text-align:center;line-height:26px}.required{color:var(--config-color-danger);font-size:8px;position:relative;top:-8px}.drop-list{position:relative;outline:0}.drop-list.open ul{display:block}.drop-list ul{position:relative;background:var(--config-color-background-fade);border-radius:10px;border-bottom:none;box-shadow:0 0 3px rgba(0,0,0,.05);display:block;padding:30px;border-radius:4px;box-shadow:0 0 6px rgba(0,0,0,.1);display:none;position:absolute;bottom:calc(100% + 10px);z-index:2;padding:0;left:-10px;max-width:280px;min-width:240px}.drop-list ul.padding-tiny{padding:5px}.drop-list ul.padding-xs{padding:10px}.drop-list ul.padding-small{padding:15px}.drop-list ul.y-scroll{overflow-y:auto}.drop-list ul.danger{background:var(--config-color-danger);color:#fff}.drop-list ul.danger .box{color:var(--config-color-normal);background:var(--config-color-background-fade)}.drop-list ul.danger>.button,.drop-list ul.danger>button{background:#fff;color:var(--config-color-danger)}.drop-list ul.note{background:var(--config-note-background)}.drop-list ul.focus{background:var(--config-color-focus);color:var(--config-color-background-fade)}.drop-list ul.focus .button,.drop-list ul.focus button{background:var(--config-color-background-fade);color:var(--config-color-focus)}.drop-list ul.line{background:0 0;border:solid 1px var(--config-color-background-dark);box-shadow:none}.drop-list ul.warning{background:var(--config-color-warning);color:#2d2d2d}.drop-list ul.warning .button,.drop-list ul.warning button{background:rgba(45,45,45,.8);color:var(--config-color-success)}.drop-list ul .tabs{border-bottom:solid 1px var(--config-border-color);margin:0 -30px;padding:0 30px!important}.drop-list ul>footer{margin:0 -30px -30px -30px;padding:15px 30px;background:var(--config-color-background-fade);border:solid 1px var(--config-border-color);border-radius:0 0 10px 10px}.drop-list ul hr{height:1px;background:var(--config-console-background);border:none;margin:30px -30px}.drop-list ul .label{position:absolute;top:10px;z-index:2;right:10px}.drop-list ul.fade-bottom{position:relative;overflow:hidden}.drop-list ul.fade-bottom:after{content:"";position:absolute;display:block;bottom:15px;width:100%;background:#000;background:linear-gradient(180deg,rgba(0,0,0,0) 0,var(--config-color-background-fade) 80%);height:100px;margin:0 -15px}.drop-list ul .header{position:static;height:40px;padding:20px 30px 20px 30px;margin-bottom:30px;margin:-30px -30px 20px -30px;background:var(--config-color-background-fade);border-bottom:solid 1px #efefef}.drop-list ul ul.numbers>li{position:relative;margin-left:30px;margin-right:50px}.drop-list ul ul.numbers>li hr{margin-left:-60px;margin-right:-80px}.drop-list ul ul.numbers>li .settings{position:absolute;top:3px;right:-50px}.drop-list ul ul.numbers>li::after{display:block;width:25px;height:25px;line-height:25px;font-size:13px;font-weight:500;border-radius:50%;background:var(--config-color-focus);color:var(--config-color-background);counter-increment:section;content:counter(section);text-align:center;position:absolute;top:3px;left:-45px}.drop-list ul .scroll{margin:0 -30px;overflow-y:scroll}.drop-list ul .scroll table{width:100%;margin:0}.drop-list ul ul.sortable{counter-reset:section}.drop-list ul ul.sortable>li [data-move-down].round,.drop-list ul ul.sortable>li [data-move-up].round,.drop-list ul ul.sortable>li [data-remove].round{background:var(--config-color-focus);color:var(--config-color-background-fade);width:25px;height:25px;line-height:25px;display:inline-block;text-align:center;padding:0;margin-right:5px}.drop-list ul ul.sortable>li [data-move-down].round:disabled,.drop-list ul ul.sortable>li [data-move-up].round:disabled,.drop-list ul ul.sortable>li [data-remove].round:disabled{display:none}.drop-list ul ul.sortable>li:first-child [data-move-up]{display:none}.drop-list ul ul.sortable>li:first-child [data-move-up]:disabled{display:inline-block;background:var(--config-color-background)}.drop-list ul ul.sortable>li:last-child [data-move-down]{display:none}.drop-list ul ul.sortable>li:last-child [data-move-down]:disabled{display:inline-block;background:var(--config-color-background)}.drop-list ul .toggle{position:relative;border-top:1px solid var(--config-console-background);border-bottom:1px solid var(--config-console-background);margin:0 -30px;padding:30px 30px 0 30px;height:65px;overflow:hidden}.drop-list ul .toggle.list{border-bottom:none}.drop-list ul .toggle.sorts button.ls-ui-open{width:calc(100% - 100px)}.drop-list ul .toggle button.ls-ui-open{right:0;position:absolute;top:0;width:100%;height:95px;background:0 0;opacity:.5;border-radius:0}.drop-list ul .toggle .icon-minus,.drop-list ul .toggle .icon-up-open{display:none}.drop-list ul .toggle .content{display:none}.drop-list ul .toggle.open{height:auto}.drop-list ul .toggle.open .icon-minus,.drop-list ul .toggle.open .icon-up-open{display:block}.drop-list ul .toggle.open .icon-down-open,.drop-list ul .toggle.open .icon-plus{display:none}.drop-list ul .toggle.open .content{display:block}.drop-list ul .list li{border-bottom:solid 2px var(--config-border-color);margin:0 -30px 30px -30px;padding:0 30px 30px 30px}.drop-list ul .list li:last-child{padding-bottom:0;margin-bottom:0;border-bottom:none}@media only screen and (max-width:550px){.drop-list ul .list li .actions{float:none}}.drop-list ul .list li .avatar{display:block}.drop-list ul .list li .avatar.inline{display:inline-block}.drop-list ul.new{text-align:center}.drop-list ul.new i{font-size:80px;line-height:80px;font-family:Poppins,sans-serif;font-style:normal;font-weight:300}.drop-list ul.new b{margin-top:20px;display:block}.drop-list ul .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.drop-list ul .info hr{background:var(--config-modal-note-border)!important}.drop-list ul .table-wrap{margin:0 -30px;overflow-y:scroll}.drop-list ul .table-wrap table{margin:0}.drop-list ul:before{border:solid;border-color:var(--config-color-background-fade) transparent;border-width:8px 8px 0 8px;bottom:-8px;content:"";position:absolute;z-index:99;left:30px}.drop-list ul.arrow-end:before{right:30px;left:unset}.drop-list ul.no-arrow::before{display:none}.drop-list ul li{border-bottom:solid 1px var(--config-color-fade-super);margin:0;padding:0}.drop-list ul li:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.drop-list ul li:first-child{border-radius:4px 4px 0 0}.drop-list ul li:last-child{border-radius:0 0 4px 4px}.drop-list ul li:hover{background:var(--config-color-fade-super)}.drop-list ul li:first-child:hover,.drop-list ul li:last-child:hover{border-color:transparent}.drop-list ul li .link,.drop-list ul li a,.drop-list ul li button.link{display:block;vertical-align:middle;height:auto;line-height:30px;display:inline-block;padding:10px 15px!important;color:inherit;font-size:14px;border:none;cursor:pointer;width:calc(100% - 30px);text-align:left;box-sizing:content-box}.drop-list ul li.disabled .link:hover,.drop-list ul li.disabled a:hover{background:0 0}.drop-list ul li .avatar{width:30px;height:30px;margin-right:10px;float:left}.drop-list ul li i.avatar{text-align:center;background:var(--config-color-dark);color:var(--config-color-background-fade)}.drop-list ul li:last-child{border-bottom:none}.drop-list.bottom ul{bottom:auto;margin-top:-2px}.drop-list.bottom ul:before{bottom:auto;top:-8px;border-width:0 8px 8px 8px}.drop-list.end ul{right:-10px;left:auto}.disabled{opacity:.2;cursor:default}.disabled .button,.disabled .link,.disabled a,.disabled button{cursor:default!important}.disabled .button:hover,.disabled .link:hover,.disabled a:hover,.disabled button:hover{background:0 0}.tags{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px;background:var(--config-color-background-input);min-height:42px;height:auto;cursor:text}.tags[type=file]{line-height:0;padding:15px;height:auto}.tags:focus{outline:0;border-color:#b3d7fd}.tags:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.tags.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:right 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.tags.strip:focus{border-color:#b3d7fd}.tags:-webkit-autofill::first-line{font-weight:300;font-size:16px}.tags .add{display:inline-block!important;border:none;padding:0;width:auto;margin:0;max-width:100%;min-width:200px}.tags ul.tags-list{display:inline;white-space:pre-line}.tags ul.tags-list li{display:inline-block!important;margin-right:10px;font-size:16px;padding:5px 10px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tags ul.tags-list li::before{float:right;content:'\ea11';font-family:icon;font-style:normal;display:inline-block;text-align:center;line-height:16px;width:16px;height:16px;font-size:12px;background:#000;color:#fff;border-radius:50%;margin-top:4px;margin-bottom:4px;margin-left:6px;margin-right:0}.switch-theme{background:var(--config-switch-background);border-radius:19px;height:26px;width:44px;margin:9px 0}.switch-theme button{padding:3px;display:block;background:0 0;height:26px;width:100%}.switch-theme i{background:var(--config-color-background-fade);border-radius:50%;height:18px;width:18px;line-height:18px;font-size:10px;padding:0;margin:0;color:var(--config-color-fade)}.switch-theme i.force-light{float:right}.switch-theme i.force-dark{float:left}.dot{width:20px;height:20px;background:var(--config-color-fade);border-radius:50%;display:inline-block;vertical-align:middle;margin:0!important;padding:0!important}.dot.danger{background:var(--config-color-danger)!important}.dot.success{background:var(--config-color-success)!important}.dot.warning{background:var(--config-color-warning)!important}.dot.info{background:var(--config-color-info)!important}.ide{background-color:var(--config-prism-background);overflow:hidden;position:relative;z-index:1;box-shadow:0 2px 4px 0 rgba(50,50,93,.3);border-radius:10px;margin-bottom:30px}.ide *{font-family:"Source Code Pro",monospace}.ide[data-lang]::after{content:attr(data-lang-label);display:inline-block;background:#fff;color:#000;position:absolute;top:15px;padding:5px 10px;border-radius:15px;font-size:10px;right:10px;opacity:.95}.ide[data-lang=bash]::after{background:var(--config-language-bash);color:var(--config-language-bash-contrast)}.ide[data-lang=javascript]::after{background:var(--config-language-javascript);color:var(--config-language-javascript-contrast)}.ide[data-lang=web]::after{background:var(--config-language-web);color:var(--config-language-web-contrast)}.ide[data-lang=html]::after{background:var(--config-language-html);color:var(--config-language-html-contrast)}.ide[data-lang=php]::after{background:var(--config-language-php);color:var(--config-language-php-contrast)}.ide[data-lang=nodejs]::after{background:var(--config-language-nodejs);color:var(--config-language-nodejs-contrast)}.ide[data-lang=ruby]::after{background:var(--config-language-ruby);color:var(--config-language-ruby-contrast)}.ide[data-lang=python]::after{background:var(--config-language-python);color:var(--config-language-python-contrast)}.ide[data-lang=go]::after{background:var(--config-language-go);color:var(--config-language-go-contrast)}.ide[data-lang=dart]::after{background:var(--config-language-dart);color:var(--config-language-dart-contrast)}.ide[data-lang=flutter]::after{background:var(--config-language-flutter);color:var(--config-language-flutter-contrast)}.ide[data-lang=android]::after{background:var(--config-language-android);color:var(--config-language-android-contrast)}.ide[data-lang=swift]::after{background:var(--config-language-swift);color:var(--config-language-swift-contrast)}.ide[data-lang=kotlin]::after{background:var(--config-language-kotlin);color:var(--config-language-kotlin-contrast)}.ide[data-lang=java]::after{background:var(--config-language-java);color:var(--config-language-java-contrast)}.ide[data-lang=yaml]::after{background:var(--config-language-yaml);color:var(--config-language-yaml-contrast)}.ide .tag{color:inherit!important;background:0 0!important;padding:inherit!important;font-size:inherit!important;line-height:14px}.ide .copy{cursor:pointer;content:attr(data-lang);display:inline-block;background:#fff;color:#000;position:absolute;transform:translateX(-50%);bottom:-20px;padding:5px 10px;border-radius:15px;font-size:10px;font-style:normal;left:50%;opacity:0;transition:bottom .3s,opacity .3s;line-height:normal;font-family:Poppins,sans-serif}.ide .copy::before{padding-right:5px}.ide:hover .copy{transition:bottom .3s,opacity .3s;opacity:.9;bottom:16px}.ide pre{-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;color:#e6ebf1;font-weight:400;line-height:20px;font-size:13px;margin:0;padding:20px;padding-left:60px}.ide.light{box-shadow:0 2px 4px 0 rgba(50,50,93,.1);background-color:#fff}.ide.light pre{color:#414770}.ide.light .token.cdata,.ide.light .token.comment,.ide.light .token.doctype,.ide.light .token.prolog{color:#91a2b0}.ide.light .token.attr-name,.ide.light .token.builtin,.ide.light .token.char,.ide.light .token.inserted,.ide.light .token.selector,.ide.light .token.string{color:#149570}.ide.light .token.punctuation{color:#414770}.ide.light .language-css .token.string,.ide.light .style .token.string,.ide.light .token.entity,.ide.light .token.operator,.ide.light .token.url,.ide.light .token.variable{color:#414770}.ide.light .line-numbers .line-numbers-rows{background:#f2feef}.ide.light .line-numbers-rows>span:before{color:#5dc79e}.ide.light .token.keyword{color:#6772e4;font-weight:500}code[class*=language-],pre[class*=language-]{text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4}pre[class*=language-]{overflow:auto}:not(pre)>code[class*=language-]{padding:.1em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#6b7c93}.token.punctuation{color:#f8f8f2}.namespace{opacity:.7}.token.constant,.token.deleted,.token.property,.token.symbol,.token.tag{color:#f92672}.token.boolean,.token.number{color:#f79a59}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#3ecf8e}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.class-name,.token.function{color:#45b2e8}.token.keyword{color:#7795f8}.token.important,.token.regex{color:#fd971f}.token.italic{font-style:italic}.token.entity{cursor:help}pre[class*=language-].line-numbers{position:relative;padding-left:60px;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{background:var(--config-prism-numbers);position:absolute;pointer-events:none;top:-20px;bottom:-21px;padding:20px 0;font-size:100%;left:-60px;width:40px;letter-spacing:-1px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{padding-right:5px;pointer-events:none;display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#636365;display:block;padding-right:.8em;text-align:right}.u-margin-inline-end-16{margin-inline-end:16px!important}.console{width:100%;padding:0;overscroll-behavior:none}.console body{position:relative;width:calc(100% - 320px);padding-top:70px;padding-bottom:0;padding-right:50px;padding-left:270px;margin:0;color:var(--config-color-normal);background:var(--config-console-background)}.console body .project-only{display:none!important}.console body.show-nav .project-only{display:inline-block!important}.console body.hide-nav{padding-left:50px;width:calc(100% - 100px)}.console body.hide-nav header{width:calc(100% - 50px)}.console body.hide-nav header .logo{display:inline-block}.console body.hide-nav .console-back{display:block}.console body.hide-nav .console-index{display:none}.console body.hide-nav .account{display:none}.console body.index .console-back{display:none}.console body.index .console-index{display:block}.console body.index .account{display:block}.console body .console-index{display:block}.console body .console-back{display:none}.console main{min-height:480px}.console header{position:fixed;top:0;width:calc(100% - 280px);height:40px;line-height:40px;padding:15px 30px;background:var(--config-color-background-fade);box-shadow:0 0 2px rgba(0,0,0,.1);margin:0 -50px;z-index:2;font-size:14px}.console header .logo{display:none;border:none}.console header .logo:hover{border:none;opacity:.8}.console header .logo img{height:26px;margin:7px 0}.console header .setup-new{width:40px;height:40px;line-height:40px}.console header .list{width:240px}.console header .list select{height:40px;line-height:40px;padding-top:0;padding-bottom:0;border:none;border-radius:26px;background-color:var(--config-console-nav-switch-background);color:var(--config-console-nav-switch-color)}.console header .account{margin-left:25px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.console header .switch-theme{margin:2px 0}.console header .avatar{height:40px;width:40px}.console header .account-button{background:0 0;position:absolute;width:100%;height:40px;border-radius:0;z-index:1}.console header .notifications{position:relative;font-size:20px}.console header .notifications a{color:#1b3445}.console header .notifications:after{position:absolute;content:"";display:block;background:var(--config-color-danger);width:8px;height:8px;border-radius:50%;top:3px;right:3px}.console header nav{background:#1b3445;background:linear-gradient(var(--config-console-nav-start),var(--config-console-nav-end));color:#788c99;position:fixed;height:100%;width:220px;top:0;left:0}.console header nav .logo{height:39px;padding:15px 20px;display:block}.console header nav .logo img{display:inline-block;margin-top:7px;margin-bottom:14px}.console header nav .logo svg g{fill:var(--config-color-focus)}.console header nav .icon{display:block;border:none;margin:18px 10px 50px 10px}.console header nav .icon img{display:block}.console header nav .icon:hover{border-bottom:none}.console header nav .icon:hover svg g{fill:var(--config-color-focus)}.console header nav .container{overflow:auto;height:calc(100% - 133px);width:100%}.console header nav .project-box{padding:20px;text-align:center;display:block;border:none;line-height:100px;height:100px}.console header nav .project-box img{max-height:80px;max-width:80%;display:inline-block;vertical-align:middle}.console header nav .project{display:block;padding:85px 25px 20px 25px;color:#788c99;position:relative;border:none;height:20px}.console header nav .project:hover{border-bottom:none}.console header nav .project .name{height:20px;line-height:20px;margin:0;padding:0;display:inline-block;max-width:100%}.console header nav .project .arrow{display:block;position:absolute;right:5px;top:10px;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #788c99;transform:rotate(225deg)}.console header nav .project img{position:absolute;bottom:40px;display:block;margin-bottom:10px;max-height:35px;max-width:40%}.console header nav .subtitle{padding:0 30px;display:block;font-size:12px;font-weight:300}.console header nav .links{margin-bottom:15px!important}.console header nav .links.top{border:none;padding-bottom:0;margin-bottom:5px!important}.console header nav .links.bottom{position:absolute;bottom:0;left:0;right:0;padding-bottom:0;border:none;margin-bottom:0!important;box-shadow:0 0 10px rgba(0,0,0,.1)}.console header nav .links.bottom a{border-top:solid 1px var(--config-console-nav-border);border-bottom:none}.console header nav .links .sub{display:inline-block;border:none;width:25px;height:25px;line-height:25px;border-radius:50%;padding:0;background:var(--config-color-focus);color:#fff;text-align:center;font-size:12px;margin:18px}.console header nav .links .sub i{width:auto;margin:0}.console header nav .links .sub:hover{border:none}.console header nav .links a{padding:8px 20px;border:none;display:flex;color:#87a5b9;font-weight:400;border-left:solid 5px transparent;font-size:13px}.console header nav .links a i{margin-right:8px;width:22px;display:inline-block}.console header nav .links a.selected,.console header nav .links a:hover{color:#e4e4e4}.console header nav:after{content:'';display:block;position:absolute;background:#302839;height:100px;width:100%;bottom:-100px}.console>footer{width:calc(100% + 100px);margin:0 -50px;box-sizing:border-box;background:0 0;padding-right:30px;padding-left:30px}.console>footer ul{float:none;text-align:center}.console>footer ul li{float:none;display:inline-block}.console .projects{position:relative}.console .projects:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.console .projects li{float:left;margin-right:50px;margin-bottom:50px;width:270px}.console .projects li:nth-child(3n){margin-right:0}.console .dashboard{padding:20px;overflow:visible;position:relative;z-index:1;margin-bottom:2px}.console .dashboard .chart{width:80%}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard .chart{width:100%}}.console .dashboard hr{margin:20px -25px;height:2px;background:var(--config-console-background)}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard hr{height:3px}}.console .dashboard footer{margin:-20px;padding:20px;background:#fcfeff;border:none;color:var(--config-color-link)}.console .dashboard .col{position:relative}.console .dashboard .col:last-child:after{display:none}.console .dashboard .col:after{content:"";display:block;width:2px;background:var(--config-console-background);position:absolute;top:-20px;bottom:-20px;right:24px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard .col:after{width:calc(100% + 40px);height:3px;position:static;margin:20px -20px}}.console .dashboard .value{color:var(--config-color-focus);vertical-align:bottom;line-height:45px}.console .dashboard .value.small{line-height:35px}.console .dashboard .value .sum{font-size:45px;line-height:45px;font-weight:700;vertical-align:bottom}.console .dashboard .value .sum.small{font-size:25px;line-height:25px}.console .dashboard .unit{font-weight:500;line-height:20px;vertical-align:bottom;font-size:16px;display:inline-block;margin-bottom:5px;margin-left:5px;color:var(--config-color-focus)}.console .dashboard .metric{color:var(--config-color-focus);font-weight:400;font-size:13px;line-height:16px}.console .dashboard .range{color:var(--config-color-fade);font-weight:400;font-size:14px;line-height:16px}.console .dashboard a{display:block;font-weight:400;font-size:14px;line-height:16px;padding:0;border:none}.console .dashboard .chart-bar{height:4rem;width:auto;display:flex;align-items:flex-end}@media only screen and (min-width:1199px){.console .dashboard .chart-bar{padding-right:15px}}.console .dashboard .chart-bar .bar{width:12.5%;background-color:var(--config-color-chart-fade);margin:0 2px;border-top:2px solid var(--config-color-chart)}.console .dashboard .chart-bar .bar:hover{background-color:var(--config-color-chart)}.console .dashboard .chart-bar .bar.bar-100{height:100%}.console .dashboard .chart-bar .bar.bar-90{height:90%}.console .dashboard .chart-bar .bar.bar-80{height:80%}.console .dashboard .chart-bar .bar.bar-70{height:70%}.console .dashboard .chart-bar .bar.bar-60{height:60%}.console .dashboard .chart-bar .bar.bar-50{height:50%}.console .dashboard .chart-bar .bar.bar-40{height:40%}.console .dashboard .chart-bar .bar.bar-30{height:30%}.console .dashboard .chart-bar .bar.bar-20{height:20%}.console .dashboard .chart-bar .bar.bar-10{height:10%}.console .dashboard .chart-bar .bar.bar-0{height:0%}.console .dashboard .chart-bar .bar.bar-0{border-top:1px solid var(--config-color-chart)}.console .dashboard .chart-bar .bar.bar-5{height:5%}.console .chart-metric{width:19%}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (max-width:550px){.console .chart-metric{width:100%}}.console .chart{width:100%;position:relative;height:0;padding-top:20px;padding-bottom:26%;margin-right:-2px;overflow:hidden;background-color:var(--config-color-background-fade);background-image:linear-gradient(transparent 1px,transparent 1px),linear-gradient(90deg,transparent 1px,transparent 1px),linear-gradient(var(--config-border-color) 1px,transparent 1px),linear-gradient(90deg,var(--config-border-color) 1px,transparent 1px);background-size:100px 100px,100px 100px,20px 20px,20px 20px;background-position:-2px -2px,-2px -2px,-1px -1px,-1px -1px;background-repeat:round;border:solid 1px var(--config-border-color);border-right:solid 1px transparent;border-bottom:solid 1px transparent}.console .chart.background-image-no{background-image:none}.console .chart.border-no{border:none}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (max-width:550px){.console .chart{width:100%;padding-bottom:32%;float:none;margin-bottom:20px}}.console .chart canvas{position:absolute;bottom:0;display:block;height:100%;width:100%}.console .chart-notes{font-size:12px}.console .chart-notes.crud li.create,.console .chart-notes.crud li:nth-child(1){color:#00b680}.console .chart-notes.crud li.create::before,.console .chart-notes.crud li:nth-child(1)::before{background:#00b680}.console .chart-notes.crud li.read,.console .chart-notes.crud li:nth-child(2){color:#009cde}.console .chart-notes.crud li.read::before,.console .chart-notes.crud li:nth-child(2)::before{background:#009cde}.console .chart-notes.crud li.update,.console .chart-notes.crud li:nth-child(3){color:#696fd7}.console .chart-notes.crud li.update::before,.console .chart-notes.crud li:nth-child(3)::before{background:#696fd7}.console .chart-notes.crud li.delete,.console .chart-notes.crud li:nth-child(4){color:#da5d95}.console .chart-notes.crud li.delete::before,.console .chart-notes.crud li:nth-child(4)::before{background:#da5d95}.console .chart-notes li{line-height:20px;display:inline-block;margin-right:15px}.console .chart-notes li::before{display:inline-block;content:'';width:14px;height:14px;background:var(--config-color-normal);border-radius:50%;margin-right:8px;vertical-align:middle}.console .chart-notes li.blue,.console .chart-notes li:nth-child(1){color:var(--config-color-chart)}.console .chart-notes li.blue::before,.console .chart-notes li:nth-child(1)::before{background:var(--config-color-chart)}.console .chart-notes li.green,.console .chart-notes li:nth-child(2){color:#4eb55b}.console .chart-notes li.green::before,.console .chart-notes li:nth-child(2)::before{background:#4eb55b}.console .chart-notes li.orange,.console .chart-notes li:nth-child(3){color:#ec9323}.console .chart-notes li.orange::before,.console .chart-notes li:nth-child(3)::before{background:#ec9323}.console .chart-notes li.red,.console .chart-notes li:nth-child(4){color:#dc3232}.console .chart-notes li.red::before,.console .chart-notes li:nth-child(4)::before{background:#dc3232}.console .community a{padding:0 10px;display:inline-block}.console .link-list li{margin-bottom:15px}.console .link-list i{display:inline-block;width:30px;height:30px;line-height:30px;text-align:center;background:var(--config-color-fade);color:var(--config-color-fade-super);border-radius:50%;margin-right:15px}.console .link-list i.fade{background:0 0;color:var(--config-color-fade)}.console .provider{width:50px;height:50px;background:var(--config-color-background-focus);color:#868686;line-height:50px;text-align:center;font-size:25px;border-radius:50%}.console .provider.facebook{color:#fff;background:#3b5998}.console .provider.twitter{color:#fff;background:#55beff}.console .provider.telegram{color:#fff;background:#3ba9e1}.console .provider.github{color:#fff;background:#24292e}.console .provider.whatsapp{color:#fff;background:#25d366}.console .provider.linkedin{color:#fff;background:#1074af}.console .provider.microsoft{color:#fff;background:#137ad4}.console .provider.google{color:#fff;background:#4489f1}.console .provider.bitbucket{color:#fff;background:#2a88fb}.console .provider.gitlab{color:#faa238;background:#30353e}.console .provider.instagram{color:#fff;background:radial-gradient(circle at 30% 107%,#fdf497 0,#fdf497 5%,#fd5949 45%,#d6249f 60%,#285aeb 90%)}.console .premium{z-index:3;margin-top:320px}.console .premium .message{height:190px;overflow:hidden;position:absolute;top:-280px}.console .premium:after{content:'';position:absolute;top:0;left:-20px;right:-20px;bottom:-20px;background:var(--config-color-background);opacity:.7;z-index:300}.console .app-section{height:90px}.console .confirm{background:var(--config-color-link);color:#fff;border-radius:25px;padding:12px;line-height:28px;text-align:center}.console .confirm .action{font-weight:500;cursor:pointer}.console .platforms{overflow:hidden}.console .platforms .box{overflow:hidden}.console .platforms .box img{width:50px;margin:0 auto;margin-bottom:20px}.console .platforms .box .cover{margin:-30px -30px 30px -30px;padding:30px}.console .platforms .box .cover.android{background:#a4ca24}.console .platforms .box .cover.android h1{color:#fff;font-size:18px;margin-top:20px}.console .platforms .col{text-align:center;line-height:30px}.console .platforms a{display:block;margin:-20px;padding:20px}.console .platforms a:hover{background:#fbfeff}.console .platforms img{display:block;margin:0 30px;width:calc(100% - 60px);border-radius:50%;margin-bottom:20px}.console .document-nav{display:none;position:sticky;top:90px}@media only screen and (min-width:1380px){.console .document-nav{display:block}}.console .document-nav ul{position:absolute;width:200px;left:-260px}.console .document-nav ul li{margin-bottom:20px}.console .document-nav ul li .selected{font-weight:500}@media only screen and (min-width:1199px){.console .logo .top{display:none!important}}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console>header{width:calc(100% - 30px)!important;margin:0 -30px;padding:15px}.console>header nav{width:100%;height:70px;overflow:hidden}.console>header nav.close{background:0 0}.console>header nav.close .logo .nav{display:none!important}.console>header nav.open{height:100%}.console>header nav.open .logo .top{display:none!important}.console>header nav.open .bottom{display:block!important}.console>header nav.open button{color:#87a5b9}.console>header nav button{margin:9px;background:0 0;color:var(--config-color-normal)}.console>header nav button:focus,.console>header nav button:hover{background:0 0}.console>header nav .logo{display:block!important;position:absolute;top:0;left:50%;margin:auto;transform:translateX(-50%)}.console>header nav .bottom{display:none!important}.console>footer{width:auto;margin:50px -30px 0 -30px!important;padding:0 30px 30px 30px}.console body{height:"calc(100% - 70px)"!important;width:calc(100% - 60px)!important;padding:70px 30px 0 30px!important}.console .cover{padding:25px 30px;margin:0 -30px}}@media only screen and (max-width:550px){.console body{height:"calc(100% - 70px)"!important;width:calc(100% - 40px)!important;padding:70px 20px 0 20px!important}.console .cover{padding:20px 20px;margin:0 -20px}.console>header{margin:0 -20px}.console>header .list{width:175px;font-size:14px}.console>footer{margin:50px -20px 0 -20px!important;padding:0 20px 20px 20px}}.dev-feature{display:none}.prod-feature{display:none}.development .dev-feature{display:block;opacity:.6!important;outline:solid #ff0 3px;outline-offset:3px}.development .dev-feature.dev-inline{display:inline-block}.development .prod-feature{display:none}.production .dev-feature{display:none}.production .prod-feature{display:block}.search{opacity:1!important}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.search button{margin-top:20px}}html.home body{padding:0 50px;color:var(--config-color-normal)}html.home .logo a{display:block}html.home .logo a:hover{opacity:.8}html.home .logo img{max-height:35px;width:198px;margin:45px auto 25px auto}html.home footer{background:0 0;text-align:center}html.home main{min-height:400px}.alerts ul{width:100%;visibility:hidden;position:fixed;padding:0;right:0;left:0;color:var(--config-color-normal);z-index:1001;margin:0 auto;bottom:15px;max-width:560px}.alerts ul li{margin:10px 0 0 0;padding:0}.alerts ul li div.message{position:relative;padding:12px 35px;margin:0 auto;list-style:none;background:var(--config-color-background-dark);text-align:center;font-size:14px;border-radius:10px;line-height:16px;min-height:16px;box-shadow:0 0 10px rgba(0,0,0,.05);opacity:.95}.alerts ul li div.message a,.alerts ul li div.message span{font-weight:600}.alerts ul li div.message a{border-bottom:dotted 1px var(--config-color-normal)}.alerts ul li div.message i{cursor:pointer;position:absolute;font-size:14px;line-height:20px;top:9px;left:9px;color:var(--config-color-background-dark);background:var(--config-color-normal);width:22px;height:22px;border-radius:50%}.alerts ul li div.message.error{color:#fff!important;background:var(--config-color-danger)!important}.alerts ul li div.message.error a{color:#fff!important;border-bottom:dotted 1px #fff!important}.alerts ul li div.message.error i{color:var(--config-color-danger);background:#fff}.alerts ul li div.message.success{color:#fff!important;background:var(--config-color-success)!important}.alerts ul li div.message.success a{color:#fff;border-bottom:dotted 1px #fff}.alerts ul li div.message.success i{color:var(--config-color-success);background:#fff}.alerts ul li div.message.warning{color:var(--config-color-normal)!important;background:var(--config-color-warning)!important}.alerts ul li div.message.warning a{color:var(--config-color-normal)!important;border-bottom:dotted 1px var(--config-color-normal)!important}.alerts ul li div.message.warning i{color:#fff;background:var(--config-color-normal)!important}.alerts ul li div.message.open{display:block}.alerts ul li div.message.close{display:none}.alerts .cookie-alert{background:var(--config-color-focus-fade)!important;color:var(--config-color-focus)}.alerts .cookie-alert a{color:var(--config-color-focus);font-weight:400;border-bottom:dotted 1px var(--config-color-focus)!important}.alerts .cookie-alert i{color:var(--config-color-focus-fade)!important;background:var(--config-color-focus)!important}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.alerts ul{top:auto;bottom:0;max-width:100%;left:0}.alerts ul li{margin:5px 0 0 0}.alerts ul li div.message{border-radius:0}}.show-nav .alerts ul{left:220px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.show-nav .alerts ul{left:0}}article{overflow-wrap:break-word;word-wrap:break-word}article h1{font-size:36px}article h2{font-size:24px}article h3{font-size:20px}article h4{font-size:20px}article h5{font-size:18px}article h6{font-size:16px}article h1,article h2,article h3,article h4,article h5,article h6{margin-top:30px!important;margin-bottom:30px!important}article p{line-height:32px;font-size:16px}article .update{display:block;margin-top:50px!important}article table{width:100%;margin:0;margin-bottom:30px!important;border-radius:0;border-bottom:solid 1px var(--config-border-color)}article table thead td{font-weight:500;padding:5px 15px}article table td,article table th{padding:15px;height:auto}article table td:first-child,article table th:first-child{padding-left:10px}article table td:last-child,article table th:last-child{padding-right:10px}article table td p,article table th p{font-size:inherit;line-height:inherit}article table td p:last-child,article table th p:last-child{margin:0}.avatar-container{position:relative}.avatar-container .corner{position:absolute;bottom:-3px;right:-3px}.avatar{width:60px;height:60px;border-radius:50%;background:var(--config-color-background-focus);display:inline-block;overflow:hidden;box-shadow:0 0 6px rgba(0,0,0,.09);position:relative;z-index:1;opacity:1!important}.avatar.hide{display:none}.avatar:before{width:100%;height:100%;z-index:0}.avatar.inline{display:inline-block;vertical-align:middle}.avatar.trans{background:0 0}.avatar .no-shadow{box-shadow:none}.avatar.xs{width:30px;height:30px}.avatar.xxs{width:20px;height:20px}.avatar.small{width:50px;height:50px}.avatar.big{width:100px;height:100px}.avatar.huge{width:150px;height:150px}.box{position:relative;background:var(--config-color-background-fade);border-radius:10px;border-bottom:none;box-shadow:0 0 3px rgba(0,0,0,.05);display:block;padding:30px}.box.padding-tiny{padding:5px}.box.padding-xs{padding:10px}.box.padding-small{padding:15px}.box.y-scroll{overflow-y:auto}.box.danger{background:var(--config-color-danger);color:#fff}.box.danger .box{color:var(--config-color-normal);background:var(--config-color-background-fade)}.box.danger>.button,.box.danger>button{background:#fff;color:var(--config-color-danger)}.box.note{background:var(--config-note-background)}.box.focus{background:var(--config-color-focus);color:var(--config-color-background-fade)}.box.focus .button,.box.focus button{background:var(--config-color-background-fade);color:var(--config-color-focus)}.box.line{background:0 0;border:solid 1px var(--config-color-background-dark);box-shadow:none}.box.warning{background:var(--config-color-warning);color:#2d2d2d}.box.warning .button,.box.warning button{background:rgba(45,45,45,.8);color:var(--config-color-success)}.box .tabs{border-bottom:solid 1px var(--config-border-color);margin:0 -30px;padding:0 30px!important}.box>footer{margin:0 -30px -30px -30px;padding:15px 30px;background:var(--config-color-background-fade);border:solid 1px var(--config-border-color);border-radius:0 0 10px 10px}.box hr{height:1px;background:var(--config-console-background);border:none;margin:30px -30px}.box .label{position:absolute;top:10px;z-index:2;right:10px}.box.fade-bottom{position:relative;overflow:hidden}.box.fade-bottom:after{content:"";position:absolute;display:block;bottom:15px;width:100%;background:#000;background:linear-gradient(180deg,rgba(0,0,0,0) 0,var(--config-color-background-fade) 80%);height:100px;margin:0 -15px}.box .header{position:static;height:40px;padding:20px 30px 20px 30px;margin-bottom:30px;margin:-30px -30px 20px -30px;background:var(--config-color-background-fade);border-bottom:solid 1px #efefef}.box ul.numbers>li{position:relative;margin-left:30px;margin-right:50px}.box ul.numbers>li hr{margin-left:-60px;margin-right:-80px}.box ul.numbers>li .settings{position:absolute;top:3px;right:-50px}.box ul.numbers>li::after{display:block;width:25px;height:25px;line-height:25px;font-size:13px;font-weight:500;border-radius:50%;background:var(--config-color-focus);color:var(--config-color-background);counter-increment:section;content:counter(section);text-align:center;position:absolute;top:3px;left:-45px}.box .scroll{margin:0 -30px;overflow-y:scroll}.box .scroll table{width:100%;margin:0}.box ul.sortable{counter-reset:section}.box ul.sortable>li [data-move-down].round,.box ul.sortable>li [data-move-up].round,.box ul.sortable>li [data-remove].round{background:var(--config-color-focus);color:var(--config-color-background-fade);width:25px;height:25px;line-height:25px;display:inline-block;text-align:center;padding:0;margin-right:5px}.box ul.sortable>li [data-move-down].round:disabled,.box ul.sortable>li [data-move-up].round:disabled,.box ul.sortable>li [data-remove].round:disabled{display:none}.box ul.sortable>li:first-child [data-move-up]{display:none}.box ul.sortable>li:first-child [data-move-up]:disabled{display:inline-block;background:var(--config-color-background)}.box ul.sortable>li:last-child [data-move-down]{display:none}.box ul.sortable>li:last-child [data-move-down]:disabled{display:inline-block;background:var(--config-color-background)}.box .toggle{position:relative;border-top:1px solid var(--config-console-background);border-bottom:1px solid var(--config-console-background);margin:0 -30px;padding:30px 30px 0 30px;height:65px;overflow:hidden}.box .toggle.list{border-bottom:none}.box .toggle.sorts button.ls-ui-open{width:calc(100% - 100px)}.box .toggle button.ls-ui-open{right:0;position:absolute;top:0;width:100%;height:95px;background:0 0;opacity:.5;border-radius:0}.box .toggle .icon-minus,.box .toggle .icon-up-open{display:none}.box .toggle .content{display:none}.box .toggle.open{height:auto}.box .toggle.open .icon-minus,.box .toggle.open .icon-up-open{display:block}.box .toggle.open .icon-down-open,.box .toggle.open .icon-plus{display:none}.box .toggle.open .content{display:block}.box .list li{border-bottom:solid 2px var(--config-border-color);margin:0 -30px 30px -30px;padding:0 30px 30px 30px}.box .list li:last-child{padding-bottom:0;margin-bottom:0;border-bottom:none}@media only screen and (max-width:550px){.box .list li .actions{float:none}}.box .list li .avatar{display:block}.box .list li .avatar.inline{display:inline-block}.box.new{text-align:center}.box.new i{font-size:80px;line-height:80px;font-family:Poppins,sans-serif;font-style:normal;font-weight:300}.box.new b{margin-top:20px;display:block}.box .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.box .info hr{background:var(--config-modal-note-border)!important}.box .table-wrap{margin:0 -30px;overflow-y:scroll}.box .table-wrap table{margin:0}a.box{border-right:none;border-left:none}a.box:hover{box-shadow:0 0 1px rgba(0,0,0,.2);opacity:.7}.box-asidex{padding-right:25px!important;padding-left:70px;right:0;background:#f9f9f9;border-radius:0 10px 10px 0;height:calc(100% - 30px);position:absolute;padding-top:30px}.box-asidex:after{content:"";display:block;position:absolute;height:100%;width:51px;background:#fff;top:0;bottom:0;left:-6px}.cover{background:var(--config-color-focus-fade);padding:30px 50px;margin:0 -50px;position:relative;border-bottom:solid 1px var(--config-border-fade)}.cover .title,.cover h1,.cover h2,.cover h3,.cover h4{color:var(--config-color-focus);font-weight:600;margin-bottom:50px!important;font-size:28px;line-height:42px}.cover .title span,.cover h1 span,.cover h2 span,.cover h3 span,.cover h4 span{font-weight:600}.cover i:before{margin:0!important}.cover p{color:var(--config-color-fade)}.cover .button{color:#fff}.cover .link,.cover a{display:inline-flex;color:var(--config-color-focus);border-left:none;border-right:none;cursor:pointer}.cover .link:hover,.cover a:hover{border-bottom-color:var(--config-color-focus)}.cover .link i,.cover a i{margin-right:.2rem}.console .database .row .col{height:452px}.console .database .row .col:after{width:2px;right:20px}.console .database hr{margin:0 -20px;background:var(--config-color-background);height:1px}.console .database h3{font-size:13px;line-height:20px;height:20px;background-color:var(--config-color-fade-super);margin:-20px -20px 0 -20px;padding:10px 20px;border-bottom:solid 1px var(--config-color-background);font-weight:600}.console .database .empty{height:162px;font-size:12px;text-align:center;margin:50px 0}.console .database .empty h4{font-size:13px;font-weight:600;line-height:120px}.console .database .search{background-color:var(--config-color-fade-super);margin:0 -20px 0 -20px;padding:10px 15px}.console .database .search input{height:40px;background-color:#fff;border-radius:25px;padding-top:0;padding-bottom:0}.console .database .code{height:411px;background:var(--config-color-fade-super);margin:0 -20px -20px -20px;padding:20px;width:calc(100% - 10px)}.console .database .code .ide{overflow:scroll;height:451px;margin:-20px;box-shadow:none;border-radius:0}.console .database .paging{background:var(--config-color-fade-super);margin:0 -20px -20px -20px;padding:20px}.console .database .button{margin:0 -20px;padding:0 20px!important;text-align:inherit;color:var(--config-color-focus);width:100%;font-size:15px;line-height:55px;box-sizing:content-box}.console .database .button i{margin-right:8px}.console .database .button:hover{border:none;background:var(--config-color-focus-fade)}.console .database .items{margin:0 -20px;height:262px;overflow-x:hidden;overflow-y:scroll}.console .database .items form{opacity:0;position:relative}.console .database .items form button{position:absolute;top:0;bottom:0;left:0;right:0;width:100%;height:45px;border-radius:0;cursor:pointer}.console .database .items li{padding:0;margin:0 0;line-height:45px;font-size:15px;padding-left:50px;padding-right:30px;position:relative}.console .database .items li i{position:absolute;display:none;right:10px}.console .database .items li .name{display:inline-block;width:100%;height:28px}.console .database .items li.selected,.console .database .items li:hover{background:#f5f5f5}.console .database .items li.selected i,.console .database .items li:hover i{display:block}.console .database .items li:last-child{border-bottom:none}body>footer{color:var(--config-color-fade);line-height:40px;margin:0 -50px;padding:12px 50px;font-size:13px;width:100%;background:#f1f1f1;position:relative;margin-top:80px!important}body>footer:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}body>footer .logo img{height:22px;padding-top:12px}body>footer a{display:inline-flex;color:var(--config-color-fade);font-size:13px}body>footer a:hover{border-bottom-color:var(--config-color-fade)}body>footer a i{margin-right:.2rem}body>footer ul{display:flex;justify-content:center}body>footer ul:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}body>footer ul li{font-size:13px;float:left;margin-right:20px!important}body>footer .copyright{padding-left:2px}.loader{height:0;direction:ltr;position:fixed;top:0;width:0;margin:0 auto;left:0;opacity:0;z-index:4}.load-start~.loader{width:100%;background:var(--config-color-focus);height:3px;opacity:1;transition:width .3s ease-out,opacity .5s ease-out;-moz-transition:width .3s ease-out,opacity .5s ease-out;-webkit-transition:width .3s ease-out,opacity .5s ease-out;-o-transition:width .3s ease-out,opacity .5s ease-out}.www .load-start~.loader{background:#fff}.load-start>*{opacity:0}.load-end>*{opacity:1;transition:opacity .3s ease-out;-moz-transition:opacity .3s ease-out;-webkit-transition:opacity .3s ease-out;-o-transition:opacity .3s ease-out}[data-ls-if]{display:none}[data-service]{opacity:0}.load-service-start{opacity:0}.load-service-end{opacity:1;transition:opacity .5s ease-out;-moz-transition:opacity .5s ease-out;-webkit-transition:opacity .5s ease-out;-o-transition:opacity .5s ease-out}.load-screen{z-index:100000;position:fixed;height:100%;width:100%;background-color:var(--config-color-background-focus);top:0;left:0}.load-screen.loaded{transition:opacity 1s ease-in-out,top 1s .7s;opacity:0;top:-100%}.load-screen .animation{position:absolute;top:45%;left:50%;transform:translate(-50%,-50%) translateZ(1px);width:140px;height:140px}.load-screen .animation div{box-sizing:border-box;display:block;position:absolute;width:124px;height:124px;margin:10px;border:10px solid var(--config-color-focus);border-radius:50%;animation:animation 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--config-color-focus) transparent transparent transparent}.load-screen .animation div:nth-child(1){animation-delay:-.45s}.load-screen .animation div:nth-child(2){animation-delay:-.3s}.load-screen .animation div:nth-child(3){animation-delay:-.15s}@keyframes animation{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.load-screen img{position:absolute;height:20px;bottom:60px;left:50%;transform:translate(-50%,-50%)}.modal-open .modal-bg,.modal-open body .modal-bg{position:fixed;content:'';display:block;width:100%;height:100%;left:0;right:0;top:0;bottom:0;background:#0c0c0c;opacity:.75;z-index:5}.modal{overflow:auto;display:none;position:fixed;transform:translate3d(0,0,0);width:100%;max-height:90%;max-width:640px;background:var(--config-color-background-fade);z-index:1000;box-shadow:0 0 4px rgba(0,0,0,.25);padding:30px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:10px;box-sizing:border-box;text-align:left;white-space:initial;line-height:normal}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.modal{width:calc(100% - 20px)}}.modal.full{max-width:none;max-height:none;height:100%;border-radius:0;padding:80px 120px}.modal.full h1{font-weight:700}.modal.padding-tiny{padding:5px}.modal.padding-xs{padding:10px}.modal.padding-small{padding:15px}.modal.height-tiny>form{height:100px}.modal.height-small>form{height:220px}.modal.width-small{max-width:400px}.modal.width-medium{max-width:500px}.modal.width-large{max-width:800px}.modal.open{display:block}.modalbutton.close{display:none}.modal.fill{height:95%;max-height:95%;max-width:75%}.modal h1,.modal h2{margin-bottom:25px;margin-top:0;font-size:20px;text-align:left}.modal h1,.modal h2,.modal h3,.modal h4,.modal h5,.modal h6{color:inherit!important;line-height:35px}.modal .main,.modal>form{position:relative;border-top:solid 1px var(--config-border-color);padding:30px 30px 0 30px;margin:0 -30px}.modal .main.strip,.modal>form.strip{border:none;padding:0;margin:0}.modal .separator{margin:20px -30px}.modal .bullets{padding-left:40px}.modal .bullets li{margin-bottom:30px!important}.modal .bullets li:before{position:absolute}.modal .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.modal .ide.strech{box-shadow:none;border-radius:0;margin:0 -30px}.modal .ide pre{overflow:auto}.modal .paging form{padding:0;margin:0;border-top:none}.modal.sticky-footer form footer{margin:-30px}.modal.sticky-footer footer{position:sticky;bottom:-30px;background:var(--config-color-background-fade-super);height:50px;z-index:1;padding:30px;box-shadow:0 0 1px rgba(0,0,0,.15)}.modal.sticky-footer footer form{display:inline-block}[data-views-current="0"] .scroll-to,[data-views-current="1"] .scroll-to{opacity:0!important}.scroll-to-bottom .scroll-to,.scroll-to-top .scroll-to{opacity:1}.scroll-to{opacity:0;display:block;width:40px;height:40px;line-height:40px;border-radius:50%;position:fixed;transform:translateZ(0);margin:30px;padding:0;bottom:0;font-size:18px;z-index:100000;transition:opacity .15s ease-in-out;right:0}.phases{list-style:none;margin:0;padding:0;position:relative}.phases li{display:none}.phases li .badge{display:none}.phases li li{display:block}.phases li.selected{display:block}.phases .number{display:none}.phases h2,.phases h3,.phases h4,.phases h5,.phases h6{margin:0 0 30px 0;text-align:inherit}.container{position:relative}.container .tabs{height:55px;line-height:55px;list-style:none;padding:0;margin-bottom:50px!important;margin-top:-55px;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.container .tabs:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.container .tabs li{position:relative}.container .tabs .badge{background:var(--config-color-focus);color:var(--config-color-background-fade);display:inline-block;border-radius:15px;width:15px;height:15px;margin:10px;line-height:15px;padding:3px;text-align:center;font-weight:500!important;position:absolute;top:-5px;right:-35px;font-size:12px}.container .tabs .selected{font-weight:400;color:var(--config-color-focus);opacity:1}.container .tabs .selected:after{content:"";display:block;height:2px;background:var(--config-color-focus);width:calc(100% + 6px);margin:0 -3px;position:absolute;bottom:0;border-radius:2px}.container .tabs .number{display:none}.container .tabs li{float:left;margin-right:50px;color:var(--config-color-focus);opacity:.9;cursor:pointer}.container .tabs li:focus{outline:0}@media only screen and (max-width:550px){.container .tabs li{margin-right:25px}}.container .icon{display:none}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.container .tabs{width:auto;overflow-x:scroll;overflow-y:hidden;white-space:nowrap}.container .tabs li{display:inline-block;float:none}}.preview-box{display:grid;place-content:center;padding:40px;background:var(--config-color-background-fade);border:1px dashed var(--config-color-background-dark);border-radius:8px}.preview-box-image{display:grid;place-content:center;width:40px;height:40px;margin-inline:auto;background-color:var(--config-color-background-focus);border-radius:50%}.preview-box-text{margin-top:16px;color:var(--config-color-fade)}.upload-box{--p-header-text-color:var(--config-color-background-fade);--p-header-bg-color:var(--config-color-normal);--p-content-text-color:var(--config-color-normal);--p-content-bg-color:var(--config-color-background-fade);--p-border-color:var(--config-modal-note-border);--box-shadow:0 10px 10px rgba(0, 0, 0, 0.05);--border-radius:6px;--transition:0.2s;position:fixed;z-index:1;overflow:hidden;min-width:285px;box-shadow:var(--box-shadow);border-radius:var(--border-radius);font-size:14px;line-height:1}.upload-box *{all:unset;display:revert}.upload-box-header{display:flex;padding:16px;padding-inline-end:21px;color:var(--p-header-text-color);background-color:var(--p-header-bg-color)}.upload-box-header .icon-button{margin-inline-start:16px}.upload-box-title{align-self:center;margin-inline-end:auto;margin-block-end:0}.upload-box-title .amount::before{content:"("}.upload-box-title .amount::after{content:")"}.upload-box-content{background-color:var(--p-content-bg-color);color:var(--p-content-text-color);height:0;overflow:auto;transition:var(--transition)}.upload-box-content.is-open{height:200px}.upload-box-item{display:flex;align-items:center;padding:13px 20px}.upload-box-item .file-name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;align-self:center;margin-inline-end:auto;line-height:normal}.upload-box-item .icon-button{align-self:center;margin-inline-start:16px}.upload-box-item .pill{margin-inline-start:8px}.upload-box-item:not(:last-child){border-bottom:solid 1px var(--p-border-color)}@media only screen and (max-width:550px){.upload-box{inset-inline:16px;inset-block-end:20px}}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (min-width:1199px){.upload-box{max-width:285px;inset-inline-end:24px;inset-block-end:24px}}:root .theme-dark .upload-box{--p-header-text-color:#fff;--p-header-bg-color:var(--config-color-background-dark)}.upload-image{--p-upload-image-size:var(--upload-image-size, 40px);--p-upload-bg-color:var(--config-color-fade-super);--p-upload-icon-color:var(--config-color-fade);position:relative;display:grid;place-content:center;flex-shrink:0;width:var(--p-upload-image-size);height:var(--p-upload-image-size);background-color:var(--p-upload-bg-color);color:var(--p-upload-icon-color);border-radius:50%}.upload-image .icon{position:relative;z-index:20}.upload-image .progress{--progress:var(--progress-value, 0);--zero-value:0 0% 0%/0%;position:absolute;z-index:10;inset:0;border-radius:50%;background:radial-gradient(var(--p-upload-bg-color) 0,var(--p-upload-bg-color) 64%,transparent 64.01%,transparent 100%),conic-gradient(hsl(194 66% 50%) 0,hsl(97 66% 50%) calc(var(--progress) * 1%),hsl(var(--zero-value)) calc(var(--progress) * 1%),hsl(var(--zero-value)) 100%)}.upload-image.is-finished .progress{display:none}:root .theme-dark .upload-image{--p-upload-bg-color:var(--config-color-background-dark);--p-upload-icon-color:var(--config-color-focus)}.icon-button{--p-icon-button-size:var(--icon-button-size, 20px);width:var(--p-icon-button-size);height:var(--p-icon-button-size);font-size:var(--p-icon-button-size);transition:.2s;line-height:1;text-align:center;flex-shrink:0;cursor:pointer}.icon-button>::before{margin:0}.icon-button.is-open{transform:rotate(180deg)}.icon-button.is-success{color:var(--config-color-success)}.icon-button:focus,.icon-button:hover{background-color:unset}.icon-button:focus-visible{outline:dashed 1px var(--config-color-primary)}.pill{--p-pill-text-color:var(--config-defalut-color-hsl, var(--pill-text-color));color:hsl(var(--p-pill-text-color));background-color:hsl(var(--p-pill-text-color) / .2);display:inline-grid;place-content:center;padding-inline:12px;height:30px;border-radius:15px;font-size:14px;font-weight:500}.pill.is-disabled{--p-pill-text-color:var(--config-disabled-color-hsl)}.pill.is-pending{--p-pill-text-color:var(--config-pending-color-hsl)}.pill.is-failed{--p-pill-text-color:var(--config-failed-color-hsl)}:root .theme-dark .pill.is-failed{color:#ffcfcf;background-color:#b91c1c}html{padding:0;margin:0;direction:ltr}body{margin:0;background:var(--config-console-background) no-repeat fixed;min-width:300px}ul{padding:0;margin:0}ul li{margin:0;list-style:none} \ No newline at end of file +.pull-start{float:left}.pull-end{float:right}img[src=""]{visibility:hidden;display:inline-block}:root{--config-width:910px;--config-width-xxl:1000px;--config-width-xl:910px;--config-width-large:700px;--config-width-medium:550px;--config-width-small:320px;--config-color-primary:#f02e65;--config-color-link:#1e849e;--config-color-background:#eceff1;--config-color-background-dark:#dfe2e4;--config-color-background-fade:#ffffff;--config-color-background-fade-super:#fdfdfd;--config-color-background-focus:#f5f5f5;--config-color-background-input:#ffffff;--config-color-placeholder:#868686;--config-color-tooltip-text:#dce8f5;--config-color-tooltip-background:#333333;--config-color-focus:#f02e65;--config-color-focus-fade:#fef8fa;--config-color-focus-hover:#ff729b;--config-color-focus-glow:#fce5ec;--config-color-focus-dark:#c52653;--config-color-normal:#40404c;--config-color-dark:#313131;--config-color-fade:#8f8f8f;--config-color-fade-dark:#6e6e6e;--config-color-fade-light:#e2e2e2;--config-color-fade-super:#f1f3f5;--config-color-danger:#f53d3d;--config-color-success:#1bbf61;--config-color-warning:#fffbdd;--config-color-info:#386fd2;--config-color-chart:#29b5d9;--config-color-chart-fade:#d4f0f7;--config-border-color:#f3f3f3;--config-border-fade:#e0e3e4;--config-border-fade-super:#f7f7f7;--config-border-radius:10px;--config-prism-background:#373738;--config-prism-numbers:#39393c;--config-note-background:#f1fbff;--config-note-border:#5bceff;--config-warning-background:#fdf7d9;--config-warning-border:#f8e380;--config-social-twitter:#1da1f2;--config-social-github:#000000;--config-social-discord:#7189dc;--config-social-facebook:#4070b4;--config-language-bash:#2b2626;--config-language-bash-contrast:#fff;--config-language-javascript:#fff054;--config-language-javascript-contrast:#333232;--config-language-web:#fff054;--config-language-web-contrast:#333232;--config-language-html:#ff895b;--config-language-html-contrast:#ffffff;--config-language-yaml:#ca3333;--config-language-yaml-contrast:#ffffff;--config-language-php:#6182bb;--config-language-php-contrast:#ffffff;--config-language-nodejs:#8cc500;--config-language-nodejs-contrast:#ffffff;--config-language-ruby:#fc3f48;--config-language-ruby-contrast:#ffffff;--config-language-python:#3873a2;--config-language-python-contrast:#ffffff;--config-language-go:#00add8;--config-language-go-contrast:#ffffff;--config-language-dart:#035698;--config-language-dart-contrast:#ffffff;--config-language-flutter:#035698;--config-language-flutter-contrast:#ffffff;--config-language-android:#a4c439;--config-language-android-contrast:#ffffff;--config-language-kotlin:#766DB2;--config-language-kotlin-contrast:#ffffff;--config-language-swift:#f2624c;--config-language-swift-contrast:#ffffff;--config-language-java:#0074bd;--config-language-java-contrast:#ffffff;--config-modal-note-background:#f5fbff;--config-modal-note-border:#eaf2f7;--config-modal-note-color:#3b5d73;--config-switch-background:#e2e2e2;--config-console-background:#eceff1;--config-console-nav-start:#143650;--config-console-nav-end:#302839;--config-console-nav-border:#2a253a;--config-console-nav-switch-background:#ececec;--config-console-nav-switch-color:#868686;--config-console-nav-switch-arrow:url("data:image/svg+xml;utf8,");--config-defalut-color-hsl:0 0% 62%;--config-disabled-color-hsl:0 0% 62%;--config-pending-color-hsl:36 100% 47%;--config-failed-color-hsl:0 74% 42%}:root .theme-dark{--config-color-primary:#f02e65;--config-color-background:#061F2F;--config-color-background-dark:#262d50;--config-color-background-fade:#1c223a;--config-color-background-fade-super:#1a1f35;--config-color-background-focus:#1a1f35;--config-color-background-input:#dce8f5;--config-color-tooltip-text:#061F2F;--config-color-tooltip-background:#dce8f5;--config-color-link:#4caedb;--config-color-placeholder:#9ea1af;--config-color-focus:#c7d8eb;--config-color-focus-fade:#1e233e;--config-color-focus-hover:#d3deea;--config-color-focus-glow:#d3deea;--config-color-focus-dark:#657586;--config-color-normal:#c7d8eb;--config-color-dark:#c7d8eb;--config-color-fade:#bec3e0;--config-color-fade-dark:#81859b;--config-color-fade-light:#181818;--config-color-fade-super:#262D50;--config-color-danger:#d84a4a;--config-color-success:#34b86d;--config-color-warning:#e0d56d;--config-color-info:#386fd2;--config-color-chart:#29b5d9;--config-color-chart-fade:#c7d8eb;--config-border-color:#262D50;--config-border-fade:#19203a;--config-border-fade-super:#262D50;--config-prism-background:#1F253F;--config-prism-numbers:#1F253F;--config-note-background:#171e33;--config-note-border:#262D50;--config-warning-background:#1F253F;--config-warning-border:#262D50;--config-social-twitter:var(--config-color-normal);--config-social-github:var(--config-color-normal);--config-social-discord:var(--config-color-normal);--config-social-facebook:var(--config-color-normal);--config-language-bash:var(--config-color-normal);--config-language-bash-contrast:var(--config-color-background);--config-language-javascript:var(--config-color-normal);--config-language-javascript-contrast:var(--config-color-background);--config-language-web:var(--config-color-normal);--config-language-web-contrast:var(--config-color-background);--config-language-yaml:var(--config-color-normal);--config-language-yaml-contrast:var(--config-color-background);--config-language-html:var(--config-color-normal);--config-language-html-contrast:var(--config-color-background);--config-language-php:var(--config-color-normal);--config-language-php-contrast:var(--config-color-background);--config-language-nodejs:var(--config-color-normal);--config-language-nodejs-contrast:var(--config-color-background);--config-language-ruby:var(--config-color-normal);--config-language-ruby-contrast:var(--config-color-background);--config-language-python:var(--config-color-normal);--config-language-python-contrast:var(--config-color-background);--config-language-go:var(--config-color-normal);--config-language-go-contrast:var(--config-color-background);--config-language-dart:var(--config-color-normal);--config-language-dart-contrast:var(--config-color-background);--config-language-flutter:var(--config-color-normal);--config-language-flutter-contrast:var(--config-color-background);--config-language-android:var(--config-color-normal);--config-language-android-contrast:var(--config-color-background);--config-language-kotlin:var(--config-color-normal);--config-language-kotlin-contrast:var(--config-color-background);--config-language-swift:var(--config-color-normal);--config-language-swift-contrast:var(--config-color-background);--config-language-java:var(--config-color-normal);--config-language-java-contrast:var(--config-color-background);--config-modal-note-background:#15192b;--config-modal-note-border:#161b31;--config-modal-note-color:var(--config-color-normal);--config-switch-background:var(--config-color-normal);--config-console-background:#20263f;--config-console-nav-start:#1c2139;--config-console-nav-end:#151929;--config-console-nav-border:#171b30;--config-console-nav-switch-background:var(--config-color-focus);--config-console-nav-switch-color:var(--config-color-background);--config-console-nav-switch-arrow:url("data:image/svg+xml;utf8,")}.theme-light .force-light{display:block!important}.theme-dark .force-dark{display:block!important}.force-dark{display:none!important}.force-light{display:none!important}@font-face{font-family:Poppins;font-style:normal;font-weight:100;src:url(/fonts/poppins-v9-latin-100.eot);src:local('Poppins Thin'),local('Poppins-Thin'),url(/fonts/poppins-v9-latin-100.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-100.woff2) format('woff2'),url(/fonts/poppins-v9-latin-100.woff) format('woff'),url(/fonts/poppins-v9-latin-100.ttf) format('truetype'),url(/fonts/poppins-v9-latin-100.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:300;src:url(/fonts/poppins-v9-latin-300.eot);src:local('Poppins Light'),local('Poppins-Light'),url(/fonts/poppins-v9-latin-300.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-300.woff2) format('woff2'),url(/fonts/poppins-v9-latin-300.woff) format('woff'),url(/fonts/poppins-v9-latin-300.ttf) format('truetype'),url(/fonts/poppins-v9-latin-300.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:400;src:url(/fonts/poppins-v9-latin-regular.eot);src:local('Poppins Regular'),local('Poppins-Regular'),url(/fonts/poppins-v9-latin-regular.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-regular.woff2) format('woff2'),url(/fonts/poppins-v9-latin-regular.woff) format('woff'),url(/fonts/poppins-v9-latin-regular.ttf) format('truetype'),url(/fonts/poppins-v9-latin-regular.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:500;src:url(/fonts/poppins-v9-latin-500.eot);src:local('Poppins Medium'),local('Poppins-Medium'),url(/fonts/poppins-v9-latin-500.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-500.woff2) format('woff2'),url(/fonts/poppins-v9-latin-500.woff) format('woff'),url(/fonts/poppins-v9-latin-500.ttf) format('truetype'),url(/fonts/poppins-v9-latin-500.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:600;src:url(/fonts/poppins-v9-latin-600.eot);src:local('Poppins SemiBold'),local('Poppins-SemiBold'),url(/fonts/poppins-v9-latin-600.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-600.woff2) format('woff2'),url(/fonts/poppins-v9-latin-600.woff) format('woff'),url(/fonts/poppins-v9-latin-600.ttf) format('truetype'),url(/fonts/poppins-v9-latin-600.svg#Poppins) format('svg')}@font-face{font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url(/fonts/source-code-pro-v11-latin-regular.eot);src:local('Source Code Pro Regular'),local('SourceCodePro-Regular'),url(/fonts/source-code-pro-v11-latin-regular.eot?#iefix) format('embedded-opentype'),url(/fonts/source-code-pro-v11-latin-regular.woff2) format('woff2'),url(/fonts/source-code-pro-v11-latin-regular.woff) format('woff'),url(/fonts/source-code-pro-v11-latin-regular.ttf) format('truetype'),url(/fonts/source-code-pro-v11-latin-regular.svg#SourceCodePro) format('svg')}.padding{padding:30px}.padding-top{padding-top:30px!important}.padding-top-large{padding-top:50px!important}.padding-top-xl{padding-top:80px!important}.padding-bottom{padding-bottom:30px!important}.padding-bottom-large{padding-bottom:50px!important}.padding-bottom-xl{padding-bottom:80px!important}.margin-end{margin-right:20px!important}.margin-start{margin-left:20px!important}.margin-end-small{margin-right:10px!important}.margin-start-small{margin-left:10px!important}.margin-end-large{margin-right:50px!important}.margin-start-large{margin-left:50px!important}.margin-end-no{margin-right:0!important}.margin-start-no{margin-left:0!important}.margin-end-negative{margin-right:-30px!important}.margin-start-negative{margin-left:-30px!important}.margin-end-negative-small{margin-right:-15px!important}.margin-start-negative-small{margin-left:-15px!important}.margin-end-negative-tiny{margin-right:-5px!important}.margin-start-negative-tiny{margin-left:-5px!important}.margin-top{margin-top:30px!important}.margin-bottom{margin-bottom:30px!important}.margin-top-no{margin-top:0!important}.margin-bottom-no{margin-bottom:0!important}.margin-top-xxl{margin-top:140px!important}.margin-top-xl{margin-top:80px!important}.margin-top-large{margin-top:50px!important}.margin-top-small{margin-top:15px!important}.margin-top-tiny{margin-top:5px!important}.margin-top-negative{margin-top:-30px!important}.margin-top-negative-tiny{margin-top:-5px!important}.margin-top-negative-small{margin-top:-15px!important}.margin-top-negative-large{margin-top:-50px!important}.margin-top-negative-xl{margin-top:-80px!important}.margin-top-negative-xxl{margin-top:-100px!important}.margin-top-negative-xxxl{margin-top:-150px!important}.margin-bottom-xxl{margin-bottom:140px!important}.margin-bottom-xl{margin-bottom:80px!important}.margin-bottom-large{margin-bottom:50px!important}.margin-bottom-small{margin-bottom:15px!important}.margin-bottom-tiny{margin-bottom:5px!important}.margin-bottom-negative{margin-bottom:-30px!important}.margin-bottom-negative-tiny{margin-bottom:-5px!important}.margin-bottom-negative-small{margin-bottom:-15px!important}.margin-bottom-negative-large{margin-bottom:-50px!important}.margin-bottom-negative-xl{margin-bottom:-80px!important}.margin-bottom-negative-xl{margin-bottom:-100px!important}.force-left,.ide{direction:ltr;text-align:left}.force-right{direction:rtl;text-align:right}.pull-left{float:left}.pull-right{float:right}.ratio-wide{height:0;overflow:hidden;padding-top:56%;position:relative;width:100%}.ratio-wide>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-square{height:0;overflow:hidden;padding-top:56%;position:relative;width:100%}.ratio-square>*{position:absolute;top:0;left:0;width:100%;height:100%}.clear:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.phones-only{display:none}@media only screen and (max-width:550px){.phones-only{display:inherit!important}}.tablets-only{display:none}@media only screen and (min-width:551px) and (max-width:1198px){.tablets-only{display:inherit!important}}.desktops-only{display:none}@media only screen and (min-width:1199px){.desktops-only{display:inherit!important}}.phones-only-inline{display:none}@media only screen and (max-width:550px){.phones-only-inline{display:inline-block!important}}.tablets-only-inline{display:none}@media only screen and (min-width:551px) and (max-width:1198px){.tablets-only-inline{display:inline-block!important}}.desktops-only-inline{display:none}@media only screen and (min-width:1199px){.desktops-only-inline{display:inline-block!important}}*{font-family:Poppins,sans-serif;-webkit-font-smoothing:antialiased;font-weight:300}h1,h2,h3,h4,h5,h6{margin:0}h4,h5,h6{font-weight:400}.link,a{color:var(--config-color-link);text-decoration:none;border-left:2px solid transparent;border-right:2px solid transparent;transition:.2s;cursor:pointer}.link.disabled,a.disabled{opacity:.5}.link.tag:hover,a.tag:hover{opacity:.9}.link.danger,a.danger{color:var(--config-color-danger)}.link.link-animation-enabled,a.link-animation-enabled{display:inline-flex}.link.link-animation-enabled:hover,a.link-animation-enabled:hover{transform:translateY(-2px)}.link-return-animation--start>i{display:inline-block;transition:.2s}.link-return-animation--start:hover>i{transform:translateX(-2px)}.link-return-animation--end>i{display:inline-block;transition:.2s}.link-return-animation--end:hover>i{transform:translateX(2px)}b,strong{font-weight:500}p{margin:0 0 20px 0;line-height:26px}small{font-size:16px;color:var(--config-color-fade)}.text-size-small{font-size:13px}.text-size-smaller{font-size:11.5px}.text-size-xs{font-size:10px}.text-size-normal{font-size:16px}.text-height-large{height:30px;line-height:30px}.text-height-small{line-height:13px}.text-one-liner{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text-bold{font-weight:400!important}.text-bold-large{font-weight:500!important}.text-bold-xl{font-weight:600!important}.text-danger{color:var(--config-color-danger)!important}.text-success{color:var(--config-color-success)!important}.text-upper{text-transform:uppercase}.text-warning{color:var(--config-color-warning)}.text-focus{color:var(--config-color-focus)}.text-fade{color:var(--config-color-fade)}.text-fade-dark{color:var(--config-color-fade-dark)}.text-green{color:var(--config-color-success)}.text-red{color:var(--config-color-danger)}.text-info{color:var(--config-color-info)}.text-yellow{color:#ffe28b}.text-disclaimer{font-size:11px;color:var(--config-color-fade)}.text-fade-extra{color:var(--config-color-fade);opacity:.5}.text-line-high-large{line-height:30px}.text-line-high-xl{line-height:40px}.text-sign{margin:5px 0;font-size:25px;width:25px;height:25px;line-height:25px;display:inline-block}.text-align-center{text-align:center}.text-align-start{text-align:left}.text-align-end{text-align:right}.text-align-left{text-align:left}.text-align-right{text-align:right}.text-dir-ltr{direction:ltr;display:inline-block}.text-dir-rtl{direction:rtl;display:inline-block}i[class*=' icon-']:before,i[class^=icon-]:before{display:inline;line-height:unset}table{width:calc(100% + 60px);border-collapse:collapse;margin:-30px;border-radius:10px;overflow:hidden;position:relative;table-layout:fixed}table.y-scroll{overflow-y:auto}table.multi-line tbody td,table.multi-line thead th{line-height:inherit;text-overflow:inherit;white-space:inherit}table.borders td,table.borders th{border-right:solid 1px var(--config-border-fade-super)}table.borders td:last-child,table.borders th:last-child{border:none}table thead{border-bottom:solid 1px var(--config-color-fade-super);font-size:14px}table.small{font-size:14px}table.open-end tbody tr:last-child{border-bottom:none;font-weight:700;background:#f7fbf7}table.full tbody td,table.full tbody th{vertical-align:top;white-space:normal;overflow:auto;line-height:24px;padding-top:20px;padding-bottom:20px;height:auto}table .avatar{width:30px;height:30px}table tr{border-bottom:solid 1px var(--config-color-fade-super)}table tr:last-child{border-bottom:none}table tr:last-child td:first-child{border-bottom-left-radius:6px}table tr:last-child td:last-child{border-bottom-right-radius:6px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){table tr:nth-child(even){background:var(--config-color-background-fade-super)}}@media only screen and (min-width:1199px){table tr:nth-child(even) td{background:var(--config-color-background-fade-super)}}table tr.selected{background:var(--config-note-background)}table tr.selected td,table tr.selected td span{font-weight:500}table th{text-align:left;font-weight:400}table th i{color:var(--config-color-fade);font-size:10px;display:inline-block;vertical-align:top;line-height:16px;padding:0 3px}table td,table th{height:65px;padding:0 15px;line-height:50px}table td:first-child,table th:first-child{padding-left:30px}table td,table th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){table.vertical{border-top:solid 1px var(--config-color-fade-super);display:block;overflow:hidden;padding-top:12px}table.vertical .hide{display:none}table.vertical tbody,table.vertical td,table.vertical th,table.vertical thead,table.vertical tr{width:100%;display:block}table.vertical tr{position:relative}table.vertical th,table.vertical tr{padding-top:12px;padding-bottom:12px}table.vertical th:first-child,table.vertical tr:first-child{padding-top:0}table.vertical td,table.vertical th{padding:5px 20px!important;text-overflow:ellipsis;white-space:normal;height:40px;line-height:40px;width:calc(100% - 40px)}table.vertical td.col-name,table.vertical th.col-name{width:calc(100% - 110px)}table.vertical td:first-child,table.vertical td:last-child,table.vertical th:first-child,table.vertical th:last-child{padding:0 10px}table.vertical td:last-child,table.vertical th:last-child{padding-bottom:0}table.vertical td p,table.vertical th p{display:inline-block;width:calc(100% - 40px)}table.vertical td:not([data-title=""]):before{content:attr(data-title);margin-right:4px;font-weight:400}table.vertical thead{display:none}table.vertical .cell-options-more{position:absolute;inset-block-start:0;inset-inline-end:0;width:auto}}table .trim-inner-text{display:inline-flex;align-items:center;gap:8px}@media only screen and (min-width:1199px){table .trim-inner-text{width:100%}}table .cell-options-more button{padding:0 12px;background-color:transparent;color:var(--config-color-fade)}table .cell-options-more button:focus-visible{outline:solid 1px var(--config-color-focus)}.zone{max-width:var(--config-width-xl);margin:0 auto 40px auto}.zone.xxxl{max-width:calc(1400px - 100px)}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.zone.xxxl{max-width:100%}}.zone.xxl{max-width:var(--config-width-xxl)}.zone.xl{max-width:var(--config-width-xl)}.zone.large{max-width:var(--config-width-large)}.zone.medium{max-width:var(--config-width-medium)}.zone.small{max-width:var(--config-width-small)}.row{position:relative;margin:0 -50px;padding-left:50px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.row{margin:0 -30px;padding-left:30px}}.row.force-ltr>.col{float:left}.row.force-rtl>.col{float:right}.row.force-reverse>.col{float:right}.row.wide{margin:0 -100px;padding-left:100px}.row.wide>.span-1{width:calc(8.33333333% * 1 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-2{width:calc(8.33333333% * 2 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-3{width:calc(8.33333333% * 3 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-4{width:calc(8.33333333% * 4 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-5{width:calc(8.33333333% * 5 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-6{width:calc(8.33333333% * 6 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-7{width:calc(8.33333333% * 7 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-8{width:calc(8.33333333% * 8 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-9{width:calc(8.33333333% * 9 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-10{width:calc(8.33333333% * 10 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-11{width:calc(8.33333333% * 11 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-12{width:calc(8.33333333% * 12 - 100px);box-sizing:content-box;padding-right:100px}.row.thin{margin:0 -20px;padding-left:20px}.row.thin>.span-1{width:calc(8.33333333% * 1 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-2{width:calc(8.33333333% * 2 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-3{width:calc(8.33333333% * 3 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-4{width:calc(8.33333333% * 4 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-5{width:calc(8.33333333% * 5 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-6{width:calc(8.33333333% * 6 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-7{width:calc(8.33333333% * 7 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-8{width:calc(8.33333333% * 8 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-9{width:calc(8.33333333% * 9 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-10{width:calc(8.33333333% * 10 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-11{width:calc(8.33333333% * 11 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-12{width:calc(8.33333333% * 12 - 20px);box-sizing:content-box;padding-right:20px}.row.modalize{margin:0 -30px;padding-left:30px}.row.modalize>.span-1{width:calc(8.33333333% * 1 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-2{width:calc(8.33333333% * 2 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-3{width:calc(8.33333333% * 3 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-4{width:calc(8.33333333% * 4 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-5{width:calc(8.33333333% * 5 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-6{width:calc(8.33333333% * 6 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-7{width:calc(8.33333333% * 7 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-8{width:calc(8.33333333% * 8 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-9{width:calc(8.33333333% * 9 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-10{width:calc(8.33333333% * 10 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-11{width:calc(8.33333333% * 11 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-12{width:calc(8.33333333% * 12 - 30px);box-sizing:content-box;padding-right:30px}.row:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.row .col{float:left;box-sizing:border-box}.row .col.sticky-top{position:sticky;top:90px}.row .col.sticky-bottom{position:sticky;bottom:0}.row .span-1{width:calc(8.33333333% * 1 - 40px);box-sizing:content-box;padding-right:40px}.row .span-2{width:calc(8.33333333% * 2 - 40px);box-sizing:content-box;padding-right:40px}.row .span-3{width:calc(8.33333333% * 3 - 40px);box-sizing:content-box;padding-right:40px}.row .span-4{width:calc(8.33333333% * 4 - 40px);box-sizing:content-box;padding-right:40px}.row .span-5{width:calc(8.33333333% * 5 - 40px);box-sizing:content-box;padding-right:40px}.row .span-6{width:calc(8.33333333% * 6 - 40px);box-sizing:content-box;padding-right:40px}.row .span-7{width:calc(8.33333333% * 7 - 40px);box-sizing:content-box;padding-right:40px}.row .span-8{width:calc(8.33333333% * 8 - 40px);box-sizing:content-box;padding-right:40px}.row .span-9{width:calc(8.33333333% * 9 - 40px);box-sizing:content-box;padding-right:40px}.row .span-10{width:calc(8.33333333% * 10 - 40px);box-sizing:content-box;padding-right:40px}.row .span-11{width:calc(8.33333333% * 11 - 40px);box-sizing:content-box;padding-right:40px}.row .span-12{width:calc(8.33333333% * 12 - 40px);box-sizing:content-box;padding-right:40px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.row.responsive{width:100%;padding:0;margin:0}.row.responsive>.span-1,.row.responsive>.span-10,.row.responsive>.span-11,.row.responsive>.span-12,.row.responsive>.span-2,.row.responsive>.span-3,.row.responsive>.span-4,.row.responsive>.span-5,.row.responsive>.span-6,.row.responsive>.span-7,.row.responsive>.span-8,.row.responsive>.span-9{width:calc(8.33333333% * 12 - 0px)!important;box-sizing:content-box!important;padding-right:0!important;width:100%!important}}.tiles{position:relative}.tiles:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.tiles .box hr{margin:15px -15px}.tiles>*{margin-right:50px!important;float:left;width:calc(33.3333% - 33.3333px)}.tiles>* .photo-title{width:calc(100% + 30px);height:15px;margin:-15px -15px 10px -15px;border-radius:10px 10px 0 0;background:var(--config-color-fade-super);border-bottom:solid 1px var(--config-color-fade-super)}.tiles>:nth-child(3n){margin-right:0!important}@media only screen and (min-width:551px) and (max-width:1198px){.tiles>li{width:calc(50% - 25px)}.tiles>li:nth-child(3n){margin-right:50px!important}.tiles>li:nth-child(2n){margin-right:0!important}}@media only screen and (max-width:550px){.tiles>li{width:100%;margin-right:0!important}}@font-face{font-family:icon;src:url(/fonts/icon.eot?t=1650537780691);src:url(/fonts/icon.eot?t=1650537780691#iefix) format('embedded-opentype'),url(/fonts/icon.woff2?t=1650537780691) format("woff2"),url(/fonts/icon.woff?t=1650537780691) format("woff"),url(/fonts/icon.ttf?t=1650537780691) format('truetype'),url(/fonts/icon.svg?t=1650537780691#icon) format('svg');font-weight:400;font-style:normal}[class*=" icon-"]:before,[class^=icon-]:before{font-family:icon!important;font-style:normal;font-weight:400;speak:never;vertical-align:middle;display:inline-block;text-decoration:inherit;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-angle-circled-left:before{content:"\ea01"}.icon-angle-circled-right:before{content:"\ea02"}.icon-archive:before{content:"\ea03"}.icon-article:before{content:"\ea04"}.icon-asterisk:before{content:"\ea05"}.icon-bank:before{content:"\ea06"}.icon-bell:before{content:"\ea07"}.icon-binoculars:before{content:"\ea08"}.icon-bitbucket:before{content:"\ea09"}.icon-bold:before{content:"\ea0a"}.icon-book-open:before{content:"\ea0b"}.icon-boolean:before{content:"\ea0c"}.icon-briefcase:before{content:"\ea0d"}.icon-building-filled:before{content:"\ea0e"}.icon-calendar:before{content:"\ea0f"}.icon-cancel-circled:before{content:"\ea10"}.icon-cancel:before{content:"\ea11"}.icon-chart-area:before{content:"\ea12"}.icon-chat-alt:before{content:"\ea13"}.icon-check:before{content:"\ea14"}.icon-chevron-down:before{content:"\ea15"}.icon-clock:before{content:"\ea16"}.icon-code:before{content:"\ea17"}.icon-cog:before{content:"\ea18"}.icon-comment:before{content:"\ea19"}.icon-database:before{content:"\ea1a"}.icon-dev:before{content:"\ea1b"}.icon-discord:before{content:"\ea1c"}.icon-docs:before{content:"\ea1d"}.icon-dot-3:before{content:"\ea1e"}.icon-dot-circled:before{content:"\ea1f"}.icon-double:before{content:"\ea20"}.icon-down-dir:before{content:"\ea21"}.icon-down-open:before{content:"\ea22"}.icon-download:before{content:"\ea23"}.icon-edit:before{content:"\ea24"}.icon-email:before{content:"\ea25"}.icon-enum:before{content:"\ea26"}.icon-export:before{content:"\ea27"}.icon-eye:before{content:"\ea28"}.icon-facebook:before{content:"\ea29"}.icon-file:before{content:"\ea2a"}.icon-film:before{content:"\ea2b"}.icon-filter:before{content:"\ea2c"}.icon-fire:before{content:"\ea2d"}.icon-float:before{content:"\ea2e"}.icon-folder:before{content:"\ea2f"}.icon-github:before{content:"\ea30"}.icon-gitlab:before{content:"\ea31"}.icon-glasses:before{content:"\ea32"}.icon-google:before{content:"\ea33"}.icon-hackernews:before{content:"\ea34"}.icon-header:before{content:"\ea35"}.icon-heart:before{content:"\ea36"}.icon-home:before{content:"\ea37"}.icon-image:before{content:"\ea38"}.icon-inbox:before{content:"\ea39"}.icon-info-circled:before{content:"\ea3a"}.icon-instagram:before{content:"\ea3b"}.icon-integer:before{content:"\ea3c"}.icon-ip:before{content:"\ea3d"}.icon-italic:before{content:"\ea3e"}.icon-key-inv:before{content:"\ea3f"}.icon-key:before{content:"\ea40"}.icon-keyboard:before{content:"\ea41"}.icon-lamp:before{content:"\ea42"}.icon-left-dir:before{content:"\ea43"}.icon-left-open:before{content:"\ea44"}.icon-lifebuoy:before{content:"\ea45"}.icon-lightning:before{content:"\ea46"}.icon-link-ext:before{content:"\ea47"}.icon-link:before{content:"\ea48"}.icon-linkedin:before{content:"\ea49"}.icon-list-bullet:before{content:"\ea4a"}.icon-list-numbered:before{content:"\ea4b"}.icon-list:before{content:"\ea4c"}.icon-location:before{content:"\ea4d"}.icon-lock:before{content:"\ea4e"}.icon-login:before{content:"\ea4f"}.icon-mail:before{content:"\ea50"}.icon-medium:before{content:"\ea51"}.icon-menu:before{content:"\ea52"}.icon-minus:before{content:"\ea53"}.icon-moon-inv:before{content:"\ea54"}.icon-moon:before{content:"\ea55"}.icon-more:before{content:"\ea56"}.icon-network:before{content:"\ea57"}.icon-ok-circled:before{content:"\ea58"}.icon-ok:before{content:"\ea59"}.icon-palette:before{content:"\ea5a"}.icon-pause:before{content:"\ea5b"}.icon-phone:before{content:"\ea5c"}.icon-photograph:before{content:"\ea5d"}.icon-picture:before{content:"\ea5e"}.icon-pinterest:before{content:"\ea5f"}.icon-play:before{content:"\ea60"}.icon-plus:before{content:"\ea61"}.icon-qrcode:before{content:"\ea62"}.icon-question:before{content:"\ea63"}.icon-quote-right:before{content:"\ea64"}.icon-random:before{content:"\ea65"}.icon-reddit:before{content:"\ea66"}.icon-refresh:before{content:"\ea67"}.icon-right-dir:before{content:"\ea68"}.icon-right-open:before{content:"\ea69"}.icon-rocket:before{content:"\ea6a"}.icon-search:before{content:"\ea6b"}.icon-shield:before{content:"\ea6c"}.icon-shuffle:before{content:"\ea6d"}.icon-smile-o:before{content:"\ea6e"}.icon-sort:before{content:"\ea6f"}.icon-stackoverflow:before{content:"\ea70"}.icon-stopwatch:before{content:"\ea71"}.icon-string:before{content:"\ea72"}.icon-sun-inv:before{content:"\ea73"}.icon-telegram:before{content:"\ea74"}.icon-trash-2:before{content:"\ea75"}.icon-trash:before{content:"\ea76"}.icon-twitter:before{content:"\ea77"}.icon-underline:before{content:"\ea78"}.icon-up-dir:before{content:"\ea79"}.icon-up-open:before{content:"\ea7a"}.icon-upload:before{content:"\ea7b"}.icon-url:before{content:"\ea7c"}.icon-user:before{content:"\ea7d"}.icon-users:before{content:"\ea7e"}.icon-videocam:before{content:"\ea7f"}.icon-warning:before{content:"\ea80"}.icon-whatsapp:before{content:"\ea81"}.icon-wheelchair:before{content:"\ea82"}.icon-windows:before{content:"\ea83"}.icon-wrench:before{content:"\ea84"}.icon-x:before{content:"\ea85"}.icon-youtube-play:before{content:"\ea86"}.datalist-polyfill{list-style:none;display:none;background:#fff;box-shadow:0 2px 2px #999;position:absolute;left:0;top:0;margin:0;padding:0;max-height:300px;overflow-y:auto}.datalist-polyfill:empty{display:none!important}.datalist-polyfill>li{padding:3px;font:13px "Lucida Grande",Sans-Serif}.datalist-polyfill__active{background:#3875d7;color:#fff}date-input-polyfill{z-index:1000!important;max-width:320px!important;width:320px!important}date-input-polyfill .monthSelect-wrapper,date-input-polyfill .yearSelect-wrapper{height:50px;line-height:50px;padding:0;width:40%!important;margin-bottom:10px!important}date-input-polyfill .monthSelect-wrapper select,date-input-polyfill .yearSelect-wrapper select{padding:0 12px;height:50px;line-height:50px;box-sizing:border-box}date-input-polyfill .yearSelect-wrapper{width:35%!important}date-input-polyfill table{width:100%!important;max-width:100%!important;padding:0 12px 12px 12px!important;box-sizing:border-box;margin:0}date-input-polyfill table td:first-child,date-input-polyfill table td:last-child,date-input-polyfill table th:first-child,date-input-polyfill table th:last-child{width:32px!important;padding:4px!important}date-input-polyfill select{margin-bottom:10px}date-input-polyfill button{width:25%!important;height:50px!important;line-height:50px!important;margin-bottom:10px!important;background:inherit;position:relative;color:inherit;padding:inherit;box-sizing:inherit;border-radius:inherit;font-size:inherit;box-shadow:none;border:none;border-bottom:none!important}::placeholder{color:var(--config-color-placeholder);text-align:left}::-webkit-input-placeholder{text-align:left}input:-moz-placeholder{text-align:left}form.inline{display:inline-block}input,textarea{background:var(--config-color-background-input)}input[type=file],input[type=file]::-webkit-file-upload-button{cursor:pointer}.button,button{display:inline-block;background:var(--config-color-focus);border-radius:26px;border:none;color:var(--config-color-background-fade);height:52px;line-height:52px;padding:0 25px;cursor:pointer;font-size:16px;box-sizing:border-box;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.button:focus,.button:hover,button:focus,button:hover{background:var(--config-color-focus-hover)}.button.fly,button.fly{position:fixed;z-index:2;bottom:30px;right:30px}@media only screen and (max-width:550px){.button.fly,button.fly{right:15px}}.button.fill,button.fill{display:block;width:100%;text-align:center;padding:0 10px!important}.button.fill-aligned,button.fill-aligned{display:block;width:100%;text-align:left;padding:0 20px!important}.button.icon,button.icon{padding-right:30px!important}.button.icon-reduce,button.icon-reduce{padding-left:15px!important}.button.reverse,button.reverse{background:0 0;height:50px;line-height:48px;padding:0 23px;color:var(--config-color-focus);border:solid 2px var(--config-color-focus)}.button.reverse:focus,.button.reverse:hover,button.reverse:focus,button.reverse:hover{color:var(--config-color-focus-hover);border-color:var(--config-color-focus-hover)}.button.small,button.small{padding:0 15px;height:40px;line-height:36px;font-size:13px}.button.tick,button.tick{background:var(--config-color-fade-light);color:var(--config-color-dark);border-radius:20px;padding:0 10px;line-height:30px;height:30px;font-size:12px;display:inline-block}.button.tick.selected,button.tick.selected{background:var(--config-color-dark);color:var(--config-color-fade)}.button.round,button.round{width:52px;padding:0}.button.round.small,button.round.small{font-size:12px;width:30px;height:30px;line-height:30px}.button.white,button.white{background:#fff;color:var(--config-color-focus)}.button.white.reverse,button.white.reverse{color:#fff;background:0 0;border:solid 2px #fff}.button.trans,button.trans{background:0 0!important}.button.trans.reverse,button.trans.reverse{background:0 0!important}.button.success,button.success{background:var(--config-color-success)}.button.success.reverse,button.success.reverse{color:var(--config-color-success);background:#fff;border:solid 2px var(--config-color-success)}.button.danger,button.danger{background:var(--config-color-danger);color:#fff}.button.danger.reverse,button.danger.reverse{color:var(--config-color-danger);background:var(--config-color-background-fade);border:solid 2px var(--config-color-danger)}.button.dark,button.dark{background:var(--config-color-dark);color:var(--config-color-background-fade)}.button.dark.reverse,button.dark.reverse{color:var(--config-color-dark);background:var(--config-color-background-fade);border:solid 2px var(--config-color-dark)}.button .disabled,.button.disabled,.button:disabled,button .disabled,button.disabled,button:disabled{color:var(--config-color-normal);background:var(--config-color-background-dark);opacity:.6;cursor:default}.button.link,button.link{background:0 0;border-radius:0;color:var(--config-color-link);height:auto;line-height:normal;padding:0;padding-right:0!important}.button.link:focus,button.link:focus{box-shadow:inherit}.button.strip,button.strip{background:0 0;height:auto;line-height:16px;color:inherit;padding:0 5px}.button.facebook,button.facebook{color:#fff!important;background:#4070b4!important}.button.twitter,button.twitter{color:#fff!important;background:#56c2ea!important}.button.linkedin,button.linkedin{color:#fff!important;background:#0076b5!important}.button.github,button.github{color:#fff!important;background:#7e7c7c!important}.button:focus,button:focus{outline:0}button.close{width:30px;height:30px;line-height:30px;padding:0;margin:0;background:var(--config-color-normal);color:var(--config-color-background-fade);border-radius:50%}button.close .icon-cancel::before{line-height:1}button.close.is-margin-top-10{margin-top:10px}label{margin-bottom:15px;display:block;line-height:normal}label.inline{display:inline}.input,input[type=date],input[type=datetime-local],input[type=email],input[type=file],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=url],select,textarea{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px}.input[type=file],input[type=date][type=file],input[type=datetime-local][type=file],input[type=email][type=file],input[type=file][type=file],input[type=number][type=file],input[type=password][type=file],input[type=search][type=file],input[type=tel][type=file],input[type=text][type=file],input[type=url][type=file],select[type=file],textarea[type=file]{line-height:0;padding:15px;height:auto}.input:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=file]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus,select:focus,textarea:focus{outline:0;border-color:#b3d7fd}.input:disabled,input[type=date]:disabled,input[type=datetime-local]:disabled,input[type=email]:disabled,input[type=file]:disabled,input[type=number]:disabled,input[type=password]:disabled,input[type=search]:disabled,input[type=tel]:disabled,input[type=text]:disabled,input[type=url]:disabled,select:disabled,textarea:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.input.strip,input[type=date].strip,input[type=datetime-local].strip,input[type=email].strip,input[type=file].strip,input[type=number].strip,input[type=password].strip,input[type=search].strip,input[type=tel].strip,input[type=text].strip,input[type=url].strip,select.strip,textarea.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:right 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.input.strip:focus,input[type=date].strip:focus,input[type=datetime-local].strip:focus,input[type=email].strip:focus,input[type=file].strip:focus,input[type=number].strip:focus,input[type=password].strip:focus,input[type=search].strip:focus,input[type=tel].strip:focus,input[type=text].strip:focus,input[type=url].strip:focus,select.strip:focus,textarea.strip:focus{border-color:#b3d7fd}.input:-webkit-autofill::first-line,input[type=date]:-webkit-autofill::first-line,input[type=datetime-local]:-webkit-autofill::first-line,input[type=email]:-webkit-autofill::first-line,input[type=file]:-webkit-autofill::first-line,input[type=number]:-webkit-autofill::first-line,input[type=password]:-webkit-autofill::first-line,input[type=search]:-webkit-autofill::first-line,input[type=tel]:-webkit-autofill::first-line,input[type=text]:-webkit-autofill::first-line,input[type=url]:-webkit-autofill::first-line,select:-webkit-autofill::first-line,textarea:-webkit-autofill::first-line{font-weight:300;font-size:16px}input[type=email],input[type=url]{direction:ltr}input[type=email]::placeholder,input[type=url]::placeholder{text-align:left;direction:ltr}select{background:0 0;-webkit-appearance:none;background-image:var(--config-console-nav-switch-arrow);background-position:right 15px top 50%;background-repeat:no-repeat;background-color:var(--config-color-background-input);width:calc(100% - 62px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:45px}select:-webkit-autofill{background-image:url("data:image/svg+xml;utf8,")!important;background-position:100% 50%!important;background-repeat:no-repeat!important}input[type=search],input[type=search].strip{background:0 0;-webkit-appearance:none;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAdZJREFUWIXt1s2LjWEYBvDfnDMzFpNIamZIFrMiJYMyFmKhZKfOwoiFr2LFn2BByG6WVrKwMcjWxgoLIlKIUk6RrzAjZWZ8LO731FlwvB+PUbjq6X0X7/VeV/d9P9fz8IdRL8Hpw3x8w0xaOz9GNxq4gJeZcGs1cRab0fU7xLfgMSYzoT3YgNXYhIO4iM+4iTWphGs4jikcFSXvhEGczr4/UFW8C2N4jXUFudvwCYeqGNgnSr6yJH8rpkWLCqMfE9hdUryFE3iC3qLEk7ij+kT34Q32FiHV8Qr7K4q3cArXihCGxd5elMjARnzBvE4f1dreV+AtnicycC/7/7K8BhaIvqXCO3zFwrwGZtCT0EAtW9N5DTSxWGR/CizNns/yEgbFEK5NZGCnaEPHE7e9Ai9wA6OJDIzistgJubFdxHB/RfFVYgCHixJruI5x5dNwDm6J47sUhkTvjpUw0Y1zeOrXR3hHjOA9zmBuTs4Arog4/yhuUZWwHPdFMh7280BZgiP4ILJ/UuymqRQmejPxphiquzgvKnMJDzOxB9glZqiRiecykbfHdawX98EhcdxO4BGu4nYm2EJDzEKPSMIdYrBnFYUq8d/EP2di1gey3cS4ErflvxffASbhcakIINaMAAAAAElFTkSuQmCC);background-color:var(--config-color-background-input);background-position:left 15px top 50%;background-repeat:no-repeat;background-size:20px 20px;width:calc(100% - 60px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-left:45px}select[multiple]{min-height:75px;padding:5px 10px!important;padding-right:50px!important}select[multiple] option{padding:10px 4px;border-bottom:solid 1px #f1f1f1}select[multiple] option:last-child{border-bottom:none}textarea{min-height:75px;resize:vertical;line-height:32px;padding:5px 15px}textarea.tall{min-height:180px}fieldset{border:none;margin:0;padding:0}.counter{font-size:13px;text-align:right;color:var(--config-color-fade);margin-top:-20px;margin-bottom:20px}.file-preview{background:var(--config-color-background-input) url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAIElEQVQoU2NkYGAwZsAEZ9GFGIeIQix+wfQgyDODXSEAcUwGCrDSHgkAAAAASUVORK5CYII=)!important;box-shadow:inset 0 0 3px #a0a0a0;border-radius:8px;width:calc(100% - 2px);max-height:180px;visibility:visible!important;object-fit:contain}.video-preview{padding-top:56%;position:relative;border-radius:10px;background:#e7e7e7;overflow:hidden;margin:0}.video-preview iframe{position:absolute;top:0;width:100%;height:100%;border:none}.map-preview{padding-top:50%;position:relative;margin-bottom:10px;border-radius:10px;background:#e7e7e7;overflow:hidden;box-shadow:0 0 30px rgba(218,218,218,.5)}.map-preview iframe{position:absolute;top:0;width:100%;height:100%;border:none}.tooltip{position:relative}.tooltip.large:hover:after{white-space:normal;width:280px}.tooltip.small:hover:after{white-space:normal;width:180px}.tooltip:hover:after{white-space:nowrap;background:var(--config-color-tooltip-background);border-radius:5px;bottom:calc(100% + 6px);color:var(--config-color-tooltip-text);content:attr(data-tooltip);padding:5px 15px;position:absolute;font-size:13px;line-height:20px;z-index:98;left:20%;margin-left:-30px;word-break:break-word}.tooltip:hover:before{border:solid;border-color:var(--config-color-tooltip-background) transparent;border-width:6px 6px 0 6px;bottom:100%;content:"";position:absolute;z-index:99;left:3px}.tooltip.down:hover:after{top:calc(100% + 6px);bottom:inherit}.tooltip.down:hover:before{top:100%;border-width:0 6px 6px 6px;bottom:inherit}.tag{display:inline-block;background:var(--config-color-fade-light);color:var(--config-color-fade);border-radius:12px;line-height:24px;padding:0 8px;font-size:12px;box-shadow:none!important;border:none;height:auto;width:auto;white-space:nowrap;text-overflow:ellipsis}.tag:hover{border:none}.tag.green{background:var(--config-color-success);color:#fff}.tag.red{background:var(--config-color-danger);color:#fff}.tag.yellow{background:#ffe28b;color:#494949}.tag.focus{background:var(--config-color-focus);color:#fff}.tag.dark{background:var(--config-color-dark);color:#e7e7e7}.tag.blue{background:var(--config-color-info);color:#fff}.tag.link{background:var(--config-color-link);color:#fff}input[type=checkbox],input[type=radio]{width:26px;height:16px;position:relative;-webkit-appearance:none;border-radius:0;border:none;background:0 0;vertical-align:middle;margin:0}input[type=checkbox]:after,input[type=radio]:after{content:"";display:block;width:20px;height:20px;background:var(--config-color-background-fade);top:-5px;border-radius:50%;position:absolute;border:solid 3px var(--config-color-focus);vertical-align:middle}input[type=checkbox]:checked:after,input[type=radio]:checked:after{text-align:center;font-family:icon;content:'\ea14';font-size:16px;line-height:20px;color:var(--config-color-background-fade);background:var(--config-color-focus)}input[type=checkbox][type=radio]:checked:after,input[type=radio][type=radio]:checked:after{content:'';display:block;width:10px;height:10px;border-radius:50%;background:var(--config-color-background-fade);border:solid 8px var(--config-color-focus)}input[type=checkbox]:focus,input[type=radio]:focus{outline:0}input[type=checkbox]:focus:after,input[type=checkbox]:hover:after,input[type=radio]:focus:after,input[type=radio]:hover:after{outline:0;border-color:#000}input[type=checkbox]:checked:focus:after,input[type=checkbox]:checked:hover:after,input[type=radio]:checked:focus:after,input[type=radio]:checked:hover:after{border-color:var(--config-color-focus)}input[type=checkbox]:after{border-radius:4px}.input-copy{position:relative}.input-copy::before{content:'';display:block;position:absolute;height:50px;background:var(--config-color-fade-light);width:50px;right:0;border-radius:8px;z-index:1;margin:1px}.input-copy input,.input-copy textarea{padding-right:65px;width:calc(100% - 82px);resize:none}.input-copy .copy{position:absolute;z-index:2;top:0;right:0;border-left:solid 1px var(--config-color-fade-light);height:calc(100% - 2px);width:50px;line-height:50px;text-align:center;background:var(--config-color-background-focus);margin:1px;border-radius:0 9px 9px 0}.paging{color:var(--config-color-fade);padding:0;font-size:12px}.paging form{display:inline-block}.paging button:disabled{color:var(--config-color-background-fade);opacity:.6}.blue-snap iframe{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px;float:none!important;height:40px!important;width:calc(100% - 32px)!important;border:solid 1px #e2e2e2!important;background:0 0!important;position:static!important}.blue-snap iframe[type=file]{line-height:0;padding:15px;height:auto}.blue-snap iframe:focus{outline:0;border-color:#b3d7fd}.blue-snap iframe:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.blue-snap iframe.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:right 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.blue-snap iframe.strip:focus{border-color:#b3d7fd}.blue-snap iframe:-webkit-autofill::first-line{font-weight:300;font-size:16px}.blue-snap .error{font-size:12px;margin-top:-25px;color:var(--config-color-danger);height:40px;padding-left:2px}.pell{height:auto;padding-bottom:0;margin-bottom:0;padding-top:0;background:var(--config-color-background-input);line-height:normal!important;position:relative}.pell.hide{padding:0!important;height:1px;min-height:1px;max-height:1px;border:none;box-shadow:none;margin-bottom:20px;opacity:0}.pell [contenteditable=true]:empty:before{content:attr(placeholder);display:block;color:var(--config-color-placeholder)}.pell .pell-actionbar{border-bottom:solid 1px var(--config-color-fade-light);margin:0 -15px 15px -15px;padding:10px 15px;position:sticky;top:70px;background:var(--config-color-background-input);border-radius:10px 10px 0 0}.pell .pell-content{min-height:100px;display:block;padding:10px;margin:-10px;cursor:text}.pell .pell-content:focus{outline:0}.pell button{background:inherit;color:inherit;margin:0;padding:0;padding-right:15px;height:40px;line-height:40px;box-shadow:none;cursor:pointer;font-size:13px;border-radius:0}.pell button.pell-button-selected,.pell button:focus,.pell button:hover{color:var(--config-color-link)}.pell h1,.pell h2,.pell h3,.pell h4,.pell h5,.pell h6{text-align:inherit;margin-bottom:30px}.pell b,.pell strong{font-weight:700}.pell ol,.pell ul{margin:0 0 20px 0}.pell ol li,.pell ul li{display:list-item!important;list-style:inherit;list-style-position:inside!important;margin:0 20px 2px 20px}.pell ol li p,.pell ul li p{margin:0;display:inline}.pell ol li{list-style:decimal}.pell ol li::before{content:'';display:none}label.switch{line-height:42px}.switch,input[type=checkbox].button.switch,input[type=checkbox].switch{width:52px;height:32px;line-height:32px;border-radius:21px;background:var(--config-color-fade);display:inline-block;margin:0;padding:5px;padding-left:5px;padding-right:30px}.switch.on,.switch:checked,input[type=checkbox].button.switch.on,input[type=checkbox].button.switch:checked,input[type=checkbox].switch.on,input[type=checkbox].switch:checked{background-color:var(--config-color-success);padding-left:25px;padding-right:5px}.switch.on:focus,.switch.on:hover,.switch:checked:focus,.switch:checked:hover,input[type=checkbox].button.switch.on:focus,input[type=checkbox].button.switch.on:hover,input[type=checkbox].button.switch:checked:focus,input[type=checkbox].button.switch:checked:hover,input[type=checkbox].switch.on:focus,input[type=checkbox].switch.on:hover,input[type=checkbox].switch:checked:focus,input[type=checkbox].switch:checked:hover{background:var(--config-color-success)}.switch:focus,.switch:hover,input[type=checkbox].button.switch:focus,input[type=checkbox].button.switch:hover,input[type=checkbox].switch:focus,input[type=checkbox].switch:hover{background:var(--config-color-fade)}.switch:focus:after,.switch:hover:after,input[type=checkbox].button.switch:focus:after,input[type=checkbox].button.switch:hover:after,input[type=checkbox].switch:focus:after,input[type=checkbox].switch:hover:after{background:#fff}.switch:after,input[type=checkbox].button.switch:after,input[type=checkbox].switch:after{content:"";display:block;width:22px;height:22px;background:#fff;border-radius:50%;border:none;position:static;top:0}.password-meter{margin:-41px 10px 30px 10px;height:2px;background:0 0;max-width:100%;z-index:2;position:relative}.password-meter.weak{background:var(--config-color-danger)}.password-meter.medium{background:var(--config-color-success)}.password-meter.strong{background:var(--config-color-success)}.color-input:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.color-input .color-preview{width:53px;height:53px;float:left;margin-right:10px;background:#000;border-radius:10px;box-shadow:inset 0 0 3px #a0a0a0;position:relative}.color-input .color-preview input{opacity:0;position:absolute;top:0;bottom:0;left:0;right:0;width:100%;height:100%;cursor:pointer}.color-input input{text-transform:uppercase;float:left;width:calc(100% - 95px)}.grecaptcha-badge{box-shadow:none!important;border-radius:10px!important;overflow:hidden!important;background:#4d92df!important;bottom:25px}.grecaptcha-badge:hover{width:256px!important}.back{font-size:15px;line-height:24px;height:24px;margin-left:-15px;margin-top:-25px;margin-bottom:20px}.back span{font-weight:inherit!important}@media only screen and (max-width:550px){.back{margin-left:-5px}}hr{height:1px;background:var(--config-border-color)!important;border:none}hr.fade{opacity:.7}.upload{position:relative}.upload:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.upload input{position:absolute;top:0;left:0;opacity:0;cursor:pointer}.upload.single .preview{height:0;position:relative;padding-top:100%;width:100%;margin-bottom:15px!important}.upload.single .preview li{position:absolute;top:0;width:calc(100% - 20px);height:calc(100% - 20px);margin-right:0!important;margin-bottom:0!important}.upload .button{float:left;margin-right:10px!important}.upload .button.disabled,.upload .button.disabled:hover{background:0 0;color:inherit;border-color:inherit}.upload .count{float:left;line-height:52px}.upload .progress{background:var(--config-color-success);height:6px;border-radius:3px;margin-bottom:15px!important}.upload .preview:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.upload .preview li{float:left;margin-right:20px!important;margin-bottom:15px!important;background:var(--config-color-background-fade-super);width:150px;height:150px;line-height:148px;text-align:center;border-radius:20px;overflow:hidden;position:relative;cursor:pointer;border:solid 1px var(--config-color-background-dark)}.upload .preview li:hover:before{background:var(--config-color-focus)}.upload .preview li:before{content:'\ea11';font-family:icon;font-size:12px;position:absolute;width:20px;height:20px;display:block;top:8px;right:8px;text-align:center;line-height:20px;vertical-align:middle;border-radius:50%;background:#484848;color:#fff;z-index:1}.upload .preview li img{vertical-align:middle;max-height:150px;max-width:150px;-webkit-filter:drop-shadow(0 0 6px rgba(0, 0, 0, .3));filter:drop-shadow(0 0 1px rgba(0, 0, 0, .3))}.upload.wide .preview li{height:0;width:100%;position:relative;padding-top:30.547%;background:#e7e7e7;border-radius:10px;overflow:hidden;border:solid 1px #f9f9f9;margin:0}.upload.wide .preview li img{border-radius:10px;position:absolute;top:0;width:100%;display:block;opacity:1;max-width:inherit;max-height:inherit}ol{list-style:none;counter-reset:x-counter;padding:0}ol li{counter-increment:x-counter;line-height:30px;margin-bottom:30px;margin-left:45px}ol li::before{display:inline-block;content:counter(x-counter);color:var(--config-color-background-fade);background:var(--config-color-focus);border:solid 2px var(--config-color-focus);margin-right:15px;margin-left:-45px;width:26px;height:26px;border-radius:50%;text-align:center;line-height:26px}.required{color:var(--config-color-danger);font-size:8px;position:relative;top:-8px}.drop-list{position:relative;outline:0}.drop-list.open ul{display:block}.drop-list ul{position:relative;background:var(--config-color-background-fade);border-radius:10px;border-bottom:none;box-shadow:0 0 3px rgba(0,0,0,.05);display:block;padding:30px;border-radius:4px;box-shadow:0 0 6px rgba(0,0,0,.1);display:none;position:absolute;bottom:calc(100% + 10px);z-index:2;padding:0;left:-10px;max-width:280px;min-width:240px}.drop-list ul.padding-tiny{padding:5px}.drop-list ul.padding-xs{padding:10px}.drop-list ul.padding-small{padding:15px}.drop-list ul.y-scroll{overflow-y:auto}.drop-list ul.danger{background:var(--config-color-danger);color:#fff}.drop-list ul.danger .box{color:var(--config-color-normal);background:var(--config-color-background-fade)}.drop-list ul.danger>.button,.drop-list ul.danger>button{background:#fff;color:var(--config-color-danger)}.drop-list ul.note{background:var(--config-note-background)}.drop-list ul.focus{background:var(--config-color-focus);color:var(--config-color-background-fade)}.drop-list ul.focus .button,.drop-list ul.focus button{background:var(--config-color-background-fade);color:var(--config-color-focus)}.drop-list ul.line{background:0 0;border:solid 1px var(--config-color-background-dark);box-shadow:none}.drop-list ul.warning{background:var(--config-color-warning);color:#2d2d2d}.drop-list ul.warning .button,.drop-list ul.warning button{background:rgba(45,45,45,.8);color:var(--config-color-success)}.drop-list ul .tabs{border-bottom:solid 1px var(--config-border-color);margin:0 -30px;padding:0 30px!important}.drop-list ul>footer{margin:0 -30px -30px -30px;padding:15px 30px;background:var(--config-color-background-fade);border:solid 1px var(--config-border-color);border-radius:0 0 10px 10px}.drop-list ul hr{height:1px;background:var(--config-console-background);border:none;margin:30px -30px}.drop-list ul .label{position:absolute;top:10px;z-index:2;right:10px}.drop-list ul.fade-bottom{position:relative;overflow:hidden}.drop-list ul.fade-bottom:after{content:"";position:absolute;display:block;bottom:15px;width:100%;background:#000;background:linear-gradient(180deg,rgba(0,0,0,0) 0,var(--config-color-background-fade) 80%);height:100px;margin:0 -15px}.drop-list ul .header{position:static;height:40px;padding:20px 30px 20px 30px;margin-bottom:30px;margin:-30px -30px 20px -30px;background:var(--config-color-background-fade);border-bottom:solid 1px #efefef}.drop-list ul ul.numbers>li{position:relative;margin-left:30px;margin-right:50px}.drop-list ul ul.numbers>li hr{margin-left:-60px;margin-right:-80px}.drop-list ul ul.numbers>li .settings{position:absolute;top:3px;right:-50px}.drop-list ul ul.numbers>li::after{display:block;width:25px;height:25px;line-height:25px;font-size:13px;font-weight:500;border-radius:50%;background:var(--config-color-focus);color:var(--config-color-background);counter-increment:section;content:counter(section);text-align:center;position:absolute;top:3px;left:-45px}.drop-list ul .scroll{margin:0 -30px;overflow-y:scroll}.drop-list ul .scroll table{width:100%;margin:0}.drop-list ul ul.sortable{counter-reset:section}.drop-list ul ul.sortable>li [data-move-down].round,.drop-list ul ul.sortable>li [data-move-up].round,.drop-list ul ul.sortable>li [data-remove].round{background:var(--config-color-focus);color:var(--config-color-background-fade);width:25px;height:25px;line-height:25px;display:inline-block;text-align:center;padding:0;margin-right:5px}.drop-list ul ul.sortable>li [data-move-down].round:disabled,.drop-list ul ul.sortable>li [data-move-up].round:disabled,.drop-list ul ul.sortable>li [data-remove].round:disabled{display:none}.drop-list ul ul.sortable>li:first-child [data-move-up]{display:none}.drop-list ul ul.sortable>li:first-child [data-move-up]:disabled{display:inline-block;background:var(--config-color-background)}.drop-list ul ul.sortable>li:last-child [data-move-down]{display:none}.drop-list ul ul.sortable>li:last-child [data-move-down]:disabled{display:inline-block;background:var(--config-color-background)}.drop-list ul .toggle{position:relative;border-top:1px solid var(--config-console-background);border-bottom:1px solid var(--config-console-background);margin:0 -30px;padding:30px 30px 0 30px;height:65px;overflow:hidden}.drop-list ul .toggle.list{border-bottom:none}.drop-list ul .toggle.sorts button.ls-ui-open{width:calc(100% - 100px)}.drop-list ul .toggle button.ls-ui-open{right:0;position:absolute;top:0;width:100%;height:95px;background:0 0;opacity:.5;border-radius:0}.drop-list ul .toggle .icon-minus,.drop-list ul .toggle .icon-up-open{display:none}.drop-list ul .toggle .content{display:none}.drop-list ul .toggle.open{height:auto}.drop-list ul .toggle.open .icon-minus,.drop-list ul .toggle.open .icon-up-open{display:block}.drop-list ul .toggle.open .icon-down-open,.drop-list ul .toggle.open .icon-plus{display:none}.drop-list ul .toggle.open .content{display:block}.drop-list ul .list li{border-bottom:solid 2px var(--config-border-color);margin:0 -30px 30px -30px;padding:0 30px 30px 30px}.drop-list ul .list li:last-child{padding-bottom:0;margin-bottom:0;border-bottom:none}@media only screen and (max-width:550px){.drop-list ul .list li .actions{float:none}}.drop-list ul .list li .avatar{display:block}.drop-list ul .list li .avatar.inline{display:inline-block}.drop-list ul.new{text-align:center}.drop-list ul.new i{font-size:80px;line-height:80px;font-family:Poppins,sans-serif;font-style:normal;font-weight:300}.drop-list ul.new b{margin-top:20px;display:block}.drop-list ul .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.drop-list ul .info hr{background:var(--config-modal-note-border)!important}.drop-list ul .table-wrap{margin:0 -30px;overflow-y:scroll}.drop-list ul .table-wrap table{margin:0}.drop-list ul:before{border:solid;border-color:var(--config-color-background-fade) transparent;border-width:8px 8px 0 8px;bottom:-8px;content:"";position:absolute;z-index:99;left:30px}.drop-list ul.arrow-end:before{right:30px;left:unset}.drop-list ul.no-arrow::before{display:none}.drop-list ul li{border-bottom:solid 1px var(--config-color-fade-super);margin:0;padding:0}.drop-list ul li:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.drop-list ul li:first-child{border-radius:4px 4px 0 0}.drop-list ul li:last-child{border-radius:0 0 4px 4px}.drop-list ul li:hover{background:var(--config-color-fade-super)}.drop-list ul li:first-child:hover,.drop-list ul li:last-child:hover{border-color:transparent}.drop-list ul li .link,.drop-list ul li a,.drop-list ul li button.link{display:block;vertical-align:middle;height:auto;line-height:30px;display:inline-block;padding:10px 15px!important;color:inherit;font-size:14px;border:none;cursor:pointer;width:calc(100% - 30px);text-align:left;box-sizing:content-box}.drop-list ul li.disabled .link:hover,.drop-list ul li.disabled a:hover{background:0 0}.drop-list ul li .avatar{width:30px;height:30px;margin-right:10px;float:left}.drop-list ul li i.avatar{text-align:center;background:var(--config-color-dark);color:var(--config-color-background-fade)}.drop-list ul li:last-child{border-bottom:none}.drop-list.bottom ul{bottom:auto;margin-top:-2px}.drop-list.bottom ul:before{bottom:auto;top:-8px;border-width:0 8px 8px 8px}.drop-list.end ul{right:-10px;left:auto}.disabled{opacity:.2;cursor:default}.disabled .button,.disabled .link,.disabled a,.disabled button{cursor:default!important}.disabled .button:hover,.disabled .link:hover,.disabled a:hover,.disabled button:hover{background:0 0}.tags{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px;background:var(--config-color-background-input);min-height:42px;height:auto;cursor:text}.tags[type=file]{line-height:0;padding:15px;height:auto}.tags:focus{outline:0;border-color:#b3d7fd}.tags:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.tags.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:right 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.tags.strip:focus{border-color:#b3d7fd}.tags:-webkit-autofill::first-line{font-weight:300;font-size:16px}.tags .add{display:inline-block!important;border:none;padding:0;width:auto;margin:0;max-width:100%;min-width:200px}.tags ul.tags-list{display:inline;white-space:pre-line}.tags ul.tags-list li{display:inline-block!important;margin-right:10px;font-size:16px;padding:5px 10px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tags ul.tags-list li::before{float:right;content:'\ea11';font-family:icon;font-style:normal;display:inline-block;text-align:center;line-height:16px;width:16px;height:16px;font-size:12px;background:#000;color:#fff;border-radius:50%;margin-top:4px;margin-bottom:4px;margin-left:6px;margin-right:0}.switch-theme{background:var(--config-switch-background);border-radius:19px;height:26px;width:44px;margin:9px 0}.switch-theme button{padding:3px;display:block;background:0 0;height:26px;width:100%}.switch-theme i{background:var(--config-color-background-fade);border-radius:50%;height:18px;width:18px;line-height:18px;font-size:10px;padding:0;margin:0;color:var(--config-color-fade)}.switch-theme i.force-light{float:right}.switch-theme i.force-dark{float:left}.dot{width:20px;height:20px;background:var(--config-color-fade);border-radius:50%;display:inline-block;vertical-align:middle;margin:0!important;padding:0!important}.dot.danger{background:var(--config-color-danger)!important}.dot.success{background:var(--config-color-success)!important}.dot.warning{background:var(--config-color-warning)!important}.dot.info{background:var(--config-color-info)!important}.ide{background-color:var(--config-prism-background);overflow:hidden;position:relative;z-index:1;box-shadow:0 2px 4px 0 rgba(50,50,93,.3);border-radius:10px;margin-bottom:30px}.ide *{font-family:"Source Code Pro",monospace}.ide[data-lang]::after{content:attr(data-lang-label);display:inline-block;background:#fff;color:#000;position:absolute;top:15px;padding:5px 10px;border-radius:15px;font-size:10px;right:10px;opacity:.95}.ide[data-lang=bash]::after{background:var(--config-language-bash);color:var(--config-language-bash-contrast)}.ide[data-lang=javascript]::after{background:var(--config-language-javascript);color:var(--config-language-javascript-contrast)}.ide[data-lang=web]::after{background:var(--config-language-web);color:var(--config-language-web-contrast)}.ide[data-lang=html]::after{background:var(--config-language-html);color:var(--config-language-html-contrast)}.ide[data-lang=php]::after{background:var(--config-language-php);color:var(--config-language-php-contrast)}.ide[data-lang=nodejs]::after{background:var(--config-language-nodejs);color:var(--config-language-nodejs-contrast)}.ide[data-lang=ruby]::after{background:var(--config-language-ruby);color:var(--config-language-ruby-contrast)}.ide[data-lang=python]::after{background:var(--config-language-python);color:var(--config-language-python-contrast)}.ide[data-lang=go]::after{background:var(--config-language-go);color:var(--config-language-go-contrast)}.ide[data-lang=dart]::after{background:var(--config-language-dart);color:var(--config-language-dart-contrast)}.ide[data-lang=flutter]::after{background:var(--config-language-flutter);color:var(--config-language-flutter-contrast)}.ide[data-lang=android]::after{background:var(--config-language-android);color:var(--config-language-android-contrast)}.ide[data-lang=swift]::after{background:var(--config-language-swift);color:var(--config-language-swift-contrast)}.ide[data-lang=kotlin]::after{background:var(--config-language-kotlin);color:var(--config-language-kotlin-contrast)}.ide[data-lang=java]::after{background:var(--config-language-java);color:var(--config-language-java-contrast)}.ide[data-lang=yaml]::after{background:var(--config-language-yaml);color:var(--config-language-yaml-contrast)}.ide .tag{color:inherit!important;background:0 0!important;padding:inherit!important;font-size:inherit!important;line-height:14px}.ide .copy{cursor:pointer;content:attr(data-lang);display:inline-block;background:#fff;color:#000;position:absolute;transform:translateX(-50%);bottom:-20px;padding:5px 10px;border-radius:15px;font-size:10px;font-style:normal;left:50%;opacity:0;transition:bottom .3s,opacity .3s;line-height:normal;font-family:Poppins,sans-serif}.ide .copy::before{padding-right:5px}.ide:hover .copy{transition:bottom .3s,opacity .3s;opacity:.9;bottom:16px}.ide pre{-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;color:#e6ebf1;font-weight:400;line-height:20px;font-size:13px;margin:0;padding:20px;padding-left:60px}.ide.light{box-shadow:0 2px 4px 0 rgba(50,50,93,.1);background-color:#fff}.ide.light pre{color:#414770}.ide.light .token.cdata,.ide.light .token.comment,.ide.light .token.doctype,.ide.light .token.prolog{color:#91a2b0}.ide.light .token.attr-name,.ide.light .token.builtin,.ide.light .token.char,.ide.light .token.inserted,.ide.light .token.selector,.ide.light .token.string{color:#149570}.ide.light .token.punctuation{color:#414770}.ide.light .language-css .token.string,.ide.light .style .token.string,.ide.light .token.entity,.ide.light .token.operator,.ide.light .token.url,.ide.light .token.variable{color:#414770}.ide.light .line-numbers .line-numbers-rows{background:#f2feef}.ide.light .line-numbers-rows>span:before{color:#5dc79e}.ide.light .token.keyword{color:#6772e4;font-weight:500}code[class*=language-],pre[class*=language-]{text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4}pre[class*=language-]{overflow:auto}:not(pre)>code[class*=language-]{padding:.1em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#6b7c93}.token.punctuation{color:#f8f8f2}.namespace{opacity:.7}.token.constant,.token.deleted,.token.property,.token.symbol,.token.tag{color:#f92672}.token.boolean,.token.number{color:#f79a59}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#3ecf8e}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.class-name,.token.function{color:#45b2e8}.token.keyword{color:#7795f8}.token.important,.token.regex{color:#fd971f}.token.italic{font-style:italic}.token.entity{cursor:help}pre[class*=language-].line-numbers{position:relative;padding-left:60px;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{background:var(--config-prism-numbers);position:absolute;pointer-events:none;top:-20px;bottom:-21px;padding:20px 0;font-size:100%;left:-60px;width:40px;letter-spacing:-1px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{padding-right:5px;pointer-events:none;display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#636365;display:block;padding-right:.8em;text-align:right}.u-margin-inline-end-16{margin-inline-end:16px!important}.console{width:100%;padding:0;overscroll-behavior:none}.console body{position:relative;width:calc(100% - 320px);padding-top:70px;padding-bottom:0;padding-right:50px;padding-left:270px;margin:0;color:var(--config-color-normal);background:var(--config-console-background)}.console body .project-only{display:none!important}.console body.show-nav .project-only{display:inline-block!important}.console body.hide-nav{padding-left:50px;width:calc(100% - 100px)}.console body.hide-nav header{width:calc(100% - 50px)}.console body.hide-nav header .logo{display:inline-block}.console body.hide-nav .console-back{display:block}.console body.hide-nav .console-index{display:none}.console body.hide-nav .account{display:none}.console body.index .console-back{display:none}.console body.index .console-index{display:block}.console body.index .account{display:block}.console body .console-index{display:block}.console body .console-back{display:none}.console main{min-height:480px}.console header{position:fixed;top:0;width:calc(100% - 280px);height:40px;line-height:40px;padding:15px 30px;background:var(--config-color-background-fade);box-shadow:0 0 2px rgba(0,0,0,.1);margin:0 -50px;z-index:2;font-size:14px}.console header .logo{display:none;border:none}.console header .logo:hover{border:none;opacity:.8}.console header .logo img{height:26px;margin:7px 0}.console header .setup-new{width:40px;height:40px;line-height:40px}.console header .list{width:240px}.console header .list select{height:40px;line-height:40px;padding-top:0;padding-bottom:0;border:none;border-radius:26px;background-color:var(--config-console-nav-switch-background);color:var(--config-console-nav-switch-color)}.console header .account{margin-left:25px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.console header .switch-theme{margin:2px 0}.console header .avatar{height:40px;width:40px}.console header .account-button{background:0 0;position:absolute;width:100%;height:40px;border-radius:0;z-index:1}.console header .notifications{position:relative;font-size:20px}.console header .notifications a{color:#1b3445}.console header .notifications:after{position:absolute;content:"";display:block;background:var(--config-color-danger);width:8px;height:8px;border-radius:50%;top:3px;right:3px}.console header nav{background:#1b3445;background:linear-gradient(var(--config-console-nav-start),var(--config-console-nav-end));color:#788c99;position:fixed;height:100%;width:220px;top:0;left:0}.console header nav .logo{height:39px;padding:15px 20px;display:block}.console header nav .logo img{display:inline-block;margin-top:7px;margin-bottom:14px}.console header nav .logo svg g{fill:var(--config-color-focus)}.console header nav .icon{display:block;border:none;margin:18px 10px 50px 10px}.console header nav .icon img{display:block}.console header nav .icon:hover{border-bottom:none}.console header nav .icon:hover svg g{fill:var(--config-color-focus)}.console header nav .container{overflow:auto;height:calc(100% - 133px);width:100%}.console header nav .project-box{padding:20px;text-align:center;display:block;border:none;line-height:100px;height:100px}.console header nav .project-box img{max-height:80px;max-width:80%;display:inline-block;vertical-align:middle}.console header nav .project{display:block;padding:85px 25px 20px 25px;color:#788c99;position:relative;border:none;height:20px}.console header nav .project:hover{border-bottom:none}.console header nav .project .name{height:20px;line-height:20px;margin:0;padding:0;display:inline-block;max-width:100%}.console header nav .project .arrow{display:block;position:absolute;right:5px;top:10px;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #788c99;transform:rotate(225deg)}.console header nav .project img{position:absolute;bottom:40px;display:block;margin-bottom:10px;max-height:35px;max-width:40%}.console header nav .subtitle{padding:0 30px;display:block;font-size:12px;font-weight:300}.console header nav .links{margin-bottom:15px!important}.console header nav .links.top{border:none;padding-bottom:0;margin-bottom:5px!important}.console header nav .links.bottom{position:absolute;bottom:0;left:0;right:0;padding-bottom:0;border:none;margin-bottom:0!important;box-shadow:0 0 10px rgba(0,0,0,.1)}.console header nav .links.bottom a{border-top:solid 1px var(--config-console-nav-border);border-bottom:none}.console header nav .links .sub{display:inline-block;border:none;width:25px;height:25px;line-height:25px;border-radius:50%;padding:0;background:var(--config-color-focus);color:#fff;text-align:center;font-size:12px;margin:18px}.console header nav .links .sub i{width:auto;margin:0}.console header nav .links .sub:hover{border:none}.console header nav .links a{padding:8px 20px;border:none;display:flex;color:#87a5b9;font-weight:400;border-left:solid 5px transparent;font-size:13px}.console header nav .links a i{margin-right:8px;width:22px;display:inline-block}.console header nav .links a.selected,.console header nav .links a:hover{color:#e4e4e4}.console header nav:after{content:'';display:block;position:absolute;background:#302839;height:100px;width:100%;bottom:-100px}.console>footer{width:calc(100% + 100px);margin:0 -50px;box-sizing:border-box;background:0 0;padding-right:30px;padding-left:30px}.console>footer ul{float:none;text-align:center}.console>footer ul li{float:none;display:inline-block}.console .projects{position:relative}.console .projects:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.console .projects li{float:left;margin-right:50px;margin-bottom:50px;width:270px}.console .projects li:nth-child(3n){margin-right:0}.console .dashboard{padding:20px;overflow:visible;position:relative;z-index:1;margin-bottom:2px}.console .dashboard .chart{width:80%}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard .chart{width:100%}}.console .dashboard hr{margin:20px -25px;height:2px;background:var(--config-console-background)}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard hr{height:3px}}.console .dashboard footer{margin:-20px;padding:20px;background:#fcfeff;border:none;color:var(--config-color-link)}.console .dashboard .col{position:relative}.console .dashboard .col:last-child:after{display:none}.console .dashboard .col:after{content:"";display:block;width:2px;background:var(--config-console-background);position:absolute;top:-20px;bottom:-20px;right:24px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard .col:after{width:calc(100% + 40px);height:3px;position:static;margin:20px -20px}}.console .dashboard .value{color:var(--config-color-focus);vertical-align:bottom;line-height:45px}.console .dashboard .value.small{line-height:35px}.console .dashboard .value .sum{font-size:45px;line-height:45px;font-weight:700;vertical-align:bottom}.console .dashboard .value .sum.small{font-size:25px;line-height:25px}.console .dashboard .unit{font-weight:500;line-height:20px;vertical-align:bottom;font-size:16px;display:inline-block;margin-bottom:5px;margin-left:5px;color:var(--config-color-focus)}.console .dashboard .metric{color:var(--config-color-focus);font-weight:400;font-size:13px;line-height:16px}.console .dashboard .range{color:var(--config-color-fade);font-weight:400;font-size:14px;line-height:16px}.console .dashboard a{display:block;font-weight:400;font-size:14px;line-height:16px;padding:0;border:none}.console .dashboard .chart-bar{height:4rem;width:auto;display:flex;align-items:flex-end}@media only screen and (min-width:1199px){.console .dashboard .chart-bar{padding-right:15px}}.console .dashboard .chart-bar .bar{width:12.5%;background-color:var(--config-color-chart-fade);margin:0 2px;border-top:2px solid var(--config-color-chart)}.console .dashboard .chart-bar .bar:hover{background-color:var(--config-color-chart)}.console .dashboard .chart-bar .bar.bar-100{height:100%}.console .dashboard .chart-bar .bar.bar-90{height:90%}.console .dashboard .chart-bar .bar.bar-80{height:80%}.console .dashboard .chart-bar .bar.bar-70{height:70%}.console .dashboard .chart-bar .bar.bar-60{height:60%}.console .dashboard .chart-bar .bar.bar-50{height:50%}.console .dashboard .chart-bar .bar.bar-40{height:40%}.console .dashboard .chart-bar .bar.bar-30{height:30%}.console .dashboard .chart-bar .bar.bar-20{height:20%}.console .dashboard .chart-bar .bar.bar-10{height:10%}.console .dashboard .chart-bar .bar.bar-0{height:0%}.console .dashboard .chart-bar .bar.bar-0{border-top:1px solid var(--config-color-chart)}.console .dashboard .chart-bar .bar.bar-5{height:5%}.console .chart-metric{width:19%}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (max-width:550px){.console .chart-metric{width:100%}}.console .chart{width:100%;position:relative;height:0;padding-top:20px;padding-bottom:26%;margin-right:-2px;overflow:hidden;background-color:var(--config-color-background-fade);background-image:linear-gradient(transparent 1px,transparent 1px),linear-gradient(90deg,transparent 1px,transparent 1px),linear-gradient(var(--config-border-color) 1px,transparent 1px),linear-gradient(90deg,var(--config-border-color) 1px,transparent 1px);background-size:100px 100px,100px 100px,20px 20px,20px 20px;background-position:-2px -2px,-2px -2px,-1px -1px,-1px -1px;background-repeat:round;border:solid 1px var(--config-border-color);border-right:solid 1px transparent;border-bottom:solid 1px transparent}.console .chart.background-image-no{background-image:none}.console .chart.border-no{border:none}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (max-width:550px){.console .chart{width:100%;padding-bottom:32%;float:none;margin-bottom:20px}}.console .chart canvas{position:absolute;bottom:0;display:block;height:100%;width:100%}.console .chart-notes{font-size:12px}.console .chart-notes.crud li.create,.console .chart-notes.crud li:nth-child(1){color:#00b680}.console .chart-notes.crud li.create::before,.console .chart-notes.crud li:nth-child(1)::before{background:#00b680}.console .chart-notes.crud li.read,.console .chart-notes.crud li:nth-child(2){color:#009cde}.console .chart-notes.crud li.read::before,.console .chart-notes.crud li:nth-child(2)::before{background:#009cde}.console .chart-notes.crud li.update,.console .chart-notes.crud li:nth-child(3){color:#696fd7}.console .chart-notes.crud li.update::before,.console .chart-notes.crud li:nth-child(3)::before{background:#696fd7}.console .chart-notes.crud li.delete,.console .chart-notes.crud li:nth-child(4){color:#da5d95}.console .chart-notes.crud li.delete::before,.console .chart-notes.crud li:nth-child(4)::before{background:#da5d95}.console .chart-notes li{line-height:20px;display:inline-block;margin-right:15px}.console .chart-notes li::before{display:inline-block;content:'';width:14px;height:14px;background:var(--config-color-normal);border-radius:50%;margin-right:8px;vertical-align:middle}.console .chart-notes li.blue,.console .chart-notes li:nth-child(1){color:var(--config-color-chart)}.console .chart-notes li.blue::before,.console .chart-notes li:nth-child(1)::before{background:var(--config-color-chart)}.console .chart-notes li.green,.console .chart-notes li:nth-child(2){color:#4eb55b}.console .chart-notes li.green::before,.console .chart-notes li:nth-child(2)::before{background:#4eb55b}.console .chart-notes li.orange,.console .chart-notes li:nth-child(3){color:#ec9323}.console .chart-notes li.orange::before,.console .chart-notes li:nth-child(3)::before{background:#ec9323}.console .chart-notes li.red,.console .chart-notes li:nth-child(4){color:#dc3232}.console .chart-notes li.red::before,.console .chart-notes li:nth-child(4)::before{background:#dc3232}.console .community a{padding:0 10px;display:inline-block}.console .link-list li{margin-bottom:15px}.console .link-list i{display:inline-block;width:30px;height:30px;line-height:30px;text-align:center;background:var(--config-color-fade);color:var(--config-color-fade-super);border-radius:50%;margin-right:15px}.console .link-list i.fade{background:0 0;color:var(--config-color-fade)}.console .provider{width:50px;height:50px;background:var(--config-color-background-focus);color:#868686;line-height:50px;text-align:center;font-size:25px;border-radius:50%}.console .provider.facebook{color:#fff;background:#3b5998}.console .provider.twitter{color:#fff;background:#55beff}.console .provider.telegram{color:#fff;background:#3ba9e1}.console .provider.github{color:#fff;background:#24292e}.console .provider.whatsapp{color:#fff;background:#25d366}.console .provider.linkedin{color:#fff;background:#1074af}.console .provider.microsoft{color:#fff;background:#137ad4}.console .provider.google{color:#fff;background:#4489f1}.console .provider.bitbucket{color:#fff;background:#2a88fb}.console .provider.gitlab{color:#faa238;background:#30353e}.console .provider.instagram{color:#fff;background:radial-gradient(circle at 30% 107%,#fdf497 0,#fdf497 5%,#fd5949 45%,#d6249f 60%,#285aeb 90%)}.console .premium{z-index:3;margin-top:320px}.console .premium .message{height:190px;overflow:hidden;position:absolute;top:-280px}.console .premium:after{content:'';position:absolute;top:0;left:-20px;right:-20px;bottom:-20px;background:var(--config-color-background);opacity:.7;z-index:300}.console .app-section{height:90px}.console .confirm{background:var(--config-color-link);color:#fff;border-radius:25px;padding:12px;line-height:28px;text-align:center}.console .confirm .action{font-weight:500;cursor:pointer}.console .platforms{overflow:hidden}.console .platforms .box{overflow:hidden}.console .platforms .box img{width:50px;margin:0 auto;margin-bottom:20px}.console .platforms .box .cover{margin:-30px -30px 30px -30px;padding:30px}.console .platforms .box .cover.android{background:#a4ca24}.console .platforms .box .cover.android h1{color:#fff;font-size:18px;margin-top:20px}.console .platforms .col{text-align:center;line-height:30px}.console .platforms a{display:block;margin:-20px;padding:20px}.console .platforms a:hover{background:#fbfeff}.console .platforms img{display:block;margin:0 30px;width:calc(100% - 60px);border-radius:50%;margin-bottom:20px}.console .document-nav{display:none;position:sticky;top:90px}@media only screen and (min-width:1380px){.console .document-nav{display:block}}.console .document-nav ul{position:absolute;width:200px;left:-260px}.console .document-nav ul li{margin-bottom:20px}.console .document-nav ul li .selected{font-weight:500}@media only screen and (min-width:1199px){.console .logo .top{display:none!important}}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console>header{width:calc(100% - 30px)!important;margin:0 -30px;padding:15px}.console>header nav{width:100%;height:70px;overflow:hidden}.console>header nav.close{background:0 0}.console>header nav.close .logo .nav{display:none!important}.console>header nav.open{height:100%}.console>header nav.open .logo .top{display:none!important}.console>header nav.open .bottom{display:block!important}.console>header nav.open button{color:#87a5b9}.console>header nav button{margin:9px;background:0 0;color:var(--config-color-normal)}.console>header nav button:focus,.console>header nav button:hover{background:0 0}.console>header nav .logo{display:block!important;position:absolute;top:0;left:50%;margin:auto;transform:translateX(-50%)}.console>header nav .bottom{display:none!important}.console>footer{width:auto;margin:50px -30px 0 -30px!important;padding:0 30px 30px 30px}.console body{height:"calc(100% - 70px)"!important;width:calc(100% - 60px)!important;padding:70px 30px 0 30px!important}.console .cover{padding:25px 30px;margin:0 -30px}}@media only screen and (max-width:550px){.console body{height:"calc(100% - 70px)"!important;width:calc(100% - 40px)!important;padding:70px 20px 0 20px!important}.console .cover{padding:20px 20px;margin:0 -20px}.console>header{margin:0 -20px}.console>header .list{width:175px;font-size:14px}.console>footer{margin:50px -20px 0 -20px!important;padding:0 20px 20px 20px}}.dev-feature{display:none}.prod-feature{display:none}.development .dev-feature{display:block;opacity:.6!important;outline:solid #ff0 3px;outline-offset:3px}.development .dev-feature.dev-inline{display:inline-block}.development .prod-feature{display:none}.production .dev-feature{display:none}.production .prod-feature{display:block}.search{opacity:1!important}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.search button{margin-top:20px}}html.home body{padding:0 50px;color:var(--config-color-normal)}html.home .logo a{display:block}html.home .logo a:hover{opacity:.8}html.home .logo img{max-height:35px;width:198px;margin:45px auto 25px auto}html.home footer{background:0 0;text-align:center}html.home main{min-height:400px}.alerts ul{width:100%;visibility:hidden;position:fixed;padding:0;right:0;left:0;color:var(--config-color-normal);z-index:1001;margin:0 auto;bottom:15px;max-width:560px}.alerts ul li{margin:10px 0 0 0;padding:0}.alerts ul li div.message{position:relative;padding:12px 35px;margin:0 auto;list-style:none;background:var(--config-color-background-dark);text-align:center;font-size:14px;border-radius:10px;line-height:16px;min-height:16px;box-shadow:0 0 10px rgba(0,0,0,.05);opacity:.95}.alerts ul li div.message a,.alerts ul li div.message span{font-weight:600}.alerts ul li div.message a{border-bottom:dotted 1px var(--config-color-normal)}.alerts ul li div.message i{cursor:pointer;position:absolute;font-size:14px;line-height:20px;top:9px;left:9px;color:var(--config-color-background-dark);background:var(--config-color-normal);width:22px;height:22px;border-radius:50%}.alerts ul li div.message.error{color:#fff!important;background:var(--config-color-danger)!important}.alerts ul li div.message.error a{color:#fff!important;border-bottom:dotted 1px #fff!important}.alerts ul li div.message.error i{color:var(--config-color-danger);background:#fff}.alerts ul li div.message.success{color:#fff!important;background:var(--config-color-success)!important}.alerts ul li div.message.success a{color:#fff;border-bottom:dotted 1px #fff}.alerts ul li div.message.success i{color:var(--config-color-success);background:#fff}.alerts ul li div.message.warning{color:var(--config-color-normal)!important;background:var(--config-color-warning)!important}.alerts ul li div.message.warning a{color:var(--config-color-normal)!important;border-bottom:dotted 1px var(--config-color-normal)!important}.alerts ul li div.message.warning i{color:#fff;background:var(--config-color-normal)!important}.alerts ul li div.message.open{display:block}.alerts ul li div.message.close{display:none}.alerts .cookie-alert{background:var(--config-color-focus-fade)!important;color:var(--config-color-focus)}.alerts .cookie-alert a{color:var(--config-color-focus);font-weight:400;border-bottom:dotted 1px var(--config-color-focus)!important}.alerts .cookie-alert i{color:var(--config-color-focus-fade)!important;background:var(--config-color-focus)!important}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.alerts ul{top:auto;bottom:0;max-width:100%;left:0}.alerts ul li{margin:5px 0 0 0}.alerts ul li div.message{border-radius:0}}.show-nav .alerts ul{left:220px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.show-nav .alerts ul{left:0}}article{overflow-wrap:break-word;word-wrap:break-word}article h1{font-size:36px}article h2{font-size:24px}article h3{font-size:20px}article h4{font-size:20px}article h5{font-size:18px}article h6{font-size:16px}article h1,article h2,article h3,article h4,article h5,article h6{margin-top:30px!important;margin-bottom:30px!important}article p{line-height:32px;font-size:16px}article .update{display:block;margin-top:50px!important}article table{width:100%;margin:0;margin-bottom:30px!important;border-radius:0;border-bottom:solid 1px var(--config-border-color)}article table thead td{font-weight:500;padding:5px 15px}article table td,article table th{padding:15px;height:auto}article table td:first-child,article table th:first-child{padding-left:10px}article table td:last-child,article table th:last-child{padding-right:10px}article table td p,article table th p{font-size:inherit;line-height:inherit}article table td p:last-child,article table th p:last-child{margin:0}.avatar-container{position:relative}.avatar-container .corner{position:absolute;bottom:-3px;right:-3px}.avatar{width:60px;height:60px;border-radius:50%;background:var(--config-color-background-focus);display:inline-block;overflow:hidden;box-shadow:0 0 6px rgba(0,0,0,.09);position:relative;z-index:1;opacity:1!important}.avatar.hide{display:none}.avatar:before{width:100%;height:100%;z-index:0}.avatar.inline{display:inline-block;vertical-align:middle}.avatar.trans{background:0 0}.avatar .no-shadow{box-shadow:none}.avatar.xs{width:30px;height:30px}.avatar.xxs{width:20px;height:20px}.avatar.small{width:50px;height:50px}.avatar.big{width:100px;height:100px}.avatar.huge{width:150px;height:150px}.box{position:relative;background:var(--config-color-background-fade);border-radius:10px;border-bottom:none;box-shadow:0 0 3px rgba(0,0,0,.05);display:block;padding:30px}.box.padding-tiny{padding:5px}.box.padding-xs{padding:10px}.box.padding-small{padding:15px}.box.y-scroll{overflow-y:auto}.box.danger{background:var(--config-color-danger);color:#fff}.box.danger .box{color:var(--config-color-normal);background:var(--config-color-background-fade)}.box.danger>.button,.box.danger>button{background:#fff;color:var(--config-color-danger)}.box.note{background:var(--config-note-background)}.box.focus{background:var(--config-color-focus);color:var(--config-color-background-fade)}.box.focus .button,.box.focus button{background:var(--config-color-background-fade);color:var(--config-color-focus)}.box.line{background:0 0;border:solid 1px var(--config-color-background-dark);box-shadow:none}.box.warning{background:var(--config-color-warning);color:#2d2d2d}.box.warning .button,.box.warning button{background:rgba(45,45,45,.8);color:var(--config-color-success)}.box .tabs{border-bottom:solid 1px var(--config-border-color);margin:0 -30px;padding:0 30px!important}.box>footer{margin:0 -30px -30px -30px;padding:15px 30px;background:var(--config-color-background-fade);border:solid 1px var(--config-border-color);border-radius:0 0 10px 10px}.box hr{height:1px;background:var(--config-console-background);border:none;margin:30px -30px}.box .label{position:absolute;top:10px;z-index:2;right:10px}.box.fade-bottom{position:relative;overflow:hidden}.box.fade-bottom:after{content:"";position:absolute;display:block;bottom:15px;width:100%;background:#000;background:linear-gradient(180deg,rgba(0,0,0,0) 0,var(--config-color-background-fade) 80%);height:100px;margin:0 -15px}.box .header{position:static;height:40px;padding:20px 30px 20px 30px;margin-bottom:30px;margin:-30px -30px 20px -30px;background:var(--config-color-background-fade);border-bottom:solid 1px #efefef}.box ul.numbers>li{position:relative;margin-left:30px;margin-right:50px}.box ul.numbers>li hr{margin-left:-60px;margin-right:-80px}.box ul.numbers>li .settings{position:absolute;top:3px;right:-50px}.box ul.numbers>li::after{display:block;width:25px;height:25px;line-height:25px;font-size:13px;font-weight:500;border-radius:50%;background:var(--config-color-focus);color:var(--config-color-background);counter-increment:section;content:counter(section);text-align:center;position:absolute;top:3px;left:-45px}.box .scroll{margin:0 -30px;overflow-y:scroll}.box .scroll table{width:100%;margin:0}.box ul.sortable{counter-reset:section}.box ul.sortable>li [data-move-down].round,.box ul.sortable>li [data-move-up].round,.box ul.sortable>li [data-remove].round{background:var(--config-color-focus);color:var(--config-color-background-fade);width:25px;height:25px;line-height:25px;display:inline-block;text-align:center;padding:0;margin-right:5px}.box ul.sortable>li [data-move-down].round:disabled,.box ul.sortable>li [data-move-up].round:disabled,.box ul.sortable>li [data-remove].round:disabled{display:none}.box ul.sortable>li:first-child [data-move-up]{display:none}.box ul.sortable>li:first-child [data-move-up]:disabled{display:inline-block;background:var(--config-color-background)}.box ul.sortable>li:last-child [data-move-down]{display:none}.box ul.sortable>li:last-child [data-move-down]:disabled{display:inline-block;background:var(--config-color-background)}.box .toggle{position:relative;border-top:1px solid var(--config-console-background);border-bottom:1px solid var(--config-console-background);margin:0 -30px;padding:30px 30px 0 30px;height:65px;overflow:hidden}.box .toggle.list{border-bottom:none}.box .toggle.sorts button.ls-ui-open{width:calc(100% - 100px)}.box .toggle button.ls-ui-open{right:0;position:absolute;top:0;width:100%;height:95px;background:0 0;opacity:.5;border-radius:0}.box .toggle .icon-minus,.box .toggle .icon-up-open{display:none}.box .toggle .content{display:none}.box .toggle.open{height:auto}.box .toggle.open .icon-minus,.box .toggle.open .icon-up-open{display:block}.box .toggle.open .icon-down-open,.box .toggle.open .icon-plus{display:none}.box .toggle.open .content{display:block}.box .list li{border-bottom:solid 2px var(--config-border-color);margin:0 -30px 30px -30px;padding:0 30px 30px 30px}.box .list li:last-child{padding-bottom:0;margin-bottom:0;border-bottom:none}@media only screen and (max-width:550px){.box .list li .actions{float:none}}.box .list li .avatar{display:block}.box .list li .avatar.inline{display:inline-block}.box.new{text-align:center}.box.new i{font-size:80px;line-height:80px;font-family:Poppins,sans-serif;font-style:normal;font-weight:300}.box.new b{margin-top:20px;display:block}.box .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.box .info hr{background:var(--config-modal-note-border)!important}.box .table-wrap{margin:0 -30px;overflow-y:scroll}.box .table-wrap table{margin:0}a.box{border-right:none;border-left:none}a.box:hover{box-shadow:0 0 1px rgba(0,0,0,.2);opacity:.7}.box-asidex{padding-right:25px!important;padding-left:70px;right:0;background:#f9f9f9;border-radius:0 10px 10px 0;height:calc(100% - 30px);position:absolute;padding-top:30px}.box-asidex:after{content:"";display:block;position:absolute;height:100%;width:51px;background:#fff;top:0;bottom:0;left:-6px}.cover{background:var(--config-color-focus-fade);padding:30px 50px;margin:0 -50px;position:relative;border-bottom:solid 1px var(--config-border-fade)}.cover .title,.cover h1,.cover h2,.cover h3,.cover h4{color:var(--config-color-focus);font-weight:600;margin-bottom:50px!important;font-size:28px;line-height:42px}.cover .title span,.cover h1 span,.cover h2 span,.cover h3 span,.cover h4 span{font-weight:600}.cover i:before{margin:0!important}.cover p{color:var(--config-color-fade)}.cover .button{color:#fff}.cover .link,.cover a{display:inline-flex;color:var(--config-color-focus);border-left:none;border-right:none;cursor:pointer}.cover .link:hover,.cover a:hover{border-bottom-color:var(--config-color-focus)}.cover .link i,.cover a i{margin-right:.2rem}.console .database .row .col{height:452px}.console .database .row .col:after{width:2px;right:20px}.console .database hr{margin:0 -20px;background:var(--config-color-background);height:1px}.console .database h3{font-size:13px;line-height:20px;height:20px;background-color:var(--config-color-fade-super);margin:-20px -20px 0 -20px;padding:10px 20px;border-bottom:solid 1px var(--config-color-background);font-weight:600}.console .database .empty{height:162px;font-size:12px;text-align:center;margin:50px 0}.console .database .empty h4{font-size:13px;font-weight:600;line-height:120px}.console .database .search{background-color:var(--config-color-fade-super);margin:0 -20px 0 -20px;padding:10px 15px}.console .database .search input{height:40px;background-color:#fff;border-radius:25px;padding-top:0;padding-bottom:0}.console .database .code{height:411px;background:var(--config-color-fade-super);margin:0 -20px -20px -20px;padding:20px;width:calc(100% - 10px)}.console .database .code .ide{overflow:scroll;height:451px;margin:-20px;box-shadow:none;border-radius:0}.console .database .paging{background:var(--config-color-fade-super);margin:0 -20px -20px -20px;padding:20px}.console .database .button{margin:0 -20px;padding:0 20px!important;text-align:inherit;color:var(--config-color-focus);width:100%;font-size:15px;line-height:55px;box-sizing:content-box}.console .database .button i{margin-right:8px}.console .database .button:hover{border:none;background:var(--config-color-focus-fade)}.console .database .items{margin:0 -20px;height:262px;overflow-x:hidden;overflow-y:scroll}.console .database .items form{opacity:0;position:relative}.console .database .items form button{position:absolute;top:0;bottom:0;left:0;right:0;width:100%;height:45px;border-radius:0;cursor:pointer}.console .database .items li{padding:0;margin:0 0;line-height:45px;font-size:15px;padding-left:50px;padding-right:30px;position:relative}.console .database .items li i{position:absolute;display:none;right:10px}.console .database .items li .name{display:inline-block;width:100%;height:28px}.console .database .items li.selected,.console .database .items li:hover{background:#f5f5f5}.console .database .items li.selected i,.console .database .items li:hover i{display:block}.console .database .items li:last-child{border-bottom:none}.events.row{border-bottom:solid 1px var(--config-color-fade-super)}.events.row .col span.text{display:inline-block;width:calc(100% - 28px);word-break:break-all}.events.row .col span.action{float:right;cursor:pointer}.events.row:last-child{border-bottom:none}body>footer{color:var(--config-color-fade);line-height:40px;margin:0 -50px;padding:12px 50px;font-size:13px;width:100%;background:#f1f1f1;position:relative;margin-top:80px!important}body>footer:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}body>footer .logo img{height:22px;padding-top:12px}body>footer a{display:inline-flex;color:var(--config-color-fade);font-size:13px}body>footer a:hover{border-bottom-color:var(--config-color-fade)}body>footer a i{margin-right:.2rem}body>footer ul{display:flex;justify-content:center}body>footer ul:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}body>footer ul li{font-size:13px;float:left;margin-right:20px!important}body>footer .copyright{padding-left:2px}.loader{height:0;direction:ltr;position:fixed;top:0;width:0;margin:0 auto;left:0;opacity:0;z-index:4}.load-start~.loader{width:100%;background:var(--config-color-focus);height:3px;opacity:1;transition:width .3s ease-out,opacity .5s ease-out;-moz-transition:width .3s ease-out,opacity .5s ease-out;-webkit-transition:width .3s ease-out,opacity .5s ease-out;-o-transition:width .3s ease-out,opacity .5s ease-out}.www .load-start~.loader{background:#fff}.load-start>*{opacity:0}.load-end>*{opacity:1;transition:opacity .3s ease-out;-moz-transition:opacity .3s ease-out;-webkit-transition:opacity .3s ease-out;-o-transition:opacity .3s ease-out}[data-ls-if]{display:none}[data-service]{opacity:0}.load-service-start{opacity:0}.load-service-end{opacity:1;transition:opacity .5s ease-out;-moz-transition:opacity .5s ease-out;-webkit-transition:opacity .5s ease-out;-o-transition:opacity .5s ease-out}.load-screen{z-index:100000;position:fixed;height:100%;width:100%;background-color:var(--config-color-background-focus);top:0;left:0}.load-screen.loaded{transition:opacity 1s ease-in-out,top 1s .7s;opacity:0;top:-100%}.load-screen .animation{position:absolute;top:45%;left:50%;transform:translate(-50%,-50%) translateZ(1px);width:140px;height:140px}.load-screen .animation div{box-sizing:border-box;display:block;position:absolute;width:124px;height:124px;margin:10px;border:10px solid var(--config-color-focus);border-radius:50%;animation:animation 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--config-color-focus) transparent transparent transparent}.load-screen .animation div:nth-child(1){animation-delay:-.45s}.load-screen .animation div:nth-child(2){animation-delay:-.3s}.load-screen .animation div:nth-child(3){animation-delay:-.15s}@keyframes animation{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.load-screen img{position:absolute;height:20px;bottom:60px;left:50%;transform:translate(-50%,-50%)}.modal-open .modal-bg,.modal-open body .modal-bg{position:fixed;content:'';display:block;width:100%;height:100%;left:0;right:0;top:0;bottom:0;background:#0c0c0c;opacity:.75;z-index:5}.modal{overflow:auto;display:none;position:fixed;transform:translate3d(0,0,0);width:100%;max-height:90%;max-width:640px;background:var(--config-color-background-fade);z-index:1000;box-shadow:0 0 4px rgba(0,0,0,.25);padding:30px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:10px;box-sizing:border-box;text-align:left;white-space:initial;line-height:normal}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.modal{width:calc(100% - 20px)}}.modal.full{max-width:none;max-height:none;height:100%;border-radius:0;padding:80px 120px}.modal.full h1{font-weight:700}.modal.padding-tiny{padding:5px}.modal.padding-xs{padding:10px}.modal.padding-small{padding:15px}.modal.height-tiny>form{height:100px}.modal.height-small>form{height:220px}.modal.width-small{max-width:400px}.modal.width-medium{max-width:500px}.modal.width-large{max-width:800px}.modal.open{display:block}.modalbutton.close{display:none}.modal.fill{height:95%;max-height:95%;max-width:75%}.modal h1,.modal h2{margin-bottom:25px;margin-top:0;font-size:20px;text-align:left}.modal h1,.modal h2,.modal h3,.modal h4,.modal h5,.modal h6{color:inherit!important;line-height:35px}.modal .main,.modal>form{position:relative;border-top:solid 1px var(--config-border-color);padding:30px 30px 0 30px;margin:0 -30px}.modal .main.strip,.modal>form.strip{border:none;padding:0;margin:0}.modal .separator{margin:20px -30px}.modal .bullets{padding-left:40px}.modal .bullets li{margin-bottom:30px!important}.modal .bullets li:before{position:absolute}.modal .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.modal .ide.strech{box-shadow:none;border-radius:0;margin:0 -30px}.modal .ide pre{overflow:auto}.modal .paging form{padding:0;margin:0;border-top:none}.modal.sticky-footer form footer{margin:-30px}.modal.sticky-footer footer{position:sticky;bottom:-30px;background:var(--config-color-background-fade-super);height:50px;z-index:1;padding:30px;box-shadow:0 0 1px rgba(0,0,0,.15)}.modal.sticky-footer footer form{display:inline-block}[data-views-current="0"] .scroll-to,[data-views-current="1"] .scroll-to{opacity:0!important;pointer-events:none}.scroll-to-bottom .scroll-to,.scroll-to-top .scroll-to{opacity:1}.scroll-to{opacity:0;display:block;width:40px;height:40px;line-height:40px;border-radius:50%;position:fixed;transform:translateZ(0);margin:30px;padding:0;bottom:0;font-size:18px;z-index:100000;transition:opacity .15s ease-in-out;right:0}.phases{list-style:none;margin:0;padding:0;position:relative}.phases li{display:none}.phases li .badge{display:none}.phases li li{display:block}.phases li.selected{display:block}.phases .number{display:none}.phases h2,.phases h3,.phases h4,.phases h5,.phases h6{margin:0 0 30px 0;text-align:inherit}.container{position:relative}.container .tabs{height:55px;line-height:55px;list-style:none;padding:0;margin-bottom:50px!important;margin-top:-55px;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.container .tabs:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.container .tabs li{position:relative}.container .tabs .badge{background:var(--config-color-focus);color:var(--config-color-background-fade);display:inline-block;border-radius:15px;width:15px;height:15px;margin:10px;line-height:15px;padding:3px;text-align:center;font-weight:500!important;position:absolute;top:-5px;right:-35px;font-size:12px}.container .tabs .selected{font-weight:400;color:var(--config-color-focus);opacity:1}.container .tabs .selected:after{content:"";display:block;height:2px;background:var(--config-color-focus);width:calc(100% + 6px);margin:0 -3px;position:absolute;bottom:0;border-radius:2px}.container .tabs .number{display:none}.container .tabs li{float:left;margin-right:50px;color:var(--config-color-focus);opacity:.9;cursor:pointer}.container .tabs li:focus{outline:0}@media only screen and (max-width:550px){.container .tabs li{margin-right:25px}}.container .icon{display:none}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.container .tabs{width:auto;overflow-x:scroll;overflow-y:hidden;white-space:nowrap}.container .tabs li{display:inline-block;float:none}}.preview-box{display:grid;place-content:center;padding:40px;background:var(--config-color-background-fade);border:1px dashed var(--config-color-background-dark);border-radius:8px}.preview-box-image{display:grid;place-content:center;width:40px;height:40px;margin-inline:auto;background-color:var(--config-color-background-focus);border-radius:50%}.preview-box-text{margin-top:16px;color:var(--config-color-fade)}.upload-box{--p-header-text-color:var(--config-color-background-fade);--p-header-bg-color:var(--config-color-normal);--p-content-text-color:var(--config-color-normal);--p-content-bg-color:var(--config-color-background-fade);--p-border-color:var(--config-modal-note-border);--box-shadow:0 10px 10px rgba(0, 0, 0, 0.05);--border-radius:6px;--transition:0.2s;position:fixed;z-index:1;overflow:hidden;min-width:285px;box-shadow:var(--box-shadow);border-radius:var(--border-radius);font-size:14px;line-height:1}.upload-box *{all:unset;display:revert}.upload-box-header{display:flex;padding:16px;padding-inline-end:21px;color:var(--p-header-text-color);background-color:var(--p-header-bg-color)}.upload-box-header .icon-button{margin-inline-start:16px}.upload-box-title{align-self:center;margin-inline-end:auto;margin-block-end:0}.upload-box-title .amount::before{content:"("}.upload-box-title .amount::after{content:")"}.upload-box-content{background-color:var(--p-content-bg-color);color:var(--p-content-text-color);height:0;overflow:auto;transition:var(--transition)}.upload-box-content.is-open{height:200px}.upload-box-item{display:flex;align-items:center;padding:13px 20px}.upload-box-item .file-name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;align-self:center;margin-inline-end:auto;line-height:normal}.upload-box-item .icon-button{align-self:center;margin-inline-start:16px}.upload-box-item .pill{margin-inline-start:8px}.upload-box-item:not(:last-child){border-bottom:solid 1px var(--p-border-color)}@media only screen and (max-width:550px){.upload-box{inset-inline:16px;inset-block-end:20px}}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (min-width:1199px){.upload-box{max-width:285px;inset-inline-end:24px;inset-block-end:24px}}:root .theme-dark .upload-box{--p-header-text-color:#fff;--p-header-bg-color:var(--config-color-background-dark)}.upload-image{--p-upload-image-size:var(--upload-image-size, 40px);--p-upload-bg-color:var(--config-color-fade-super);--p-upload-icon-color:var(--config-color-fade);position:relative;display:grid;place-content:center;flex-shrink:0;width:var(--p-upload-image-size);height:var(--p-upload-image-size);background-color:var(--p-upload-bg-color);color:var(--p-upload-icon-color);border-radius:50%}.upload-image .icon{position:relative;z-index:20}.upload-image .progress{--progress:var(--progress-value, 0);--zero-value:0 0% 0%/0%;position:absolute;z-index:10;inset:0;border-radius:50%;background:radial-gradient(var(--p-upload-bg-color) 0,var(--p-upload-bg-color) 64%,transparent 64.01%,transparent 100%),conic-gradient(hsl(194 66% 50%) 0,hsl(97 66% 50%) calc(var(--progress) * 1%),hsl(var(--zero-value)) calc(var(--progress) * 1%),hsl(var(--zero-value)) 100%)}.upload-image.is-finished .progress{display:none}:root .theme-dark .upload-image{--p-upload-bg-color:var(--config-color-background-dark);--p-upload-icon-color:var(--config-color-focus)}[data-views-current]:not([data-views-current="0"]):not([data-views-current="1"]) .upload-box{margin-right:4rem}.icon-button{--p-icon-button-size:var(--icon-button-size, 20px);width:var(--p-icon-button-size);height:var(--p-icon-button-size);font-size:var(--p-icon-button-size);transition:.2s;line-height:1;text-align:center;flex-shrink:0;cursor:pointer}.icon-button>::before{margin:0}.icon-button.is-open{transform:rotate(180deg)}.icon-button.is-success{color:var(--config-color-success)}.icon-button:focus,.icon-button:hover{background-color:unset}.icon-button:focus-visible{outline:dashed 1px var(--config-color-primary)}.pill{--p-pill-text-color:var(--config-defalut-color-hsl, var(--pill-text-color));color:hsl(var(--p-pill-text-color));background-color:hsl(var(--p-pill-text-color) / .2);display:inline-grid;place-content:center;padding-inline:12px;height:30px;border-radius:15px;font-size:14px;font-weight:500}.pill.is-disabled{--p-pill-text-color:var(--config-disabled-color-hsl)}.pill.is-pending{--p-pill-text-color:var(--config-pending-color-hsl)}.pill.is-failed{--p-pill-text-color:var(--config-failed-color-hsl)}:root .theme-dark .pill.is-failed{color:#ffcfcf;background-color:#b91c1c}html{padding:0;margin:0;direction:ltr}body{margin:0;background:var(--config-console-background) no-repeat fixed;min-width:300px}ul{padding:0;margin:0}ul li{margin:0;list-style:none} \ No newline at end of file diff --git a/public/dist/styles/default-rtl.css b/public/dist/styles/default-rtl.css index aaded501ab..b226c76182 100644 --- a/public/dist/styles/default-rtl.css +++ b/public/dist/styles/default-rtl.css @@ -1 +1 @@ -.pull-start{float:right}.pull-end{float:left}img[src=""]{visibility:hidden;display:inline-block}:root{--config-width:910px;--config-width-xxl:1000px;--config-width-xl:910px;--config-width-large:700px;--config-width-medium:550px;--config-width-small:320px;--config-color-primary:#f02e65;--config-color-link:#1e849e;--config-color-background:#eceff1;--config-color-background-dark:#dfe2e4;--config-color-background-fade:#ffffff;--config-color-background-fade-super:#fdfdfd;--config-color-background-focus:#f5f5f5;--config-color-background-input:#ffffff;--config-color-placeholder:#868686;--config-color-tooltip-text:#dce8f5;--config-color-tooltip-background:#333333;--config-color-focus:#f02e65;--config-color-focus-fade:#fef8fa;--config-color-focus-hover:#ff729b;--config-color-focus-glow:#fce5ec;--config-color-focus-dark:#c52653;--config-color-normal:#40404c;--config-color-dark:#313131;--config-color-fade:#8f8f8f;--config-color-fade-dark:#6e6e6e;--config-color-fade-light:#e2e2e2;--config-color-fade-super:#f1f3f5;--config-color-danger:#f53d3d;--config-color-success:#1bbf61;--config-color-warning:#fffbdd;--config-color-info:#386fd2;--config-color-chart:#29b5d9;--config-color-chart-fade:#d4f0f7;--config-border-color:#f3f3f3;--config-border-fade:#e0e3e4;--config-border-fade-super:#f7f7f7;--config-border-radius:10px;--config-prism-background:#373738;--config-prism-numbers:#39393c;--config-note-background:#f1fbff;--config-note-border:#5bceff;--config-warning-background:#fdf7d9;--config-warning-border:#f8e380;--config-social-twitter:#1da1f2;--config-social-github:#000000;--config-social-discord:#7189dc;--config-social-facebook:#4070b4;--config-language-bash:#2b2626;--config-language-bash-contrast:#fff;--config-language-javascript:#fff054;--config-language-javascript-contrast:#333232;--config-language-web:#fff054;--config-language-web-contrast:#333232;--config-language-html:#ff895b;--config-language-html-contrast:#ffffff;--config-language-yaml:#ca3333;--config-language-yaml-contrast:#ffffff;--config-language-php:#6182bb;--config-language-php-contrast:#ffffff;--config-language-nodejs:#8cc500;--config-language-nodejs-contrast:#ffffff;--config-language-ruby:#fc3f48;--config-language-ruby-contrast:#ffffff;--config-language-python:#3873a2;--config-language-python-contrast:#ffffff;--config-language-go:#00add8;--config-language-go-contrast:#ffffff;--config-language-dart:#035698;--config-language-dart-contrast:#ffffff;--config-language-flutter:#035698;--config-language-flutter-contrast:#ffffff;--config-language-android:#a4c439;--config-language-android-contrast:#ffffff;--config-language-kotlin:#766DB2;--config-language-kotlin-contrast:#ffffff;--config-language-swift:#f2624c;--config-language-swift-contrast:#ffffff;--config-language-java:#0074bd;--config-language-java-contrast:#ffffff;--config-modal-note-background:#f5fbff;--config-modal-note-border:#eaf2f7;--config-modal-note-color:#3b5d73;--config-switch-background:#e2e2e2;--config-console-background:#eceff1;--config-console-nav-start:#143650;--config-console-nav-end:#302839;--config-console-nav-border:#2a253a;--config-console-nav-switch-background:#ececec;--config-console-nav-switch-color:#868686;--config-console-nav-switch-arrow:url("data:image/svg+xml;utf8,");--config-defalut-color-hsl:0 0% 62%;--config-disabled-color-hsl:0 0% 62%;--config-pending-color-hsl:36 100% 47%;--config-failed-color-hsl:0 74% 42%}:root .theme-dark{--config-color-primary:#f02e65;--config-color-background:#061F2F;--config-color-background-dark:#262d50;--config-color-background-fade:#1c223a;--config-color-background-fade-super:#1a1f35;--config-color-background-focus:#1a1f35;--config-color-background-input:#dce8f5;--config-color-tooltip-text:#061F2F;--config-color-tooltip-background:#dce8f5;--config-color-link:#4caedb;--config-color-placeholder:#9ea1af;--config-color-focus:#c7d8eb;--config-color-focus-fade:#1e233e;--config-color-focus-hover:#d3deea;--config-color-focus-glow:#d3deea;--config-color-focus-dark:#657586;--config-color-normal:#c7d8eb;--config-color-dark:#c7d8eb;--config-color-fade:#bec3e0;--config-color-fade-dark:#81859b;--config-color-fade-light:#181818;--config-color-fade-super:#262D50;--config-color-danger:#d84a4a;--config-color-success:#34b86d;--config-color-warning:#e0d56d;--config-color-info:#386fd2;--config-color-chart:#29b5d9;--config-color-chart-fade:#c7d8eb;--config-border-color:#262D50;--config-border-fade:#19203a;--config-border-fade-super:#262D50;--config-prism-background:#1F253F;--config-prism-numbers:#1F253F;--config-note-background:#171e33;--config-note-border:#262D50;--config-warning-background:#1F253F;--config-warning-border:#262D50;--config-social-twitter:var(--config-color-normal);--config-social-github:var(--config-color-normal);--config-social-discord:var(--config-color-normal);--config-social-facebook:var(--config-color-normal);--config-language-bash:var(--config-color-normal);--config-language-bash-contrast:var(--config-color-background);--config-language-javascript:var(--config-color-normal);--config-language-javascript-contrast:var(--config-color-background);--config-language-web:var(--config-color-normal);--config-language-web-contrast:var(--config-color-background);--config-language-yaml:var(--config-color-normal);--config-language-yaml-contrast:var(--config-color-background);--config-language-html:var(--config-color-normal);--config-language-html-contrast:var(--config-color-background);--config-language-php:var(--config-color-normal);--config-language-php-contrast:var(--config-color-background);--config-language-nodejs:var(--config-color-normal);--config-language-nodejs-contrast:var(--config-color-background);--config-language-ruby:var(--config-color-normal);--config-language-ruby-contrast:var(--config-color-background);--config-language-python:var(--config-color-normal);--config-language-python-contrast:var(--config-color-background);--config-language-go:var(--config-color-normal);--config-language-go-contrast:var(--config-color-background);--config-language-dart:var(--config-color-normal);--config-language-dart-contrast:var(--config-color-background);--config-language-flutter:var(--config-color-normal);--config-language-flutter-contrast:var(--config-color-background);--config-language-android:var(--config-color-normal);--config-language-android-contrast:var(--config-color-background);--config-language-kotlin:var(--config-color-normal);--config-language-kotlin-contrast:var(--config-color-background);--config-language-swift:var(--config-color-normal);--config-language-swift-contrast:var(--config-color-background);--config-language-java:var(--config-color-normal);--config-language-java-contrast:var(--config-color-background);--config-modal-note-background:#15192b;--config-modal-note-border:#161b31;--config-modal-note-color:var(--config-color-normal);--config-switch-background:var(--config-color-normal);--config-console-background:#20263f;--config-console-nav-start:#1c2139;--config-console-nav-end:#151929;--config-console-nav-border:#171b30;--config-console-nav-switch-background:var(--config-color-focus);--config-console-nav-switch-color:var(--config-color-background);--config-console-nav-switch-arrow:url("data:image/svg+xml;utf8,")}.theme-light .force-light{display:block!important}.theme-dark .force-dark{display:block!important}.force-dark{display:none!important}.force-light{display:none!important}@font-face{font-family:Poppins;font-style:normal;font-weight:100;src:url(/fonts/poppins-v9-latin-100.eot);src:local('Poppins Thin'),local('Poppins-Thin'),url(/fonts/poppins-v9-latin-100.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-100.woff2) format('woff2'),url(/fonts/poppins-v9-latin-100.woff) format('woff'),url(/fonts/poppins-v9-latin-100.ttf) format('truetype'),url(/fonts/poppins-v9-latin-100.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:300;src:url(/fonts/poppins-v9-latin-300.eot);src:local('Poppins Light'),local('Poppins-Light'),url(/fonts/poppins-v9-latin-300.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-300.woff2) format('woff2'),url(/fonts/poppins-v9-latin-300.woff) format('woff'),url(/fonts/poppins-v9-latin-300.ttf) format('truetype'),url(/fonts/poppins-v9-latin-300.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:400;src:url(/fonts/poppins-v9-latin-regular.eot);src:local('Poppins Regular'),local('Poppins-Regular'),url(/fonts/poppins-v9-latin-regular.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-regular.woff2) format('woff2'),url(/fonts/poppins-v9-latin-regular.woff) format('woff'),url(/fonts/poppins-v9-latin-regular.ttf) format('truetype'),url(/fonts/poppins-v9-latin-regular.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:500;src:url(/fonts/poppins-v9-latin-500.eot);src:local('Poppins Medium'),local('Poppins-Medium'),url(/fonts/poppins-v9-latin-500.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-500.woff2) format('woff2'),url(/fonts/poppins-v9-latin-500.woff) format('woff'),url(/fonts/poppins-v9-latin-500.ttf) format('truetype'),url(/fonts/poppins-v9-latin-500.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:600;src:url(/fonts/poppins-v9-latin-600.eot);src:local('Poppins SemiBold'),local('Poppins-SemiBold'),url(/fonts/poppins-v9-latin-600.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-600.woff2) format('woff2'),url(/fonts/poppins-v9-latin-600.woff) format('woff'),url(/fonts/poppins-v9-latin-600.ttf) format('truetype'),url(/fonts/poppins-v9-latin-600.svg#Poppins) format('svg')}@font-face{font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url(/fonts/source-code-pro-v11-latin-regular.eot);src:local('Source Code Pro Regular'),local('SourceCodePro-Regular'),url(/fonts/source-code-pro-v11-latin-regular.eot?#iefix) format('embedded-opentype'),url(/fonts/source-code-pro-v11-latin-regular.woff2) format('woff2'),url(/fonts/source-code-pro-v11-latin-regular.woff) format('woff'),url(/fonts/source-code-pro-v11-latin-regular.ttf) format('truetype'),url(/fonts/source-code-pro-v11-latin-regular.svg#SourceCodePro) format('svg')}.padding{padding:30px}.padding-top{padding-top:30px!important}.padding-top-large{padding-top:50px!important}.padding-top-xl{padding-top:80px!important}.padding-bottom{padding-bottom:30px!important}.padding-bottom-large{padding-bottom:50px!important}.padding-bottom-xl{padding-bottom:80px!important}.margin-end{margin-left:20px!important}.margin-start{margin-right:20px!important}.margin-end-small{margin-left:10px!important}.margin-start-small{margin-right:10px!important}.margin-end-large{margin-left:50px!important}.margin-start-large{margin-right:50px!important}.margin-end-no{margin-left:0!important}.margin-start-no{margin-right:0!important}.margin-end-negative{margin-left:-30px!important}.margin-start-negative{margin-right:-30px!important}.margin-end-negative-small{margin-left:-15px!important}.margin-start-negative-small{margin-right:-15px!important}.margin-end-negative-tiny{margin-left:-5px!important}.margin-start-negative-tiny{margin-right:-5px!important}.margin-top{margin-top:30px!important}.margin-bottom{margin-bottom:30px!important}.margin-top-no{margin-top:0!important}.margin-bottom-no{margin-bottom:0!important}.margin-top-xxl{margin-top:140px!important}.margin-top-xl{margin-top:80px!important}.margin-top-large{margin-top:50px!important}.margin-top-small{margin-top:15px!important}.margin-top-tiny{margin-top:5px!important}.margin-top-negative{margin-top:-30px!important}.margin-top-negative-tiny{margin-top:-5px!important}.margin-top-negative-small{margin-top:-15px!important}.margin-top-negative-large{margin-top:-50px!important}.margin-top-negative-xl{margin-top:-80px!important}.margin-top-negative-xxl{margin-top:-100px!important}.margin-top-negative-xxxl{margin-top:-150px!important}.margin-bottom-xxl{margin-bottom:140px!important}.margin-bottom-xl{margin-bottom:80px!important}.margin-bottom-large{margin-bottom:50px!important}.margin-bottom-small{margin-bottom:15px!important}.margin-bottom-tiny{margin-bottom:5px!important}.margin-bottom-negative{margin-bottom:-30px!important}.margin-bottom-negative-tiny{margin-bottom:-5px!important}.margin-bottom-negative-small{margin-bottom:-15px!important}.margin-bottom-negative-large{margin-bottom:-50px!important}.margin-bottom-negative-xl{margin-bottom:-80px!important}.margin-bottom-negative-xl{margin-bottom:-100px!important}.force-left,.ide{direction:ltr;text-align:left}.force-right{direction:rtl;text-align:right}.pull-left{float:left}.pull-right{float:right}.ratio-wide{height:0;overflow:hidden;padding-top:56%;position:relative;width:100%}.ratio-wide>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-square{height:0;overflow:hidden;padding-top:56%;position:relative;width:100%}.ratio-square>*{position:absolute;top:0;left:0;width:100%;height:100%}.clear:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.phones-only{display:none}@media only screen and (max-width:550px){.phones-only{display:inherit!important}}.tablets-only{display:none}@media only screen and (min-width:551px) and (max-width:1198px){.tablets-only{display:inherit!important}}.desktops-only{display:none}@media only screen and (min-width:1199px){.desktops-only{display:inherit!important}}.phones-only-inline{display:none}@media only screen and (max-width:550px){.phones-only-inline{display:inline-block!important}}.tablets-only-inline{display:none}@media only screen and (min-width:551px) and (max-width:1198px){.tablets-only-inline{display:inline-block!important}}.desktops-only-inline{display:none}@media only screen and (min-width:1199px){.desktops-only-inline{display:inline-block!important}}*{font-family:Poppins,sans-serif;-webkit-font-smoothing:antialiased;font-weight:300}h1,h2,h3,h4,h5,h6{margin:0}h4,h5,h6{font-weight:400}.link,a{color:var(--config-color-link);text-decoration:none;border-left:2px solid transparent;border-right:2px solid transparent;transition:.2s;cursor:pointer}.link.disabled,a.disabled{opacity:.5}.link.tag:hover,a.tag:hover{opacity:.9}.link.danger,a.danger{color:var(--config-color-danger)}.link.link-animation-enabled,a.link-animation-enabled{display:inline-flex}.link.link-animation-enabled:hover,a.link-animation-enabled:hover{transform:translateY(-2px)}.link-return-animation--start>i{display:inline-block;transition:.2s}.link-return-animation--start:hover>i{transform:translateX(2px)}.link-return-animation--end>i{display:inline-block;transition:.2s}.link-return-animation--end:hover>i{transform:translateX(-2px)}b,strong{font-weight:500}p{margin:0 0 20px 0;line-height:26px}small{font-size:16px;color:var(--config-color-fade)}.text-size-small{font-size:13px}.text-size-smaller{font-size:11.5px}.text-size-xs{font-size:10px}.text-size-normal{font-size:16px}.text-height-large{height:30px;line-height:30px}.text-height-small{line-height:13px}.text-one-liner{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text-bold{font-weight:400!important}.text-bold-large{font-weight:500!important}.text-bold-xl{font-weight:600!important}.text-danger{color:var(--config-color-danger)!important}.text-success{color:var(--config-color-success)!important}.text-upper{text-transform:uppercase}.text-warning{color:var(--config-color-warning)}.text-focus{color:var(--config-color-focus)}.text-fade{color:var(--config-color-fade)}.text-fade-dark{color:var(--config-color-fade-dark)}.text-green{color:var(--config-color-success)}.text-red{color:var(--config-color-danger)}.text-info{color:var(--config-color-info)}.text-yellow{color:#ffe28b}.text-disclaimer{font-size:11px;color:var(--config-color-fade)}.text-fade-extra{color:var(--config-color-fade);opacity:.5}.text-line-high-large{line-height:30px}.text-line-high-xl{line-height:40px}.text-sign{margin:5px 0;font-size:25px;width:25px;height:25px;line-height:25px;display:inline-block}.text-align-center{text-align:center}.text-align-start{text-align:right}.text-align-end{text-align:left}.text-align-left{text-align:left}.text-align-right{text-align:right}.text-dir-ltr{direction:ltr;display:inline-block}.text-dir-rtl{direction:rtl;display:inline-block}i[class*=' icon-']:before,i[class^=icon-]:before{display:inline;line-height:unset}table{width:calc(100% + 60px);border-collapse:collapse;margin:-30px;border-radius:10px;overflow:hidden;position:relative;table-layout:fixed}table.y-scroll{overflow-y:auto}table.multi-line tbody td,table.multi-line thead th{line-height:inherit;text-overflow:inherit;white-space:inherit}table.borders td,table.borders th{border-left:solid 1px var(--config-border-fade-super)}table.borders td:last-child,table.borders th:last-child{border:none}table thead{border-bottom:solid 1px var(--config-color-fade-super);font-size:14px}table.small{font-size:14px}table.open-end tbody tr:last-child{border-bottom:none;font-weight:700;background:#f7fbf7}table.full tbody td,table.full tbody th{vertical-align:top;white-space:normal;overflow:auto;line-height:24px;padding-top:20px;padding-bottom:20px;height:auto}table .avatar{width:30px;height:30px}table tr{border-bottom:solid 1px var(--config-color-fade-super)}table tr:last-child{border-bottom:none}table tr:last-child td:first-child{border-bottom-left-radius:6px}table tr:last-child td:last-child{border-bottom-right-radius:6px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){table tr:nth-child(even){background:var(--config-color-background-fade-super)}}@media only screen and (min-width:1199px){table tr:nth-child(even) td{background:var(--config-color-background-fade-super)}}table tr.selected{background:var(--config-note-background)}table tr.selected td,table tr.selected td span{font-weight:500}table th{text-align:right;font-weight:400}table th i{color:var(--config-color-fade);font-size:10px;display:inline-block;vertical-align:top;line-height:16px;padding:0 3px}table td,table th{height:65px;padding:0 15px;line-height:50px}table td:first-child,table th:first-child{padding-right:30px}table td,table th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){table.vertical{border-top:solid 1px var(--config-color-fade-super);display:block;overflow:hidden;padding-top:12px}table.vertical .hide{display:none}table.vertical tbody,table.vertical td,table.vertical th,table.vertical thead,table.vertical tr{width:100%;display:block}table.vertical tr{position:relative}table.vertical th,table.vertical tr{padding-top:12px;padding-bottom:12px}table.vertical th:first-child,table.vertical tr:first-child{padding-top:0}table.vertical td,table.vertical th{padding:5px 20px!important;text-overflow:ellipsis;white-space:normal;height:40px;line-height:40px;width:calc(100% - 40px)}table.vertical td.col-name,table.vertical th.col-name{width:calc(100% - 110px)}table.vertical td:first-child,table.vertical td:last-child,table.vertical th:first-child,table.vertical th:last-child{padding:0 10px}table.vertical td:last-child,table.vertical th:last-child{padding-bottom:0}table.vertical td p,table.vertical th p{display:inline-block;width:calc(100% - 40px)}table.vertical td:not([data-title=""]):before{content:attr(data-title);margin-right:4px;font-weight:400}table.vertical thead{display:none}table.vertical .cell-options-more{position:absolute;inset-block-start:0;inset-inline-end:0;width:auto}}table .trim-inner-text{display:inline-flex;align-items:center;gap:8px}@media only screen and (min-width:1199px){table .trim-inner-text{width:100%}}table .cell-options-more button{padding:0 12px;background-color:transparent;color:var(--config-color-fade)}table .cell-options-more button:focus-visible{outline:solid 1px var(--config-color-focus)}.zone{max-width:var(--config-width-xl);margin:0 auto 40px auto}.zone.xxxl{max-width:calc(1400px - 100px)}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.zone.xxxl{max-width:100%}}.zone.xxl{max-width:var(--config-width-xxl)}.zone.xl{max-width:var(--config-width-xl)}.zone.large{max-width:var(--config-width-large)}.zone.medium{max-width:var(--config-width-medium)}.zone.small{max-width:var(--config-width-small)}.row{position:relative;margin:0 -50px;padding-right:50px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.row{margin:0 -30px;padding-right:30px}}.row.force-ltr>.col{float:left}.row.force-rtl>.col{float:right}.row.force-reverse>.col{float:left}.row.wide{margin:0 -100px;padding-right:100px}.row.wide>.span-1{width:calc(8.33333333% * 1 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-2{width:calc(8.33333333% * 2 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-3{width:calc(8.33333333% * 3 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-4{width:calc(8.33333333% * 4 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-5{width:calc(8.33333333% * 5 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-6{width:calc(8.33333333% * 6 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-7{width:calc(8.33333333% * 7 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-8{width:calc(8.33333333% * 8 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-9{width:calc(8.33333333% * 9 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-10{width:calc(8.33333333% * 10 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-11{width:calc(8.33333333% * 11 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-12{width:calc(8.33333333% * 12 - 100px);box-sizing:content-box;padding-left:100px}.row.thin{margin:0 -20px;padding-right:20px}.row.thin>.span-1{width:calc(8.33333333% * 1 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-2{width:calc(8.33333333% * 2 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-3{width:calc(8.33333333% * 3 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-4{width:calc(8.33333333% * 4 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-5{width:calc(8.33333333% * 5 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-6{width:calc(8.33333333% * 6 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-7{width:calc(8.33333333% * 7 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-8{width:calc(8.33333333% * 8 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-9{width:calc(8.33333333% * 9 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-10{width:calc(8.33333333% * 10 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-11{width:calc(8.33333333% * 11 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-12{width:calc(8.33333333% * 12 - 20px);box-sizing:content-box;padding-left:20px}.row.modalize{margin:0 -30px;padding-right:30px}.row.modalize>.span-1{width:calc(8.33333333% * 1 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-2{width:calc(8.33333333% * 2 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-3{width:calc(8.33333333% * 3 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-4{width:calc(8.33333333% * 4 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-5{width:calc(8.33333333% * 5 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-6{width:calc(8.33333333% * 6 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-7{width:calc(8.33333333% * 7 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-8{width:calc(8.33333333% * 8 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-9{width:calc(8.33333333% * 9 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-10{width:calc(8.33333333% * 10 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-11{width:calc(8.33333333% * 11 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-12{width:calc(8.33333333% * 12 - 30px);box-sizing:content-box;padding-left:30px}.row:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.row .col{float:right;box-sizing:border-box}.row .col.sticky-top{position:sticky;top:90px}.row .col.sticky-bottom{position:sticky;bottom:0}.row .span-1{width:calc(8.33333333% * 1 - 40px);box-sizing:content-box;padding-left:40px}.row .span-2{width:calc(8.33333333% * 2 - 40px);box-sizing:content-box;padding-left:40px}.row .span-3{width:calc(8.33333333% * 3 - 40px);box-sizing:content-box;padding-left:40px}.row .span-4{width:calc(8.33333333% * 4 - 40px);box-sizing:content-box;padding-left:40px}.row .span-5{width:calc(8.33333333% * 5 - 40px);box-sizing:content-box;padding-left:40px}.row .span-6{width:calc(8.33333333% * 6 - 40px);box-sizing:content-box;padding-left:40px}.row .span-7{width:calc(8.33333333% * 7 - 40px);box-sizing:content-box;padding-left:40px}.row .span-8{width:calc(8.33333333% * 8 - 40px);box-sizing:content-box;padding-left:40px}.row .span-9{width:calc(8.33333333% * 9 - 40px);box-sizing:content-box;padding-left:40px}.row .span-10{width:calc(8.33333333% * 10 - 40px);box-sizing:content-box;padding-left:40px}.row .span-11{width:calc(8.33333333% * 11 - 40px);box-sizing:content-box;padding-left:40px}.row .span-12{width:calc(8.33333333% * 12 - 40px);box-sizing:content-box;padding-left:40px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.row.responsive{width:100%;padding:0;margin:0}.row.responsive>.span-1,.row.responsive>.span-10,.row.responsive>.span-11,.row.responsive>.span-12,.row.responsive>.span-2,.row.responsive>.span-3,.row.responsive>.span-4,.row.responsive>.span-5,.row.responsive>.span-6,.row.responsive>.span-7,.row.responsive>.span-8,.row.responsive>.span-9{width:calc(8.33333333% * 12 - 0px)!important;box-sizing:content-box!important;padding-left:0!important;width:100%!important}}.tiles{position:relative}.tiles:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.tiles .box hr{margin:15px -15px}.tiles>*{margin-left:50px!important;float:right;width:calc(33.3333% - 33.3333px)}.tiles>* .photo-title{width:calc(100% + 30px);height:15px;margin:-15px -15px 10px -15px;border-radius:10px 10px 0 0;background:var(--config-color-fade-super);border-bottom:solid 1px var(--config-color-fade-super)}.tiles>:nth-child(3n){margin-left:0!important}@media only screen and (min-width:551px) and (max-width:1198px){.tiles>li{width:calc(50% - 25px)}.tiles>li:nth-child(3n){margin-left:50px!important}.tiles>li:nth-child(2n){margin-left:0!important}}@media only screen and (max-width:550px){.tiles>li{width:100%;margin-left:0!important}}@font-face{font-family:icon;src:url(/fonts/icon.eot?t=1645269945236);src:url(/fonts/icon.eot?t=1645269945236#iefix) format('embedded-opentype'),url(/fonts/icon.woff2?t=1645269945236) format("woff2"),url(/fonts/icon.woff?t=1645269945236) format("woff"),url(/fonts/icon.ttf?t=1645269945236) format('truetype'),url(/fonts/icon.svg?t=1645269945236#icon) format('svg');font-weight:400;font-style:normal}[class*=" icon-"]:before,[class^=icon-]:before{font-family:icon!important;font-style:normal;font-weight:400;speak:never;vertical-align:middle;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-angle-circled-left:before{content:"\ea01"}.icon-angle-circled-right:before{content:"\ea02"}.icon-archive:before{content:"\ea03"}.icon-article:before{content:"\ea04"}.icon-asterisk:before{content:"\ea05"}.icon-bank:before{content:"\ea06"}.icon-bell:before{content:"\ea07"}.icon-binoculars:before{content:"\ea08"}.icon-bitbucket:before{content:"\ea09"}.icon-bold:before{content:"\ea0a"}.icon-book-open:before{content:"\ea0b"}.icon-boolean:before{content:"\ea0c"}.icon-briefcase:before{content:"\ea0d"}.icon-building-filled:before{content:"\ea0e"}.icon-calendar:before{content:"\ea0f"}.icon-cancel-circled:before{content:"\ea10"}.icon-cancel:before{content:"\ea11"}.icon-chart-area:before{content:"\ea12"}.icon-chat-alt:before{content:"\ea13"}.icon-check:before{content:"\ea14"}.icon-chevron-down:before{content:"\ea15"}.icon-clock:before{content:"\ea16"}.icon-code:before{content:"\ea17"}.icon-cog:before{content:"\ea18"}.icon-comment:before{content:"\ea19"}.icon-database:before{content:"\ea1a"}.icon-dev:before{content:"\ea1b"}.icon-discord:before{content:"\ea1c"}.icon-docs:before{content:"\ea1d"}.icon-dot-3:before{content:"\ea1e"}.icon-dot-circled:before{content:"\ea1f"}.icon-double:before{content:"\ea20"}.icon-down-dir:before{content:"\ea21"}.icon-down-open:before{content:"\ea22"}.icon-download:before{content:"\ea23"}.icon-edit:before{content:"\ea24"}.icon-enum:before{content:"\ea25"}.icon-export:before{content:"\ea26"}.icon-eye:before{content:"\ea27"}.icon-facebook:before{content:"\ea28"}.icon-file:before{content:"\ea29"}.icon-film:before{content:"\ea2a"}.icon-filter:before{content:"\ea2b"}.icon-fire:before{content:"\ea2c"}.icon-float:before{content:"\ea2d"}.icon-folder:before{content:"\ea2e"}.icon-github:before{content:"\ea2f"}.icon-gitlab:before{content:"\ea30"}.icon-glasses:before{content:"\ea31"}.icon-google:before{content:"\ea32"}.icon-hackernews:before{content:"\ea33"}.icon-header:before{content:"\ea34"}.icon-heart:before{content:"\ea35"}.icon-home:before{content:"\ea36"}.icon-image:before{content:"\ea37"}.icon-inbox:before{content:"\ea38"}.icon-info-circled:before{content:"\ea39"}.icon-instagram:before{content:"\ea3a"}.icon-integer:before{content:"\ea3b"}.icon-ip:before{content:"\ea3c"}.icon-italic:before{content:"\ea3d"}.icon-key-inv:before{content:"\ea3e"}.icon-key:before{content:"\ea3f"}.icon-keyboard:before{content:"\ea40"}.icon-lamp:before{content:"\ea41"}.icon-left-dir:before{content:"\ea42"}.icon-left-open:before{content:"\ea43"}.icon-lifebuoy:before{content:"\ea44"}.icon-lightning:before{content:"\ea45"}.icon-link-ext:before{content:"\ea46"}.icon-link:before{content:"\ea47"}.icon-url:before{content:"\ea47"}.icon-linkedin:before{content:"\ea48"}.icon-list-bullet:before{content:"\ea49"}.icon-list-numbered:before{content:"\ea4a"}.icon-list:before{content:"\ea4b"}.icon-location:before{content:"\ea4c"}.icon-lock:before{content:"\ea4d"}.icon-login:before{content:"\ea4e"}.icon-mail:before{content:"\ea4f"}.icon-email:before{content:"\ea4f"}.icon-medium:before{content:"\ea50"}.icon-menu:before{content:"\ea51"}.icon-minus:before{content:"\ea52"}.icon-moon-inv:before{content:"\ea53"}.icon-moon:before{content:"\ea54"}.icon-more:before{content:"\ea55"}.icon-network:before{content:"\ea56"}.icon-ok-circled:before{content:"\ea57"}.icon-ok:before{content:"\ea58"}.icon-palette:before{content:"\ea59"}.icon-pause:before{content:"\ea5a"}.icon-phone:before{content:"\ea5b"}.icon-photograph:before{content:"\ea5c"}.icon-picture:before{content:"\ea5d"}.icon-pinterest:before{content:"\ea5e"}.icon-play:before{content:"\ea5f"}.icon-plus:before{content:"\ea60"}.icon-qrcode:before{content:"\ea61"}.icon-question:before{content:"\ea62"}.icon-quote-right:before{content:"\ea63"}.icon-random:before{content:"\ea64"}.icon-reddit:before{content:"\ea65"}.icon-refresh:before{content:"\ea66"}.icon-right-dir:before{content:"\ea67"}.icon-right-open:before{content:"\ea68"}.icon-rocket:before{content:"\ea69"}.icon-search:before{content:"\ea6a"}.icon-shield:before{content:"\ea6b"}.icon-shuffle:before{content:"\ea6c"}.icon-smile-o:before{content:"\ea6d"}.icon-sort:before{content:"\ea6e"}.icon-stackoverflow:before{content:"\ea6f"}.icon-stopwatch:before{content:"\ea70"}.icon-string:before{content:"\ea71"}.icon-sun-inv:before{content:"\ea72"}.icon-telegram:before{content:"\ea73"}.icon-trash-2:before{content:"\ea74"}.icon-trash:before{content:"\ea75"}.icon-twitter:before{content:"\ea76"}.icon-underline:before{content:"\ea77"}.icon-up-dir:before{content:"\ea78"}.icon-up-open:before{content:"\ea79"}.icon-upload:before{content:"\ea7a"}.icon-user:before{content:"\ea7b"}.icon-users:before{content:"\ea7c"}.icon-videocam:before{content:"\ea7d"}.icon-warning:before{content:"\ea7e"}.icon-whatsapp:before{content:"\ea7f"}.icon-wheelchair:before{content:"\ea80"}.icon-windows:before{content:"\ea81"}.icon-wrench:before{content:"\ea82"}.icon-x:before{content:"\ea83"}.icon-youtube-play:before{content:"\ea84"}.datalist-polyfill{list-style:none;display:none;background:#fff;box-shadow:0 2px 2px #999;position:absolute;left:0;top:0;margin:0;padding:0;max-height:300px;overflow-y:auto}.datalist-polyfill:empty{display:none!important}.datalist-polyfill>li{padding:3px;font:13px "Lucida Grande",Sans-Serif}.datalist-polyfill__active{background:#3875d7;color:#fff}date-input-polyfill{z-index:1000!important;max-width:320px!important;width:320px!important}date-input-polyfill .monthSelect-wrapper,date-input-polyfill .yearSelect-wrapper{height:50px;line-height:50px;padding:0;width:40%!important;margin-bottom:10px!important}date-input-polyfill .monthSelect-wrapper select,date-input-polyfill .yearSelect-wrapper select{padding:0 12px;height:50px;line-height:50px;box-sizing:border-box}date-input-polyfill .yearSelect-wrapper{width:35%!important}date-input-polyfill table{width:100%!important;max-width:100%!important;padding:0 12px 12px 12px!important;box-sizing:border-box;margin:0}date-input-polyfill table td:first-child,date-input-polyfill table td:last-child,date-input-polyfill table th:first-child,date-input-polyfill table th:last-child{width:32px!important;padding:4px!important}date-input-polyfill select{margin-bottom:10px}date-input-polyfill button{width:25%!important;height:50px!important;line-height:50px!important;margin-bottom:10px!important;background:inherit;position:relative;color:inherit;padding:inherit;box-sizing:inherit;border-radius:inherit;font-size:inherit;box-shadow:none;border:none;border-bottom:none!important}::placeholder{color:var(--config-color-placeholder);text-align:right}::-webkit-input-placeholder{text-align:right}input:-moz-placeholder{text-align:right}form.inline{display:inline-block}input,textarea{background:var(--config-color-background-input)}input[type=file],input[type=file]::-webkit-file-upload-button{cursor:pointer}.button,button{display:inline-block;background:var(--config-color-focus);border-radius:26px;border:none;color:var(--config-color-background-fade);height:52px;line-height:52px;padding:0 25px;cursor:pointer;font-size:16px;box-sizing:border-box;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.button:focus,.button:hover,button:focus,button:hover{background:var(--config-color-focus-hover)}.button.fly,button.fly{position:fixed;z-index:2;bottom:30px;left:30px}@media only screen and (max-width:550px){.button.fly,button.fly{left:15px}}.button.fill,button.fill{display:block;width:100%;text-align:center;padding:0 10px!important}.button.fill-aligned,button.fill-aligned{display:block;width:100%;text-align:right;padding:0 20px!important}.button.icon,button.icon{padding-left:30px!important}.button.icon-reduce,button.icon-reduce{padding-right:15px!important}.button.reverse,button.reverse{background:0 0;height:50px;line-height:48px;padding:0 23px;color:var(--config-color-focus);border:solid 2px var(--config-color-focus)}.button.reverse:focus,.button.reverse:hover,button.reverse:focus,button.reverse:hover{color:var(--config-color-focus-hover);border-color:var(--config-color-focus-hover)}.button.small,button.small{padding:0 15px;height:40px;line-height:36px;font-size:13px}.button.tick,button.tick{background:var(--config-color-fade-light);color:var(--config-color-dark);border-radius:20px;padding:0 10px;line-height:30px;height:30px;font-size:12px;display:inline-block}.button.tick.selected,button.tick.selected{background:var(--config-color-dark);color:var(--config-color-fade)}.button.round,button.round{width:52px;padding:0}.button.round.small,button.round.small{font-size:12px;width:30px;height:30px;line-height:30px}.button.white,button.white{background:#fff;color:var(--config-color-focus)}.button.white.reverse,button.white.reverse{color:#fff;background:0 0;border:solid 2px #fff}.button.trans,button.trans{background:0 0!important}.button.trans.reverse,button.trans.reverse{background:0 0!important}.button.success,button.success{background:var(--config-color-success)}.button.success.reverse,button.success.reverse{color:var(--config-color-success);background:#fff;border:solid 2px var(--config-color-success)}.button.danger,button.danger{background:var(--config-color-danger);color:#fff}.button.danger.reverse,button.danger.reverse{color:var(--config-color-danger);background:var(--config-color-background-fade);border:solid 2px var(--config-color-danger)}.button.dark,button.dark{background:var(--config-color-dark);color:var(--config-color-background-fade)}.button.dark.reverse,button.dark.reverse{color:var(--config-color-dark);background:var(--config-color-background-fade);border:solid 2px var(--config-color-dark)}.button .disabled,.button.disabled,.button:disabled,button .disabled,button.disabled,button:disabled{color:var(--config-color-normal);background:var(--config-color-background-dark);opacity:.6;cursor:default}.button.link,button.link{background:0 0;border-radius:0;color:var(--config-color-link);height:auto;line-height:normal;padding:0;padding-left:0!important}.button.link:focus,button.link:focus{box-shadow:inherit}.button.strip,button.strip{background:0 0;height:auto;line-height:16px;color:inherit;padding:0 5px}.button.facebook,button.facebook{color:#fff!important;background:#4070b4!important}.button.twitter,button.twitter{color:#fff!important;background:#56c2ea!important}.button.linkedin,button.linkedin{color:#fff!important;background:#0076b5!important}.button.github,button.github{color:#fff!important;background:#7e7c7c!important}.button:focus,button:focus{outline:0}button.close{width:30px;height:30px;line-height:30px;padding:0;margin:0;background:var(--config-color-normal);color:var(--config-color-background-fade);border-radius:50%}button.close .icon-cancel::before{line-height:1}button.close.is-margin-top-10{margin-top:10px}label{margin-bottom:15px;display:block;line-height:normal}label.inline{display:inline}.input,input[type=date],input[type=datetime-local],input[type=email],input[type=file],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=url],select,textarea{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px}.input[type=file],input[type=date][type=file],input[type=datetime-local][type=file],input[type=email][type=file],input[type=file][type=file],input[type=number][type=file],input[type=password][type=file],input[type=search][type=file],input[type=tel][type=file],input[type=text][type=file],input[type=url][type=file],select[type=file],textarea[type=file]{line-height:0;padding:15px;height:auto}.input:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=file]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus,select:focus,textarea:focus{outline:0;border-color:#b3d7fd}.input:disabled,input[type=date]:disabled,input[type=datetime-local]:disabled,input[type=email]:disabled,input[type=file]:disabled,input[type=number]:disabled,input[type=password]:disabled,input[type=search]:disabled,input[type=tel]:disabled,input[type=text]:disabled,input[type=url]:disabled,select:disabled,textarea:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.input.strip,input[type=date].strip,input[type=datetime-local].strip,input[type=email].strip,input[type=file].strip,input[type=number].strip,input[type=password].strip,input[type=search].strip,input[type=tel].strip,input[type=text].strip,input[type=url].strip,select.strip,textarea.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:left 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.input.strip:focus,input[type=date].strip:focus,input[type=datetime-local].strip:focus,input[type=email].strip:focus,input[type=file].strip:focus,input[type=number].strip:focus,input[type=password].strip:focus,input[type=search].strip:focus,input[type=tel].strip:focus,input[type=text].strip:focus,input[type=url].strip:focus,select.strip:focus,textarea.strip:focus{border-color:#b3d7fd}.input:-webkit-autofill::first-line,input[type=date]:-webkit-autofill::first-line,input[type=datetime-local]:-webkit-autofill::first-line,input[type=email]:-webkit-autofill::first-line,input[type=file]:-webkit-autofill::first-line,input[type=number]:-webkit-autofill::first-line,input[type=password]:-webkit-autofill::first-line,input[type=search]:-webkit-autofill::first-line,input[type=tel]:-webkit-autofill::first-line,input[type=text]:-webkit-autofill::first-line,input[type=url]:-webkit-autofill::first-line,select:-webkit-autofill::first-line,textarea:-webkit-autofill::first-line{font-weight:300;font-size:16px}input[type=email],input[type=url]{direction:ltr}input[type=email]::placeholder,input[type=url]::placeholder{text-align:left;direction:ltr}select{background:0 0;-webkit-appearance:none;background-image:var(--config-console-nav-switch-arrow);background-position:left 15px top 50%;background-repeat:no-repeat;background-color:var(--config-color-background-input);width:calc(100% - 62px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-left:45px}select:-webkit-autofill{background-image:url("data:image/svg+xml;utf8,")!important;background-position:100% 50%!important;background-repeat:no-repeat!important}input[type=search],input[type=search].strip{background:0 0;-webkit-appearance:none;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAdZJREFUWIXt1s2LjWEYBvDfnDMzFpNIamZIFrMiJYMyFmKhZKfOwoiFr2LFn2BByG6WVrKwMcjWxgoLIlKIUk6RrzAjZWZ8LO731FlwvB+PUbjq6X0X7/VeV/d9P9fz8IdRL8Hpw3x8w0xaOz9GNxq4gJeZcGs1cRab0fU7xLfgMSYzoT3YgNXYhIO4iM+4iTWphGs4jikcFSXvhEGczr4/UFW8C2N4jXUFudvwCYeqGNgnSr6yJH8rpkWLCqMfE9hdUryFE3iC3qLEk7ij+kT34Q32FiHV8Qr7K4q3cArXihCGxd5elMjARnzBvE4f1dreV+AtnicycC/7/7K8BhaIvqXCO3zFwrwGZtCT0EAtW9N5DTSxWGR/CizNns/yEgbFEK5NZGCnaEPHE7e9Ai9wA6OJDIzistgJubFdxHB/RfFVYgCHixJruI5x5dNwDm6J47sUhkTvjpUw0Y1zeOrXR3hHjOA9zmBuTs4Arog4/yhuUZWwHPdFMh7280BZgiP4ILJ/UuymqRQmejPxphiquzgvKnMJDzOxB9glZqiRiecykbfHdawX98EhcdxO4BGu4nYm2EJDzEKPSMIdYrBnFYUq8d/EP2di1gey3cS4ErflvxffASbhcakIINaMAAAAAElFTkSuQmCC);background-color:var(--config-color-background-input);background-position:right 15px top 50%;background-repeat:no-repeat;background-size:20px 20px;width:calc(100% - 60px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:45px}select[multiple]{min-height:75px;padding:5px 10px!important;padding-left:50px!important}select[multiple] option{padding:10px 4px;border-bottom:solid 1px #f1f1f1}select[multiple] option:last-child{border-bottom:none}textarea{min-height:75px;resize:vertical;line-height:32px;padding:5px 15px}textarea.tall{min-height:180px}fieldset{border:none;margin:0;padding:0}.counter{font-size:13px;text-align:left;color:var(--config-color-fade);margin-top:-20px;margin-bottom:20px}.file-preview{background:var(--config-color-background-input) url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAIElEQVQoU2NkYGAwZsAEZ9GFGIeIQix+wfQgyDODXSEAcUwGCrDSHgkAAAAASUVORK5CYII=)!important;box-shadow:inset 0 0 3px #a0a0a0;border-radius:8px;width:calc(100% - 2px);max-height:180px;visibility:visible!important;object-fit:contain}.video-preview{padding-top:56%;position:relative;border-radius:10px;background:#e7e7e7;overflow:hidden;margin:0}.video-preview iframe{position:absolute;top:0;width:100%;height:100%;border:none}.map-preview{padding-top:50%;position:relative;margin-bottom:10px;border-radius:10px;background:#e7e7e7;overflow:hidden;box-shadow:0 0 30px rgba(218,218,218,.5)}.map-preview iframe{position:absolute;top:0;width:100%;height:100%;border:none}.tooltip{position:relative}.tooltip.large:hover:after{white-space:normal;width:280px}.tooltip.small:hover:after{white-space:normal;width:180px}.tooltip:hover:after{white-space:nowrap;background:var(--config-color-tooltip-background);border-radius:5px;bottom:calc(100% + 6px);color:var(--config-color-tooltip-text);content:attr(data-tooltip);padding:5px 15px;position:absolute;font-size:13px;line-height:20px;z-index:98;right:20%;margin-right:-30px;word-break:break-word}.tooltip:hover:before{border:solid;border-color:var(--config-color-tooltip-background) transparent;border-width:6px 6px 0 6px;bottom:100%;content:"";position:absolute;z-index:99;right:3px}.tooltip.down:hover:after{top:calc(100% + 6px);bottom:inherit}.tooltip.down:hover:before{top:100%;border-width:0 6px 6px 6px;bottom:inherit}.tag{display:inline-block;background:var(--config-color-fade-light);color:var(--config-color-fade);border-radius:12px;line-height:24px;padding:0 8px;font-size:12px;box-shadow:none!important;border:none;height:auto;width:auto;white-space:nowrap;text-overflow:ellipsis}.tag:hover{border:none}.tag.green{background:var(--config-color-success);color:#fff}.tag.red{background:var(--config-color-danger);color:#fff}.tag.yellow{background:#ffe28b;color:#494949}.tag.focus{background:var(--config-color-focus);color:#fff}.tag.dark{background:var(--config-color-dark);color:#e7e7e7}.tag.blue{background:var(--config-color-info);color:#fff}.tag.link{background:var(--config-color-link);color:#fff}input[type=checkbox],input[type=radio]{width:26px;height:16px;position:relative;-webkit-appearance:none;border-radius:0;border:none;background:0 0;vertical-align:middle;margin:0}input[type=checkbox]:after,input[type=radio]:after{content:"";display:block;width:20px;height:20px;background:var(--config-color-background-fade);top:-5px;border-radius:50%;position:absolute;border:solid 3px var(--config-color-focus);vertical-align:middle}input[type=checkbox]:checked:after,input[type=radio]:checked:after{text-align:center;font-family:icon;content:'\ea14';font-size:16px;line-height:20px;color:var(--config-color-background-fade);background:var(--config-color-focus)}input[type=checkbox][type=radio]:checked:after,input[type=radio][type=radio]:checked:after{content:'';display:block;width:10px;height:10px;border-radius:50%;background:var(--config-color-background-fade);border:solid 8px var(--config-color-focus)}input[type=checkbox]:focus,input[type=radio]:focus{outline:0}input[type=checkbox]:focus:after,input[type=checkbox]:hover:after,input[type=radio]:focus:after,input[type=radio]:hover:after{outline:0;border-color:#000}input[type=checkbox]:checked:focus:after,input[type=checkbox]:checked:hover:after,input[type=radio]:checked:focus:after,input[type=radio]:checked:hover:after{border-color:var(--config-color-focus)}input[type=checkbox]:after{border-radius:4px}.input-copy{position:relative}.input-copy::before{content:'';display:block;position:absolute;height:50px;background:var(--config-color-fade-light);width:50px;right:0;border-radius:8px;z-index:1;margin:1px}.input-copy input,.input-copy textarea{padding-left:65px;width:calc(100% - 82px);resize:none}.input-copy .copy{position:absolute;z-index:2;top:0;left:0;border-right:solid 1px var(--config-color-fade-light);height:calc(100% - 2px);width:50px;line-height:50px;text-align:center;background:var(--config-color-background-focus);margin:1px;border-radius:0 9px 9px 0}.paging{color:var(--config-color-fade);padding:0;font-size:12px}.paging form{display:inline-block}.paging button:disabled{color:var(--config-color-background-fade);opacity:.6}.blue-snap iframe{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px;float:none!important;height:40px!important;width:calc(100% - 32px)!important;border:solid 1px #e2e2e2!important;background:0 0!important;position:static!important}.blue-snap iframe[type=file]{line-height:0;padding:15px;height:auto}.blue-snap iframe:focus{outline:0;border-color:#b3d7fd}.blue-snap iframe:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.blue-snap iframe.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:left 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.blue-snap iframe.strip:focus{border-color:#b3d7fd}.blue-snap iframe:-webkit-autofill::first-line{font-weight:300;font-size:16px}.blue-snap .error{font-size:12px;margin-top:-25px;color:var(--config-color-danger);height:40px;padding-right:2px}.pell{height:auto;padding-bottom:0;margin-bottom:0;padding-top:0;background:var(--config-color-background-input);line-height:normal!important;position:relative}.pell.hide{padding:0!important;height:1px;min-height:1px;max-height:1px;border:none;box-shadow:none;margin-bottom:20px;opacity:0}.pell [contenteditable=true]:empty:before{content:attr(placeholder);display:block;color:var(--config-color-placeholder)}.pell .pell-actionbar{border-bottom:solid 1px var(--config-color-fade-light);margin:0 -15px 15px -15px;padding:10px 15px;position:sticky;top:70px;background:var(--config-color-background-input);border-radius:10px 10px 0 0}.pell .pell-content{min-height:100px;display:block;padding:10px;margin:-10px;cursor:text}.pell .pell-content:focus{outline:0}.pell button{background:inherit;color:inherit;margin:0;padding:0;padding-left:15px;height:40px;line-height:40px;box-shadow:none;cursor:pointer;font-size:13px;border-radius:0}.pell button.pell-button-selected,.pell button:focus,.pell button:hover{color:var(--config-color-link)}.pell h1,.pell h2,.pell h3,.pell h4,.pell h5,.pell h6{text-align:inherit;margin-bottom:30px}.pell b,.pell strong{font-weight:700}.pell ol,.pell ul{margin:0 0 20px 0}.pell ol li,.pell ul li{display:list-item!important;list-style:inherit;list-style-position:inside!important;margin:0 20px 2px 20px}.pell ol li p,.pell ul li p{margin:0;display:inline}.pell ol li{list-style:decimal}.pell ol li::before{content:'';display:none}label.switch{line-height:42px}.switch,input[type=checkbox].button.switch,input[type=checkbox].switch{width:52px;height:32px;line-height:32px;border-radius:21px;background:var(--config-color-fade);display:inline-block;margin:0;padding:5px;padding-right:5px;padding-left:30px}.switch.on,.switch:checked,input[type=checkbox].button.switch.on,input[type=checkbox].button.switch:checked,input[type=checkbox].switch.on,input[type=checkbox].switch:checked{background-color:var(--config-color-success);padding-right:25px;padding-left:5px}.switch.on:focus,.switch.on:hover,.switch:checked:focus,.switch:checked:hover,input[type=checkbox].button.switch.on:focus,input[type=checkbox].button.switch.on:hover,input[type=checkbox].button.switch:checked:focus,input[type=checkbox].button.switch:checked:hover,input[type=checkbox].switch.on:focus,input[type=checkbox].switch.on:hover,input[type=checkbox].switch:checked:focus,input[type=checkbox].switch:checked:hover{background:var(--config-color-success)}.switch:focus,.switch:hover,input[type=checkbox].button.switch:focus,input[type=checkbox].button.switch:hover,input[type=checkbox].switch:focus,input[type=checkbox].switch:hover{background:var(--config-color-fade)}.switch:focus:after,.switch:hover:after,input[type=checkbox].button.switch:focus:after,input[type=checkbox].button.switch:hover:after,input[type=checkbox].switch:focus:after,input[type=checkbox].switch:hover:after{background:#fff}.switch:after,input[type=checkbox].button.switch:after,input[type=checkbox].switch:after{content:"";display:block;width:22px;height:22px;background:#fff;border-radius:50%;border:none;position:static;top:0}.password-meter{margin:-41px 10px 30px 10px;height:2px;background:0 0;max-width:100%;z-index:2;position:relative}.password-meter.weak{background:var(--config-color-danger)}.password-meter.medium{background:var(--config-color-success)}.password-meter.strong{background:var(--config-color-success)}.color-input:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.color-input .color-preview{width:53px;height:53px;float:right;margin-left:10px;background:#000;border-radius:10px;box-shadow:inset 0 0 3px #a0a0a0;position:relative}.color-input .color-preview input{opacity:0;position:absolute;top:0;bottom:0;left:0;right:0;width:100%;height:100%;cursor:pointer}.color-input input{text-transform:uppercase;float:right;width:calc(100% - 95px)}.grecaptcha-badge{box-shadow:none!important;border-radius:10px!important;overflow:hidden!important;background:#4d92df!important;bottom:25px}.grecaptcha-badge:hover{width:256px!important}.back{font-size:15px;line-height:24px;height:24px;margin-right:-15px;margin-top:-25px;margin-bottom:20px}.back span{font-weight:inherit!important}@media only screen and (max-width:550px){.back{margin-right:-5px}}hr{height:1px;background:var(--config-border-color)!important;border:none}hr.fade{opacity:.7}.upload{position:relative}.upload:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.upload input{position:absolute;top:0;right:0;opacity:0;cursor:pointer}.upload.single .preview{height:0;position:relative;padding-top:100%;width:100%;margin-bottom:15px!important}.upload.single .preview li{position:absolute;top:0;width:calc(100% - 20px);height:calc(100% - 20px);margin-left:0!important;margin-bottom:0!important}.upload .button{float:right;margin-left:10px!important}.upload .button.disabled,.upload .button.disabled:hover{background:0 0;color:inherit;border-color:inherit}.upload .count{float:right;line-height:52px}.upload .progress{background:var(--config-color-success);height:6px;border-radius:3px;margin-bottom:15px!important}.upload .preview:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.upload .preview li{float:right;margin-left:20px!important;margin-bottom:15px!important;background:var(--config-color-background-fade-super);width:150px;height:150px;line-height:148px;text-align:center;border-radius:20px;overflow:hidden;position:relative;cursor:pointer;border:solid 1px var(--config-color-background-dark)}.upload .preview li:hover:before{background:var(--config-color-focus)}.upload .preview li:before{content:'\ea11';font-family:icon;font-size:12px;position:absolute;width:20px;height:20px;display:block;top:8px;left:8px;text-align:center;line-height:20px;vertical-align:middle;border-radius:50%;background:#484848;color:#fff;z-index:1}.upload .preview li img{vertical-align:middle;max-height:150px;max-width:150px;-webkit-filter:drop-shadow(0 0 6px rgba(0, 0, 0, .3));filter:drop-shadow(0 0 1px rgba(0, 0, 0, .3))}.upload.wide .preview li{height:0;width:100%;position:relative;padding-top:30.547%;background:#e7e7e7;border-radius:10px;overflow:hidden;border:solid 1px #f9f9f9;margin:0}.upload.wide .preview li img{border-radius:10px;position:absolute;top:0;width:100%;display:block;opacity:1;max-width:inherit;max-height:inherit}ol{list-style:none;counter-reset:x-counter;padding:0}ol li{counter-increment:x-counter;line-height:30px;margin-bottom:30px;margin-right:45px}ol li::before{display:inline-block;content:counter(x-counter);color:var(--config-color-background-fade);background:var(--config-color-focus);border:solid 2px var(--config-color-focus);margin-left:15px;margin-right:-45px;width:26px;height:26px;border-radius:50%;text-align:center;line-height:26px}.required{color:var(--config-color-danger);font-size:8px;position:relative;top:-8px}.drop-list{position:relative;outline:0}.drop-list.open ul{display:block}.drop-list ul{position:relative;background:var(--config-color-background-fade);border-radius:10px;border-bottom:none;box-shadow:0 0 3px rgba(0,0,0,.05);display:block;padding:30px;border-radius:4px;box-shadow:0 0 6px rgba(0,0,0,.1);display:none;position:absolute;bottom:calc(100% + 10px);z-index:2;padding:0;right:-10px;max-width:280px;min-width:240px}.drop-list ul.padding-tiny{padding:5px}.drop-list ul.padding-xs{padding:10px}.drop-list ul.padding-small{padding:15px}.drop-list ul.y-scroll{overflow-y:auto}.drop-list ul.danger{background:var(--config-color-danger);color:#fff}.drop-list ul.danger .box{color:var(--config-color-normal);background:var(--config-color-background-fade)}.drop-list ul.danger>.button,.drop-list ul.danger>button{background:#fff;color:var(--config-color-danger)}.drop-list ul.note{background:var(--config-note-background)}.drop-list ul.focus{background:var(--config-color-focus);color:var(--config-color-background-fade)}.drop-list ul.focus .button,.drop-list ul.focus button{background:var(--config-color-background-fade);color:var(--config-color-focus)}.drop-list ul.line{background:0 0;border:solid 1px var(--config-color-background-dark);box-shadow:none}.drop-list ul.warning{background:var(--config-color-warning);color:#2d2d2d}.drop-list ul.warning .button,.drop-list ul.warning button{background:rgba(45,45,45,.8);color:var(--config-color-success)}.drop-list ul .tabs{border-bottom:solid 1px var(--config-border-color);margin:0 -30px;padding:0 30px!important}.drop-list ul>footer{margin:0 -30px -30px -30px;padding:15px 30px;background:var(--config-color-background-fade);border:solid 1px var(--config-border-color);border-radius:0 0 10px 10px}.drop-list ul hr{height:1px;background:var(--config-console-background);border:none;margin:30px -30px}.drop-list ul .label{position:absolute;top:10px;z-index:2;left:10px}.drop-list ul.fade-bottom{position:relative;overflow:hidden}.drop-list ul.fade-bottom:after{content:"";position:absolute;display:block;bottom:15px;width:100%;background:#000;background:linear-gradient(180deg,rgba(0,0,0,0) 0,var(--config-color-background-fade) 80%);height:100px;margin:0 -15px}.drop-list ul .header{position:static;height:40px;padding:20px 30px 20px 30px;margin-bottom:30px;margin:-30px -30px 20px -30px;background:var(--config-color-background-fade);border-bottom:solid 1px #efefef}.drop-list ul ul.numbers>li{position:relative;margin-right:30px;margin-left:50px}.drop-list ul ul.numbers>li hr{margin-right:-60px;margin-left:-80px}.drop-list ul ul.numbers>li .settings{position:absolute;top:3px;left:-50px}.drop-list ul ul.numbers>li::after{display:block;width:25px;height:25px;line-height:25px;font-size:13px;font-weight:500;border-radius:50%;background:var(--config-color-focus);color:var(--config-color-background);counter-increment:section;content:counter(section);text-align:center;position:absolute;top:3px;right:-45px}.drop-list ul .scroll{margin:0 -30px;overflow-y:scroll}.drop-list ul .scroll table{width:100%;margin:0}.drop-list ul ul.sortable{counter-reset:section}.drop-list ul ul.sortable>li [data-move-down].round,.drop-list ul ul.sortable>li [data-move-up].round,.drop-list ul ul.sortable>li [data-remove].round{background:var(--config-color-focus);color:var(--config-color-background-fade);width:25px;height:25px;line-height:25px;display:inline-block;text-align:center;padding:0;margin-left:5px}.drop-list ul ul.sortable>li [data-move-down].round:disabled,.drop-list ul ul.sortable>li [data-move-up].round:disabled,.drop-list ul ul.sortable>li [data-remove].round:disabled{display:none}.drop-list ul ul.sortable>li:first-child [data-move-up]{display:none}.drop-list ul ul.sortable>li:first-child [data-move-up]:disabled{display:inline-block;background:var(--config-color-background)}.drop-list ul ul.sortable>li:last-child [data-move-down]{display:none}.drop-list ul ul.sortable>li:last-child [data-move-down]:disabled{display:inline-block;background:var(--config-color-background)}.drop-list ul .toggle{position:relative;border-top:1px solid var(--config-console-background);border-bottom:1px solid var(--config-console-background);margin:0 -30px;padding:30px 30px 0 30px;height:65px;overflow:hidden}.drop-list ul .toggle.list{border-bottom:none}.drop-list ul .toggle.sorts button.ls-ui-open{width:calc(100% - 100px)}.drop-list ul .toggle button.ls-ui-open{left:0;position:absolute;top:0;width:100%;height:95px;background:0 0;opacity:.5;border-radius:0}.drop-list ul .toggle .icon-minus,.drop-list ul .toggle .icon-up-open{display:none}.drop-list ul .toggle .content{display:none}.drop-list ul .toggle.open{height:auto}.drop-list ul .toggle.open .icon-minus,.drop-list ul .toggle.open .icon-up-open{display:block}.drop-list ul .toggle.open .icon-down-open,.drop-list ul .toggle.open .icon-plus{display:none}.drop-list ul .toggle.open .content{display:block}.drop-list ul .list li{border-bottom:solid 2px var(--config-border-color);margin:0 -30px 30px -30px;padding:0 30px 30px 30px}.drop-list ul .list li:last-child{padding-bottom:0;margin-bottom:0;border-bottom:none}@media only screen and (max-width:550px){.drop-list ul .list li .actions{float:none}}.drop-list ul .list li .avatar{display:block}.drop-list ul .list li .avatar.inline{display:inline-block}.drop-list ul.new{text-align:center}.drop-list ul.new i{font-size:80px;line-height:80px;font-family:Poppins,sans-serif;font-style:normal;font-weight:300}.drop-list ul.new b{margin-top:20px;display:block}.drop-list ul .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.drop-list ul .info hr{background:var(--config-modal-note-border)!important}.drop-list ul .table-wrap{margin:0 -30px;overflow-y:scroll}.drop-list ul .table-wrap table{margin:0}.drop-list ul:before{border:solid;border-color:var(--config-color-background-fade) transparent;border-width:8px 8px 0 8px;bottom:-8px;content:"";position:absolute;z-index:99;right:30px}.drop-list ul.arrow-end:before{left:30px;right:unset}.drop-list ul.no-arrow::before{display:none}.drop-list ul li{border-bottom:solid 1px var(--config-color-fade-super);margin:0;padding:0}.drop-list ul li:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.drop-list ul li:first-child{border-radius:4px 4px 0 0}.drop-list ul li:last-child{border-radius:0 0 4px 4px}.drop-list ul li:hover{background:var(--config-color-fade-super)}.drop-list ul li:first-child:hover,.drop-list ul li:last-child:hover{border-color:transparent}.drop-list ul li .link,.drop-list ul li a,.drop-list ul li button.link{display:block;vertical-align:middle;height:auto;line-height:30px;display:inline-block;padding:10px 15px!important;color:inherit;font-size:14px;border:none;cursor:pointer;width:calc(100% - 30px);text-align:right;box-sizing:content-box}.drop-list ul li.disabled .link:hover,.drop-list ul li.disabled a:hover{background:0 0}.drop-list ul li .avatar{width:30px;height:30px;margin-left:10px;float:right}.drop-list ul li i.avatar{text-align:center;background:var(--config-color-dark);color:var(--config-color-background-fade)}.drop-list ul li:last-child{border-bottom:none}.drop-list.bottom ul{bottom:auto;margin-top:-2px}.drop-list.bottom ul:before{bottom:auto;top:-8px;border-width:0 8px 8px 8px}.drop-list.end ul{left:-10px;right:auto}.disabled{opacity:.2;cursor:default}.disabled .button,.disabled .link,.disabled a,.disabled button{cursor:default!important}.disabled .button:hover,.disabled .link:hover,.disabled a:hover,.disabled button:hover{background:0 0}.tags{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px;background:var(--config-color-background-input);min-height:42px;height:auto;cursor:text}.tags[type=file]{line-height:0;padding:15px;height:auto}.tags:focus{outline:0;border-color:#b3d7fd}.tags:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.tags.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:left 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.tags.strip:focus{border-color:#b3d7fd}.tags:-webkit-autofill::first-line{font-weight:300;font-size:16px}.tags .add{display:inline-block!important;border:none;padding:0;width:auto;margin:0;max-width:100%;min-width:200px}.tags ul.tags-list{display:inline;white-space:pre-line}.tags ul.tags-list li{display:inline-block!important;margin-left:10px;font-size:16px;padding:5px 10px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tags ul.tags-list li::before{float:left;content:'\ea11';font-family:icon;font-style:normal;display:inline-block;text-align:center;line-height:16px;width:16px;height:16px;font-size:12px;background:#000;color:#fff;border-radius:50%;margin-top:4px;margin-bottom:4px;margin-right:6px;margin-left:0}.switch-theme{background:var(--config-switch-background);border-radius:19px;height:26px;width:44px;margin:9px 0}.switch-theme button{padding:3px;display:block;background:0 0;height:26px;width:100%}.switch-theme i{background:var(--config-color-background-fade);border-radius:50%;height:18px;width:18px;line-height:18px;font-size:10px;padding:0;margin:0;color:var(--config-color-fade)}.switch-theme i.force-light{float:left}.switch-theme i.force-dark{float:right}.dot{width:20px;height:20px;background:var(--config-color-fade);border-radius:50%;display:inline-block;vertical-align:middle;margin:0!important;padding:0!important}.dot.danger{background:var(--config-color-danger)!important}.dot.success{background:var(--config-color-success)!important}.dot.warning{background:var(--config-color-warning)!important}.dot.info{background:var(--config-color-info)!important}.ide{background-color:var(--config-prism-background);overflow:hidden;position:relative;z-index:1;box-shadow:0 2px 4px 0 rgba(50,50,93,.3);border-radius:10px;margin-bottom:30px}.ide *{font-family:"Source Code Pro",monospace}.ide[data-lang]::after{content:attr(data-lang-label);display:inline-block;background:#fff;color:#000;position:absolute;top:15px;padding:5px 10px;border-radius:15px;font-size:10px;right:10px;opacity:.95}.ide[data-lang=bash]::after{background:var(--config-language-bash);color:var(--config-language-bash-contrast)}.ide[data-lang=javascript]::after{background:var(--config-language-javascript);color:var(--config-language-javascript-contrast)}.ide[data-lang=web]::after{background:var(--config-language-web);color:var(--config-language-web-contrast)}.ide[data-lang=html]::after{background:var(--config-language-html);color:var(--config-language-html-contrast)}.ide[data-lang=php]::after{background:var(--config-language-php);color:var(--config-language-php-contrast)}.ide[data-lang=nodejs]::after{background:var(--config-language-nodejs);color:var(--config-language-nodejs-contrast)}.ide[data-lang=ruby]::after{background:var(--config-language-ruby);color:var(--config-language-ruby-contrast)}.ide[data-lang=python]::after{background:var(--config-language-python);color:var(--config-language-python-contrast)}.ide[data-lang=go]::after{background:var(--config-language-go);color:var(--config-language-go-contrast)}.ide[data-lang=dart]::after{background:var(--config-language-dart);color:var(--config-language-dart-contrast)}.ide[data-lang=flutter]::after{background:var(--config-language-flutter);color:var(--config-language-flutter-contrast)}.ide[data-lang=android]::after{background:var(--config-language-android);color:var(--config-language-android-contrast)}.ide[data-lang=swift]::after{background:var(--config-language-swift);color:var(--config-language-swift-contrast)}.ide[data-lang=kotlin]::after{background:var(--config-language-kotlin);color:var(--config-language-kotlin-contrast)}.ide[data-lang=java]::after{background:var(--config-language-java);color:var(--config-language-java-contrast)}.ide[data-lang=yaml]::after{background:var(--config-language-yaml);color:var(--config-language-yaml-contrast)}.ide .tag{color:inherit!important;background:0 0!important;padding:inherit!important;font-size:inherit!important;line-height:14px}.ide .copy{cursor:pointer;content:attr(data-lang);display:inline-block;background:#fff;color:#000;position:absolute;transform:translateX(-50%);bottom:-20px;padding:5px 10px;border-radius:15px;font-size:10px;font-style:normal;right:50%;opacity:0;transition:bottom .3s,opacity .3s;line-height:normal;font-family:Poppins,sans-serif}.ide .copy::before{padding-left:5px}.ide:hover .copy{transition:bottom .3s,opacity .3s;opacity:.9;bottom:16px}.ide pre{-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;color:#e6ebf1;font-weight:400;line-height:20px;font-size:13px;margin:0;padding:20px;padding-left:60px}.ide.light{box-shadow:0 2px 4px 0 rgba(50,50,93,.1);background-color:#fff}.ide.light pre{color:#414770}.ide.light .token.cdata,.ide.light .token.comment,.ide.light .token.doctype,.ide.light .token.prolog{color:#91a2b0}.ide.light .token.attr-name,.ide.light .token.builtin,.ide.light .token.char,.ide.light .token.inserted,.ide.light .token.selector,.ide.light .token.string{color:#149570}.ide.light .token.punctuation{color:#414770}.ide.light .language-css .token.string,.ide.light .style .token.string,.ide.light .token.entity,.ide.light .token.operator,.ide.light .token.url,.ide.light .token.variable{color:#414770}.ide.light .line-numbers .line-numbers-rows{background:#f2feef}.ide.light .line-numbers-rows>span:before{color:#5dc79e}.ide.light .token.keyword{color:#6772e4;font-weight:500}code[class*=language-],pre[class*=language-]{text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4}pre[class*=language-]{overflow:auto}:not(pre)>code[class*=language-]{padding:.1em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#6b7c93}.token.punctuation{color:#f8f8f2}.namespace{opacity:.7}.token.constant,.token.deleted,.token.property,.token.symbol,.token.tag{color:#f92672}.token.boolean,.token.number{color:#f79a59}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#3ecf8e}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.class-name,.token.function{color:#45b2e8}.token.keyword{color:#7795f8}.token.important,.token.regex{color:#fd971f}.token.italic{font-style:italic}.token.entity{cursor:help}pre[class*=language-].line-numbers{position:relative;padding-left:60px;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{background:var(--config-prism-numbers);position:absolute;pointer-events:none;top:-20px;bottom:-21px;padding:20px 0;font-size:100%;left:-60px;width:40px;letter-spacing:-1px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{padding-left:5px;pointer-events:none;display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#636365;display:block;padding-right:.8em;text-align:right}.u-margin-inline-end-16{margin-inline-end:16px!important}.console{width:100%;padding:0;overscroll-behavior:none}.console body{position:relative;width:calc(100% - 320px);padding-top:70px;padding-bottom:0;padding-left:50px;padding-right:270px;margin:0;color:var(--config-color-normal);background:var(--config-console-background)}.console body .project-only{display:none!important}.console body.show-nav .project-only{display:inline-block!important}.console body.hide-nav{padding-right:50px;width:calc(100% - 100px)}.console body.hide-nav header{width:calc(100% - 50px)}.console body.hide-nav header .logo{display:inline-block}.console body.hide-nav .console-back{display:block}.console body.hide-nav .console-index{display:none}.console body.hide-nav .account{display:none}.console body.index .console-back{display:none}.console body.index .console-index{display:block}.console body.index .account{display:block}.console body .console-index{display:block}.console body .console-back{display:none}.console main{min-height:480px}.console header{position:fixed;top:0;width:calc(100% - 280px);height:40px;line-height:40px;padding:15px 30px;background:var(--config-color-background-fade);box-shadow:0 0 2px rgba(0,0,0,.1);margin:0 -50px;z-index:2;font-size:14px}.console header .logo{display:none;border:none}.console header .logo:hover{border:none;opacity:.8}.console header .logo img{height:26px;margin:7px 0}.console header .setup-new{width:40px;height:40px;line-height:40px}.console header .list{width:240px}.console header .list select{height:40px;line-height:40px;padding-top:0;padding-bottom:0;border:none;border-radius:26px;background-color:var(--config-console-nav-switch-background);color:var(--config-console-nav-switch-color)}.console header .account{margin-right:25px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.console header .switch-theme{margin:2px 0}.console header .avatar{height:40px;width:40px}.console header .account-button{background:0 0;position:absolute;width:100%;height:40px;border-radius:0;z-index:1}.console header .notifications{position:relative;font-size:20px}.console header .notifications a{color:#1b3445}.console header .notifications:after{position:absolute;content:"";display:block;background:var(--config-color-danger);width:8px;height:8px;border-radius:50%;top:3px;left:3px}.console header nav{background:#1b3445;background:linear-gradient(var(--config-console-nav-start),var(--config-console-nav-end));color:#788c99;position:fixed;height:100%;width:220px;top:0;right:0}.console header nav .logo{height:39px;padding:15px 20px;display:block}.console header nav .logo img{display:inline-block;margin-top:7px;margin-bottom:14px}.console header nav .logo svg g{fill:var(--config-color-focus)}.console header nav .icon{display:block;border:none;margin:18px 10px 50px 10px}.console header nav .icon img{display:block}.console header nav .icon:hover{border-bottom:none}.console header nav .icon:hover svg g{fill:var(--config-color-focus)}.console header nav .container{overflow:auto;height:calc(100% - 133px);width:100%}.console header nav .project-box{padding:20px;text-align:center;display:block;border:none;line-height:100px;height:100px}.console header nav .project-box img{max-height:80px;max-width:80%;display:inline-block;vertical-align:middle}.console header nav .project{display:block;padding:85px 25px 20px 25px;color:#788c99;position:relative;border:none;height:20px}.console header nav .project:hover{border-bottom:none}.console header nav .project .name{height:20px;line-height:20px;margin:0;padding:0;display:inline-block;max-width:100%}.console header nav .project .arrow{display:block;position:absolute;left:5px;top:10px;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #788c99;transform:rotate(225deg)}.console header nav .project img{position:absolute;bottom:40px;display:block;margin-bottom:10px;max-height:35px;max-width:40%}.console header nav .subtitle{padding:0 30px;display:block;font-size:12px;font-weight:300}.console header nav .links{margin-bottom:15px!important}.console header nav .links.top{border:none;padding-bottom:0;margin-bottom:5px!important}.console header nav .links.bottom{position:absolute;bottom:0;left:0;right:0;padding-bottom:0;border:none;margin-bottom:0!important;box-shadow:0 0 10px rgba(0,0,0,.1)}.console header nav .links.bottom a{border-top:solid 1px var(--config-console-nav-border);border-bottom:none}.console header nav .links .sub{display:inline-block;border:none;width:25px;height:25px;line-height:25px;border-radius:50%;padding:0;background:var(--config-color-focus);color:#fff;text-align:center;font-size:12px;margin:18px}.console header nav .links .sub i{width:auto;margin:0}.console header nav .links .sub:hover{border:none}.console header nav .links a{padding:8px 20px;border:none;display:flex;color:#87a5b9;font-weight:400;border-right:solid 5px transparent;font-size:13px}.console header nav .links a i{margin-left:8px;width:22px;display:inline-block}.console header nav .links a.selected,.console header nav .links a:hover{color:#e4e4e4}.console header nav:after{content:'';display:block;position:absolute;background:#302839;height:100px;width:100%;bottom:-100px}.console>footer{width:calc(100% + 100px);margin:0 -50px;box-sizing:border-box;background:0 0;padding-left:30px;padding-right:30px}.console>footer ul{float:none;text-align:center}.console>footer ul li{float:none;display:inline-block}.console .projects{position:relative}.console .projects:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.console .projects li{float:right;margin-left:50px;margin-bottom:50px;width:270px}.console .projects li:nth-child(3n){margin-left:0}.console .dashboard{padding:20px;overflow:visible;position:relative;z-index:1;margin-bottom:2px}.console .dashboard .chart{width:80%}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard .chart{width:100%}}.console .dashboard hr{margin:20px -25px;height:2px;background:var(--config-console-background)}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard hr{height:3px}}.console .dashboard footer{margin:-20px;padding:20px;background:#fcfeff;border:none;color:var(--config-color-link)}.console .dashboard .col{position:relative}.console .dashboard .col:last-child:after{display:none}.console .dashboard .col:after{content:"";display:block;width:2px;background:var(--config-console-background);position:absolute;top:-20px;bottom:-20px;left:24px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard .col:after{width:calc(100% + 40px);height:3px;position:static;margin:20px -20px}}.console .dashboard .value{color:var(--config-color-focus);vertical-align:bottom;line-height:45px}.console .dashboard .value.small{line-height:35px}.console .dashboard .value .sum{font-size:45px;line-height:45px;font-weight:700;vertical-align:bottom}.console .dashboard .value .sum.small{font-size:25px;line-height:25px}.console .dashboard .unit{font-weight:500;line-height:20px;vertical-align:bottom;font-size:16px;display:inline-block;margin-bottom:5px;margin-right:5px;color:var(--config-color-focus)}.console .dashboard .metric{color:var(--config-color-focus);font-weight:400;font-size:13px;line-height:16px}.console .dashboard .range{color:var(--config-color-fade);font-weight:400;font-size:14px;line-height:16px}.console .dashboard a{display:block;font-weight:400;font-size:14px;line-height:16px;padding:0;border:none}.console .dashboard .chart-bar{height:4rem;width:auto;display:flex;align-items:flex-end}@media only screen and (min-width:1199px){.console .dashboard .chart-bar{padding-right:15px}}.console .dashboard .chart-bar .bar{width:12.5%;background-color:var(--config-color-chart-fade);margin:0 2px;border-top:2px solid var(--config-color-chart)}.console .dashboard .chart-bar .bar:hover{background-color:var(--config-color-chart)}.console .dashboard .chart-bar .bar.bar-100{height:100%}.console .dashboard .chart-bar .bar.bar-90{height:90%}.console .dashboard .chart-bar .bar.bar-80{height:80%}.console .dashboard .chart-bar .bar.bar-70{height:70%}.console .dashboard .chart-bar .bar.bar-60{height:60%}.console .dashboard .chart-bar .bar.bar-50{height:50%}.console .dashboard .chart-bar .bar.bar-40{height:40%}.console .dashboard .chart-bar .bar.bar-30{height:30%}.console .dashboard .chart-bar .bar.bar-20{height:20%}.console .dashboard .chart-bar .bar.bar-10{height:10%}.console .dashboard .chart-bar .bar.bar-0{height:0%}.console .dashboard .chart-bar .bar.bar-0{border-top:1px solid var(--config-color-chart)}.console .dashboard .chart-bar .bar.bar-5{height:5%}.console .chart-metric{width:19%}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (max-width:550px){.console .chart-metric{width:100%}}.console .chart{width:100%;position:relative;height:0;padding-top:20px;padding-bottom:26%;margin-left:-2px;overflow:hidden;background-color:var(--config-color-background-fade);background-image:linear-gradient(transparent 1px,transparent 1px),linear-gradient(90deg,transparent 1px,transparent 1px),linear-gradient(var(--config-border-color) 1px,transparent 1px),linear-gradient(90deg,var(--config-border-color) 1px,transparent 1px);background-size:100px 100px,100px 100px,20px 20px,20px 20px;background-position:-2px -2px,-2px -2px,-1px -1px,-1px -1px;background-repeat:round;border:solid 1px var(--config-border-color);border-right:solid 1px transparent;border-bottom:solid 1px transparent}.console .chart.background-image-no{background-image:none}.console .chart.border-no{border:none}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (max-width:550px){.console .chart{width:100%;padding-bottom:32%;float:none;margin-bottom:20px}}.console .chart canvas{position:absolute;bottom:0;display:block;height:100%;width:100%}.console .chart-notes{font-size:12px}.console .chart-notes.crud li.create,.console .chart-notes.crud li:nth-child(1){color:#00b680}.console .chart-notes.crud li.create::before,.console .chart-notes.crud li:nth-child(1)::before{background:#00b680}.console .chart-notes.crud li.read,.console .chart-notes.crud li:nth-child(2){color:#009cde}.console .chart-notes.crud li.read::before,.console .chart-notes.crud li:nth-child(2)::before{background:#009cde}.console .chart-notes.crud li.update,.console .chart-notes.crud li:nth-child(3){color:#696fd7}.console .chart-notes.crud li.update::before,.console .chart-notes.crud li:nth-child(3)::before{background:#696fd7}.console .chart-notes.crud li.delete,.console .chart-notes.crud li:nth-child(4){color:#da5d95}.console .chart-notes.crud li.delete::before,.console .chart-notes.crud li:nth-child(4)::before{background:#da5d95}.console .chart-notes li{line-height:20px;display:inline-block;margin-left:15px}.console .chart-notes li::before{display:inline-block;content:'';width:14px;height:14px;background:var(--config-color-normal);border-radius:50%;margin-left:8px;vertical-align:middle}.console .chart-notes li.blue,.console .chart-notes li:nth-child(1){color:var(--config-color-chart)}.console .chart-notes li.blue::before,.console .chart-notes li:nth-child(1)::before{background:var(--config-color-chart)}.console .chart-notes li.green,.console .chart-notes li:nth-child(2){color:#4eb55b}.console .chart-notes li.green::before,.console .chart-notes li:nth-child(2)::before{background:#4eb55b}.console .chart-notes li.orange,.console .chart-notes li:nth-child(3){color:#ec9323}.console .chart-notes li.orange::before,.console .chart-notes li:nth-child(3)::before{background:#ec9323}.console .chart-notes li.red,.console .chart-notes li:nth-child(4){color:#dc3232}.console .chart-notes li.red::before,.console .chart-notes li:nth-child(4)::before{background:#dc3232}.console .community a{padding:0 10px;display:inline-block}.console .link-list li{margin-bottom:15px}.console .link-list i{display:inline-block;width:30px;height:30px;line-height:30px;text-align:center;background:var(--config-color-fade);color:var(--config-color-fade-super);border-radius:50%;margin-left:15px}.console .link-list i.fade{background:0 0;color:var(--config-color-fade)}.console .provider{width:50px;height:50px;background:var(--config-color-background-focus);color:#868686;line-height:50px;text-align:center;font-size:25px;border-radius:50%}.console .provider.facebook{color:#fff;background:#3b5998}.console .provider.twitter{color:#fff;background:#55beff}.console .provider.telegram{color:#fff;background:#3ba9e1}.console .provider.github{color:#fff;background:#24292e}.console .provider.whatsapp{color:#fff;background:#25d366}.console .provider.linkedin{color:#fff;background:#1074af}.console .provider.microsoft{color:#fff;background:#137ad4}.console .provider.google{color:#fff;background:#4489f1}.console .provider.bitbucket{color:#fff;background:#2a88fb}.console .provider.gitlab{color:#faa238;background:#30353e}.console .provider.instagram{color:#fff;background:radial-gradient(circle at 30% 107%,#fdf497 0,#fdf497 5%,#fd5949 45%,#d6249f 60%,#285aeb 90%)}.console .premium{z-index:3;margin-top:320px}.console .premium .message{height:190px;overflow:hidden;position:absolute;top:-280px}.console .premium:after{content:'';position:absolute;top:0;left:-20px;right:-20px;bottom:-20px;background:var(--config-color-background);opacity:.7;z-index:300}.console .app-section{height:90px}.console .confirm{background:var(--config-color-link);color:#fff;border-radius:25px;padding:12px;line-height:28px;text-align:center}.console .confirm .action{font-weight:500;cursor:pointer}.console .platforms{overflow:hidden}.console .platforms .box{overflow:hidden}.console .platforms .box img{width:50px;margin:0 auto;margin-bottom:20px}.console .platforms .box .cover{margin:-30px -30px 30px -30px;padding:30px}.console .platforms .box .cover.android{background:#a4ca24}.console .platforms .box .cover.android h1{color:#fff;font-size:18px;margin-top:20px}.console .platforms .col{text-align:center;line-height:30px}.console .platforms a{display:block;margin:-20px;padding:20px}.console .platforms a:hover{background:#fbfeff}.console .platforms img{display:block;margin:0 30px;width:calc(100% - 60px);border-radius:50%;margin-bottom:20px}.console .document-nav{display:none;position:sticky;top:90px}@media only screen and (min-width:1380px){.console .document-nav{display:block}}.console .document-nav ul{position:absolute;width:200px;right:-260px}.console .document-nav ul li{margin-bottom:20px}.console .document-nav ul li .selected{font-weight:500}@media only screen and (min-width:1199px){.console .logo .top{display:none!important}}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console>header{width:calc(100% - 30px)!important;margin:0 -30px;padding:15px}.console>header nav{width:100%;height:70px;overflow:hidden}.console>header nav.close{background:0 0}.console>header nav.close .logo .nav{display:none!important}.console>header nav.open{height:100%}.console>header nav.open .logo .top{display:none!important}.console>header nav.open .bottom{display:block!important}.console>header nav.open button{color:#87a5b9}.console>header nav button{margin:9px;background:0 0;color:var(--config-color-normal)}.console>header nav button:focus,.console>header nav button:hover{background:0 0}.console>header nav .logo{display:block!important;position:absolute;top:0;left:50%;margin:auto;transform:translateX(-50%)}.console>header nav .bottom{display:none!important}.console>footer{width:auto;margin:50px -30px 0 -30px!important;padding:0 30px 30px 30px}.console body{height:"calc(100% - 70px)"!important;width:calc(100% - 60px)!important;padding:70px 30px 0 30px!important}.console .cover{padding:25px 30px;margin:0 -30px}}@media only screen and (max-width:550px){.console body{height:"calc(100% - 70px)"!important;width:calc(100% - 40px)!important;padding:70px 20px 0 20px!important}.console .cover{padding:20px 20px;margin:0 -20px}.console>header{margin:0 -20px}.console>header .list{width:175px;font-size:14px}.console>footer{margin:50px -20px 0 -20px!important;padding:0 20px 20px 20px}}.dev-feature{display:none}.prod-feature{display:none}.development .dev-feature{display:block;opacity:.6!important;outline:solid #ff0 3px;outline-offset:3px}.development .dev-feature.dev-inline{display:inline-block}.development .prod-feature{display:none}.production .dev-feature{display:none}.production .prod-feature{display:block}.search{opacity:1!important}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.search button{margin-top:20px}}html.home body{padding:0 50px;color:var(--config-color-normal)}html.home .logo a{display:block}html.home .logo a:hover{opacity:.8}html.home .logo img{max-height:35px;width:198px;margin:45px auto 25px auto}html.home footer{background:0 0;text-align:center}html.home main{min-height:400px}.alerts ul{width:100%;visibility:hidden;position:fixed;padding:0;left:0;right:0;color:var(--config-color-normal);z-index:1001;margin:0 auto;bottom:15px;max-width:560px}.alerts ul li{margin:10px 0 0 0;padding:0}.alerts ul li div.message{position:relative;padding:12px 35px;margin:0 auto;list-style:none;background:var(--config-color-background-dark);text-align:center;font-size:14px;border-radius:10px;line-height:16px;min-height:16px;box-shadow:0 0 10px rgba(0,0,0,.05);opacity:.95}.alerts ul li div.message a,.alerts ul li div.message span{font-weight:600}.alerts ul li div.message a{border-bottom:dotted 1px var(--config-color-normal)}.alerts ul li div.message i{cursor:pointer;position:absolute;font-size:14px;line-height:20px;top:9px;right:9px;color:var(--config-color-background-dark);background:var(--config-color-normal);width:22px;height:22px;border-radius:50%}.alerts ul li div.message.error{color:#fff!important;background:var(--config-color-danger)!important}.alerts ul li div.message.error a{color:#fff!important;border-bottom:dotted 1px #fff!important}.alerts ul li div.message.error i{color:var(--config-color-danger);background:#fff}.alerts ul li div.message.success{color:#fff!important;background:var(--config-color-success)!important}.alerts ul li div.message.success a{color:#fff;border-bottom:dotted 1px #fff}.alerts ul li div.message.success i{color:var(--config-color-success);background:#fff}.alerts ul li div.message.warning{color:var(--config-color-normal)!important;background:var(--config-color-warning)!important}.alerts ul li div.message.warning a{color:var(--config-color-normal)!important;border-bottom:dotted 1px var(--config-color-normal)!important}.alerts ul li div.message.warning i{color:#fff;background:var(--config-color-normal)!important}.alerts ul li div.message.open{display:block}.alerts ul li div.message.close{display:none}.alerts .cookie-alert{background:var(--config-color-focus-fade)!important;color:var(--config-color-focus)}.alerts .cookie-alert a{color:var(--config-color-focus);font-weight:400;border-bottom:dotted 1px var(--config-color-focus)!important}.alerts .cookie-alert i{color:var(--config-color-focus-fade)!important;background:var(--config-color-focus)!important}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.alerts ul{top:auto;bottom:0;max-width:100%;right:0}.alerts ul li{margin:5px 0 0 0}.alerts ul li div.message{border-radius:0}}.show-nav .alerts ul{right:220px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.show-nav .alerts ul{right:0}}article{overflow-wrap:break-word;word-wrap:break-word}article h1{font-size:36px}article h2{font-size:24px}article h3{font-size:20px}article h4{font-size:20px}article h5{font-size:18px}article h6{font-size:16px}article h1,article h2,article h3,article h4,article h5,article h6{margin-top:30px!important;margin-bottom:30px!important}article p{line-height:32px;font-size:16px}article .update{display:block;margin-top:50px!important}article table{width:100%;margin:0;margin-bottom:30px!important;border-radius:0;border-bottom:solid 1px var(--config-border-color)}article table thead td{font-weight:500;padding:5px 15px}article table td,article table th{padding:15px;height:auto}article table td:first-child,article table th:first-child{padding-right:10px}article table td:last-child,article table th:last-child{padding-left:10px}article table td p,article table th p{font-size:inherit;line-height:inherit}article table td p:last-child,article table th p:last-child{margin:0}.avatar-container{position:relative}.avatar-container .corner{position:absolute;bottom:-3px;left:-3px}.avatar{width:60px;height:60px;border-radius:50%;background:var(--config-color-background-focus);display:inline-block;overflow:hidden;box-shadow:0 0 6px rgba(0,0,0,.09);position:relative;z-index:1;opacity:1!important}.avatar.hide{display:none}.avatar:before{width:100%;height:100%;z-index:0}.avatar.inline{display:inline-block;vertical-align:middle}.avatar.trans{background:0 0}.avatar .no-shadow{box-shadow:none}.avatar.xs{width:30px;height:30px}.avatar.xxs{width:20px;height:20px}.avatar.small{width:50px;height:50px}.avatar.big{width:100px;height:100px}.avatar.huge{width:150px;height:150px}.box{position:relative;background:var(--config-color-background-fade);border-radius:10px;border-bottom:none;box-shadow:0 0 3px rgba(0,0,0,.05);display:block;padding:30px}.box.padding-tiny{padding:5px}.box.padding-xs{padding:10px}.box.padding-small{padding:15px}.box.y-scroll{overflow-y:auto}.box.danger{background:var(--config-color-danger);color:#fff}.box.danger .box{color:var(--config-color-normal);background:var(--config-color-background-fade)}.box.danger>.button,.box.danger>button{background:#fff;color:var(--config-color-danger)}.box.note{background:var(--config-note-background)}.box.focus{background:var(--config-color-focus);color:var(--config-color-background-fade)}.box.focus .button,.box.focus button{background:var(--config-color-background-fade);color:var(--config-color-focus)}.box.line{background:0 0;border:solid 1px var(--config-color-background-dark);box-shadow:none}.box.warning{background:var(--config-color-warning);color:#2d2d2d}.box.warning .button,.box.warning button{background:rgba(45,45,45,.8);color:var(--config-color-success)}.box .tabs{border-bottom:solid 1px var(--config-border-color);margin:0 -30px;padding:0 30px!important}.box>footer{margin:0 -30px -30px -30px;padding:15px 30px;background:var(--config-color-background-fade);border:solid 1px var(--config-border-color);border-radius:0 0 10px 10px}.box hr{height:1px;background:var(--config-console-background);border:none;margin:30px -30px}.box .label{position:absolute;top:10px;z-index:2;left:10px}.box.fade-bottom{position:relative;overflow:hidden}.box.fade-bottom:after{content:"";position:absolute;display:block;bottom:15px;width:100%;background:#000;background:linear-gradient(180deg,rgba(0,0,0,0) 0,var(--config-color-background-fade) 80%);height:100px;margin:0 -15px}.box .header{position:static;height:40px;padding:20px 30px 20px 30px;margin-bottom:30px;margin:-30px -30px 20px -30px;background:var(--config-color-background-fade);border-bottom:solid 1px #efefef}.box ul.numbers>li{position:relative;margin-right:30px;margin-left:50px}.box ul.numbers>li hr{margin-right:-60px;margin-left:-80px}.box ul.numbers>li .settings{position:absolute;top:3px;left:-50px}.box ul.numbers>li::after{display:block;width:25px;height:25px;line-height:25px;font-size:13px;font-weight:500;border-radius:50%;background:var(--config-color-focus);color:var(--config-color-background);counter-increment:section;content:counter(section);text-align:center;position:absolute;top:3px;right:-45px}.box .scroll{margin:0 -30px;overflow-y:scroll}.box .scroll table{width:100%;margin:0}.box ul.sortable{counter-reset:section}.box ul.sortable>li [data-move-down].round,.box ul.sortable>li [data-move-up].round,.box ul.sortable>li [data-remove].round{background:var(--config-color-focus);color:var(--config-color-background-fade);width:25px;height:25px;line-height:25px;display:inline-block;text-align:center;padding:0;margin-left:5px}.box ul.sortable>li [data-move-down].round:disabled,.box ul.sortable>li [data-move-up].round:disabled,.box ul.sortable>li [data-remove].round:disabled{display:none}.box ul.sortable>li:first-child [data-move-up]{display:none}.box ul.sortable>li:first-child [data-move-up]:disabled{display:inline-block;background:var(--config-color-background)}.box ul.sortable>li:last-child [data-move-down]{display:none}.box ul.sortable>li:last-child [data-move-down]:disabled{display:inline-block;background:var(--config-color-background)}.box .toggle{position:relative;border-top:1px solid var(--config-console-background);border-bottom:1px solid var(--config-console-background);margin:0 -30px;padding:30px 30px 0 30px;height:65px;overflow:hidden}.box .toggle.list{border-bottom:none}.box .toggle.sorts button.ls-ui-open{width:calc(100% - 100px)}.box .toggle button.ls-ui-open{left:0;position:absolute;top:0;width:100%;height:95px;background:0 0;opacity:.5;border-radius:0}.box .toggle .icon-minus,.box .toggle .icon-up-open{display:none}.box .toggle .content{display:none}.box .toggle.open{height:auto}.box .toggle.open .icon-minus,.box .toggle.open .icon-up-open{display:block}.box .toggle.open .icon-down-open,.box .toggle.open .icon-plus{display:none}.box .toggle.open .content{display:block}.box .list li{border-bottom:solid 2px var(--config-border-color);margin:0 -30px 30px -30px;padding:0 30px 30px 30px}.box .list li:last-child{padding-bottom:0;margin-bottom:0;border-bottom:none}@media only screen and (max-width:550px){.box .list li .actions{float:none}}.box .list li .avatar{display:block}.box .list li .avatar.inline{display:inline-block}.box.new{text-align:center}.box.new i{font-size:80px;line-height:80px;font-family:Poppins,sans-serif;font-style:normal;font-weight:300}.box.new b{margin-top:20px;display:block}.box .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.box .info hr{background:var(--config-modal-note-border)!important}.box .table-wrap{margin:0 -30px;overflow-y:scroll}.box .table-wrap table{margin:0}a.box{border-right:none;border-left:none}a.box:hover{box-shadow:0 0 1px rgba(0,0,0,.2);opacity:.7}.box-asidex{padding-left:25px!important;padding-right:70px;left:0;background:#f9f9f9;border-radius:0 10px 10px 0;height:calc(100% - 30px);position:absolute;padding-top:30px}.box-asidex:after{content:"";display:block;position:absolute;height:100%;width:51px;background:#fff;top:0;bottom:0;right:-6px}.cover{background:var(--config-color-focus-fade);padding:30px 50px;margin:0 -50px;position:relative;border-bottom:solid 1px var(--config-border-fade)}.cover .title,.cover h1,.cover h2,.cover h3,.cover h4{color:var(--config-color-focus);font-weight:600;margin-bottom:50px!important;font-size:28px;line-height:42px}.cover .title span,.cover h1 span,.cover h2 span,.cover h3 span,.cover h4 span{font-weight:600}.cover i:before{margin:0!important}.cover p{color:var(--config-color-fade)}.cover .button{color:#fff}.cover .link,.cover a{display:inline-flex;color:var(--config-color-focus);border-left:none;border-right:none;cursor:pointer}.cover .link:hover,.cover a:hover{border-bottom-color:var(--config-color-focus)}.cover .link i,.cover a i{margin-right:.2rem}.console .database .row .col{height:452px}.console .database .row .col:after{width:2px;left:20px}.console .database hr{margin:0 -20px;background:var(--config-color-background);height:1px}.console .database h3{font-size:13px;line-height:20px;height:20px;background-color:var(--config-color-fade-super);margin:-20px -20px 0 -20px;padding:10px 20px;border-bottom:solid 1px var(--config-color-background);font-weight:600}.console .database .empty{height:162px;font-size:12px;text-align:center;margin:50px 0}.console .database .empty h4{font-size:13px;font-weight:600;line-height:120px}.console .database .search{background-color:var(--config-color-fade-super);margin:0 -20px 0 -20px;padding:10px 15px}.console .database .search input{height:40px;background-color:#fff;border-radius:25px;padding-top:0;padding-bottom:0}.console .database .code{height:411px;background:var(--config-color-fade-super);margin:0 -20px -20px -20px;padding:20px;width:calc(100% - 10px)}.console .database .code .ide{overflow:scroll;height:451px;margin:-20px;box-shadow:none;border-radius:0}.console .database .paging{background:var(--config-color-fade-super);margin:0 -20px -20px -20px;padding:20px}.console .database .button{margin:0 -20px;padding:0 20px!important;text-align:inherit;color:var(--config-color-focus);width:100%;font-size:15px;line-height:55px;box-sizing:content-box}.console .database .button i{margin-left:8px}.console .database .button:hover{border:none;background:var(--config-color-focus-fade)}.console .database .items{margin:0 -20px;height:262px;overflow-x:hidden;overflow-y:scroll}.console .database .items form{opacity:0;position:relative}.console .database .items form button{position:absolute;top:0;bottom:0;right:0;left:0;width:100%;height:45px;border-radius:0;cursor:pointer}.console .database .items li{padding:0;margin:0 0;line-height:45px;font-size:15px;padding-right:50px;padding-left:30px;position:relative}.console .database .items li i{position:absolute;display:none;left:10px}.console .database .items li .name{display:inline-block;width:100%;height:28px}.console .database .items li.selected,.console .database .items li:hover{background:#f5f5f5}.console .database .items li.selected i,.console .database .items li:hover i{display:block}.console .database .items li:last-child{border-bottom:none}body>footer{color:var(--config-color-fade);line-height:40px;margin:0 -50px;padding:12px 50px;font-size:13px;width:100%;background:#f1f1f1;position:relative;margin-top:80px!important}body>footer:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}body>footer .logo img{height:22px;padding-top:12px}body>footer a{display:inline-flex;color:var(--config-color-fade);font-size:13px}body>footer a:hover{border-bottom-color:var(--config-color-fade)}body>footer a i{margin-right:.2rem}body>footer ul{display:flex;justify-content:center}body>footer ul:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}body>footer ul li{font-size:13px;float:right;margin-left:20px!important}body>footer .copyright{padding-right:2px}.loader{height:0;direction:ltr;position:fixed;top:0;width:0;margin:0 auto;right:0;opacity:0;z-index:4}.load-start~.loader{width:100%;background:var(--config-color-focus);height:3px;opacity:1;transition:width .3s ease-out,opacity .5s ease-out;-moz-transition:width .3s ease-out,opacity .5s ease-out;-webkit-transition:width .3s ease-out,opacity .5s ease-out;-o-transition:width .3s ease-out,opacity .5s ease-out}.www .load-start~.loader{background:#fff}.load-start>*{opacity:0}.load-end>*{opacity:1;transition:opacity .3s ease-out;-moz-transition:opacity .3s ease-out;-webkit-transition:opacity .3s ease-out;-o-transition:opacity .3s ease-out}[data-ls-if]{display:none}[data-service]{opacity:0}.load-service-start{opacity:0}.load-service-end{opacity:1;transition:opacity .5s ease-out;-moz-transition:opacity .5s ease-out;-webkit-transition:opacity .5s ease-out;-o-transition:opacity .5s ease-out}.load-screen{z-index:100000;position:fixed;height:100%;width:100%;background-color:var(--config-color-background-focus);top:0;right:0}.load-screen.loaded{transition:opacity 1s ease-in-out,top 1s .7s;opacity:0;top:-100%}.load-screen .animation{position:absolute;top:45%;left:50%;transform:translate(-50%,-50%) translateZ(1px);width:140px;height:140px}.load-screen .animation div{box-sizing:border-box;display:block;position:absolute;width:124px;height:124px;margin:10px;border:10px solid var(--config-color-focus);border-radius:50%;animation:animation 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--config-color-focus) transparent transparent transparent}.load-screen .animation div:nth-child(1){animation-delay:-.45s}.load-screen .animation div:nth-child(2){animation-delay:-.3s}.load-screen .animation div:nth-child(3){animation-delay:-.15s}@keyframes animation{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.load-screen img{position:absolute;height:20px;bottom:60px;left:50%;transform:translate(-50%,-50%)}.modal-open .modal-bg,.modal-open body .modal-bg{position:fixed;content:'';display:block;width:100%;height:100%;left:0;right:0;top:0;bottom:0;background:#0c0c0c;opacity:.75;z-index:5}.modal{overflow:auto;display:none;position:fixed;transform:translate3d(0,0,0);width:100%;max-height:90%;max-width:640px;background:var(--config-color-background-fade);z-index:1000;box-shadow:0 0 4px rgba(0,0,0,.25);padding:30px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:10px;box-sizing:border-box;text-align:right;white-space:initial;line-height:normal}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.modal{width:calc(100% - 20px)}}.modal.full{max-width:none;max-height:none;height:100%;border-radius:0;padding:80px 120px}.modal.full h1{font-weight:700}.modal.padding-tiny{padding:5px}.modal.padding-xs{padding:10px}.modal.padding-small{padding:15px}.modal.height-tiny>form{height:100px}.modal.height-small>form{height:220px}.modal.width-small{max-width:400px}.modal.width-medium{max-width:500px}.modal.width-large{max-width:800px}.modal.open{display:block}.modalbutton.close{display:none}.modal.fill{height:95%;max-height:95%;max-width:75%}.modal h1,.modal h2{margin-bottom:25px;margin-top:0;font-size:20px;text-align:right}.modal h1,.modal h2,.modal h3,.modal h4,.modal h5,.modal h6{color:inherit!important;line-height:35px}.modal .main,.modal>form{position:relative;border-top:solid 1px var(--config-border-color);padding:30px 30px 0 30px;margin:0 -30px}.modal .main.strip,.modal>form.strip{border:none;padding:0;margin:0}.modal .separator{margin:20px -30px}.modal .bullets{padding-right:40px}.modal .bullets li{margin-bottom:30px!important}.modal .bullets li:before{position:absolute}.modal .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.modal .ide.strech{box-shadow:none;border-radius:0;margin:0 -30px}.modal .ide pre{overflow:auto}.modal .paging form{padding:0;margin:0;border-top:none}.modal.sticky-footer form footer{margin:-30px}.modal.sticky-footer footer{position:sticky;bottom:-30px;background:var(--config-color-background-fade-super);height:50px;z-index:1;padding:30px;box-shadow:0 0 1px rgba(0,0,0,.15)}.modal.sticky-footer footer form{display:inline-block}[data-views-current="0"] .scroll-to,[data-views-current="1"] .scroll-to{opacity:0!important}.scroll-to-bottom .scroll-to,.scroll-to-top .scroll-to{opacity:1}.scroll-to{opacity:0;display:block;width:40px;height:40px;line-height:40px;border-radius:50%;position:fixed;transform:translateZ(0);margin:30px;padding:0;bottom:0;font-size:18px;z-index:100000;transition:opacity .15s ease-in-out;left:0}.phases{list-style:none;margin:0;padding:0;position:relative}.phases li{display:none}.phases li .badge{display:none}.phases li li{display:block}.phases li.selected{display:block}.phases .number{display:none}.phases h2,.phases h3,.phases h4,.phases h5,.phases h6{margin:0 0 30px 0;text-align:inherit}.container{position:relative}.container .tabs{height:55px;line-height:55px;list-style:none;padding:0;margin-bottom:50px!important;margin-top:-55px;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.container .tabs:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.container .tabs li{position:relative}.container .tabs .badge{background:var(--config-color-focus);color:var(--config-color-background-fade);display:inline-block;border-radius:15px;width:15px;height:15px;margin:10px;line-height:15px;padding:3px;text-align:center;font-weight:500!important;position:absolute;top:-5px;right:-35px;font-size:12px}.container .tabs .selected{font-weight:400;color:var(--config-color-focus);opacity:1}.container .tabs .selected:after{content:"";display:block;height:2px;background:var(--config-color-focus);width:calc(100% + 6px);margin:0 -3px;position:absolute;bottom:0;border-radius:2px}.container .tabs .number{display:none}.container .tabs li{float:right;margin-left:50px;color:var(--config-color-focus);opacity:.9;cursor:pointer}.container .tabs li:focus{outline:0}@media only screen and (max-width:550px){.container .tabs li{margin-left:25px}}.container .icon{display:none}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.container .tabs{width:auto;overflow-x:scroll;overflow-y:hidden;white-space:nowrap}.container .tabs li{display:inline-block;float:none}}.preview-box{display:grid;place-content:center;padding:40px;background:var(--config-color-background-fade);border:1px dashed var(--config-color-background-dark);border-radius:8px}.preview-box-image{display:grid;place-content:center;width:40px;height:40px;margin-inline:auto;background-color:var(--config-color-background-focus);border-radius:50%}.preview-box-text{margin-top:16px;color:var(--config-color-fade)}.upload-box{--p-header-text-color:var(--config-color-background-fade);--p-header-bg-color:var(--config-color-normal);--p-content-text-color:var(--config-color-normal);--p-content-bg-color:var(--config-color-background-fade);--p-border-color:var(--config-modal-note-border);--box-shadow:0 10px 10px rgba(0, 0, 0, 0.05);--border-radius:6px;--transition:0.2s;position:fixed;z-index:1;overflow:hidden;min-width:285px;box-shadow:var(--box-shadow);border-radius:var(--border-radius);font-size:14px;line-height:1}.upload-box *{all:unset;display:revert}.upload-box-header{display:flex;padding:16px;padding-inline-end:21px;color:var(--p-header-text-color);background-color:var(--p-header-bg-color)}.upload-box-header .icon-button{margin-inline-start:16px}.upload-box-title{align-self:center;margin-inline-end:auto;margin-block-end:0}.upload-box-title .amount::before{content:"("}.upload-box-title .amount::after{content:")"}.upload-box-content{background-color:var(--p-content-bg-color);color:var(--p-content-text-color);height:0;overflow:auto;transition:var(--transition)}.upload-box-content.is-open{height:200px}.upload-box-item{display:flex;align-items:center;padding:13px 20px}.upload-box-item .file-name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;align-self:center;margin-inline-end:auto;line-height:normal}.upload-box-item .icon-button{align-self:center;margin-inline-start:16px}.upload-box-item .pill{margin-inline-start:8px}.upload-box-item:not(:last-child){border-bottom:solid 1px var(--p-border-color)}@media only screen and (max-width:550px){.upload-box{inset-inline:16px;inset-block-end:20px}}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (min-width:1199px){.upload-box{max-width:285px;inset-inline-end:24px;inset-block-end:24px}}:root .theme-dark .upload-box{--p-header-text-color:#fff;--p-header-bg-color:var(--config-color-background-dark)}.upload-image{--p-upload-image-size:var(--upload-image-size, 40px);--p-upload-bg-color:var(--config-color-fade-super);--p-upload-icon-color:var(--config-color-fade);position:relative;display:grid;place-content:center;flex-shrink:0;width:var(--p-upload-image-size);height:var(--p-upload-image-size);background-color:var(--p-upload-bg-color);color:var(--p-upload-icon-color);border-radius:50%}.upload-image .icon{position:relative;z-index:20}.upload-image .progress{--progress:var(--progress-value, 0);--zero-value:0 0% 0%/0%;position:absolute;z-index:10;inset:0;border-radius:50%;background:radial-gradient(var(--p-upload-bg-color) 0,var(--p-upload-bg-color) 64%,transparent 64.01%,transparent 100%),conic-gradient(hsl(194 66% 50%) 0,hsl(97 66% 50%) calc(var(--progress) * 1%),hsl(var(--zero-value)) calc(var(--progress) * 1%),hsl(var(--zero-value)) 100%)}.upload-image.is-finished .progress{display:none}:root .theme-dark .upload-image{--p-upload-bg-color:var(--config-color-background-dark);--p-upload-icon-color:var(--config-color-focus)}.icon-button{--p-icon-button-size:var(--icon-button-size, 20px);width:var(--p-icon-button-size);height:var(--p-icon-button-size);font-size:var(--p-icon-button-size);transition:.2s;line-height:1;text-align:center;flex-shrink:0;cursor:pointer}.icon-button>::before{margin:0}.icon-button.is-open{transform:rotate(180deg)}.icon-button.is-success{color:var(--config-color-success)}.icon-button:focus,.icon-button:hover{background-color:unset}.icon-button:focus-visible{outline:dashed 1px var(--config-color-primary)}.pill{--p-pill-text-color:var(--config-defalut-color-hsl, var(--pill-text-color));color:hsl(var(--p-pill-text-color));background-color:hsl(var(--p-pill-text-color) / .2);display:inline-grid;place-content:center;padding-inline:12px;height:30px;border-radius:15px;font-size:14px;font-weight:500}.pill.is-disabled{--p-pill-text-color:var(--config-disabled-color-hsl)}.pill.is-pending{--p-pill-text-color:var(--config-pending-color-hsl)}.pill.is-failed{--p-pill-text-color:var(--config-failed-color-hsl)}:root .theme-dark .pill.is-failed{color:#ffcfcf;background-color:#b91c1c}html{padding:0;margin:0;direction:rtl}body{margin:0;background:var(--config-console-background) no-repeat fixed;min-width:300px}ul{padding:0;margin:0}ul li{margin:0;list-style:none}.icon-left-open:before{content:'\e814'!important}.icon-right-open:before{content:'\e813'!important}.icon-right-dir:before{content:'\e84e'!important}.icon-left-dir:before{content:'\e84d'!important}.icon-link-ext:before{-moz-transform:scaleX(-1);-o-transform:scaleX(-1);-webkit-transform:scaleX(-1);transform:scaleX(-1)}.icon-article-alt:before{-moz-transform:scaleX(-1);-o-transform:scaleX(-1);-webkit-transform:scaleX(-1);transform:scaleX(-1)}.copy{border-radius:10px 0 0 10px!important} \ No newline at end of file +.pull-start{float:right}.pull-end{float:left}img[src=""]{visibility:hidden;display:inline-block}:root{--config-width:910px;--config-width-xxl:1000px;--config-width-xl:910px;--config-width-large:700px;--config-width-medium:550px;--config-width-small:320px;--config-color-primary:#f02e65;--config-color-link:#1e849e;--config-color-background:#eceff1;--config-color-background-dark:#dfe2e4;--config-color-background-fade:#ffffff;--config-color-background-fade-super:#fdfdfd;--config-color-background-focus:#f5f5f5;--config-color-background-input:#ffffff;--config-color-placeholder:#868686;--config-color-tooltip-text:#dce8f5;--config-color-tooltip-background:#333333;--config-color-focus:#f02e65;--config-color-focus-fade:#fef8fa;--config-color-focus-hover:#ff729b;--config-color-focus-glow:#fce5ec;--config-color-focus-dark:#c52653;--config-color-normal:#40404c;--config-color-dark:#313131;--config-color-fade:#8f8f8f;--config-color-fade-dark:#6e6e6e;--config-color-fade-light:#e2e2e2;--config-color-fade-super:#f1f3f5;--config-color-danger:#f53d3d;--config-color-success:#1bbf61;--config-color-warning:#fffbdd;--config-color-info:#386fd2;--config-color-chart:#29b5d9;--config-color-chart-fade:#d4f0f7;--config-border-color:#f3f3f3;--config-border-fade:#e0e3e4;--config-border-fade-super:#f7f7f7;--config-border-radius:10px;--config-prism-background:#373738;--config-prism-numbers:#39393c;--config-note-background:#f1fbff;--config-note-border:#5bceff;--config-warning-background:#fdf7d9;--config-warning-border:#f8e380;--config-social-twitter:#1da1f2;--config-social-github:#000000;--config-social-discord:#7189dc;--config-social-facebook:#4070b4;--config-language-bash:#2b2626;--config-language-bash-contrast:#fff;--config-language-javascript:#fff054;--config-language-javascript-contrast:#333232;--config-language-web:#fff054;--config-language-web-contrast:#333232;--config-language-html:#ff895b;--config-language-html-contrast:#ffffff;--config-language-yaml:#ca3333;--config-language-yaml-contrast:#ffffff;--config-language-php:#6182bb;--config-language-php-contrast:#ffffff;--config-language-nodejs:#8cc500;--config-language-nodejs-contrast:#ffffff;--config-language-ruby:#fc3f48;--config-language-ruby-contrast:#ffffff;--config-language-python:#3873a2;--config-language-python-contrast:#ffffff;--config-language-go:#00add8;--config-language-go-contrast:#ffffff;--config-language-dart:#035698;--config-language-dart-contrast:#ffffff;--config-language-flutter:#035698;--config-language-flutter-contrast:#ffffff;--config-language-android:#a4c439;--config-language-android-contrast:#ffffff;--config-language-kotlin:#766DB2;--config-language-kotlin-contrast:#ffffff;--config-language-swift:#f2624c;--config-language-swift-contrast:#ffffff;--config-language-java:#0074bd;--config-language-java-contrast:#ffffff;--config-modal-note-background:#f5fbff;--config-modal-note-border:#eaf2f7;--config-modal-note-color:#3b5d73;--config-switch-background:#e2e2e2;--config-console-background:#eceff1;--config-console-nav-start:#143650;--config-console-nav-end:#302839;--config-console-nav-border:#2a253a;--config-console-nav-switch-background:#ececec;--config-console-nav-switch-color:#868686;--config-console-nav-switch-arrow:url("data:image/svg+xml;utf8,");--config-defalut-color-hsl:0 0% 62%;--config-disabled-color-hsl:0 0% 62%;--config-pending-color-hsl:36 100% 47%;--config-failed-color-hsl:0 74% 42%}:root .theme-dark{--config-color-primary:#f02e65;--config-color-background:#061F2F;--config-color-background-dark:#262d50;--config-color-background-fade:#1c223a;--config-color-background-fade-super:#1a1f35;--config-color-background-focus:#1a1f35;--config-color-background-input:#dce8f5;--config-color-tooltip-text:#061F2F;--config-color-tooltip-background:#dce8f5;--config-color-link:#4caedb;--config-color-placeholder:#9ea1af;--config-color-focus:#c7d8eb;--config-color-focus-fade:#1e233e;--config-color-focus-hover:#d3deea;--config-color-focus-glow:#d3deea;--config-color-focus-dark:#657586;--config-color-normal:#c7d8eb;--config-color-dark:#c7d8eb;--config-color-fade:#bec3e0;--config-color-fade-dark:#81859b;--config-color-fade-light:#181818;--config-color-fade-super:#262D50;--config-color-danger:#d84a4a;--config-color-success:#34b86d;--config-color-warning:#e0d56d;--config-color-info:#386fd2;--config-color-chart:#29b5d9;--config-color-chart-fade:#c7d8eb;--config-border-color:#262D50;--config-border-fade:#19203a;--config-border-fade-super:#262D50;--config-prism-background:#1F253F;--config-prism-numbers:#1F253F;--config-note-background:#171e33;--config-note-border:#262D50;--config-warning-background:#1F253F;--config-warning-border:#262D50;--config-social-twitter:var(--config-color-normal);--config-social-github:var(--config-color-normal);--config-social-discord:var(--config-color-normal);--config-social-facebook:var(--config-color-normal);--config-language-bash:var(--config-color-normal);--config-language-bash-contrast:var(--config-color-background);--config-language-javascript:var(--config-color-normal);--config-language-javascript-contrast:var(--config-color-background);--config-language-web:var(--config-color-normal);--config-language-web-contrast:var(--config-color-background);--config-language-yaml:var(--config-color-normal);--config-language-yaml-contrast:var(--config-color-background);--config-language-html:var(--config-color-normal);--config-language-html-contrast:var(--config-color-background);--config-language-php:var(--config-color-normal);--config-language-php-contrast:var(--config-color-background);--config-language-nodejs:var(--config-color-normal);--config-language-nodejs-contrast:var(--config-color-background);--config-language-ruby:var(--config-color-normal);--config-language-ruby-contrast:var(--config-color-background);--config-language-python:var(--config-color-normal);--config-language-python-contrast:var(--config-color-background);--config-language-go:var(--config-color-normal);--config-language-go-contrast:var(--config-color-background);--config-language-dart:var(--config-color-normal);--config-language-dart-contrast:var(--config-color-background);--config-language-flutter:var(--config-color-normal);--config-language-flutter-contrast:var(--config-color-background);--config-language-android:var(--config-color-normal);--config-language-android-contrast:var(--config-color-background);--config-language-kotlin:var(--config-color-normal);--config-language-kotlin-contrast:var(--config-color-background);--config-language-swift:var(--config-color-normal);--config-language-swift-contrast:var(--config-color-background);--config-language-java:var(--config-color-normal);--config-language-java-contrast:var(--config-color-background);--config-modal-note-background:#15192b;--config-modal-note-border:#161b31;--config-modal-note-color:var(--config-color-normal);--config-switch-background:var(--config-color-normal);--config-console-background:#20263f;--config-console-nav-start:#1c2139;--config-console-nav-end:#151929;--config-console-nav-border:#171b30;--config-console-nav-switch-background:var(--config-color-focus);--config-console-nav-switch-color:var(--config-color-background);--config-console-nav-switch-arrow:url("data:image/svg+xml;utf8,")}.theme-light .force-light{display:block!important}.theme-dark .force-dark{display:block!important}.force-dark{display:none!important}.force-light{display:none!important}@font-face{font-family:Poppins;font-style:normal;font-weight:100;src:url(/fonts/poppins-v9-latin-100.eot);src:local('Poppins Thin'),local('Poppins-Thin'),url(/fonts/poppins-v9-latin-100.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-100.woff2) format('woff2'),url(/fonts/poppins-v9-latin-100.woff) format('woff'),url(/fonts/poppins-v9-latin-100.ttf) format('truetype'),url(/fonts/poppins-v9-latin-100.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:300;src:url(/fonts/poppins-v9-latin-300.eot);src:local('Poppins Light'),local('Poppins-Light'),url(/fonts/poppins-v9-latin-300.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-300.woff2) format('woff2'),url(/fonts/poppins-v9-latin-300.woff) format('woff'),url(/fonts/poppins-v9-latin-300.ttf) format('truetype'),url(/fonts/poppins-v9-latin-300.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:400;src:url(/fonts/poppins-v9-latin-regular.eot);src:local('Poppins Regular'),local('Poppins-Regular'),url(/fonts/poppins-v9-latin-regular.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-regular.woff2) format('woff2'),url(/fonts/poppins-v9-latin-regular.woff) format('woff'),url(/fonts/poppins-v9-latin-regular.ttf) format('truetype'),url(/fonts/poppins-v9-latin-regular.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:500;src:url(/fonts/poppins-v9-latin-500.eot);src:local('Poppins Medium'),local('Poppins-Medium'),url(/fonts/poppins-v9-latin-500.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-500.woff2) format('woff2'),url(/fonts/poppins-v9-latin-500.woff) format('woff'),url(/fonts/poppins-v9-latin-500.ttf) format('truetype'),url(/fonts/poppins-v9-latin-500.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:600;src:url(/fonts/poppins-v9-latin-600.eot);src:local('Poppins SemiBold'),local('Poppins-SemiBold'),url(/fonts/poppins-v9-latin-600.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-600.woff2) format('woff2'),url(/fonts/poppins-v9-latin-600.woff) format('woff'),url(/fonts/poppins-v9-latin-600.ttf) format('truetype'),url(/fonts/poppins-v9-latin-600.svg#Poppins) format('svg')}@font-face{font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url(/fonts/source-code-pro-v11-latin-regular.eot);src:local('Source Code Pro Regular'),local('SourceCodePro-Regular'),url(/fonts/source-code-pro-v11-latin-regular.eot?#iefix) format('embedded-opentype'),url(/fonts/source-code-pro-v11-latin-regular.woff2) format('woff2'),url(/fonts/source-code-pro-v11-latin-regular.woff) format('woff'),url(/fonts/source-code-pro-v11-latin-regular.ttf) format('truetype'),url(/fonts/source-code-pro-v11-latin-regular.svg#SourceCodePro) format('svg')}.padding{padding:30px}.padding-top{padding-top:30px!important}.padding-top-large{padding-top:50px!important}.padding-top-xl{padding-top:80px!important}.padding-bottom{padding-bottom:30px!important}.padding-bottom-large{padding-bottom:50px!important}.padding-bottom-xl{padding-bottom:80px!important}.margin-end{margin-left:20px!important}.margin-start{margin-right:20px!important}.margin-end-small{margin-left:10px!important}.margin-start-small{margin-right:10px!important}.margin-end-large{margin-left:50px!important}.margin-start-large{margin-right:50px!important}.margin-end-no{margin-left:0!important}.margin-start-no{margin-right:0!important}.margin-end-negative{margin-left:-30px!important}.margin-start-negative{margin-right:-30px!important}.margin-end-negative-small{margin-left:-15px!important}.margin-start-negative-small{margin-right:-15px!important}.margin-end-negative-tiny{margin-left:-5px!important}.margin-start-negative-tiny{margin-right:-5px!important}.margin-top{margin-top:30px!important}.margin-bottom{margin-bottom:30px!important}.margin-top-no{margin-top:0!important}.margin-bottom-no{margin-bottom:0!important}.margin-top-xxl{margin-top:140px!important}.margin-top-xl{margin-top:80px!important}.margin-top-large{margin-top:50px!important}.margin-top-small{margin-top:15px!important}.margin-top-tiny{margin-top:5px!important}.margin-top-negative{margin-top:-30px!important}.margin-top-negative-tiny{margin-top:-5px!important}.margin-top-negative-small{margin-top:-15px!important}.margin-top-negative-large{margin-top:-50px!important}.margin-top-negative-xl{margin-top:-80px!important}.margin-top-negative-xxl{margin-top:-100px!important}.margin-top-negative-xxxl{margin-top:-150px!important}.margin-bottom-xxl{margin-bottom:140px!important}.margin-bottom-xl{margin-bottom:80px!important}.margin-bottom-large{margin-bottom:50px!important}.margin-bottom-small{margin-bottom:15px!important}.margin-bottom-tiny{margin-bottom:5px!important}.margin-bottom-negative{margin-bottom:-30px!important}.margin-bottom-negative-tiny{margin-bottom:-5px!important}.margin-bottom-negative-small{margin-bottom:-15px!important}.margin-bottom-negative-large{margin-bottom:-50px!important}.margin-bottom-negative-xl{margin-bottom:-80px!important}.margin-bottom-negative-xl{margin-bottom:-100px!important}.force-left,.ide{direction:ltr;text-align:left}.force-right{direction:rtl;text-align:right}.pull-left{float:left}.pull-right{float:right}.ratio-wide{height:0;overflow:hidden;padding-top:56%;position:relative;width:100%}.ratio-wide>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-square{height:0;overflow:hidden;padding-top:56%;position:relative;width:100%}.ratio-square>*{position:absolute;top:0;left:0;width:100%;height:100%}.clear:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.phones-only{display:none}@media only screen and (max-width:550px){.phones-only{display:inherit!important}}.tablets-only{display:none}@media only screen and (min-width:551px) and (max-width:1198px){.tablets-only{display:inherit!important}}.desktops-only{display:none}@media only screen and (min-width:1199px){.desktops-only{display:inherit!important}}.phones-only-inline{display:none}@media only screen and (max-width:550px){.phones-only-inline{display:inline-block!important}}.tablets-only-inline{display:none}@media only screen and (min-width:551px) and (max-width:1198px){.tablets-only-inline{display:inline-block!important}}.desktops-only-inline{display:none}@media only screen and (min-width:1199px){.desktops-only-inline{display:inline-block!important}}*{font-family:Poppins,sans-serif;-webkit-font-smoothing:antialiased;font-weight:300}h1,h2,h3,h4,h5,h6{margin:0}h4,h5,h6{font-weight:400}.link,a{color:var(--config-color-link);text-decoration:none;border-left:2px solid transparent;border-right:2px solid transparent;transition:.2s;cursor:pointer}.link.disabled,a.disabled{opacity:.5}.link.tag:hover,a.tag:hover{opacity:.9}.link.danger,a.danger{color:var(--config-color-danger)}.link.link-animation-enabled,a.link-animation-enabled{display:inline-flex}.link.link-animation-enabled:hover,a.link-animation-enabled:hover{transform:translateY(-2px)}.link-return-animation--start>i{display:inline-block;transition:.2s}.link-return-animation--start:hover>i{transform:translateX(2px)}.link-return-animation--end>i{display:inline-block;transition:.2s}.link-return-animation--end:hover>i{transform:translateX(-2px)}b,strong{font-weight:500}p{margin:0 0 20px 0;line-height:26px}small{font-size:16px;color:var(--config-color-fade)}.text-size-small{font-size:13px}.text-size-smaller{font-size:11.5px}.text-size-xs{font-size:10px}.text-size-normal{font-size:16px}.text-height-large{height:30px;line-height:30px}.text-height-small{line-height:13px}.text-one-liner{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text-bold{font-weight:400!important}.text-bold-large{font-weight:500!important}.text-bold-xl{font-weight:600!important}.text-danger{color:var(--config-color-danger)!important}.text-success{color:var(--config-color-success)!important}.text-upper{text-transform:uppercase}.text-warning{color:var(--config-color-warning)}.text-focus{color:var(--config-color-focus)}.text-fade{color:var(--config-color-fade)}.text-fade-dark{color:var(--config-color-fade-dark)}.text-green{color:var(--config-color-success)}.text-red{color:var(--config-color-danger)}.text-info{color:var(--config-color-info)}.text-yellow{color:#ffe28b}.text-disclaimer{font-size:11px;color:var(--config-color-fade)}.text-fade-extra{color:var(--config-color-fade);opacity:.5}.text-line-high-large{line-height:30px}.text-line-high-xl{line-height:40px}.text-sign{margin:5px 0;font-size:25px;width:25px;height:25px;line-height:25px;display:inline-block}.text-align-center{text-align:center}.text-align-start{text-align:right}.text-align-end{text-align:left}.text-align-left{text-align:left}.text-align-right{text-align:right}.text-dir-ltr{direction:ltr;display:inline-block}.text-dir-rtl{direction:rtl;display:inline-block}i[class*=' icon-']:before,i[class^=icon-]:before{display:inline;line-height:unset}table{width:calc(100% + 60px);border-collapse:collapse;margin:-30px;border-radius:10px;overflow:hidden;position:relative;table-layout:fixed}table.y-scroll{overflow-y:auto}table.multi-line tbody td,table.multi-line thead th{line-height:inherit;text-overflow:inherit;white-space:inherit}table.borders td,table.borders th{border-left:solid 1px var(--config-border-fade-super)}table.borders td:last-child,table.borders th:last-child{border:none}table thead{border-bottom:solid 1px var(--config-color-fade-super);font-size:14px}table.small{font-size:14px}table.open-end tbody tr:last-child{border-bottom:none;font-weight:700;background:#f7fbf7}table.full tbody td,table.full tbody th{vertical-align:top;white-space:normal;overflow:auto;line-height:24px;padding-top:20px;padding-bottom:20px;height:auto}table .avatar{width:30px;height:30px}table tr{border-bottom:solid 1px var(--config-color-fade-super)}table tr:last-child{border-bottom:none}table tr:last-child td:first-child{border-bottom-left-radius:6px}table tr:last-child td:last-child{border-bottom-right-radius:6px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){table tr:nth-child(even){background:var(--config-color-background-fade-super)}}@media only screen and (min-width:1199px){table tr:nth-child(even) td{background:var(--config-color-background-fade-super)}}table tr.selected{background:var(--config-note-background)}table tr.selected td,table tr.selected td span{font-weight:500}table th{text-align:right;font-weight:400}table th i{color:var(--config-color-fade);font-size:10px;display:inline-block;vertical-align:top;line-height:16px;padding:0 3px}table td,table th{height:65px;padding:0 15px;line-height:50px}table td:first-child,table th:first-child{padding-right:30px}table td,table th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){table.vertical{border-top:solid 1px var(--config-color-fade-super);display:block;overflow:hidden;padding-top:12px}table.vertical .hide{display:none}table.vertical tbody,table.vertical td,table.vertical th,table.vertical thead,table.vertical tr{width:100%;display:block}table.vertical tr{position:relative}table.vertical th,table.vertical tr{padding-top:12px;padding-bottom:12px}table.vertical th:first-child,table.vertical tr:first-child{padding-top:0}table.vertical td,table.vertical th{padding:5px 20px!important;text-overflow:ellipsis;white-space:normal;height:40px;line-height:40px;width:calc(100% - 40px)}table.vertical td.col-name,table.vertical th.col-name{width:calc(100% - 110px)}table.vertical td:first-child,table.vertical td:last-child,table.vertical th:first-child,table.vertical th:last-child{padding:0 10px}table.vertical td:last-child,table.vertical th:last-child{padding-bottom:0}table.vertical td p,table.vertical th p{display:inline-block;width:calc(100% - 40px)}table.vertical td:not([data-title=""]):before{content:attr(data-title);margin-right:4px;font-weight:400}table.vertical thead{display:none}table.vertical .cell-options-more{position:absolute;inset-block-start:0;inset-inline-end:0;width:auto}}table .trim-inner-text{display:inline-flex;align-items:center;gap:8px}@media only screen and (min-width:1199px){table .trim-inner-text{width:100%}}table .cell-options-more button{padding:0 12px;background-color:transparent;color:var(--config-color-fade)}table .cell-options-more button:focus-visible{outline:solid 1px var(--config-color-focus)}.zone{max-width:var(--config-width-xl);margin:0 auto 40px auto}.zone.xxxl{max-width:calc(1400px - 100px)}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.zone.xxxl{max-width:100%}}.zone.xxl{max-width:var(--config-width-xxl)}.zone.xl{max-width:var(--config-width-xl)}.zone.large{max-width:var(--config-width-large)}.zone.medium{max-width:var(--config-width-medium)}.zone.small{max-width:var(--config-width-small)}.row{position:relative;margin:0 -50px;padding-right:50px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.row{margin:0 -30px;padding-right:30px}}.row.force-ltr>.col{float:left}.row.force-rtl>.col{float:right}.row.force-reverse>.col{float:left}.row.wide{margin:0 -100px;padding-right:100px}.row.wide>.span-1{width:calc(8.33333333% * 1 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-2{width:calc(8.33333333% * 2 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-3{width:calc(8.33333333% * 3 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-4{width:calc(8.33333333% * 4 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-5{width:calc(8.33333333% * 5 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-6{width:calc(8.33333333% * 6 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-7{width:calc(8.33333333% * 7 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-8{width:calc(8.33333333% * 8 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-9{width:calc(8.33333333% * 9 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-10{width:calc(8.33333333% * 10 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-11{width:calc(8.33333333% * 11 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-12{width:calc(8.33333333% * 12 - 100px);box-sizing:content-box;padding-left:100px}.row.thin{margin:0 -20px;padding-right:20px}.row.thin>.span-1{width:calc(8.33333333% * 1 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-2{width:calc(8.33333333% * 2 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-3{width:calc(8.33333333% * 3 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-4{width:calc(8.33333333% * 4 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-5{width:calc(8.33333333% * 5 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-6{width:calc(8.33333333% * 6 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-7{width:calc(8.33333333% * 7 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-8{width:calc(8.33333333% * 8 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-9{width:calc(8.33333333% * 9 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-10{width:calc(8.33333333% * 10 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-11{width:calc(8.33333333% * 11 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-12{width:calc(8.33333333% * 12 - 20px);box-sizing:content-box;padding-left:20px}.row.modalize{margin:0 -30px;padding-right:30px}.row.modalize>.span-1{width:calc(8.33333333% * 1 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-2{width:calc(8.33333333% * 2 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-3{width:calc(8.33333333% * 3 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-4{width:calc(8.33333333% * 4 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-5{width:calc(8.33333333% * 5 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-6{width:calc(8.33333333% * 6 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-7{width:calc(8.33333333% * 7 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-8{width:calc(8.33333333% * 8 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-9{width:calc(8.33333333% * 9 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-10{width:calc(8.33333333% * 10 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-11{width:calc(8.33333333% * 11 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-12{width:calc(8.33333333% * 12 - 30px);box-sizing:content-box;padding-left:30px}.row:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.row .col{float:right;box-sizing:border-box}.row .col.sticky-top{position:sticky;top:90px}.row .col.sticky-bottom{position:sticky;bottom:0}.row .span-1{width:calc(8.33333333% * 1 - 40px);box-sizing:content-box;padding-left:40px}.row .span-2{width:calc(8.33333333% * 2 - 40px);box-sizing:content-box;padding-left:40px}.row .span-3{width:calc(8.33333333% * 3 - 40px);box-sizing:content-box;padding-left:40px}.row .span-4{width:calc(8.33333333% * 4 - 40px);box-sizing:content-box;padding-left:40px}.row .span-5{width:calc(8.33333333% * 5 - 40px);box-sizing:content-box;padding-left:40px}.row .span-6{width:calc(8.33333333% * 6 - 40px);box-sizing:content-box;padding-left:40px}.row .span-7{width:calc(8.33333333% * 7 - 40px);box-sizing:content-box;padding-left:40px}.row .span-8{width:calc(8.33333333% * 8 - 40px);box-sizing:content-box;padding-left:40px}.row .span-9{width:calc(8.33333333% * 9 - 40px);box-sizing:content-box;padding-left:40px}.row .span-10{width:calc(8.33333333% * 10 - 40px);box-sizing:content-box;padding-left:40px}.row .span-11{width:calc(8.33333333% * 11 - 40px);box-sizing:content-box;padding-left:40px}.row .span-12{width:calc(8.33333333% * 12 - 40px);box-sizing:content-box;padding-left:40px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.row.responsive{width:100%;padding:0;margin:0}.row.responsive>.span-1,.row.responsive>.span-10,.row.responsive>.span-11,.row.responsive>.span-12,.row.responsive>.span-2,.row.responsive>.span-3,.row.responsive>.span-4,.row.responsive>.span-5,.row.responsive>.span-6,.row.responsive>.span-7,.row.responsive>.span-8,.row.responsive>.span-9{width:calc(8.33333333% * 12 - 0px)!important;box-sizing:content-box!important;padding-left:0!important;width:100%!important}}.tiles{position:relative}.tiles:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.tiles .box hr{margin:15px -15px}.tiles>*{margin-left:50px!important;float:right;width:calc(33.3333% - 33.3333px)}.tiles>* .photo-title{width:calc(100% + 30px);height:15px;margin:-15px -15px 10px -15px;border-radius:10px 10px 0 0;background:var(--config-color-fade-super);border-bottom:solid 1px var(--config-color-fade-super)}.tiles>:nth-child(3n){margin-left:0!important}@media only screen and (min-width:551px) and (max-width:1198px){.tiles>li{width:calc(50% - 25px)}.tiles>li:nth-child(3n){margin-left:50px!important}.tiles>li:nth-child(2n){margin-left:0!important}}@media only screen and (max-width:550px){.tiles>li{width:100%;margin-left:0!important}}@font-face{font-family:icon;src:url(/fonts/icon.eot?t=1650537780691);src:url(/fonts/icon.eot?t=1650537780691#iefix) format('embedded-opentype'),url(/fonts/icon.woff2?t=1650537780691) format("woff2"),url(/fonts/icon.woff?t=1650537780691) format("woff"),url(/fonts/icon.ttf?t=1650537780691) format('truetype'),url(/fonts/icon.svg?t=1650537780691#icon) format('svg');font-weight:400;font-style:normal}[class*=" icon-"]:before,[class^=icon-]:before{font-family:icon!important;font-style:normal;font-weight:400;speak:never;vertical-align:middle;display:inline-block;text-decoration:inherit;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-angle-circled-left:before{content:"\ea01"}.icon-angle-circled-right:before{content:"\ea02"}.icon-archive:before{content:"\ea03"}.icon-article:before{content:"\ea04"}.icon-asterisk:before{content:"\ea05"}.icon-bank:before{content:"\ea06"}.icon-bell:before{content:"\ea07"}.icon-binoculars:before{content:"\ea08"}.icon-bitbucket:before{content:"\ea09"}.icon-bold:before{content:"\ea0a"}.icon-book-open:before{content:"\ea0b"}.icon-boolean:before{content:"\ea0c"}.icon-briefcase:before{content:"\ea0d"}.icon-building-filled:before{content:"\ea0e"}.icon-calendar:before{content:"\ea0f"}.icon-cancel-circled:before{content:"\ea10"}.icon-cancel:before{content:"\ea11"}.icon-chart-area:before{content:"\ea12"}.icon-chat-alt:before{content:"\ea13"}.icon-check:before{content:"\ea14"}.icon-chevron-down:before{content:"\ea15"}.icon-clock:before{content:"\ea16"}.icon-code:before{content:"\ea17"}.icon-cog:before{content:"\ea18"}.icon-comment:before{content:"\ea19"}.icon-database:before{content:"\ea1a"}.icon-dev:before{content:"\ea1b"}.icon-discord:before{content:"\ea1c"}.icon-docs:before{content:"\ea1d"}.icon-dot-3:before{content:"\ea1e"}.icon-dot-circled:before{content:"\ea1f"}.icon-double:before{content:"\ea20"}.icon-down-dir:before{content:"\ea21"}.icon-down-open:before{content:"\ea22"}.icon-download:before{content:"\ea23"}.icon-edit:before{content:"\ea24"}.icon-email:before{content:"\ea25"}.icon-enum:before{content:"\ea26"}.icon-export:before{content:"\ea27"}.icon-eye:before{content:"\ea28"}.icon-facebook:before{content:"\ea29"}.icon-file:before{content:"\ea2a"}.icon-film:before{content:"\ea2b"}.icon-filter:before{content:"\ea2c"}.icon-fire:before{content:"\ea2d"}.icon-float:before{content:"\ea2e"}.icon-folder:before{content:"\ea2f"}.icon-github:before{content:"\ea30"}.icon-gitlab:before{content:"\ea31"}.icon-glasses:before{content:"\ea32"}.icon-google:before{content:"\ea33"}.icon-hackernews:before{content:"\ea34"}.icon-header:before{content:"\ea35"}.icon-heart:before{content:"\ea36"}.icon-home:before{content:"\ea37"}.icon-image:before{content:"\ea38"}.icon-inbox:before{content:"\ea39"}.icon-info-circled:before{content:"\ea3a"}.icon-instagram:before{content:"\ea3b"}.icon-integer:before{content:"\ea3c"}.icon-ip:before{content:"\ea3d"}.icon-italic:before{content:"\ea3e"}.icon-key-inv:before{content:"\ea3f"}.icon-key:before{content:"\ea40"}.icon-keyboard:before{content:"\ea41"}.icon-lamp:before{content:"\ea42"}.icon-left-dir:before{content:"\ea43"}.icon-left-open:before{content:"\ea44"}.icon-lifebuoy:before{content:"\ea45"}.icon-lightning:before{content:"\ea46"}.icon-link-ext:before{content:"\ea47"}.icon-link:before{content:"\ea48"}.icon-linkedin:before{content:"\ea49"}.icon-list-bullet:before{content:"\ea4a"}.icon-list-numbered:before{content:"\ea4b"}.icon-list:before{content:"\ea4c"}.icon-location:before{content:"\ea4d"}.icon-lock:before{content:"\ea4e"}.icon-login:before{content:"\ea4f"}.icon-mail:before{content:"\ea50"}.icon-medium:before{content:"\ea51"}.icon-menu:before{content:"\ea52"}.icon-minus:before{content:"\ea53"}.icon-moon-inv:before{content:"\ea54"}.icon-moon:before{content:"\ea55"}.icon-more:before{content:"\ea56"}.icon-network:before{content:"\ea57"}.icon-ok-circled:before{content:"\ea58"}.icon-ok:before{content:"\ea59"}.icon-palette:before{content:"\ea5a"}.icon-pause:before{content:"\ea5b"}.icon-phone:before{content:"\ea5c"}.icon-photograph:before{content:"\ea5d"}.icon-picture:before{content:"\ea5e"}.icon-pinterest:before{content:"\ea5f"}.icon-play:before{content:"\ea60"}.icon-plus:before{content:"\ea61"}.icon-qrcode:before{content:"\ea62"}.icon-question:before{content:"\ea63"}.icon-quote-right:before{content:"\ea64"}.icon-random:before{content:"\ea65"}.icon-reddit:before{content:"\ea66"}.icon-refresh:before{content:"\ea67"}.icon-right-dir:before{content:"\ea68"}.icon-right-open:before{content:"\ea69"}.icon-rocket:before{content:"\ea6a"}.icon-search:before{content:"\ea6b"}.icon-shield:before{content:"\ea6c"}.icon-shuffle:before{content:"\ea6d"}.icon-smile-o:before{content:"\ea6e"}.icon-sort:before{content:"\ea6f"}.icon-stackoverflow:before{content:"\ea70"}.icon-stopwatch:before{content:"\ea71"}.icon-string:before{content:"\ea72"}.icon-sun-inv:before{content:"\ea73"}.icon-telegram:before{content:"\ea74"}.icon-trash-2:before{content:"\ea75"}.icon-trash:before{content:"\ea76"}.icon-twitter:before{content:"\ea77"}.icon-underline:before{content:"\ea78"}.icon-up-dir:before{content:"\ea79"}.icon-up-open:before{content:"\ea7a"}.icon-upload:before{content:"\ea7b"}.icon-url:before{content:"\ea7c"}.icon-user:before{content:"\ea7d"}.icon-users:before{content:"\ea7e"}.icon-videocam:before{content:"\ea7f"}.icon-warning:before{content:"\ea80"}.icon-whatsapp:before{content:"\ea81"}.icon-wheelchair:before{content:"\ea82"}.icon-windows:before{content:"\ea83"}.icon-wrench:before{content:"\ea84"}.icon-x:before{content:"\ea85"}.icon-youtube-play:before{content:"\ea86"}.datalist-polyfill{list-style:none;display:none;background:#fff;box-shadow:0 2px 2px #999;position:absolute;left:0;top:0;margin:0;padding:0;max-height:300px;overflow-y:auto}.datalist-polyfill:empty{display:none!important}.datalist-polyfill>li{padding:3px;font:13px "Lucida Grande",Sans-Serif}.datalist-polyfill__active{background:#3875d7;color:#fff}date-input-polyfill{z-index:1000!important;max-width:320px!important;width:320px!important}date-input-polyfill .monthSelect-wrapper,date-input-polyfill .yearSelect-wrapper{height:50px;line-height:50px;padding:0;width:40%!important;margin-bottom:10px!important}date-input-polyfill .monthSelect-wrapper select,date-input-polyfill .yearSelect-wrapper select{padding:0 12px;height:50px;line-height:50px;box-sizing:border-box}date-input-polyfill .yearSelect-wrapper{width:35%!important}date-input-polyfill table{width:100%!important;max-width:100%!important;padding:0 12px 12px 12px!important;box-sizing:border-box;margin:0}date-input-polyfill table td:first-child,date-input-polyfill table td:last-child,date-input-polyfill table th:first-child,date-input-polyfill table th:last-child{width:32px!important;padding:4px!important}date-input-polyfill select{margin-bottom:10px}date-input-polyfill button{width:25%!important;height:50px!important;line-height:50px!important;margin-bottom:10px!important;background:inherit;position:relative;color:inherit;padding:inherit;box-sizing:inherit;border-radius:inherit;font-size:inherit;box-shadow:none;border:none;border-bottom:none!important}::placeholder{color:var(--config-color-placeholder);text-align:right}::-webkit-input-placeholder{text-align:right}input:-moz-placeholder{text-align:right}form.inline{display:inline-block}input,textarea{background:var(--config-color-background-input)}input[type=file],input[type=file]::-webkit-file-upload-button{cursor:pointer}.button,button{display:inline-block;background:var(--config-color-focus);border-radius:26px;border:none;color:var(--config-color-background-fade);height:52px;line-height:52px;padding:0 25px;cursor:pointer;font-size:16px;box-sizing:border-box;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.button:focus,.button:hover,button:focus,button:hover{background:var(--config-color-focus-hover)}.button.fly,button.fly{position:fixed;z-index:2;bottom:30px;left:30px}@media only screen and (max-width:550px){.button.fly,button.fly{left:15px}}.button.fill,button.fill{display:block;width:100%;text-align:center;padding:0 10px!important}.button.fill-aligned,button.fill-aligned{display:block;width:100%;text-align:right;padding:0 20px!important}.button.icon,button.icon{padding-left:30px!important}.button.icon-reduce,button.icon-reduce{padding-right:15px!important}.button.reverse,button.reverse{background:0 0;height:50px;line-height:48px;padding:0 23px;color:var(--config-color-focus);border:solid 2px var(--config-color-focus)}.button.reverse:focus,.button.reverse:hover,button.reverse:focus,button.reverse:hover{color:var(--config-color-focus-hover);border-color:var(--config-color-focus-hover)}.button.small,button.small{padding:0 15px;height:40px;line-height:36px;font-size:13px}.button.tick,button.tick{background:var(--config-color-fade-light);color:var(--config-color-dark);border-radius:20px;padding:0 10px;line-height:30px;height:30px;font-size:12px;display:inline-block}.button.tick.selected,button.tick.selected{background:var(--config-color-dark);color:var(--config-color-fade)}.button.round,button.round{width:52px;padding:0}.button.round.small,button.round.small{font-size:12px;width:30px;height:30px;line-height:30px}.button.white,button.white{background:#fff;color:var(--config-color-focus)}.button.white.reverse,button.white.reverse{color:#fff;background:0 0;border:solid 2px #fff}.button.trans,button.trans{background:0 0!important}.button.trans.reverse,button.trans.reverse{background:0 0!important}.button.success,button.success{background:var(--config-color-success)}.button.success.reverse,button.success.reverse{color:var(--config-color-success);background:#fff;border:solid 2px var(--config-color-success)}.button.danger,button.danger{background:var(--config-color-danger);color:#fff}.button.danger.reverse,button.danger.reverse{color:var(--config-color-danger);background:var(--config-color-background-fade);border:solid 2px var(--config-color-danger)}.button.dark,button.dark{background:var(--config-color-dark);color:var(--config-color-background-fade)}.button.dark.reverse,button.dark.reverse{color:var(--config-color-dark);background:var(--config-color-background-fade);border:solid 2px var(--config-color-dark)}.button .disabled,.button.disabled,.button:disabled,button .disabled,button.disabled,button:disabled{color:var(--config-color-normal);background:var(--config-color-background-dark);opacity:.6;cursor:default}.button.link,button.link{background:0 0;border-radius:0;color:var(--config-color-link);height:auto;line-height:normal;padding:0;padding-left:0!important}.button.link:focus,button.link:focus{box-shadow:inherit}.button.strip,button.strip{background:0 0;height:auto;line-height:16px;color:inherit;padding:0 5px}.button.facebook,button.facebook{color:#fff!important;background:#4070b4!important}.button.twitter,button.twitter{color:#fff!important;background:#56c2ea!important}.button.linkedin,button.linkedin{color:#fff!important;background:#0076b5!important}.button.github,button.github{color:#fff!important;background:#7e7c7c!important}.button:focus,button:focus{outline:0}button.close{width:30px;height:30px;line-height:30px;padding:0;margin:0;background:var(--config-color-normal);color:var(--config-color-background-fade);border-radius:50%}button.close .icon-cancel::before{line-height:1}button.close.is-margin-top-10{margin-top:10px}label{margin-bottom:15px;display:block;line-height:normal}label.inline{display:inline}.input,input[type=date],input[type=datetime-local],input[type=email],input[type=file],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=url],select,textarea{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px}.input[type=file],input[type=date][type=file],input[type=datetime-local][type=file],input[type=email][type=file],input[type=file][type=file],input[type=number][type=file],input[type=password][type=file],input[type=search][type=file],input[type=tel][type=file],input[type=text][type=file],input[type=url][type=file],select[type=file],textarea[type=file]{line-height:0;padding:15px;height:auto}.input:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=file]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus,select:focus,textarea:focus{outline:0;border-color:#b3d7fd}.input:disabled,input[type=date]:disabled,input[type=datetime-local]:disabled,input[type=email]:disabled,input[type=file]:disabled,input[type=number]:disabled,input[type=password]:disabled,input[type=search]:disabled,input[type=tel]:disabled,input[type=text]:disabled,input[type=url]:disabled,select:disabled,textarea:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.input.strip,input[type=date].strip,input[type=datetime-local].strip,input[type=email].strip,input[type=file].strip,input[type=number].strip,input[type=password].strip,input[type=search].strip,input[type=tel].strip,input[type=text].strip,input[type=url].strip,select.strip,textarea.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:left 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.input.strip:focus,input[type=date].strip:focus,input[type=datetime-local].strip:focus,input[type=email].strip:focus,input[type=file].strip:focus,input[type=number].strip:focus,input[type=password].strip:focus,input[type=search].strip:focus,input[type=tel].strip:focus,input[type=text].strip:focus,input[type=url].strip:focus,select.strip:focus,textarea.strip:focus{border-color:#b3d7fd}.input:-webkit-autofill::first-line,input[type=date]:-webkit-autofill::first-line,input[type=datetime-local]:-webkit-autofill::first-line,input[type=email]:-webkit-autofill::first-line,input[type=file]:-webkit-autofill::first-line,input[type=number]:-webkit-autofill::first-line,input[type=password]:-webkit-autofill::first-line,input[type=search]:-webkit-autofill::first-line,input[type=tel]:-webkit-autofill::first-line,input[type=text]:-webkit-autofill::first-line,input[type=url]:-webkit-autofill::first-line,select:-webkit-autofill::first-line,textarea:-webkit-autofill::first-line{font-weight:300;font-size:16px}input[type=email],input[type=url]{direction:ltr}input[type=email]::placeholder,input[type=url]::placeholder{text-align:left;direction:ltr}select{background:0 0;-webkit-appearance:none;background-image:var(--config-console-nav-switch-arrow);background-position:left 15px top 50%;background-repeat:no-repeat;background-color:var(--config-color-background-input);width:calc(100% - 62px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-left:45px}select:-webkit-autofill{background-image:url("data:image/svg+xml;utf8,")!important;background-position:100% 50%!important;background-repeat:no-repeat!important}input[type=search],input[type=search].strip{background:0 0;-webkit-appearance:none;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAdZJREFUWIXt1s2LjWEYBvDfnDMzFpNIamZIFrMiJYMyFmKhZKfOwoiFr2LFn2BByG6WVrKwMcjWxgoLIlKIUk6RrzAjZWZ8LO731FlwvB+PUbjq6X0X7/VeV/d9P9fz8IdRL8Hpw3x8w0xaOz9GNxq4gJeZcGs1cRab0fU7xLfgMSYzoT3YgNXYhIO4iM+4iTWphGs4jikcFSXvhEGczr4/UFW8C2N4jXUFudvwCYeqGNgnSr6yJH8rpkWLCqMfE9hdUryFE3iC3qLEk7ij+kT34Q32FiHV8Qr7K4q3cArXihCGxd5elMjARnzBvE4f1dreV+AtnicycC/7/7K8BhaIvqXCO3zFwrwGZtCT0EAtW9N5DTSxWGR/CizNns/yEgbFEK5NZGCnaEPHE7e9Ai9wA6OJDIzistgJubFdxHB/RfFVYgCHixJruI5x5dNwDm6J47sUhkTvjpUw0Y1zeOrXR3hHjOA9zmBuTs4Arog4/yhuUZWwHPdFMh7280BZgiP4ILJ/UuymqRQmejPxphiquzgvKnMJDzOxB9glZqiRiecykbfHdawX98EhcdxO4BGu4nYm2EJDzEKPSMIdYrBnFYUq8d/EP2di1gey3cS4ErflvxffASbhcakIINaMAAAAAElFTkSuQmCC);background-color:var(--config-color-background-input);background-position:right 15px top 50%;background-repeat:no-repeat;background-size:20px 20px;width:calc(100% - 60px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:45px}select[multiple]{min-height:75px;padding:5px 10px!important;padding-left:50px!important}select[multiple] option{padding:10px 4px;border-bottom:solid 1px #f1f1f1}select[multiple] option:last-child{border-bottom:none}textarea{min-height:75px;resize:vertical;line-height:32px;padding:5px 15px}textarea.tall{min-height:180px}fieldset{border:none;margin:0;padding:0}.counter{font-size:13px;text-align:left;color:var(--config-color-fade);margin-top:-20px;margin-bottom:20px}.file-preview{background:var(--config-color-background-input) url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAIElEQVQoU2NkYGAwZsAEZ9GFGIeIQix+wfQgyDODXSEAcUwGCrDSHgkAAAAASUVORK5CYII=)!important;box-shadow:inset 0 0 3px #a0a0a0;border-radius:8px;width:calc(100% - 2px);max-height:180px;visibility:visible!important;object-fit:contain}.video-preview{padding-top:56%;position:relative;border-radius:10px;background:#e7e7e7;overflow:hidden;margin:0}.video-preview iframe{position:absolute;top:0;width:100%;height:100%;border:none}.map-preview{padding-top:50%;position:relative;margin-bottom:10px;border-radius:10px;background:#e7e7e7;overflow:hidden;box-shadow:0 0 30px rgba(218,218,218,.5)}.map-preview iframe{position:absolute;top:0;width:100%;height:100%;border:none}.tooltip{position:relative}.tooltip.large:hover:after{white-space:normal;width:280px}.tooltip.small:hover:after{white-space:normal;width:180px}.tooltip:hover:after{white-space:nowrap;background:var(--config-color-tooltip-background);border-radius:5px;bottom:calc(100% + 6px);color:var(--config-color-tooltip-text);content:attr(data-tooltip);padding:5px 15px;position:absolute;font-size:13px;line-height:20px;z-index:98;right:20%;margin-right:-30px;word-break:break-word}.tooltip:hover:before{border:solid;border-color:var(--config-color-tooltip-background) transparent;border-width:6px 6px 0 6px;bottom:100%;content:"";position:absolute;z-index:99;right:3px}.tooltip.down:hover:after{top:calc(100% + 6px);bottom:inherit}.tooltip.down:hover:before{top:100%;border-width:0 6px 6px 6px;bottom:inherit}.tag{display:inline-block;background:var(--config-color-fade-light);color:var(--config-color-fade);border-radius:12px;line-height:24px;padding:0 8px;font-size:12px;box-shadow:none!important;border:none;height:auto;width:auto;white-space:nowrap;text-overflow:ellipsis}.tag:hover{border:none}.tag.green{background:var(--config-color-success);color:#fff}.tag.red{background:var(--config-color-danger);color:#fff}.tag.yellow{background:#ffe28b;color:#494949}.tag.focus{background:var(--config-color-focus);color:#fff}.tag.dark{background:var(--config-color-dark);color:#e7e7e7}.tag.blue{background:var(--config-color-info);color:#fff}.tag.link{background:var(--config-color-link);color:#fff}input[type=checkbox],input[type=radio]{width:26px;height:16px;position:relative;-webkit-appearance:none;border-radius:0;border:none;background:0 0;vertical-align:middle;margin:0}input[type=checkbox]:after,input[type=radio]:after{content:"";display:block;width:20px;height:20px;background:var(--config-color-background-fade);top:-5px;border-radius:50%;position:absolute;border:solid 3px var(--config-color-focus);vertical-align:middle}input[type=checkbox]:checked:after,input[type=radio]:checked:after{text-align:center;font-family:icon;content:'\ea14';font-size:16px;line-height:20px;color:var(--config-color-background-fade);background:var(--config-color-focus)}input[type=checkbox][type=radio]:checked:after,input[type=radio][type=radio]:checked:after{content:'';display:block;width:10px;height:10px;border-radius:50%;background:var(--config-color-background-fade);border:solid 8px var(--config-color-focus)}input[type=checkbox]:focus,input[type=radio]:focus{outline:0}input[type=checkbox]:focus:after,input[type=checkbox]:hover:after,input[type=radio]:focus:after,input[type=radio]:hover:after{outline:0;border-color:#000}input[type=checkbox]:checked:focus:after,input[type=checkbox]:checked:hover:after,input[type=radio]:checked:focus:after,input[type=radio]:checked:hover:after{border-color:var(--config-color-focus)}input[type=checkbox]:after{border-radius:4px}.input-copy{position:relative}.input-copy::before{content:'';display:block;position:absolute;height:50px;background:var(--config-color-fade-light);width:50px;right:0;border-radius:8px;z-index:1;margin:1px}.input-copy input,.input-copy textarea{padding-left:65px;width:calc(100% - 82px);resize:none}.input-copy .copy{position:absolute;z-index:2;top:0;left:0;border-right:solid 1px var(--config-color-fade-light);height:calc(100% - 2px);width:50px;line-height:50px;text-align:center;background:var(--config-color-background-focus);margin:1px;border-radius:0 9px 9px 0}.paging{color:var(--config-color-fade);padding:0;font-size:12px}.paging form{display:inline-block}.paging button:disabled{color:var(--config-color-background-fade);opacity:.6}.blue-snap iframe{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px;float:none!important;height:40px!important;width:calc(100% - 32px)!important;border:solid 1px #e2e2e2!important;background:0 0!important;position:static!important}.blue-snap iframe[type=file]{line-height:0;padding:15px;height:auto}.blue-snap iframe:focus{outline:0;border-color:#b3d7fd}.blue-snap iframe:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.blue-snap iframe.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:left 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.blue-snap iframe.strip:focus{border-color:#b3d7fd}.blue-snap iframe:-webkit-autofill::first-line{font-weight:300;font-size:16px}.blue-snap .error{font-size:12px;margin-top:-25px;color:var(--config-color-danger);height:40px;padding-right:2px}.pell{height:auto;padding-bottom:0;margin-bottom:0;padding-top:0;background:var(--config-color-background-input);line-height:normal!important;position:relative}.pell.hide{padding:0!important;height:1px;min-height:1px;max-height:1px;border:none;box-shadow:none;margin-bottom:20px;opacity:0}.pell [contenteditable=true]:empty:before{content:attr(placeholder);display:block;color:var(--config-color-placeholder)}.pell .pell-actionbar{border-bottom:solid 1px var(--config-color-fade-light);margin:0 -15px 15px -15px;padding:10px 15px;position:sticky;top:70px;background:var(--config-color-background-input);border-radius:10px 10px 0 0}.pell .pell-content{min-height:100px;display:block;padding:10px;margin:-10px;cursor:text}.pell .pell-content:focus{outline:0}.pell button{background:inherit;color:inherit;margin:0;padding:0;padding-left:15px;height:40px;line-height:40px;box-shadow:none;cursor:pointer;font-size:13px;border-radius:0}.pell button.pell-button-selected,.pell button:focus,.pell button:hover{color:var(--config-color-link)}.pell h1,.pell h2,.pell h3,.pell h4,.pell h5,.pell h6{text-align:inherit;margin-bottom:30px}.pell b,.pell strong{font-weight:700}.pell ol,.pell ul{margin:0 0 20px 0}.pell ol li,.pell ul li{display:list-item!important;list-style:inherit;list-style-position:inside!important;margin:0 20px 2px 20px}.pell ol li p,.pell ul li p{margin:0;display:inline}.pell ol li{list-style:decimal}.pell ol li::before{content:'';display:none}label.switch{line-height:42px}.switch,input[type=checkbox].button.switch,input[type=checkbox].switch{width:52px;height:32px;line-height:32px;border-radius:21px;background:var(--config-color-fade);display:inline-block;margin:0;padding:5px;padding-right:5px;padding-left:30px}.switch.on,.switch:checked,input[type=checkbox].button.switch.on,input[type=checkbox].button.switch:checked,input[type=checkbox].switch.on,input[type=checkbox].switch:checked{background-color:var(--config-color-success);padding-right:25px;padding-left:5px}.switch.on:focus,.switch.on:hover,.switch:checked:focus,.switch:checked:hover,input[type=checkbox].button.switch.on:focus,input[type=checkbox].button.switch.on:hover,input[type=checkbox].button.switch:checked:focus,input[type=checkbox].button.switch:checked:hover,input[type=checkbox].switch.on:focus,input[type=checkbox].switch.on:hover,input[type=checkbox].switch:checked:focus,input[type=checkbox].switch:checked:hover{background:var(--config-color-success)}.switch:focus,.switch:hover,input[type=checkbox].button.switch:focus,input[type=checkbox].button.switch:hover,input[type=checkbox].switch:focus,input[type=checkbox].switch:hover{background:var(--config-color-fade)}.switch:focus:after,.switch:hover:after,input[type=checkbox].button.switch:focus:after,input[type=checkbox].button.switch:hover:after,input[type=checkbox].switch:focus:after,input[type=checkbox].switch:hover:after{background:#fff}.switch:after,input[type=checkbox].button.switch:after,input[type=checkbox].switch:after{content:"";display:block;width:22px;height:22px;background:#fff;border-radius:50%;border:none;position:static;top:0}.password-meter{margin:-41px 10px 30px 10px;height:2px;background:0 0;max-width:100%;z-index:2;position:relative}.password-meter.weak{background:var(--config-color-danger)}.password-meter.medium{background:var(--config-color-success)}.password-meter.strong{background:var(--config-color-success)}.color-input:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.color-input .color-preview{width:53px;height:53px;float:right;margin-left:10px;background:#000;border-radius:10px;box-shadow:inset 0 0 3px #a0a0a0;position:relative}.color-input .color-preview input{opacity:0;position:absolute;top:0;bottom:0;left:0;right:0;width:100%;height:100%;cursor:pointer}.color-input input{text-transform:uppercase;float:right;width:calc(100% - 95px)}.grecaptcha-badge{box-shadow:none!important;border-radius:10px!important;overflow:hidden!important;background:#4d92df!important;bottom:25px}.grecaptcha-badge:hover{width:256px!important}.back{font-size:15px;line-height:24px;height:24px;margin-right:-15px;margin-top:-25px;margin-bottom:20px}.back span{font-weight:inherit!important}@media only screen and (max-width:550px){.back{margin-right:-5px}}hr{height:1px;background:var(--config-border-color)!important;border:none}hr.fade{opacity:.7}.upload{position:relative}.upload:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.upload input{position:absolute;top:0;right:0;opacity:0;cursor:pointer}.upload.single .preview{height:0;position:relative;padding-top:100%;width:100%;margin-bottom:15px!important}.upload.single .preview li{position:absolute;top:0;width:calc(100% - 20px);height:calc(100% - 20px);margin-left:0!important;margin-bottom:0!important}.upload .button{float:right;margin-left:10px!important}.upload .button.disabled,.upload .button.disabled:hover{background:0 0;color:inherit;border-color:inherit}.upload .count{float:right;line-height:52px}.upload .progress{background:var(--config-color-success);height:6px;border-radius:3px;margin-bottom:15px!important}.upload .preview:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.upload .preview li{float:right;margin-left:20px!important;margin-bottom:15px!important;background:var(--config-color-background-fade-super);width:150px;height:150px;line-height:148px;text-align:center;border-radius:20px;overflow:hidden;position:relative;cursor:pointer;border:solid 1px var(--config-color-background-dark)}.upload .preview li:hover:before{background:var(--config-color-focus)}.upload .preview li:before{content:'\ea11';font-family:icon;font-size:12px;position:absolute;width:20px;height:20px;display:block;top:8px;left:8px;text-align:center;line-height:20px;vertical-align:middle;border-radius:50%;background:#484848;color:#fff;z-index:1}.upload .preview li img{vertical-align:middle;max-height:150px;max-width:150px;-webkit-filter:drop-shadow(0 0 6px rgba(0, 0, 0, .3));filter:drop-shadow(0 0 1px rgba(0, 0, 0, .3))}.upload.wide .preview li{height:0;width:100%;position:relative;padding-top:30.547%;background:#e7e7e7;border-radius:10px;overflow:hidden;border:solid 1px #f9f9f9;margin:0}.upload.wide .preview li img{border-radius:10px;position:absolute;top:0;width:100%;display:block;opacity:1;max-width:inherit;max-height:inherit}ol{list-style:none;counter-reset:x-counter;padding:0}ol li{counter-increment:x-counter;line-height:30px;margin-bottom:30px;margin-right:45px}ol li::before{display:inline-block;content:counter(x-counter);color:var(--config-color-background-fade);background:var(--config-color-focus);border:solid 2px var(--config-color-focus);margin-left:15px;margin-right:-45px;width:26px;height:26px;border-radius:50%;text-align:center;line-height:26px}.required{color:var(--config-color-danger);font-size:8px;position:relative;top:-8px}.drop-list{position:relative;outline:0}.drop-list.open ul{display:block}.drop-list ul{position:relative;background:var(--config-color-background-fade);border-radius:10px;border-bottom:none;box-shadow:0 0 3px rgba(0,0,0,.05);display:block;padding:30px;border-radius:4px;box-shadow:0 0 6px rgba(0,0,0,.1);display:none;position:absolute;bottom:calc(100% + 10px);z-index:2;padding:0;right:-10px;max-width:280px;min-width:240px}.drop-list ul.padding-tiny{padding:5px}.drop-list ul.padding-xs{padding:10px}.drop-list ul.padding-small{padding:15px}.drop-list ul.y-scroll{overflow-y:auto}.drop-list ul.danger{background:var(--config-color-danger);color:#fff}.drop-list ul.danger .box{color:var(--config-color-normal);background:var(--config-color-background-fade)}.drop-list ul.danger>.button,.drop-list ul.danger>button{background:#fff;color:var(--config-color-danger)}.drop-list ul.note{background:var(--config-note-background)}.drop-list ul.focus{background:var(--config-color-focus);color:var(--config-color-background-fade)}.drop-list ul.focus .button,.drop-list ul.focus button{background:var(--config-color-background-fade);color:var(--config-color-focus)}.drop-list ul.line{background:0 0;border:solid 1px var(--config-color-background-dark);box-shadow:none}.drop-list ul.warning{background:var(--config-color-warning);color:#2d2d2d}.drop-list ul.warning .button,.drop-list ul.warning button{background:rgba(45,45,45,.8);color:var(--config-color-success)}.drop-list ul .tabs{border-bottom:solid 1px var(--config-border-color);margin:0 -30px;padding:0 30px!important}.drop-list ul>footer{margin:0 -30px -30px -30px;padding:15px 30px;background:var(--config-color-background-fade);border:solid 1px var(--config-border-color);border-radius:0 0 10px 10px}.drop-list ul hr{height:1px;background:var(--config-console-background);border:none;margin:30px -30px}.drop-list ul .label{position:absolute;top:10px;z-index:2;left:10px}.drop-list ul.fade-bottom{position:relative;overflow:hidden}.drop-list ul.fade-bottom:after{content:"";position:absolute;display:block;bottom:15px;width:100%;background:#000;background:linear-gradient(180deg,rgba(0,0,0,0) 0,var(--config-color-background-fade) 80%);height:100px;margin:0 -15px}.drop-list ul .header{position:static;height:40px;padding:20px 30px 20px 30px;margin-bottom:30px;margin:-30px -30px 20px -30px;background:var(--config-color-background-fade);border-bottom:solid 1px #efefef}.drop-list ul ul.numbers>li{position:relative;margin-right:30px;margin-left:50px}.drop-list ul ul.numbers>li hr{margin-right:-60px;margin-left:-80px}.drop-list ul ul.numbers>li .settings{position:absolute;top:3px;left:-50px}.drop-list ul ul.numbers>li::after{display:block;width:25px;height:25px;line-height:25px;font-size:13px;font-weight:500;border-radius:50%;background:var(--config-color-focus);color:var(--config-color-background);counter-increment:section;content:counter(section);text-align:center;position:absolute;top:3px;right:-45px}.drop-list ul .scroll{margin:0 -30px;overflow-y:scroll}.drop-list ul .scroll table{width:100%;margin:0}.drop-list ul ul.sortable{counter-reset:section}.drop-list ul ul.sortable>li [data-move-down].round,.drop-list ul ul.sortable>li [data-move-up].round,.drop-list ul ul.sortable>li [data-remove].round{background:var(--config-color-focus);color:var(--config-color-background-fade);width:25px;height:25px;line-height:25px;display:inline-block;text-align:center;padding:0;margin-left:5px}.drop-list ul ul.sortable>li [data-move-down].round:disabled,.drop-list ul ul.sortable>li [data-move-up].round:disabled,.drop-list ul ul.sortable>li [data-remove].round:disabled{display:none}.drop-list ul ul.sortable>li:first-child [data-move-up]{display:none}.drop-list ul ul.sortable>li:first-child [data-move-up]:disabled{display:inline-block;background:var(--config-color-background)}.drop-list ul ul.sortable>li:last-child [data-move-down]{display:none}.drop-list ul ul.sortable>li:last-child [data-move-down]:disabled{display:inline-block;background:var(--config-color-background)}.drop-list ul .toggle{position:relative;border-top:1px solid var(--config-console-background);border-bottom:1px solid var(--config-console-background);margin:0 -30px;padding:30px 30px 0 30px;height:65px;overflow:hidden}.drop-list ul .toggle.list{border-bottom:none}.drop-list ul .toggle.sorts button.ls-ui-open{width:calc(100% - 100px)}.drop-list ul .toggle button.ls-ui-open{left:0;position:absolute;top:0;width:100%;height:95px;background:0 0;opacity:.5;border-radius:0}.drop-list ul .toggle .icon-minus,.drop-list ul .toggle .icon-up-open{display:none}.drop-list ul .toggle .content{display:none}.drop-list ul .toggle.open{height:auto}.drop-list ul .toggle.open .icon-minus,.drop-list ul .toggle.open .icon-up-open{display:block}.drop-list ul .toggle.open .icon-down-open,.drop-list ul .toggle.open .icon-plus{display:none}.drop-list ul .toggle.open .content{display:block}.drop-list ul .list li{border-bottom:solid 2px var(--config-border-color);margin:0 -30px 30px -30px;padding:0 30px 30px 30px}.drop-list ul .list li:last-child{padding-bottom:0;margin-bottom:0;border-bottom:none}@media only screen and (max-width:550px){.drop-list ul .list li .actions{float:none}}.drop-list ul .list li .avatar{display:block}.drop-list ul .list li .avatar.inline{display:inline-block}.drop-list ul.new{text-align:center}.drop-list ul.new i{font-size:80px;line-height:80px;font-family:Poppins,sans-serif;font-style:normal;font-weight:300}.drop-list ul.new b{margin-top:20px;display:block}.drop-list ul .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.drop-list ul .info hr{background:var(--config-modal-note-border)!important}.drop-list ul .table-wrap{margin:0 -30px;overflow-y:scroll}.drop-list ul .table-wrap table{margin:0}.drop-list ul:before{border:solid;border-color:var(--config-color-background-fade) transparent;border-width:8px 8px 0 8px;bottom:-8px;content:"";position:absolute;z-index:99;right:30px}.drop-list ul.arrow-end:before{left:30px;right:unset}.drop-list ul.no-arrow::before{display:none}.drop-list ul li{border-bottom:solid 1px var(--config-color-fade-super);margin:0;padding:0}.drop-list ul li:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.drop-list ul li:first-child{border-radius:4px 4px 0 0}.drop-list ul li:last-child{border-radius:0 0 4px 4px}.drop-list ul li:hover{background:var(--config-color-fade-super)}.drop-list ul li:first-child:hover,.drop-list ul li:last-child:hover{border-color:transparent}.drop-list ul li .link,.drop-list ul li a,.drop-list ul li button.link{display:block;vertical-align:middle;height:auto;line-height:30px;display:inline-block;padding:10px 15px!important;color:inherit;font-size:14px;border:none;cursor:pointer;width:calc(100% - 30px);text-align:right;box-sizing:content-box}.drop-list ul li.disabled .link:hover,.drop-list ul li.disabled a:hover{background:0 0}.drop-list ul li .avatar{width:30px;height:30px;margin-left:10px;float:right}.drop-list ul li i.avatar{text-align:center;background:var(--config-color-dark);color:var(--config-color-background-fade)}.drop-list ul li:last-child{border-bottom:none}.drop-list.bottom ul{bottom:auto;margin-top:-2px}.drop-list.bottom ul:before{bottom:auto;top:-8px;border-width:0 8px 8px 8px}.drop-list.end ul{left:-10px;right:auto}.disabled{opacity:.2;cursor:default}.disabled .button,.disabled .link,.disabled a,.disabled button{cursor:default!important}.disabled .button:hover,.disabled .link:hover,.disabled a:hover,.disabled button:hover{background:0 0}.tags{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px;background:var(--config-color-background-input);min-height:42px;height:auto;cursor:text}.tags[type=file]{line-height:0;padding:15px;height:auto}.tags:focus{outline:0;border-color:#b3d7fd}.tags:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.tags.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:left 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.tags.strip:focus{border-color:#b3d7fd}.tags:-webkit-autofill::first-line{font-weight:300;font-size:16px}.tags .add{display:inline-block!important;border:none;padding:0;width:auto;margin:0;max-width:100%;min-width:200px}.tags ul.tags-list{display:inline;white-space:pre-line}.tags ul.tags-list li{display:inline-block!important;margin-left:10px;font-size:16px;padding:5px 10px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tags ul.tags-list li::before{float:left;content:'\ea11';font-family:icon;font-style:normal;display:inline-block;text-align:center;line-height:16px;width:16px;height:16px;font-size:12px;background:#000;color:#fff;border-radius:50%;margin-top:4px;margin-bottom:4px;margin-right:6px;margin-left:0}.switch-theme{background:var(--config-switch-background);border-radius:19px;height:26px;width:44px;margin:9px 0}.switch-theme button{padding:3px;display:block;background:0 0;height:26px;width:100%}.switch-theme i{background:var(--config-color-background-fade);border-radius:50%;height:18px;width:18px;line-height:18px;font-size:10px;padding:0;margin:0;color:var(--config-color-fade)}.switch-theme i.force-light{float:left}.switch-theme i.force-dark{float:right}.dot{width:20px;height:20px;background:var(--config-color-fade);border-radius:50%;display:inline-block;vertical-align:middle;margin:0!important;padding:0!important}.dot.danger{background:var(--config-color-danger)!important}.dot.success{background:var(--config-color-success)!important}.dot.warning{background:var(--config-color-warning)!important}.dot.info{background:var(--config-color-info)!important}.ide{background-color:var(--config-prism-background);overflow:hidden;position:relative;z-index:1;box-shadow:0 2px 4px 0 rgba(50,50,93,.3);border-radius:10px;margin-bottom:30px}.ide *{font-family:"Source Code Pro",monospace}.ide[data-lang]::after{content:attr(data-lang-label);display:inline-block;background:#fff;color:#000;position:absolute;top:15px;padding:5px 10px;border-radius:15px;font-size:10px;right:10px;opacity:.95}.ide[data-lang=bash]::after{background:var(--config-language-bash);color:var(--config-language-bash-contrast)}.ide[data-lang=javascript]::after{background:var(--config-language-javascript);color:var(--config-language-javascript-contrast)}.ide[data-lang=web]::after{background:var(--config-language-web);color:var(--config-language-web-contrast)}.ide[data-lang=html]::after{background:var(--config-language-html);color:var(--config-language-html-contrast)}.ide[data-lang=php]::after{background:var(--config-language-php);color:var(--config-language-php-contrast)}.ide[data-lang=nodejs]::after{background:var(--config-language-nodejs);color:var(--config-language-nodejs-contrast)}.ide[data-lang=ruby]::after{background:var(--config-language-ruby);color:var(--config-language-ruby-contrast)}.ide[data-lang=python]::after{background:var(--config-language-python);color:var(--config-language-python-contrast)}.ide[data-lang=go]::after{background:var(--config-language-go);color:var(--config-language-go-contrast)}.ide[data-lang=dart]::after{background:var(--config-language-dart);color:var(--config-language-dart-contrast)}.ide[data-lang=flutter]::after{background:var(--config-language-flutter);color:var(--config-language-flutter-contrast)}.ide[data-lang=android]::after{background:var(--config-language-android);color:var(--config-language-android-contrast)}.ide[data-lang=swift]::after{background:var(--config-language-swift);color:var(--config-language-swift-contrast)}.ide[data-lang=kotlin]::after{background:var(--config-language-kotlin);color:var(--config-language-kotlin-contrast)}.ide[data-lang=java]::after{background:var(--config-language-java);color:var(--config-language-java-contrast)}.ide[data-lang=yaml]::after{background:var(--config-language-yaml);color:var(--config-language-yaml-contrast)}.ide .tag{color:inherit!important;background:0 0!important;padding:inherit!important;font-size:inherit!important;line-height:14px}.ide .copy{cursor:pointer;content:attr(data-lang);display:inline-block;background:#fff;color:#000;position:absolute;transform:translateX(-50%);bottom:-20px;padding:5px 10px;border-radius:15px;font-size:10px;font-style:normal;right:50%;opacity:0;transition:bottom .3s,opacity .3s;line-height:normal;font-family:Poppins,sans-serif}.ide .copy::before{padding-left:5px}.ide:hover .copy{transition:bottom .3s,opacity .3s;opacity:.9;bottom:16px}.ide pre{-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;color:#e6ebf1;font-weight:400;line-height:20px;font-size:13px;margin:0;padding:20px;padding-left:60px}.ide.light{box-shadow:0 2px 4px 0 rgba(50,50,93,.1);background-color:#fff}.ide.light pre{color:#414770}.ide.light .token.cdata,.ide.light .token.comment,.ide.light .token.doctype,.ide.light .token.prolog{color:#91a2b0}.ide.light .token.attr-name,.ide.light .token.builtin,.ide.light .token.char,.ide.light .token.inserted,.ide.light .token.selector,.ide.light .token.string{color:#149570}.ide.light .token.punctuation{color:#414770}.ide.light .language-css .token.string,.ide.light .style .token.string,.ide.light .token.entity,.ide.light .token.operator,.ide.light .token.url,.ide.light .token.variable{color:#414770}.ide.light .line-numbers .line-numbers-rows{background:#f2feef}.ide.light .line-numbers-rows>span:before{color:#5dc79e}.ide.light .token.keyword{color:#6772e4;font-weight:500}code[class*=language-],pre[class*=language-]{text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4}pre[class*=language-]{overflow:auto}:not(pre)>code[class*=language-]{padding:.1em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#6b7c93}.token.punctuation{color:#f8f8f2}.namespace{opacity:.7}.token.constant,.token.deleted,.token.property,.token.symbol,.token.tag{color:#f92672}.token.boolean,.token.number{color:#f79a59}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#3ecf8e}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.class-name,.token.function{color:#45b2e8}.token.keyword{color:#7795f8}.token.important,.token.regex{color:#fd971f}.token.italic{font-style:italic}.token.entity{cursor:help}pre[class*=language-].line-numbers{position:relative;padding-left:60px;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{background:var(--config-prism-numbers);position:absolute;pointer-events:none;top:-20px;bottom:-21px;padding:20px 0;font-size:100%;left:-60px;width:40px;letter-spacing:-1px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{padding-left:5px;pointer-events:none;display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#636365;display:block;padding-right:.8em;text-align:right}.u-margin-inline-end-16{margin-inline-end:16px!important}.console{width:100%;padding:0;overscroll-behavior:none}.console body{position:relative;width:calc(100% - 320px);padding-top:70px;padding-bottom:0;padding-left:50px;padding-right:270px;margin:0;color:var(--config-color-normal);background:var(--config-console-background)}.console body .project-only{display:none!important}.console body.show-nav .project-only{display:inline-block!important}.console body.hide-nav{padding-right:50px;width:calc(100% - 100px)}.console body.hide-nav header{width:calc(100% - 50px)}.console body.hide-nav header .logo{display:inline-block}.console body.hide-nav .console-back{display:block}.console body.hide-nav .console-index{display:none}.console body.hide-nav .account{display:none}.console body.index .console-back{display:none}.console body.index .console-index{display:block}.console body.index .account{display:block}.console body .console-index{display:block}.console body .console-back{display:none}.console main{min-height:480px}.console header{position:fixed;top:0;width:calc(100% - 280px);height:40px;line-height:40px;padding:15px 30px;background:var(--config-color-background-fade);box-shadow:0 0 2px rgba(0,0,0,.1);margin:0 -50px;z-index:2;font-size:14px}.console header .logo{display:none;border:none}.console header .logo:hover{border:none;opacity:.8}.console header .logo img{height:26px;margin:7px 0}.console header .setup-new{width:40px;height:40px;line-height:40px}.console header .list{width:240px}.console header .list select{height:40px;line-height:40px;padding-top:0;padding-bottom:0;border:none;border-radius:26px;background-color:var(--config-console-nav-switch-background);color:var(--config-console-nav-switch-color)}.console header .account{margin-right:25px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.console header .switch-theme{margin:2px 0}.console header .avatar{height:40px;width:40px}.console header .account-button{background:0 0;position:absolute;width:100%;height:40px;border-radius:0;z-index:1}.console header .notifications{position:relative;font-size:20px}.console header .notifications a{color:#1b3445}.console header .notifications:after{position:absolute;content:"";display:block;background:var(--config-color-danger);width:8px;height:8px;border-radius:50%;top:3px;left:3px}.console header nav{background:#1b3445;background:linear-gradient(var(--config-console-nav-start),var(--config-console-nav-end));color:#788c99;position:fixed;height:100%;width:220px;top:0;right:0}.console header nav .logo{height:39px;padding:15px 20px;display:block}.console header nav .logo img{display:inline-block;margin-top:7px;margin-bottom:14px}.console header nav .logo svg g{fill:var(--config-color-focus)}.console header nav .icon{display:block;border:none;margin:18px 10px 50px 10px}.console header nav .icon img{display:block}.console header nav .icon:hover{border-bottom:none}.console header nav .icon:hover svg g{fill:var(--config-color-focus)}.console header nav .container{overflow:auto;height:calc(100% - 133px);width:100%}.console header nav .project-box{padding:20px;text-align:center;display:block;border:none;line-height:100px;height:100px}.console header nav .project-box img{max-height:80px;max-width:80%;display:inline-block;vertical-align:middle}.console header nav .project{display:block;padding:85px 25px 20px 25px;color:#788c99;position:relative;border:none;height:20px}.console header nav .project:hover{border-bottom:none}.console header nav .project .name{height:20px;line-height:20px;margin:0;padding:0;display:inline-block;max-width:100%}.console header nav .project .arrow{display:block;position:absolute;left:5px;top:10px;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #788c99;transform:rotate(225deg)}.console header nav .project img{position:absolute;bottom:40px;display:block;margin-bottom:10px;max-height:35px;max-width:40%}.console header nav .subtitle{padding:0 30px;display:block;font-size:12px;font-weight:300}.console header nav .links{margin-bottom:15px!important}.console header nav .links.top{border:none;padding-bottom:0;margin-bottom:5px!important}.console header nav .links.bottom{position:absolute;bottom:0;left:0;right:0;padding-bottom:0;border:none;margin-bottom:0!important;box-shadow:0 0 10px rgba(0,0,0,.1)}.console header nav .links.bottom a{border-top:solid 1px var(--config-console-nav-border);border-bottom:none}.console header nav .links .sub{display:inline-block;border:none;width:25px;height:25px;line-height:25px;border-radius:50%;padding:0;background:var(--config-color-focus);color:#fff;text-align:center;font-size:12px;margin:18px}.console header nav .links .sub i{width:auto;margin:0}.console header nav .links .sub:hover{border:none}.console header nav .links a{padding:8px 20px;border:none;display:flex;color:#87a5b9;font-weight:400;border-right:solid 5px transparent;font-size:13px}.console header nav .links a i{margin-left:8px;width:22px;display:inline-block}.console header nav .links a.selected,.console header nav .links a:hover{color:#e4e4e4}.console header nav:after{content:'';display:block;position:absolute;background:#302839;height:100px;width:100%;bottom:-100px}.console>footer{width:calc(100% + 100px);margin:0 -50px;box-sizing:border-box;background:0 0;padding-left:30px;padding-right:30px}.console>footer ul{float:none;text-align:center}.console>footer ul li{float:none;display:inline-block}.console .projects{position:relative}.console .projects:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.console .projects li{float:right;margin-left:50px;margin-bottom:50px;width:270px}.console .projects li:nth-child(3n){margin-left:0}.console .dashboard{padding:20px;overflow:visible;position:relative;z-index:1;margin-bottom:2px}.console .dashboard .chart{width:80%}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard .chart{width:100%}}.console .dashboard hr{margin:20px -25px;height:2px;background:var(--config-console-background)}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard hr{height:3px}}.console .dashboard footer{margin:-20px;padding:20px;background:#fcfeff;border:none;color:var(--config-color-link)}.console .dashboard .col{position:relative}.console .dashboard .col:last-child:after{display:none}.console .dashboard .col:after{content:"";display:block;width:2px;background:var(--config-console-background);position:absolute;top:-20px;bottom:-20px;left:24px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard .col:after{width:calc(100% + 40px);height:3px;position:static;margin:20px -20px}}.console .dashboard .value{color:var(--config-color-focus);vertical-align:bottom;line-height:45px}.console .dashboard .value.small{line-height:35px}.console .dashboard .value .sum{font-size:45px;line-height:45px;font-weight:700;vertical-align:bottom}.console .dashboard .value .sum.small{font-size:25px;line-height:25px}.console .dashboard .unit{font-weight:500;line-height:20px;vertical-align:bottom;font-size:16px;display:inline-block;margin-bottom:5px;margin-right:5px;color:var(--config-color-focus)}.console .dashboard .metric{color:var(--config-color-focus);font-weight:400;font-size:13px;line-height:16px}.console .dashboard .range{color:var(--config-color-fade);font-weight:400;font-size:14px;line-height:16px}.console .dashboard a{display:block;font-weight:400;font-size:14px;line-height:16px;padding:0;border:none}.console .dashboard .chart-bar{height:4rem;width:auto;display:flex;align-items:flex-end}@media only screen and (min-width:1199px){.console .dashboard .chart-bar{padding-right:15px}}.console .dashboard .chart-bar .bar{width:12.5%;background-color:var(--config-color-chart-fade);margin:0 2px;border-top:2px solid var(--config-color-chart)}.console .dashboard .chart-bar .bar:hover{background-color:var(--config-color-chart)}.console .dashboard .chart-bar .bar.bar-100{height:100%}.console .dashboard .chart-bar .bar.bar-90{height:90%}.console .dashboard .chart-bar .bar.bar-80{height:80%}.console .dashboard .chart-bar .bar.bar-70{height:70%}.console .dashboard .chart-bar .bar.bar-60{height:60%}.console .dashboard .chart-bar .bar.bar-50{height:50%}.console .dashboard .chart-bar .bar.bar-40{height:40%}.console .dashboard .chart-bar .bar.bar-30{height:30%}.console .dashboard .chart-bar .bar.bar-20{height:20%}.console .dashboard .chart-bar .bar.bar-10{height:10%}.console .dashboard .chart-bar .bar.bar-0{height:0%}.console .dashboard .chart-bar .bar.bar-0{border-top:1px solid var(--config-color-chart)}.console .dashboard .chart-bar .bar.bar-5{height:5%}.console .chart-metric{width:19%}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (max-width:550px){.console .chart-metric{width:100%}}.console .chart{width:100%;position:relative;height:0;padding-top:20px;padding-bottom:26%;margin-left:-2px;overflow:hidden;background-color:var(--config-color-background-fade);background-image:linear-gradient(transparent 1px,transparent 1px),linear-gradient(90deg,transparent 1px,transparent 1px),linear-gradient(var(--config-border-color) 1px,transparent 1px),linear-gradient(90deg,var(--config-border-color) 1px,transparent 1px);background-size:100px 100px,100px 100px,20px 20px,20px 20px;background-position:-2px -2px,-2px -2px,-1px -1px,-1px -1px;background-repeat:round;border:solid 1px var(--config-border-color);border-right:solid 1px transparent;border-bottom:solid 1px transparent}.console .chart.background-image-no{background-image:none}.console .chart.border-no{border:none}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (max-width:550px){.console .chart{width:100%;padding-bottom:32%;float:none;margin-bottom:20px}}.console .chart canvas{position:absolute;bottom:0;display:block;height:100%;width:100%}.console .chart-notes{font-size:12px}.console .chart-notes.crud li.create,.console .chart-notes.crud li:nth-child(1){color:#00b680}.console .chart-notes.crud li.create::before,.console .chart-notes.crud li:nth-child(1)::before{background:#00b680}.console .chart-notes.crud li.read,.console .chart-notes.crud li:nth-child(2){color:#009cde}.console .chart-notes.crud li.read::before,.console .chart-notes.crud li:nth-child(2)::before{background:#009cde}.console .chart-notes.crud li.update,.console .chart-notes.crud li:nth-child(3){color:#696fd7}.console .chart-notes.crud li.update::before,.console .chart-notes.crud li:nth-child(3)::before{background:#696fd7}.console .chart-notes.crud li.delete,.console .chart-notes.crud li:nth-child(4){color:#da5d95}.console .chart-notes.crud li.delete::before,.console .chart-notes.crud li:nth-child(4)::before{background:#da5d95}.console .chart-notes li{line-height:20px;display:inline-block;margin-left:15px}.console .chart-notes li::before{display:inline-block;content:'';width:14px;height:14px;background:var(--config-color-normal);border-radius:50%;margin-left:8px;vertical-align:middle}.console .chart-notes li.blue,.console .chart-notes li:nth-child(1){color:var(--config-color-chart)}.console .chart-notes li.blue::before,.console .chart-notes li:nth-child(1)::before{background:var(--config-color-chart)}.console .chart-notes li.green,.console .chart-notes li:nth-child(2){color:#4eb55b}.console .chart-notes li.green::before,.console .chart-notes li:nth-child(2)::before{background:#4eb55b}.console .chart-notes li.orange,.console .chart-notes li:nth-child(3){color:#ec9323}.console .chart-notes li.orange::before,.console .chart-notes li:nth-child(3)::before{background:#ec9323}.console .chart-notes li.red,.console .chart-notes li:nth-child(4){color:#dc3232}.console .chart-notes li.red::before,.console .chart-notes li:nth-child(4)::before{background:#dc3232}.console .community a{padding:0 10px;display:inline-block}.console .link-list li{margin-bottom:15px}.console .link-list i{display:inline-block;width:30px;height:30px;line-height:30px;text-align:center;background:var(--config-color-fade);color:var(--config-color-fade-super);border-radius:50%;margin-left:15px}.console .link-list i.fade{background:0 0;color:var(--config-color-fade)}.console .provider{width:50px;height:50px;background:var(--config-color-background-focus);color:#868686;line-height:50px;text-align:center;font-size:25px;border-radius:50%}.console .provider.facebook{color:#fff;background:#3b5998}.console .provider.twitter{color:#fff;background:#55beff}.console .provider.telegram{color:#fff;background:#3ba9e1}.console .provider.github{color:#fff;background:#24292e}.console .provider.whatsapp{color:#fff;background:#25d366}.console .provider.linkedin{color:#fff;background:#1074af}.console .provider.microsoft{color:#fff;background:#137ad4}.console .provider.google{color:#fff;background:#4489f1}.console .provider.bitbucket{color:#fff;background:#2a88fb}.console .provider.gitlab{color:#faa238;background:#30353e}.console .provider.instagram{color:#fff;background:radial-gradient(circle at 30% 107%,#fdf497 0,#fdf497 5%,#fd5949 45%,#d6249f 60%,#285aeb 90%)}.console .premium{z-index:3;margin-top:320px}.console .premium .message{height:190px;overflow:hidden;position:absolute;top:-280px}.console .premium:after{content:'';position:absolute;top:0;left:-20px;right:-20px;bottom:-20px;background:var(--config-color-background);opacity:.7;z-index:300}.console .app-section{height:90px}.console .confirm{background:var(--config-color-link);color:#fff;border-radius:25px;padding:12px;line-height:28px;text-align:center}.console .confirm .action{font-weight:500;cursor:pointer}.console .platforms{overflow:hidden}.console .platforms .box{overflow:hidden}.console .platforms .box img{width:50px;margin:0 auto;margin-bottom:20px}.console .platforms .box .cover{margin:-30px -30px 30px -30px;padding:30px}.console .platforms .box .cover.android{background:#a4ca24}.console .platforms .box .cover.android h1{color:#fff;font-size:18px;margin-top:20px}.console .platforms .col{text-align:center;line-height:30px}.console .platforms a{display:block;margin:-20px;padding:20px}.console .platforms a:hover{background:#fbfeff}.console .platforms img{display:block;margin:0 30px;width:calc(100% - 60px);border-radius:50%;margin-bottom:20px}.console .document-nav{display:none;position:sticky;top:90px}@media only screen and (min-width:1380px){.console .document-nav{display:block}}.console .document-nav ul{position:absolute;width:200px;right:-260px}.console .document-nav ul li{margin-bottom:20px}.console .document-nav ul li .selected{font-weight:500}@media only screen and (min-width:1199px){.console .logo .top{display:none!important}}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console>header{width:calc(100% - 30px)!important;margin:0 -30px;padding:15px}.console>header nav{width:100%;height:70px;overflow:hidden}.console>header nav.close{background:0 0}.console>header nav.close .logo .nav{display:none!important}.console>header nav.open{height:100%}.console>header nav.open .logo .top{display:none!important}.console>header nav.open .bottom{display:block!important}.console>header nav.open button{color:#87a5b9}.console>header nav button{margin:9px;background:0 0;color:var(--config-color-normal)}.console>header nav button:focus,.console>header nav button:hover{background:0 0}.console>header nav .logo{display:block!important;position:absolute;top:0;left:50%;margin:auto;transform:translateX(-50%)}.console>header nav .bottom{display:none!important}.console>footer{width:auto;margin:50px -30px 0 -30px!important;padding:0 30px 30px 30px}.console body{height:"calc(100% - 70px)"!important;width:calc(100% - 60px)!important;padding:70px 30px 0 30px!important}.console .cover{padding:25px 30px;margin:0 -30px}}@media only screen and (max-width:550px){.console body{height:"calc(100% - 70px)"!important;width:calc(100% - 40px)!important;padding:70px 20px 0 20px!important}.console .cover{padding:20px 20px;margin:0 -20px}.console>header{margin:0 -20px}.console>header .list{width:175px;font-size:14px}.console>footer{margin:50px -20px 0 -20px!important;padding:0 20px 20px 20px}}.dev-feature{display:none}.prod-feature{display:none}.development .dev-feature{display:block;opacity:.6!important;outline:solid #ff0 3px;outline-offset:3px}.development .dev-feature.dev-inline{display:inline-block}.development .prod-feature{display:none}.production .dev-feature{display:none}.production .prod-feature{display:block}.search{opacity:1!important}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.search button{margin-top:20px}}html.home body{padding:0 50px;color:var(--config-color-normal)}html.home .logo a{display:block}html.home .logo a:hover{opacity:.8}html.home .logo img{max-height:35px;width:198px;margin:45px auto 25px auto}html.home footer{background:0 0;text-align:center}html.home main{min-height:400px}.alerts ul{width:100%;visibility:hidden;position:fixed;padding:0;left:0;right:0;color:var(--config-color-normal);z-index:1001;margin:0 auto;bottom:15px;max-width:560px}.alerts ul li{margin:10px 0 0 0;padding:0}.alerts ul li div.message{position:relative;padding:12px 35px;margin:0 auto;list-style:none;background:var(--config-color-background-dark);text-align:center;font-size:14px;border-radius:10px;line-height:16px;min-height:16px;box-shadow:0 0 10px rgba(0,0,0,.05);opacity:.95}.alerts ul li div.message a,.alerts ul li div.message span{font-weight:600}.alerts ul li div.message a{border-bottom:dotted 1px var(--config-color-normal)}.alerts ul li div.message i{cursor:pointer;position:absolute;font-size:14px;line-height:20px;top:9px;right:9px;color:var(--config-color-background-dark);background:var(--config-color-normal);width:22px;height:22px;border-radius:50%}.alerts ul li div.message.error{color:#fff!important;background:var(--config-color-danger)!important}.alerts ul li div.message.error a{color:#fff!important;border-bottom:dotted 1px #fff!important}.alerts ul li div.message.error i{color:var(--config-color-danger);background:#fff}.alerts ul li div.message.success{color:#fff!important;background:var(--config-color-success)!important}.alerts ul li div.message.success a{color:#fff;border-bottom:dotted 1px #fff}.alerts ul li div.message.success i{color:var(--config-color-success);background:#fff}.alerts ul li div.message.warning{color:var(--config-color-normal)!important;background:var(--config-color-warning)!important}.alerts ul li div.message.warning a{color:var(--config-color-normal)!important;border-bottom:dotted 1px var(--config-color-normal)!important}.alerts ul li div.message.warning i{color:#fff;background:var(--config-color-normal)!important}.alerts ul li div.message.open{display:block}.alerts ul li div.message.close{display:none}.alerts .cookie-alert{background:var(--config-color-focus-fade)!important;color:var(--config-color-focus)}.alerts .cookie-alert a{color:var(--config-color-focus);font-weight:400;border-bottom:dotted 1px var(--config-color-focus)!important}.alerts .cookie-alert i{color:var(--config-color-focus-fade)!important;background:var(--config-color-focus)!important}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.alerts ul{top:auto;bottom:0;max-width:100%;right:0}.alerts ul li{margin:5px 0 0 0}.alerts ul li div.message{border-radius:0}}.show-nav .alerts ul{right:220px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.show-nav .alerts ul{right:0}}article{overflow-wrap:break-word;word-wrap:break-word}article h1{font-size:36px}article h2{font-size:24px}article h3{font-size:20px}article h4{font-size:20px}article h5{font-size:18px}article h6{font-size:16px}article h1,article h2,article h3,article h4,article h5,article h6{margin-top:30px!important;margin-bottom:30px!important}article p{line-height:32px;font-size:16px}article .update{display:block;margin-top:50px!important}article table{width:100%;margin:0;margin-bottom:30px!important;border-radius:0;border-bottom:solid 1px var(--config-border-color)}article table thead td{font-weight:500;padding:5px 15px}article table td,article table th{padding:15px;height:auto}article table td:first-child,article table th:first-child{padding-right:10px}article table td:last-child,article table th:last-child{padding-left:10px}article table td p,article table th p{font-size:inherit;line-height:inherit}article table td p:last-child,article table th p:last-child{margin:0}.avatar-container{position:relative}.avatar-container .corner{position:absolute;bottom:-3px;left:-3px}.avatar{width:60px;height:60px;border-radius:50%;background:var(--config-color-background-focus);display:inline-block;overflow:hidden;box-shadow:0 0 6px rgba(0,0,0,.09);position:relative;z-index:1;opacity:1!important}.avatar.hide{display:none}.avatar:before{width:100%;height:100%;z-index:0}.avatar.inline{display:inline-block;vertical-align:middle}.avatar.trans{background:0 0}.avatar .no-shadow{box-shadow:none}.avatar.xs{width:30px;height:30px}.avatar.xxs{width:20px;height:20px}.avatar.small{width:50px;height:50px}.avatar.big{width:100px;height:100px}.avatar.huge{width:150px;height:150px}.box{position:relative;background:var(--config-color-background-fade);border-radius:10px;border-bottom:none;box-shadow:0 0 3px rgba(0,0,0,.05);display:block;padding:30px}.box.padding-tiny{padding:5px}.box.padding-xs{padding:10px}.box.padding-small{padding:15px}.box.y-scroll{overflow-y:auto}.box.danger{background:var(--config-color-danger);color:#fff}.box.danger .box{color:var(--config-color-normal);background:var(--config-color-background-fade)}.box.danger>.button,.box.danger>button{background:#fff;color:var(--config-color-danger)}.box.note{background:var(--config-note-background)}.box.focus{background:var(--config-color-focus);color:var(--config-color-background-fade)}.box.focus .button,.box.focus button{background:var(--config-color-background-fade);color:var(--config-color-focus)}.box.line{background:0 0;border:solid 1px var(--config-color-background-dark);box-shadow:none}.box.warning{background:var(--config-color-warning);color:#2d2d2d}.box.warning .button,.box.warning button{background:rgba(45,45,45,.8);color:var(--config-color-success)}.box .tabs{border-bottom:solid 1px var(--config-border-color);margin:0 -30px;padding:0 30px!important}.box>footer{margin:0 -30px -30px -30px;padding:15px 30px;background:var(--config-color-background-fade);border:solid 1px var(--config-border-color);border-radius:0 0 10px 10px}.box hr{height:1px;background:var(--config-console-background);border:none;margin:30px -30px}.box .label{position:absolute;top:10px;z-index:2;left:10px}.box.fade-bottom{position:relative;overflow:hidden}.box.fade-bottom:after{content:"";position:absolute;display:block;bottom:15px;width:100%;background:#000;background:linear-gradient(180deg,rgba(0,0,0,0) 0,var(--config-color-background-fade) 80%);height:100px;margin:0 -15px}.box .header{position:static;height:40px;padding:20px 30px 20px 30px;margin-bottom:30px;margin:-30px -30px 20px -30px;background:var(--config-color-background-fade);border-bottom:solid 1px #efefef}.box ul.numbers>li{position:relative;margin-right:30px;margin-left:50px}.box ul.numbers>li hr{margin-right:-60px;margin-left:-80px}.box ul.numbers>li .settings{position:absolute;top:3px;left:-50px}.box ul.numbers>li::after{display:block;width:25px;height:25px;line-height:25px;font-size:13px;font-weight:500;border-radius:50%;background:var(--config-color-focus);color:var(--config-color-background);counter-increment:section;content:counter(section);text-align:center;position:absolute;top:3px;right:-45px}.box .scroll{margin:0 -30px;overflow-y:scroll}.box .scroll table{width:100%;margin:0}.box ul.sortable{counter-reset:section}.box ul.sortable>li [data-move-down].round,.box ul.sortable>li [data-move-up].round,.box ul.sortable>li [data-remove].round{background:var(--config-color-focus);color:var(--config-color-background-fade);width:25px;height:25px;line-height:25px;display:inline-block;text-align:center;padding:0;margin-left:5px}.box ul.sortable>li [data-move-down].round:disabled,.box ul.sortable>li [data-move-up].round:disabled,.box ul.sortable>li [data-remove].round:disabled{display:none}.box ul.sortable>li:first-child [data-move-up]{display:none}.box ul.sortable>li:first-child [data-move-up]:disabled{display:inline-block;background:var(--config-color-background)}.box ul.sortable>li:last-child [data-move-down]{display:none}.box ul.sortable>li:last-child [data-move-down]:disabled{display:inline-block;background:var(--config-color-background)}.box .toggle{position:relative;border-top:1px solid var(--config-console-background);border-bottom:1px solid var(--config-console-background);margin:0 -30px;padding:30px 30px 0 30px;height:65px;overflow:hidden}.box .toggle.list{border-bottom:none}.box .toggle.sorts button.ls-ui-open{width:calc(100% - 100px)}.box .toggle button.ls-ui-open{left:0;position:absolute;top:0;width:100%;height:95px;background:0 0;opacity:.5;border-radius:0}.box .toggle .icon-minus,.box .toggle .icon-up-open{display:none}.box .toggle .content{display:none}.box .toggle.open{height:auto}.box .toggle.open .icon-minus,.box .toggle.open .icon-up-open{display:block}.box .toggle.open .icon-down-open,.box .toggle.open .icon-plus{display:none}.box .toggle.open .content{display:block}.box .list li{border-bottom:solid 2px var(--config-border-color);margin:0 -30px 30px -30px;padding:0 30px 30px 30px}.box .list li:last-child{padding-bottom:0;margin-bottom:0;border-bottom:none}@media only screen and (max-width:550px){.box .list li .actions{float:none}}.box .list li .avatar{display:block}.box .list li .avatar.inline{display:inline-block}.box.new{text-align:center}.box.new i{font-size:80px;line-height:80px;font-family:Poppins,sans-serif;font-style:normal;font-weight:300}.box.new b{margin-top:20px;display:block}.box .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.box .info hr{background:var(--config-modal-note-border)!important}.box .table-wrap{margin:0 -30px;overflow-y:scroll}.box .table-wrap table{margin:0}a.box{border-right:none;border-left:none}a.box:hover{box-shadow:0 0 1px rgba(0,0,0,.2);opacity:.7}.box-asidex{padding-left:25px!important;padding-right:70px;left:0;background:#f9f9f9;border-radius:0 10px 10px 0;height:calc(100% - 30px);position:absolute;padding-top:30px}.box-asidex:after{content:"";display:block;position:absolute;height:100%;width:51px;background:#fff;top:0;bottom:0;right:-6px}.cover{background:var(--config-color-focus-fade);padding:30px 50px;margin:0 -50px;position:relative;border-bottom:solid 1px var(--config-border-fade)}.cover .title,.cover h1,.cover h2,.cover h3,.cover h4{color:var(--config-color-focus);font-weight:600;margin-bottom:50px!important;font-size:28px;line-height:42px}.cover .title span,.cover h1 span,.cover h2 span,.cover h3 span,.cover h4 span{font-weight:600}.cover i:before{margin:0!important}.cover p{color:var(--config-color-fade)}.cover .button{color:#fff}.cover .link,.cover a{display:inline-flex;color:var(--config-color-focus);border-left:none;border-right:none;cursor:pointer}.cover .link:hover,.cover a:hover{border-bottom-color:var(--config-color-focus)}.cover .link i,.cover a i{margin-right:.2rem}.console .database .row .col{height:452px}.console .database .row .col:after{width:2px;left:20px}.console .database hr{margin:0 -20px;background:var(--config-color-background);height:1px}.console .database h3{font-size:13px;line-height:20px;height:20px;background-color:var(--config-color-fade-super);margin:-20px -20px 0 -20px;padding:10px 20px;border-bottom:solid 1px var(--config-color-background);font-weight:600}.console .database .empty{height:162px;font-size:12px;text-align:center;margin:50px 0}.console .database .empty h4{font-size:13px;font-weight:600;line-height:120px}.console .database .search{background-color:var(--config-color-fade-super);margin:0 -20px 0 -20px;padding:10px 15px}.console .database .search input{height:40px;background-color:#fff;border-radius:25px;padding-top:0;padding-bottom:0}.console .database .code{height:411px;background:var(--config-color-fade-super);margin:0 -20px -20px -20px;padding:20px;width:calc(100% - 10px)}.console .database .code .ide{overflow:scroll;height:451px;margin:-20px;box-shadow:none;border-radius:0}.console .database .paging{background:var(--config-color-fade-super);margin:0 -20px -20px -20px;padding:20px}.console .database .button{margin:0 -20px;padding:0 20px!important;text-align:inherit;color:var(--config-color-focus);width:100%;font-size:15px;line-height:55px;box-sizing:content-box}.console .database .button i{margin-left:8px}.console .database .button:hover{border:none;background:var(--config-color-focus-fade)}.console .database .items{margin:0 -20px;height:262px;overflow-x:hidden;overflow-y:scroll}.console .database .items form{opacity:0;position:relative}.console .database .items form button{position:absolute;top:0;bottom:0;right:0;left:0;width:100%;height:45px;border-radius:0;cursor:pointer}.console .database .items li{padding:0;margin:0 0;line-height:45px;font-size:15px;padding-right:50px;padding-left:30px;position:relative}.console .database .items li i{position:absolute;display:none;left:10px}.console .database .items li .name{display:inline-block;width:100%;height:28px}.console .database .items li.selected,.console .database .items li:hover{background:#f5f5f5}.console .database .items li.selected i,.console .database .items li:hover i{display:block}.console .database .items li:last-child{border-bottom:none}.events.row{border-bottom:solid 1px var(--config-color-fade-super)}.events.row .col span.text{display:inline-block;width:calc(100% - 28px);word-break:break-all}.events.row .col span.action{float:left;cursor:pointer}.events.row:last-child{border-bottom:none}body>footer{color:var(--config-color-fade);line-height:40px;margin:0 -50px;padding:12px 50px;font-size:13px;width:100%;background:#f1f1f1;position:relative;margin-top:80px!important}body>footer:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}body>footer .logo img{height:22px;padding-top:12px}body>footer a{display:inline-flex;color:var(--config-color-fade);font-size:13px}body>footer a:hover{border-bottom-color:var(--config-color-fade)}body>footer a i{margin-right:.2rem}body>footer ul{display:flex;justify-content:center}body>footer ul:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}body>footer ul li{font-size:13px;float:right;margin-left:20px!important}body>footer .copyright{padding-right:2px}.loader{height:0;direction:ltr;position:fixed;top:0;width:0;margin:0 auto;right:0;opacity:0;z-index:4}.load-start~.loader{width:100%;background:var(--config-color-focus);height:3px;opacity:1;transition:width .3s ease-out,opacity .5s ease-out;-moz-transition:width .3s ease-out,opacity .5s ease-out;-webkit-transition:width .3s ease-out,opacity .5s ease-out;-o-transition:width .3s ease-out,opacity .5s ease-out}.www .load-start~.loader{background:#fff}.load-start>*{opacity:0}.load-end>*{opacity:1;transition:opacity .3s ease-out;-moz-transition:opacity .3s ease-out;-webkit-transition:opacity .3s ease-out;-o-transition:opacity .3s ease-out}[data-ls-if]{display:none}[data-service]{opacity:0}.load-service-start{opacity:0}.load-service-end{opacity:1;transition:opacity .5s ease-out;-moz-transition:opacity .5s ease-out;-webkit-transition:opacity .5s ease-out;-o-transition:opacity .5s ease-out}.load-screen{z-index:100000;position:fixed;height:100%;width:100%;background-color:var(--config-color-background-focus);top:0;right:0}.load-screen.loaded{transition:opacity 1s ease-in-out,top 1s .7s;opacity:0;top:-100%}.load-screen .animation{position:absolute;top:45%;left:50%;transform:translate(-50%,-50%) translateZ(1px);width:140px;height:140px}.load-screen .animation div{box-sizing:border-box;display:block;position:absolute;width:124px;height:124px;margin:10px;border:10px solid var(--config-color-focus);border-radius:50%;animation:animation 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--config-color-focus) transparent transparent transparent}.load-screen .animation div:nth-child(1){animation-delay:-.45s}.load-screen .animation div:nth-child(2){animation-delay:-.3s}.load-screen .animation div:nth-child(3){animation-delay:-.15s}@keyframes animation{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.load-screen img{position:absolute;height:20px;bottom:60px;left:50%;transform:translate(-50%,-50%)}.modal-open .modal-bg,.modal-open body .modal-bg{position:fixed;content:'';display:block;width:100%;height:100%;left:0;right:0;top:0;bottom:0;background:#0c0c0c;opacity:.75;z-index:5}.modal{overflow:auto;display:none;position:fixed;transform:translate3d(0,0,0);width:100%;max-height:90%;max-width:640px;background:var(--config-color-background-fade);z-index:1000;box-shadow:0 0 4px rgba(0,0,0,.25);padding:30px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:10px;box-sizing:border-box;text-align:right;white-space:initial;line-height:normal}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.modal{width:calc(100% - 20px)}}.modal.full{max-width:none;max-height:none;height:100%;border-radius:0;padding:80px 120px}.modal.full h1{font-weight:700}.modal.padding-tiny{padding:5px}.modal.padding-xs{padding:10px}.modal.padding-small{padding:15px}.modal.height-tiny>form{height:100px}.modal.height-small>form{height:220px}.modal.width-small{max-width:400px}.modal.width-medium{max-width:500px}.modal.width-large{max-width:800px}.modal.open{display:block}.modalbutton.close{display:none}.modal.fill{height:95%;max-height:95%;max-width:75%}.modal h1,.modal h2{margin-bottom:25px;margin-top:0;font-size:20px;text-align:right}.modal h1,.modal h2,.modal h3,.modal h4,.modal h5,.modal h6{color:inherit!important;line-height:35px}.modal .main,.modal>form{position:relative;border-top:solid 1px var(--config-border-color);padding:30px 30px 0 30px;margin:0 -30px}.modal .main.strip,.modal>form.strip{border:none;padding:0;margin:0}.modal .separator{margin:20px -30px}.modal .bullets{padding-right:40px}.modal .bullets li{margin-bottom:30px!important}.modal .bullets li:before{position:absolute}.modal .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.modal .ide.strech{box-shadow:none;border-radius:0;margin:0 -30px}.modal .ide pre{overflow:auto}.modal .paging form{padding:0;margin:0;border-top:none}.modal.sticky-footer form footer{margin:-30px}.modal.sticky-footer footer{position:sticky;bottom:-30px;background:var(--config-color-background-fade-super);height:50px;z-index:1;padding:30px;box-shadow:0 0 1px rgba(0,0,0,.15)}.modal.sticky-footer footer form{display:inline-block}[data-views-current="0"] .scroll-to,[data-views-current="1"] .scroll-to{opacity:0!important;pointer-events:none}.scroll-to-bottom .scroll-to,.scroll-to-top .scroll-to{opacity:1}.scroll-to{opacity:0;display:block;width:40px;height:40px;line-height:40px;border-radius:50%;position:fixed;transform:translateZ(0);margin:30px;padding:0;bottom:0;font-size:18px;z-index:100000;transition:opacity .15s ease-in-out;left:0}.phases{list-style:none;margin:0;padding:0;position:relative}.phases li{display:none}.phases li .badge{display:none}.phases li li{display:block}.phases li.selected{display:block}.phases .number{display:none}.phases h2,.phases h3,.phases h4,.phases h5,.phases h6{margin:0 0 30px 0;text-align:inherit}.container{position:relative}.container .tabs{height:55px;line-height:55px;list-style:none;padding:0;margin-bottom:50px!important;margin-top:-55px;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.container .tabs:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.container .tabs li{position:relative}.container .tabs .badge{background:var(--config-color-focus);color:var(--config-color-background-fade);display:inline-block;border-radius:15px;width:15px;height:15px;margin:10px;line-height:15px;padding:3px;text-align:center;font-weight:500!important;position:absolute;top:-5px;right:-35px;font-size:12px}.container .tabs .selected{font-weight:400;color:var(--config-color-focus);opacity:1}.container .tabs .selected:after{content:"";display:block;height:2px;background:var(--config-color-focus);width:calc(100% + 6px);margin:0 -3px;position:absolute;bottom:0;border-radius:2px}.container .tabs .number{display:none}.container .tabs li{float:right;margin-left:50px;color:var(--config-color-focus);opacity:.9;cursor:pointer}.container .tabs li:focus{outline:0}@media only screen and (max-width:550px){.container .tabs li{margin-left:25px}}.container .icon{display:none}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.container .tabs{width:auto;overflow-x:scroll;overflow-y:hidden;white-space:nowrap}.container .tabs li{display:inline-block;float:none}}.preview-box{display:grid;place-content:center;padding:40px;background:var(--config-color-background-fade);border:1px dashed var(--config-color-background-dark);border-radius:8px}.preview-box-image{display:grid;place-content:center;width:40px;height:40px;margin-inline:auto;background-color:var(--config-color-background-focus);border-radius:50%}.preview-box-text{margin-top:16px;color:var(--config-color-fade)}.upload-box{--p-header-text-color:var(--config-color-background-fade);--p-header-bg-color:var(--config-color-normal);--p-content-text-color:var(--config-color-normal);--p-content-bg-color:var(--config-color-background-fade);--p-border-color:var(--config-modal-note-border);--box-shadow:0 10px 10px rgba(0, 0, 0, 0.05);--border-radius:6px;--transition:0.2s;position:fixed;z-index:1;overflow:hidden;min-width:285px;box-shadow:var(--box-shadow);border-radius:var(--border-radius);font-size:14px;line-height:1}.upload-box *{all:unset;display:revert}.upload-box-header{display:flex;padding:16px;padding-inline-end:21px;color:var(--p-header-text-color);background-color:var(--p-header-bg-color)}.upload-box-header .icon-button{margin-inline-start:16px}.upload-box-title{align-self:center;margin-inline-end:auto;margin-block-end:0}.upload-box-title .amount::before{content:"("}.upload-box-title .amount::after{content:")"}.upload-box-content{background-color:var(--p-content-bg-color);color:var(--p-content-text-color);height:0;overflow:auto;transition:var(--transition)}.upload-box-content.is-open{height:200px}.upload-box-item{display:flex;align-items:center;padding:13px 20px}.upload-box-item .file-name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;align-self:center;margin-inline-end:auto;line-height:normal}.upload-box-item .icon-button{align-self:center;margin-inline-start:16px}.upload-box-item .pill{margin-inline-start:8px}.upload-box-item:not(:last-child){border-bottom:solid 1px var(--p-border-color)}@media only screen and (max-width:550px){.upload-box{inset-inline:16px;inset-block-end:20px}}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (min-width:1199px){.upload-box{max-width:285px;inset-inline-end:24px;inset-block-end:24px}}:root .theme-dark .upload-box{--p-header-text-color:#fff;--p-header-bg-color:var(--config-color-background-dark)}.upload-image{--p-upload-image-size:var(--upload-image-size, 40px);--p-upload-bg-color:var(--config-color-fade-super);--p-upload-icon-color:var(--config-color-fade);position:relative;display:grid;place-content:center;flex-shrink:0;width:var(--p-upload-image-size);height:var(--p-upload-image-size);background-color:var(--p-upload-bg-color);color:var(--p-upload-icon-color);border-radius:50%}.upload-image .icon{position:relative;z-index:20}.upload-image .progress{--progress:var(--progress-value, 0);--zero-value:0 0% 0%/0%;position:absolute;z-index:10;inset:0;border-radius:50%;background:radial-gradient(var(--p-upload-bg-color) 0,var(--p-upload-bg-color) 64%,transparent 64.01%,transparent 100%),conic-gradient(hsl(194 66% 50%) 0,hsl(97 66% 50%) calc(var(--progress) * 1%),hsl(var(--zero-value)) calc(var(--progress) * 1%),hsl(var(--zero-value)) 100%)}.upload-image.is-finished .progress{display:none}:root .theme-dark .upload-image{--p-upload-bg-color:var(--config-color-background-dark);--p-upload-icon-color:var(--config-color-focus)}[data-views-current]:not([data-views-current="0"]):not([data-views-current="1"]) .upload-box{margin-right:4rem}.icon-button{--p-icon-button-size:var(--icon-button-size, 20px);width:var(--p-icon-button-size);height:var(--p-icon-button-size);font-size:var(--p-icon-button-size);transition:.2s;line-height:1;text-align:center;flex-shrink:0;cursor:pointer}.icon-button>::before{margin:0}.icon-button.is-open{transform:rotate(180deg)}.icon-button.is-success{color:var(--config-color-success)}.icon-button:focus,.icon-button:hover{background-color:unset}.icon-button:focus-visible{outline:dashed 1px var(--config-color-primary)}.pill{--p-pill-text-color:var(--config-defalut-color-hsl, var(--pill-text-color));color:hsl(var(--p-pill-text-color));background-color:hsl(var(--p-pill-text-color) / .2);display:inline-grid;place-content:center;padding-inline:12px;height:30px;border-radius:15px;font-size:14px;font-weight:500}.pill.is-disabled{--p-pill-text-color:var(--config-disabled-color-hsl)}.pill.is-pending{--p-pill-text-color:var(--config-pending-color-hsl)}.pill.is-failed{--p-pill-text-color:var(--config-failed-color-hsl)}:root .theme-dark .pill.is-failed{color:#ffcfcf;background-color:#b91c1c}html{padding:0;margin:0;direction:rtl}body{margin:0;background:var(--config-console-background) no-repeat fixed;min-width:300px}ul{padding:0;margin:0}ul li{margin:0;list-style:none}.icon-left-open:before{content:'\e814'!important}.icon-right-open:before{content:'\e813'!important}.icon-right-dir:before{content:'\e84e'!important}.icon-left-dir:before{content:'\e84d'!important}.icon-link-ext:before{-moz-transform:scaleX(-1);-o-transform:scaleX(-1);-webkit-transform:scaleX(-1);transform:scaleX(-1)}.icon-article-alt:before{-moz-transform:scaleX(-1);-o-transform:scaleX(-1);-webkit-transform:scaleX(-1);transform:scaleX(-1)}.copy{border-radius:10px 0 0 10px!important} \ No newline at end of file diff --git a/public/fonts/icon.eot b/public/fonts/icon.eot index a153c9a64e..bf985c1b50 100644 Binary files a/public/fonts/icon.eot and b/public/fonts/icon.eot differ diff --git a/public/fonts/icon.svg b/public/fonts/icon.svg index c6eb0c8bb9..59fef35d45 100644 --- a/public/fonts/icon.svg +++ b/public/fonts/icon.svg @@ -4,405 +4,411 @@ + horiz-adv-x="1333.3333333333333" d="M625.0838681175594 926.235987959298C570.469470796131 921.0540683164407 520.063220796131 906.1885549235838 470.8567475818452 880.7527290307266C373.6173502604167 830.4882201021553 301.5263904389881 748.8710326021553 263.0922386532738 645.5345370664409C256.3411225818452 627.3827513521553 246.0129975818452 586.3196933164409 242.3416806175595 563.0345370664411C238.0342029389881 535.7164567092982 238.0342029389881 463.6863227807266 242.3416806175595 436.3682424235837C256.7540690104167 344.9558540307266 296.9292922247024 264.5797379592981 360.5492699032738 199.8760549235837C417.0297386532738 142.4329745664409 482.9103190104166 104.2410102807267 559.274158296131 84.6718138521553C599.3723725818452 74.3955861735838 617.8372163318452 72.2605415307267 666.750720796131 72.2443584950124C715.3684663318452 72.2281754592981 733.1575288318452 74.2901174235838 774.250720796131 84.7058540307266C923.819359188988 122.6160102807266 1043.8361002604167 242.6327513521553 1081.7462565104167 392.2013897450123C1092.153064546131 433.2594254592981 1094.2222609747023 451.087550459298 1094.2222609747023 499.7013897450124C1094.2222609747023 548.3369924235838 1092.1486002604167 566.1885549235838 1081.7356538318452 607.2013897450124C1062.5487118675594 682.7717022450124 1023.7903413318452 749.6472602807266 966.5760556175596 805.9028406378695C896.0152297247025 875.2817468878695 805.4940243675594 917.1042915307266 705.9175734747023 926.3330861735838C685.0286225818452 928.2689120664407 646.012439546131 928.2220370664407 625.0838681175594 926.235987959298M734.5643368675596 785.5110995664409C742.0425734747023 782.3866576021553 801.9555199032739 723.4949165307266 807.9019484747023 713.4234879592982C813.1201404389881 704.5853183164411 813.7713681175594 690.1891129592982 809.352283296131 681.3682424235838C807.7451404389881 678.1595370664409 766.942127046131 635.9720370664409 718.6798502604167 587.6182424235838L630.9292922247023 499.7013897450124L718.6798502604167 411.7845370664409C766.942127046131 363.4307424235838 807.7451404389881 321.2432424235838 809.352283296131 318.0345370664409C813.7786225818452 309.1985995664409 813.1206984747023 294.8129968878695 807.8863234747023 285.9792915307266C801.7853190104165 275.6840906378695 742.2786225818452 217.114894209298 734.7032877604165 213.9497156378695C727.5967029389881 210.9804076021553 714.1212565104167 210.568019209298 707.2758324032739 213.1104299235838C700.2618815104167 215.7158986735837 438.8517252604167 477.2220370664409 434.9516136532738 485.5345370664409C430.8874395461309 494.196925459298 430.9789574032738 505.3191352807266 435.1910109747024 514.7013897450124C437.7981538318452 520.5088674235838 467.9722609747024 551.5708093878695 568.9041806175594 652.3481531378695C646.028064546131 729.3537334950124 701.6324172247023 783.6104299235838 705.0838681175594 785.2270593878695C712.4326404389881 788.6684656378695 726.6787341889881 788.8057424235838 734.5643368675596 785.5110995664409" /> + horiz-adv-x="1333.3333333333333" d="M625.0838681175594 926.235987959298C570.469470796131 921.0540683164407 520.063220796131 906.1885549235838 470.8567475818452 880.7527290307266C373.6173502604167 830.4882201021553 301.5263904389881 748.8710326021553 263.0922386532738 645.5345370664409C256.3411225818452 627.3827513521553 246.0129975818452 586.3196933164409 242.3416806175595 563.0345370664411C238.0342029389881 535.7164567092982 238.0342029389881 463.6863227807266 242.3416806175595 436.3682424235837C256.7540690104167 344.9558540307266 296.9292922247024 264.5797379592981 360.5492699032738 199.8760549235837C417.0297386532738 142.4329745664409 482.9103190104166 104.2410102807267 559.274158296131 84.6718138521553C599.3723725818452 74.3955861735838 617.8372163318452 72.2605415307267 666.750720796131 72.2443584950124C715.3684663318452 72.2281754592981 733.1575288318452 74.2901174235838 774.250720796131 84.7058540307266C923.819359188988 122.6160102807266 1043.8361002604167 242.6327513521553 1081.7462565104167 392.2013897450123C1092.153064546131 433.2594254592981 1094.2222609747023 451.087550459298 1094.2222609747023 499.7013897450124C1094.2222609747023 548.3369924235838 1092.1486002604167 566.1885549235838 1081.7356538318452 607.2013897450124C1062.5487118675594 682.7717022450124 1023.7903413318452 749.6472602807266 966.5760556175596 805.9028406378695C896.0152297247025 875.2817468878695 805.4940243675594 917.1042915307266 705.9175734747023 926.3330861735838C685.0286225818452 928.2689120664407 646.012439546131 928.2220370664407 625.0838681175594 926.235987959298M634.3422386532737 781.0189120664409C638.8751627604166 777.6584209950124 699.3589797247023 718.0496040307266 768.750720796131 648.5551843878695C865.8494931175596 551.3124388521553 895.696033296131 520.4737111735838 898.297595796131 514.7013897450124C902.5219261532739 505.3280638521552 902.617908296131 494.2058540307266 898.5498279389881 485.5345370664409C894.6497163318452 477.2220370664409 633.2395600818452 215.7158986735837 626.2256091889881 213.1104299235838C619.3801850818452 210.568019209298 605.9047386532739 210.9804076021553 598.7981538318452 213.9497156378695C591.2228190104166 217.114894209298 531.7161225818452 275.6840906378695 525.6151181175595 285.9792915307266C520.3807431175595 294.8129968878695 519.7228190104166 309.1985995664409 524.149158296131 318.0345370664409C525.7563011532737 321.2432424235838 566.559314546131 363.4307424235838 614.8215913318452 411.7845370664409L702.5721493675594 499.7013897450124L614.8215913318452 587.6182424235838C566.559314546131 635.9720370664409 525.7563011532737 678.1595370664409 524.149158296131 681.3682424235838C519.7300734747023 690.1891129592982 520.3813011532739 704.5853183164411 525.5994931175595 713.4234879592982C531.1536225818452 722.8297379592982 591.2892252604166 782.2544031378695 598.5648949032739 785.5256084950124C602.2914574032739 787.2008317092982 608.0152297247023 787.9173495664409 615.1759440104166 787.6054076021553C624.766345796131 787.1874388521553 627.1067475818452 786.3833093878695 634.3422386532737 781.0189120664409" /> + horiz-adv-x="1333.3333333333333" d="M456.184008434598 898.356150071679C434.2840084345979 892.9061500716791 418.684008434598 875.2061500716791 418.684008434598 855.7061500716791L418.684008434598 849.9561500716791L667.0340084345979 849.9561500716791L915.384008434598 849.9561500716791L915.384008434598 855.7061500716791C915.384008434598 873.756150071679 901.784008434598 890.6561500716791 882.4340084345979 896.6561500716791C871.934008434598 899.9061500716791 867.0340084345979 899.9561500716791 666.4340084345979 899.8061500716791C553.584008434598 899.7061500716791 458.9340084345979 899.0561500716791 456.184008434598 898.356150071679M353.484008434598 797.3561500716792C340.734008434598 793.4061500716791 330.134008434598 785.256150071679 324.5340084345979 774.9561500716791L319.5340084345979 765.8061500716791L318.984008434598 732.8561500716792L318.434008434598 699.9561500716791L667.0840084345979 699.9561500716791L1015.6840084345978 699.9561500716791L1015.0840084345978 732.8561500716792L1014.534008434598 765.8061500716791L1009.384008434598 774.9561500716791C1003.4840084345979 785.506150071679 992.884008434598 793.606150071679 979.884008434598 797.4561500716791C967.484008434598 801.106150071679 365.484008434598 801.0561500716791 353.484008434598 797.3561500716792M217.734008434598 698.5561500716791C170.784008434598 652.7061500716791 170.934008434598 653.4061500716791 186.834008434598 563.306150071679C192.384008434598 531.6561500716791 208.5840084345979 437.1561500716791 222.884008434598 353.3061500716791C262.134008434598 122.306150071679 259.184008434598 136.9561500716789 268.984008434598 124.2561500716791C276.384008434598 114.7061500716792 282.434008434598 110.106150071679 294.2840084345979 105.1061500716791L304.5340084345979 100.8061500716791L663.634008434598 100.356150071679C1053.734008434598 99.906150071679 1029.534008434598 99.356150071679 1047.534008434598 108.5561500716791C1056.9840084345979 113.3561500716791 1068.184008434598 125.906150071679 1071.934008434598 135.856150071679C1076.134008434598 147.206150071679 1077.184008434598 152.856150071679 1109.534008434598 343.3061500716791C1124.734008434598 432.6561500716791 1141.384008434598 529.0561500716791 1146.584008434598 557.4561500716791C1154.4340084345981 600.7061500716791 1155.984008434598 612.3561500716792 1156.084008434598 629.1061500716792C1156.2340084345979 658.306150071679 1154.634008434598 661.0561500716791 1116.334008434598 698.5561500716791L1086.184008434598 728.006150071679L1085.7340084345979 689.006150071679L1085.2840084345978 649.9561500716791L667.0340084345979 649.9561500716791L248.784008434598 649.9561500716791L248.334008434598 689.006150071679L247.884008434598 728.006150071679L217.734008434598 698.5561500716791M517.0340084345979 449.956150071679L517.0340084345979 399.956150071679L667.0340084345979 399.956150071679L817.0340084345979 399.956150071679L817.0340084345979 449.956150071679L817.0340084345979 499.956150071679L842.134008434598 499.956150071679L867.1840084345979 499.956150071679L866.6840084345979 443.706150071679L866.1840084345979 387.456150071679L861.5340084345979 377.906150071679C855.8840084345978 366.456150071679 846.334008434598 357.856150071679 834.1840084345979 353.3061500716791C825.484008434598 350.0561500716791 821.384008434598 349.956150071679 667.0340084345979 349.956150071679C512.684008434598 349.956150071679 508.584008434598 350.0561500716791 499.8840084345979 353.3061500716791C487.734008434598 357.856150071679 478.1840084345979 366.456150071679 472.5340084345979 377.906150071679L467.8840084345979 387.456150071679L467.3840084345979 443.706150071679L466.8840084345979 499.956150071679L491.934008434598 499.956150071679L517.0340084345979 499.956150071679L517.0340084345979 449.956150071679" /> + horiz-adv-x="1333.3333333333333" d="M166.6666666666666 937.5L166.6666666666666 875L666.6666666666666 875L1166.6666666666665 875L1166.6666666666665 937.5L1166.6666666666665 1000L666.6666666666666 1000L166.6666666666666 1000L166.6666666666666 937.5M166.6666666666666 687.5L166.6666666666666 625L479.1666666666666 625L791.6666666666666 625L791.6666666666666 687.5L791.6666666666666 750L479.1666666666666 750L166.6666666666666 750L166.6666666666666 687.5M166.6666666666666 312.5L166.6666666666666 250L666.6666666666666 250L1166.6666666666665 250L1166.6666666666665 312.5L1166.6666666666665 375L666.6666666666666 375L166.6666666666666 375L166.6666666666666 312.5M166.6666666666666 62.5L166.6666666666666 0L541.6666666666666 0L916.6666666666666 0L916.6666666666666 62.5L916.6666666666666 125L541.6666666666666 125L166.6666666666666 125L166.6666666666666 62.5M1088.2291666666665 122.8125C1070.8229166666665 117.90625 1054.9479166666665 104.09375 1046.9479166666665 86.96875C1043.2291666666665 78.9375 1042.5416666666665 75.1875 1042.5416666666665 62.46875C1042.5104166666665 48.84375 1043.0104166666665 46.40625 1047.9166666666665 36.46875C1054.4166666666665 23.21875 1066.3541666666665 11.53125 1079.6354166666665 5.3125C1087.7291666666665 1.5625 1091.4479166666665 0.875 1104.1979166666665 0.875C1117.8229166666665 0.84375 1120.2604166666665 1.34375 1130.1979166666665 6.25C1143.4479166666665 12.75 1155.1666666666665 24.6875 1161.3229166666665 37.96875C1165.0416666666665 45.96875 1165.7604166666665 49.78125 1165.7291666666665 61.65625C1165.6979166666665 73.84375 1165.0104166666665 77.25 1160.8854166666665 85.84375C1154.6979166666665 98.65625 1140.3229166666665 113.0625 1127.7916666666665 118.96875C1116.1979166666665 124.4375 1099.6041666666665 126.0625 1088.2291666666665 122.8125" /> + horiz-adv-x="1333.3333333333333" d="M611.9741443452381 925.3640288205146C607.1013764880952 924.0526448919431 599.893787202381 921.0922654276574 595.9568452380952 918.784787749086C585.518787202381 912.667600249086 570.5411086309524 896.1865734633718 565.3474702380952 885.1023100705146L560.8335193452381 875.4672654276575L560.3642113095237 780.8841181062289C560.1058407738095 728.8634707848004 559.4378720238095 686.3009707848003 558.8792782738095 686.3009707848003C558.3212425595239 686.3009707848003 523.6839657738094 705.9706136419431 481.9082961309524 730.011350249086C440.1320684523809 754.0520868562289 402.175037202381 775.0275332848004 397.5595238095238 776.6235154276575C392.5210193452381 778.3657029276575 384.0740327380952 779.5470645348004 376.4255952380952 779.5794306062289C350.6622023809524 779.6899216776575 329.6108630952381 768.7875779276575 316.1884300595238 748.3841181062289C301.0918898809524 725.4348993562289 274.4986979166667 677.4795422133718 271.4663318452381 667.7362386419431C263.4914434523809 642.1134707848003 272.1337425595238 611.109006499086 291.9272693452381 594.3311047133718C295.9088541666667 590.9561047133718 332.5416666666667 568.9248547133718 373.3335193452381 545.3723993562289C414.1248139880952 521.8193859633718 448.3770461309524 501.7061047133718 449.4484747023809 500.6748547133718C450.9082961309524 499.2708368562289 432.1761532738095 487.7289841776575 374.7224702380952 454.6341181062289C324.4735863095238 425.6893636419432 295.3033854166667 407.8824439990861 290.0851934523809 402.9672654276575C270.4423363095238 384.4661493562288 263.3033854166667 355.2418189990861 272.1705729166667 329.6341181062288C275.9172247023809 318.8143636419432 308.7682291666667 260.669274356229 319.3675595238095 246.0967297133718C337.9099702380952 220.6056582848004 378.081287202381 211.7663725705147 407.4908854166667 226.7066627490861C411.1622023809524 228.5721761419433 446.5567336309524 248.7440511419432 486.143787202381 271.5331136419432C525.7313988095237 294.3221761419432 558.5204613095239 312.9672654276575 559.0081845238095 312.9672654276575C559.4959077380952 312.9672654276575 560.1058407738095 270.4047654276575 560.3642113095237 218.3841181062289L560.8335193452381 123.8009707848004L566.229724702381 112.7719529276575C573.315662202381 98.2898100705146 590.6700148809523 81.6106806062289 604.4244791666666 76.0632475705146C613.9417782738095 72.2250779276575 615.3792782738094 72.1341181062289 666.6666666666666 72.1341181062289C717.9540550595239 72.1341181062289 719.3915550595237 72.2250779276575 728.9088541666666 76.0632475705146C742.6633184523808 81.6106806062289 760.0176711309524 98.2898100705146 767.1036086309523 112.7719529276575L772.4998139880952 123.8009707848004L772.9691220238094 218.3841181062289C773.2274925595239 270.4047654276575 773.823474702381 312.9672654276575 774.2938988095237 312.9672654276575C774.764880952381 312.9672654276575 807.5533854166666 294.3216181062288 847.1582961309524 271.532555606229C886.7626488095239 248.7429350705146 922.171130952381 228.5710600705147 925.8424479166666 226.7061047133718C955.2548363095239 211.7669306062289 995.4239211309524 220.6056582848004 1013.9657738095239 246.0967297133718C1024.5651041666665 260.669274356229 1057.4161086309523 318.8143636419432 1061.1627604166665 329.6341181062288C1070.0299479166665 355.2418189990861 1062.8909970238096 384.4661493562288 1043.2481398809523 402.9672654276575C1038.0299479166665 407.8824439990861 1008.8597470238096 425.6893636419432 958.610863095238 454.6341181062289C901.1571800595239 487.7289841776575 882.4250372023808 499.2708368562289 883.8848586309524 500.6748547133718C884.956287202381 501.7061047133718 919.208519345238 521.8193859633718 959.9998139880952 545.3723993562289C1000.7916666666666 568.9248547133718 1037.4244791666665 590.9561047133718 1041.4060639880952 594.3311047133718C1061.1995907738096 611.109006499086 1069.8418898809523 642.1134707848003 1061.8670014880954 667.7362386419431C1058.8346354166667 677.4795422133718 1032.2414434523807 725.4348993562289 1017.1449032738096 748.3841181062289C1003.7224702380952 768.7875779276575 982.671130952381 779.6899216776575 956.907738095238 779.5794306062289C949.259300595238 779.5470645348004 940.8123139880952 778.3657029276575 935.7738095238096 776.6235154276575C931.1582961309524 775.0275332848004 893.2012648809524 754.0520868562289 851.425037202381 730.011350249086C809.6493675595237 705.9706136419431 775.0120907738095 686.3009707848003 774.4540550595237 686.3009707848003C773.8954613095237 686.3009707848003 773.2274925595239 728.8634707848004 772.9691220238094 780.8841181062289L772.4998139880952 875.4672654276575L767.9858630952381 885.1023100705146C762.800037202381 896.1692743562289 747.8190104166666 912.665368106229 737.4177827380952 918.7607922133718C723.6075148809524 926.8539841776574 714.7816220238095 927.9767520348004 665.8999255952381 927.8578904276574C632.3452380952381 927.7758591776574 618.5701264880952 927.1391404276574 611.9741443452381 925.3640288205146" /> + horiz-adv-x="1333.3333333333333" d="M431.3275553385417 844.0733288558604L197.6019694010416 750.4961804183604L197.5775553385416 719.2461804183604L197.5536295572916 687.9961804183604L228.4393717447917 687.9961804183604C251.6942545572917 687.9961804183604 259.4833170572917 687.4815319808604 259.9667154947917 685.9126843246104C260.3197428385417 684.7671765121104 261.0653483072917 681.7481335433604 261.6234537760417 679.2041882308604C262.1815592447917 676.6602429183604 265.2909342447917 671.6421765121104 268.5336100260417 668.0533093246104C280.0707194010417 655.2832897933604 245.8348795572917 656.2505749496104 669.2767740885416 656.7320202621104L1048.3871256510415 657.1626843246104L1056.1586100260415 661.7315319808604C1064.4691569010415 666.6167858871104 1070.2323404947915 674.3077038558604 1071.9252115885415 682.7705944808604L1072.9701334635415 687.9961804183604L1104.4652506510415 687.9961804183604L1135.9603678385415 687.9961804183604L1135.5072428385415 719.1617077621104L1135.0536295572915 750.3277233871104L902.5536295572916 843.3404186996104C774.6786295572916 894.4971569808604 668.9286295572916 936.6451061996104 667.5536295572916 937.0015515121104C666.1786295572916 937.3584851058604 559.8768717447916 895.5406140121104 431.3275553385417 844.0733288558604M322.5536295572917 437.2989147933603L322.5536295572917 249.9346569808603L301.8568522135417 249.3819226058603C281.9559733072917 248.8506726058603 280.8876139322917 248.6372936996103 274.0882975260417 243.8296765121103C263.0121256510417 235.9976452621103 260.1942545572917 228.8482311996103 259.4725748697917 206.7461804183603L258.8607584635417 187.9961804183603L665.8431803385416 187.9961804183603L1072.8256022135415 187.9961804183603L1072.2728678385415 208.7139538558603C1071.6595865885415 231.7027233871103 1070.8514811197915 233.7647351058603 1058.5472819010415 243.7329968246103C1052.3964029947915 248.7159069808603 1051.7958170572915 248.8418835433603 1031.5716959635415 249.3819226058603L1010.8871256510416 249.9346569808603L1010.8871256510416 437.2989147933603L1010.8871256510416 624.6626843246104L947.5536295572916 624.6626843246104L884.2201334635416 624.6626843246104L884.2201334635416 437.1626843246103L884.2201334635416 249.6626843246103L853.3871256510416 249.6626843246103L822.5536295572916 249.6626843246103L822.5536295572916 437.1626843246103L822.5536295572916 624.6626843246104L760.0536295572916 624.6626843246104L697.5536295572916 624.6626843246104L697.5536295572916 437.1626843246103L697.5536295572916 249.6626843246103L666.7201334635416 249.6626843246103L635.8871256510416 249.6626843246103L635.8871256510416 437.1626843246103L635.8871256510416 624.6626843246104L572.5536295572916 624.6626843246104L509.2201334635416 624.6626843246104L509.2201334635416 437.1626843246103L509.2201334635416 249.6626843246103L478.3871256510416 249.6626843246103L447.5536295572917 249.6626843246103L447.5536295572917 437.1626843246103L447.5536295572917 624.6626843246104L385.0536295572917 624.6626843246104L322.5536295572917 624.6626843246104L322.5536295572917 437.2989147933603M215.9198404947916 152.5796765121103C211.8832194010416 150.5171765121103 206.2865397135416 145.9493054183603 203.4838053385416 142.4292858871103L198.3871256510416 136.0288952621103L197.8802897135416 99.5122936996103L197.3729654947916 62.9961804183603L666.6302897135416 62.9961804183603L1135.8871256510415 62.9961804183603L1135.8871256510415 92.9141491683603C1135.8871256510415 109.3692272933603 1135.0887858072915 126.5533093246103 1134.1131998697915 131.1016491683603C1132.1156412760415 140.4180554183603 1124.9452311197915 149.0240124496103 1115.4115397135415 153.5479382308603C1109.9833170572915 156.1241101058603 1076.7987467447915 156.3296765121103 666.4047037760416 156.3296765121103L223.2601725260416 156.3296765121103L215.9198404947916 152.5796765121103" /> + horiz-adv-x="1333.3333333333333" d="M651.6588541666666 998.0067197881228C635.4283854166666 993.3979028238372 621.1878720238094 979.6054921095516 615.7470238095237 963.2254697881228C613.1571800595237 955.4285947881228 613.0589657738094 947.0496885381228 615.3424479166666 928.7070546095516C615.8089657738095 924.9559385381228 614.9317336309524 924.5775903238372 597.4998139880952 921.018438538123C562.8675595238094 913.9475680024086 526.5327380952381 899.3739072881228 499.0126488095237 881.5156483595514C445.7526041666667 846.9553805024086 401.7152157738095 787.5602912166943 387.6326264880952 731.2929921095514C382.5394345238095 710.9419876452657 381.6454613095238 701.6585055024086 380.0617559523809 652.6518090738372C377.5556175595238 575.1266974666943 369.5411086309523 515.0290412166943 354.0321800595238 457.4788180024086C337.0902157738095 394.6088403238371 307.0941220238095 333.7438849666942 266.3630952380952 279.5904251452656C260.7347470238095 272.1071662166942 243.884300595238 253.8900903238371 228.9172247023809 239.10660818098L201.7040550595238 212.2282599666942L203.5076264880952 202.4403135381228C207.6443452380952 179.9871885381229 223.4082961309523 159.6758046095513 244.4216889880952 149.7232376452657L255.833519345238 144.3186617524086L389.3206845238095 143.8638626452657L522.8084077380952 143.4090635381229L524.7213541666666 127.8409831809799C530.4468005952381 81.2516974666942 555.2626488095237 43.0775903238371 595.6633184523808 18.7098447881229C638.760974702381 -7.2845748547343 702.5366443452381 -5.3509811047344 744.6164434523808 23.2249117524086C781.4920014880953 48.2662063952657 803.1923363095237 83.7410947881228 808.6119791666666 127.8409831809799L810.5249255952381 143.4090635381229L944.0126488095239 143.8638626452657L1077.4998139880952 144.3186617524086L1088.911644345238 149.7232376452657C1109.925037202381 159.6758046095513 1125.688988095238 179.9871885381229 1129.825706845238 202.4403135381228L1131.6292782738094 212.2282599666942L1104.4161086309523 239.10660818098C1089.4490327380952 253.8900903238371 1072.5985863095239 272.1071662166942 1066.970238095238 279.5904251452656C1020.1471354166666 341.843215323837 988.796130952381 410.2835055024085 972.6220238095239 485.5552688952657C960.1605282738096 543.5491305024086 955.4691220238096 584.1529251452657 953.310081845238 652.6998001452657C951.6627604166666 705.0162063952657 949.3028273809522 722.8967867524085 940.7604166666666 747.7784831809801C923.4216889880952 798.2857376452657 881.8084077380953 850.6975680024086 834.8491443452381 881.1741305024086C807.0807291666667 899.1958938952657 770.3770461309523 913.9654251452658 735.8335193452381 921.018438538123C718.3949032738095 924.57926443098 717.5243675595237 924.95426443098 718.0009300595237 928.7070546095516C720.4914434523808 948.3192197881228 720.186755952381 956.27457693098 716.5757068452381 965.8867421095516C712.1928943452381 977.55192068098 701.3396577380952 989.2717867524086 689.7124255952381 994.8923224666942C680.1041666666666 999.5374117524086 662.2079613095237 1001.0022555024086 651.6588541666666 998.0067197881228M583.0757068452381 150.3460055024085C584.3798363095237 149.5195546095513 585.8965773809523 143.7689965738371 586.7001488095237 136.6032599666942C591.1058407738095 97.3186617524086 618.7146577380952 68.765090323837 657.4998139880952 63.38004568098C672.5796130952381 61.28629568098 674.9998139880952 59.9358492524086 674.9998139880952 53.61442068098C674.9998139880952 47.022902823837 672.0556175595237 45.1518090738371 661.6834077380952 45.1518090738371C628.7319568452381 45.1518090738371 593.9534970238094 68.2505813952656 578.6800595238094 100.2801572881229C569.3195684523808 119.9101796095513 565.5466889880952 143.7935501452657 570.952380952381 149.1992421095515C573.8067336309523 152.0535947881229 579.5277157738094 152.59488943098 583.0757068452381 150.3460055024085" /> + horiz-adv-x="1333.3333333333333" d="M388.8346354166667 996.7427455357142C385.1465773809523 994.4938616071428 382.9562872023809 991.4626116071428 381.7308407738095 986.9107142857142C380.5896577380952 982.6741071428572 380.1142113095238 958.4508928571428 380.396019345238 918.91796875L380.833519345238 857.5061383928571L479.1666666666666 857.5061383928571L577.4998139880952 857.5061383928571L577.4998139880952 920.8392857142858C577.4998139880952 955.6729910714286 576.9172247023808 986.2583705357142 576.2051711309523 988.8080357142858C575.4931175595237 991.3571428571428 572.4931175595237 994.9168526785716 569.5388764880952 996.7181919642858C564.3837425595237 999.8616071428572 560.7319568452381 999.9938616071428 479.1666666666666 999.9938616071428C397.8167782738095 999.9938616071428 393.9378720238095 999.8537946428572 388.8346354166667 996.7427455357142M763.8346354166666 996.7427455357142C760.1465773809524 994.4938616071428 757.9562872023808 991.4626116071428 756.7308407738095 986.9107142857142C755.5896577380952 982.6741071428572 755.1142113095239 958.4508928571428 755.3960193452381 918.91796875L755.8335193452381 857.5061383928571L854.1666666666666 857.5061383928571L952.4998139880952 857.5061383928571L952.4998139880952 920.8392857142858C952.4998139880952 955.6729910714286 951.917224702381 986.2583705357142 951.2051711309524 988.8080357142858C950.4931175595239 991.3571428571428 947.4931175595239 994.9168526785716 944.5388764880952 996.7181919642858C939.3837425595239 999.8616071428572 935.731956845238 999.9938616071428 854.1666666666666 999.9938616071428C772.8167782738095 999.9938616071428 768.9378720238095 999.8537946428572 763.8346354166666 996.7427455357142M315.8335193452381 820.0970982142858C313.9998139880952 819.3470982142858 311.1577380952381 817.2399553571429 309.5171130952381 815.4151785714287C307.6722470238095 813.36328125 279.8396577380952 718.4481026785713 236.5740327380952 566.6651785714284L166.6142113095238 321.2332589285714L167.0567336309523 173.4051339285714L167.4998139880952 25.5764508928571L172.5254836309523 17.4486607142857C176.1845238095238 11.5312500000001 179.9763764880952 8.0535714285715 186.4657738095238 4.6629464285714L195.380394345238 0.0061383928572L343.9401041666667 0.0156250000001C442.4635416666667 0.0217633928572 494.6203497023808 0.6138392857143 498.7955729166666 1.7728794642857C506.9886532738094 4.0479910714285 516.4077380952381 12.4224330357143 520.2252604166666 20.8253348214286C523.0941220238094 27.1411830357143 523.2620907738095 36.4933035714286 523.2966889880952 191.9229910714285L523.3335193452381 356.3404017857143L531.9897693452381 358.4168526785714C543.5667782738094 361.1941964285715 555.2224702380952 372.5089285714286 558.042224702381 383.7070312500001C559.4914434523808 389.4614955357143 559.9998139880952 447.3789062500001 559.9998139880952 606.5775669642858L559.9998139880952 821.6729910714287L439.5835193452381 821.5669642857142C373.3541666666667 821.5089285714287 317.6666666666667 820.84765625 315.8335193452381 820.0970982142858M594.9998139880952 625.0061383928571L594.9998139880952 428.3392857142857L666.6666666666666 428.3392857142857L738.3335193452381 428.3392857142857L738.3335193452381 625.0061383928571L738.3335193452381 821.6729910714287L666.6666666666666 821.6729910714287L594.9998139880952 821.6729910714287L594.9998139880952 625.0061383928571M773.3335193452381 605.6478794642858C773.3335193452381 440.2393973214286 773.8111979166666 387.9508928571429 775.370349702381 382.6997767857143C778.4518229166666 372.3236607142857 790.5595238095239 361.00390625 801.3435639880952 358.4168526785714L809.9998139880953 356.3404017857143L810.0366443452381 191.9229910714285C810.0712425595237 36.4933035714286 810.2392113095237 27.1411830357143 813.1080729166666 20.8253348214286C816.9255952380952 12.4224330357143 826.3446800595239 4.0479910714285 834.5377604166666 1.7728794642857C838.7129836309524 0.6138392857143 890.8697916666666 0.0217633928572 989.3932291666666 0.0156250000001L1137.9529389880952 0.0061383928572L1146.8675595238094 4.6629464285714C1153.356956845238 8.0535714285715 1157.1488095238094 11.5312500000001 1160.807849702381 17.4486607142857L1165.833519345238 25.5764508928571L1166.2765997023807 173.4029017857144L1166.7191220238094 321.2293526785715L1096.7040550595236 566.8186383928571C1037.4138764880952 774.7896205357142 1026.0433407738094 813.0535714285713 1022.474144345238 816.6238839285713L1018.2587425595239 820.8392857142858L895.7961309523808 821.2879464285716L773.3335193452381 821.7360491071429L773.3335193452381 605.6478794642858" /> + horiz-adv-x="1333.3333333333333" d="M609.5144747884161 952.7651131081602C606.3063274669876 952.4693541795888 592.0563274669876 951.4163407867316 577.848180145559 950.4252693581602C500.6740730027018 945.0435729295888 425.8219524669876 930.6468095367316 373.1651444312733 911.0580818581602C322.5021980027019 892.2109836438744 294.234898895559 873.0753809653031 281.3532024669876 848.9068541795888C272.9687158598447 833.1763854295888 272.6350105027018 828.8415640010173 277.1936042527019 794.9213631081602C284.4530908598447 740.9062961438744 295.8587828241304 669.9397782867317 312.9949435384161 572.1702470367317C322.2326667527019 519.4615416795888 331.2187158598447 467.1133273938745 332.9631355027018 455.8404479295888C340.2315506812733 408.8666756081603 347.8007471098447 396.1177916795889 381.7042069312733 373.7411175724461C454.4218408598447 325.7478140010174 561.6511935384161 301.5179032867316 688.6813274669876 304.3767202510174C756.8604569312733 305.9113184653031 803.1690506812732 313.1177916795889 857.2985149669876 330.6166756081603C913.3035372884162 348.7227023938745 958.7175997884162 373.0117648938746 976.486573002702 394.3627693581603C993.0875774669876 414.3114300724461 989.9274212169876 400.1490416795889 1029.371617645559 631.3365416795888C1062.510568538416 825.5686845367317 1062.648961395559 826.7271666795888 1054.7962828241302 844.4397782867317C1048.090367645559 859.5664523938744 1020.5987381812733 882.4408943581602 991.6980685384162 896.9408943581602C937.4318855027018 924.1674568581602 842.5345640741305 945.5028363224458 746.1813274669876 952.1389970367316C724.4207247884161 953.6378809653032 623.9636935384161 954.0982604295888 609.5144747884161 952.7651131081602M714.5144747884162 890.4609836438744C763.301305145559 887.4570773938744 821.3174881812732 880.2829702510173 856.7209480027018 872.8767202510173C870.0931578241305 870.0792872153031 889.059117645559 862.4643318581602 900.5289837169876 855.2874345367317C908.9553230027018 850.0151131081602 922.848180145559 837.4821890010173 922.848180145559 835.1529479295888C922.848180145559 832.9102023938744 903.271729252702 819.2796220367317 893.211461395559 814.5179032867317C875.0066622884161 805.9007157867317 850.7242962169876 798.8454702510173 827.6874658598448 795.4799568581602C718.7242962169876 779.5608720367317 636.5602337169876 779.1507157867317 518.6813274669876 793.9364300724459C488.488805145559 797.7232604295888 474.3459480027018 801.1769434653031 450.387242645559 810.6133273938744C434.5680462169876 816.8443541795888 411.3532024669876 830.8220327510173 409.9793185384161 834.9431265010173C408.777867645559 838.5469211438744 425.6941622884161 853.2120997153031 438.8760819312733 859.995023822446C457.1952783598447 869.4213631081602 463.9977337169876 871.3242648938744 502.848180145559 877.8862068581602C577.5758587169876 890.5089747153031 646.8771980027019 894.6261622153031 714.5144747884162 890.4609836438744M687.5016399669876 639.5781711438744C703.9977337169876 636.2500461438744 730.219273895559 623.5977023938744 745.6590060384161 611.5167872153031C765.313023895559 596.1389970367317 780.6188274669876 572.4727023938744 787.2756355027019 547.1702470367316C791.6774212169876 530.4375461438744 791.2488497884162 501.3722559653031 786.3671533598448 485.5452470367317C775.0758587169876 448.9392202510174 747.133336395559 416.0586398938745 715.379430145559 402.0123229295889C693.9508587169876 392.5335282867317 664.2600105027019 389.6378809653031 640.348180145559 394.6953586438746C606.4609033598447 401.8627693581603 571.6779792527018 429.2612068581603 554.6874658598447 462.1702470367317C545.7605685384161 479.4609836438746 542.3571087169876 494.217680072446 542.3861265741305 515.5033943581602C542.4140283598447 535.3543988224459 545.4235149669876 550.229398822446 552.6266399669876 566.1155595367316C577.2533140741303 620.4286175724459 632.7086712169876 650.6334166795888 687.5016399669876 639.5781711438744M648.6813274669876 576.5921220367316C626.8805462169876 569.3555148938744 613.7376890741303 557.3694657867316 607.695836395559 539.2126577510173C597.0245194312732 507.1451354295888 609.2834480027018 475.9665640010174 638.512242645559 460.8354256081603C649.5619078241303 455.1155595367317 651.344273895559 454.7070773938745 665.3481801455589 454.6892202510174C679.0792069312733 454.6719211438745 681.2957247884161 455.1456934653032 691.5535372884161 460.2935729295888C704.4296533598448 466.7556265010174 717.6818855027019 478.7098675724459 722.5518631812732 488.2561845367317C730.266148895559 503.3778363224459 730.1467292527019 529.4554032867316 722.2918185384161 544.955961322446C717.1511935384161 555.1004925724459 701.9519747884161 569.5999345367317 691.5992962169876 574.2344211438744C681.7706131812733 578.6345327510173 658.6595640741303 579.9040640010173 648.6813274669876 576.5921220367316M376.6857917527018 313.5084166795889C369.3688274669876 309.9732604295889 369.2282024669876 304.6362068581603 375.4977337169876 268.3878809653031C389.582555145559 186.958193465303 399.512242645559 142.4665640010174 405.7125774669876 133.0033943581603C412.2566622884161 123.0162291795887 429.0602337169876 106.0385506081601 440.348180145559 98.0095327510174C467.6930462169876 78.5586398938745 516.9642515741303 62.0056265010174 571.1813274669876 54.055849715303C617.2494078241303 47.3008273938746 630.1534256812732 46.3666756081601 676.1813274669876 46.4526131081601C725.4413721098447 46.5452470367317 741.9413721098447 48.3030595367316 785.7449435384161 58.1278363224459C837.2756355027019 69.6853140010174 890.3437158598448 93.0139970367317 909.598180145559 112.5748229295888C928.9235149669876 132.2076354295887 936.152867645559 150.6769434653032 944.6383587169876 202.0937961438745C948.224854252702 223.8276131081601 953.7806578241303 252.7985952510174 956.9843408598446 266.4732604295889C964.3448319312732 297.8951354295889 964.484898895559 304.1228140010174 957.9759703241303 310.631742572446C955.2968408598448 313.3108720367316 952.056885502702 315.5033943581603 950.7767515741303 315.5033943581603C949.496617645559 315.5033943581603 940.316930145559 310.6194657867317 930.3777560384162 304.6495997153031C871.8961712169877 269.526273822446 807.7432694312733 247.6004925724459 734.5144747884161 237.7093095367317C706.8202783598448 233.9682381081602 628.000523895559 233.4727023938745 602.8481801455589 236.8811845367316C522.0992962169876 247.8242648938746 458.2265283598447 269.7472559653031 397.2990730027019 307.4325238224461C383.4726221098447 315.9849791795889 382.4408140741304 316.2891086438745 376.6857917527018 313.5084166795889" /> + horiz-adv-x="1333.3333333333333" d="M562.6282324597223 926.7836276228159C539.5796833525795 926.0313954799586 479.2046833525795 923.8729133371014 428.4613797811509 921.98731065853C377.7180762097225 920.1017079799586 322.4284556740081 918.0687838728159 305.5958663882938 917.470011551387L274.9903976382938 916.3812838728159L276.1873842454367 893.6937838728157C276.8458663882938 881.2155472656729 277.4931878168652 870.8851901228157 277.6260003168652 870.7384267299586C277.7588128168652 870.5911053013871 290.2426297811509 869.2970204799586 305.367629781151 867.8628686942443C350.3391699597225 863.5989178013871 374.9172949597224 858.3634267299585 382.8151744240081 851.36621690853C386.0612681740081 848.4901008371014 387.3536788882938 845.0899892299585 388.6544601382938 836.0057258371014C394.2331431740081 797.0431142299586 397.1873842454367 653.6524892299585 397.5646163882938 403.5057258371014L397.867629781151 202.6725785156728L394.1963128168652 184.4895428013872C392.1773396025796 174.4889847656728 388.4273396025796 162.1139847656728 385.8631654954367 156.9895428013872C381.3637235311509 147.9979133371014 380.8068038882938 147.5408820871014 369.902786031151 143.8969088728157C359.6823619240081 140.4817303013871 336.5601521025796 135.5470204799585 292.0344824597224 127.2791633371014L276.2013351382938 124.3394311942443L274.7253306740081 98.8706811942442C273.9139467454367 84.8628686942443 273.7186342454367 72.9326231585299 274.2922949597224 72.3589624442442C275.2219824597224 71.4292749442443 359.0568038882938 75.4169981585299 446.2013351382938 80.5358597656728C478.3307994240081 82.4231365513871 599.7063574597223 83.1552794085299 702.867629781151 82.0844088728157C761.6014467454365 81.4744758371014 780.9502190668652 82.5888731585299 817.0344824597223 88.6580695871014C870.6103753168652 97.6692303013871 922.2850404954368 117.2038285156728 961.2013351382938 143.1580695871014C982.1812458525794 157.1502570871014 1010.2939690668652 184.6653240513872 1021.9295717454368 202.5955695871014C1038.905018174008 228.7546097656727 1050.695754781151 259.0911053013871 1056.2906208525797 291.0057258371014C1059.945754781151 311.8539401228157 1060.449661031151 354.2015963728158 1057.2521163882939 371.8394311942443C1049.996536031151 411.86231065853 1032.9424065668652 444.5297213728158 1004.6114913882938 472.6725785156729C970.9111565668652 506.1491410156729 927.6829199597227 530.7222436942443 877.8564690668652 544.7267079799586C869.1544601382939 547.1725785156729 862.0774512097223 549.5860829799585 862.1304646025797 550.0899892299586C862.1834779954368 550.5938954799586 875.4959779954368 557.5129803013871 891.7136119240081 565.4661053013871C928.5127190668652 583.5118642299586 953.5640583525797 600.0090740513871 972.2024512097227 618.4728017299586C987.9853753168652 634.1072883371014 996.0992146025794 646.9917749442443 1004.7593708525794 670.1725785156729C1012.2303529954366 690.1692303013871 1014.342518174008 705.8355249442443 1013.2437458525794 733.1117526228157C1012.2588128168652 757.5632035156729 1009.3486565668652 771.75293565853 1000.8062458525794 793.7523776228157C974.4585896025794 861.6061722656729 903.3458663882938 908.7780472656729 803.7013351382939 924.4995874442442C789.2928529954368 926.7730249442442 770.1550181740081 927.3394311942442 695.367629781151 927.70606065853C645.4094824597224 927.9504803013872 585.6767815668652 927.5358597656729 562.6282324597223 926.7836276228159M672.7766699597223 869.3539401228157C703.6622726382939 867.4532704799586 734.6472056740081 859.0090740513871 762.059036031151 845.0235829799586C797.684036031151 826.8478017299585 818.250442281151 802.0559490513872 828.9903976382939 764.3394311942443C832.2755538882939 752.8031588728157 832.7844824597223 747.18652940853 832.7666253168652 722.6725785156729C832.7359333525794 681.2389847656729 827.2297949597223 657.2953463728157 811.7141699597225 631.12793565853C783.5322503168652 583.5989178013871 717.3743262097223 560.5481365513871 619.5344824597223 564.1697883371014C603.0344824597223 564.7808374442443 586.5344824597223 565.8321767299586 582.867629781151 566.5073999442442L576.2013351382939 567.7339624442443L576.0841476382939 647.7032704799586C576.0194154954366 691.68652940853 574.9943038882939 755.7975785156729 573.8056878168652 790.1725785156729C572.617629781151 824.5475785156729 571.9200851382938 855.28809190853 572.2565806740081 858.4845204799586L572.867629781151 864.29590440853L587.0344824597223 866.3863061942443C605.4412904954366 869.1022660156729 638.9323619240081 871.4661053013871 649.5344824597223 870.7975785156729C654.117629781151 870.5085160156729 664.5768931740081 869.8589624442443 672.7766699597223 869.3539401228157M717.867629781151 504.4822883371014C744.7057994240081 500.1413285156727 760.2080315668652 495.7105249442443 776.2013351382939 487.8092972656729C820.1455315668652 466.0989178013872 854.8776744240081 424.0252570871014 865.3291253168652 379.8416633371014C875.137161031151 338.3790517299585 873.0222056740081 281.2981365513872 860.2911788882939 243.8478017299585C844.2928529954365 196.7869758371014 811.6053529954365 164.9962392299585 761.5573619240081 147.8226901228156C724.8319154954368 135.2211276228157 668.9412904954368 130.0526008371013 634.445754781151 136.0682258371014C617.5406208525795 139.0157704799585 589.9546833525795 147.7635383371014 585.2258887097223 151.6753686942442C582.9295717454366 153.5749222656727 581.2275628168652 158.8823999442442 579.293411031151 170.1725785156728C576.9859333525795 183.6424445871014 576.4853753168652 205.7847436942443 575.9390583525794 318.5057258371014C575.586379781151 391.3807258371014 575.8760003168652 463.0057258371014 576.582473531151 477.6725785156729L577.867629781151 504.3394311942442L588.7013351382938 506.3366410156729C604.848098531151 509.3132035156729 696.0997726382939 508.0034936942443 717.867629781151 504.4822883371014" /> + horiz-adv-x="1333.3333333333333" d="M166.6666666666666 562.984375L166.6666666666666 188.296875L219.5729166666666 186.265625C307.8541666666667 182.859375 371.0729166666667 175.515625 438.3229166666667 160.859375C529.0729166666666 141.109375 615.5104166666666 105.078125 658.7916666666666 68.984375L666.7604166666666 62.359375L673.6354166666665 68.546875C691.4791666666666 84.671875 737.7916666666666 110.109375 779.1666666666666 126.515625C871.5729166666666 163.171875 983.8541666666666 182.546875 1129.5729166666665 187.015625L1166.6666666666665 188.140625L1166.6666666666665 562.890625L1166.6666666666665 937.640625L1152.0729166666665 937.609375C1128.2291666666665 937.609375 1064.5104166666665 934.390625 1035.0104166666665 931.734375C928.5416666666666 922.171875 836.4791666666666 901.109375 762.5104166666666 869.390625C728.5729166666666 854.859375 693.2916666666666 834.640625 674.5729166666666 819.046875L666.6666666666666 812.453125L658.7604166666666 819.046875C640.0416666666666 834.640625 604.7604166666666 854.859375 570.8229166666666 869.390625C496.8541666666666 901.109375 404.7916666666667 922.171875 298.3229166666667 931.734375C268.8229166666667 934.390625 205.1041666666666 937.609375 181.2604166666666 937.609375L166.6666666666666 937.640625L166.6666666666666 562.984375M1041.6666666666665 568.578125L1041.6666666666665 312.859375L1034.5729166666665 311.953125C1030.6979166666665 311.484375 1016.2604166666666 309.859375 1002.5104166666666 308.390625C906.7916666666666 298.046875 812.0416666666666 272.953125 748.5416666666666 241.078125C739.2916666666666 236.453125 731.3541666666666 232.640625 730.8541666666666 232.640625C730.3854166666666 232.640625 730.0104166666666 345.109375 730.0104166666666 482.546875L730.0104166666666 732.453125L745.2604166666666 741.890625C806.1666666666666 779.546875 880.6666666666666 804.078125 975.0104166666666 817.484375C1004.5416666666666 821.703125 1023.2916666666666 823.796875 1033.7604166666665 824.078125L1041.6666666666665 824.296875L1041.6666666666665 568.578125M338.3229166666667 807.484375C397.2916666666667 800.546875 461.2604166666666 787.109375 508.6041666666666 771.671875C540.1666666666666 761.390625 552.9791666666666 756.296875 580.4166666666666 743.109375L603.3229166666666 732.078125L603.3229166666666 482.171875C603.3229166666666 282.890625 602.9166666666666 232.453125 601.2604166666666 233.171875C600.1041666666666 233.671875 589.4166666666666 238.546875 577.5104166666666 244.046875C513.1041666666666 273.609375 427.9166666666667 295.765625 333.2604166666667 307.578125C318.1666666666667 309.453125 302.6354166666667 311.390625 298.7604166666667 311.921875L291.6666666666667 312.859375L291.6666666666667 562.765625L291.6666666666667 812.671875L301.2604166666667 811.671875C306.5104166666667 811.140625 323.1979166666667 809.234375 338.3229166666667 807.484375" /> + horiz-adv-x="1333.3333333333333" d="M445.8336195299582 810.8017250812234C402.1270765612082 806.3969399249734 353.1773695299582 789.3163735187234 313.3990492174582 764.5893227374734C211.1768812487081 701.0453774249734 153.7633070299581 580.3852211749734 169.2276624987081 461.5976235187234C187.6885999987081 319.7909828937234 298.5440687487082 208.9423500812234 440.5025648424582 190.3398110187234C469.9307874987081 186.4833657062234 863.4034437487081 186.4833657062234 892.8316664049581 190.3398110187234C1034.814088279958 208.9457680499734 1145.483521873708 319.6152016437234 1164.089478904958 461.5976235187234C1174.501588279958 541.0507485187234 1152.274049217458 623.1386391437234 1102.431275779958 689.3051430499734C1051.166627342458 757.3593422687234 969.9893812487082 802.6425453937234 884.2945570299581 810.9892250812234C861.7427992174581 813.1855141437234 467.8175062487081 813.0170571124734 445.8336195299582 810.8017250812234M906.6671156237082 744.7192055499734C929.1407484362082 739.4814125812234 940.8907484362082 735.1220375812234 965.8336195299582 722.7680336749734C1016.2613539049582 697.7914711749734 1051.802857811208 662.2367836749734 1076.631959373708 611.9286782062234C1096.477174217458 571.7192055499734 1103.333619529958 543.0444008624734 1103.333619529958 500.2621742999734C1103.333619529958 457.4799477374734 1096.477174217458 428.8051430499734 1076.631959373708 388.5956703937234C1052.225709373708 339.1444985187234 1014.3936781237082 301.0810219562234 965.8336195299582 277.1210610187234C893.0821546862081 241.2240883624734 815.2520765612081 241.2240883624734 742.5006117174581 277.1210610187234C694.0035414049581 301.0502602374734 656.2340101549581 339.0292641437234 631.6412367174581 388.5956703937234C610.4898695299581 431.2260414874734 605.8477796862081 451.3217446124734 605.8477796862081 500.2621742999734C605.8477796862081 537.5819985187234 607.3634046862081 548.8427407062234 616.0426039049581 576.0077797687234C622.2672132799581 595.4911782062234 641.9522718737081 633.5839516437234 654.1510023424581 649.7524086749734C693.3785414049581 701.7460610187234 753.2989515612081 737.6581703937234 817.5357679674581 747.6737953937234C834.7637953112081 750.3598305499734 890.3746351549581 748.5165688312234 906.6671156237082 744.7192055499734" /> + horiz-adv-x="1333.3333333333333" d="M531.8167752402582 923.0876543209876C522.6167752402581 921.2376543209876 514.5667752402582 915.8376543209876 508.7167752402581 907.5876543209876C506.2167752402581 904.0876543209876 489.1167752402581 872.9376543209876 470.7667752402581 838.4376543209876L437.3167752402582 775.6876543209876L344.0667752402582 774.7376543209875C262.5667752402582 773.9376543209876 249.6167752402582 773.4376543209876 240.9667752402582 770.9376543209876C209.4667752402581 761.7376543209878 189.9167752402582 740.3876543209876 181.6167752402581 706.0876543209877C179.6667752402582 697.9876543209875 177.6167752402581 680.7376543209878 176.6167752402581 663.9876543209878C175.2167752402582 640.8376543209877 166.6167752402581 395.2876543209877 166.6667752402582 379.4376543209877L166.6667752402582 374.8376543209876L391.6667752402582 374.8376543209876L616.6667752402582 374.8376543209876L616.6667752402582 424.8376543209876L616.6667752402582 474.8376543209876L666.6667752402582 474.8376543209876L716.6667752402582 474.8376543209876L716.6667752402582 424.8376543209876L716.6667752402582 374.8376543209876L941.6667752402582 374.8376543209876L1166.6667752402582 374.8376543209876L1166.6667752402582 378.8376543209876C1166.6667752402582 402.7376543209876 1156.2167752402581 678.7876543209877 1154.9667752402581 687.9876543209875C1148.6667752402582 734.4876543209875 1129.4167752402582 759.9876543209875 1092.516775240258 770.8376543209877C1083.6667752402582 773.3876543209876 1071.516775240258 773.8876543209876 989.2167752402582 774.6876543209876L895.9167752402582 775.6876543209876L871.1667752402582 822.3376543209877C831.1167752402581 897.9876543209875 826.5167752402581 906.1376543209876 820.5167752402582 912.3376543209876C808.5167752402582 924.6876543209876 817.6667752402582 923.9876543209876 670.8167752402582 924.2876543209878C598.4167752402582 924.4376543209876 535.8667752402582 923.8876543209876 531.8167752402582 923.0876543209876M760.8167752402582 853.2376543209875C770.6667752402582 850.9876543209875 776.9167752402582 842.7376543209875 795.4167752402582 807.6876543209876C804.3667752402581 790.7376543209875 811.6667752402582 776.4376543209876 811.6667752402582 775.8376543209877C811.6667752402582 775.2876543209877 746.4167752402582 774.8376543209877 666.6667752402582 774.8376543209877C586.9167752402581 774.8376543209877 521.6667752402582 775.3376543209877 521.6667752402582 775.9876543209875C521.6667752402582 776.5876543209877 528.9667752402581 790.9376543209876 537.9167752402582 807.8376543209877C555.8667752402581 841.7876543209877 562.7667752402581 851.0876543209877 571.6667752402582 853.1376543209876C579.7667752402582 855.0376543209877 752.6167752402581 855.0876543209877 760.8167752402582 853.2376543209875M191.6667752402582 323.5876543209876C191.6667752402582 322.8876543209877 193.1667752402582 299.0876543209876 194.9167752402582 270.6876543209877C196.7167752402581 242.2376543209877 199.0667752402582 203.2376543209876 200.0667752402582 183.9876543209876C202.6667752402582 135.5876543209876 206.6667752402582 118.5876543209876 219.4667752402582 102.2876543209875C226.2667752402582 93.6376543209877 241.9667752402582 83.6876543209876 255.6167752402582 79.3876543209877L267.5167752402582 75.6876543209876L666.6667752402582 75.6876543209876C1049.7167752402581 75.6876543209876 1066.2167752402581 75.7876543209875 1075.766775240258 78.7376543209876C1090.016775240258 83.1376543209877 1097.6667752402582 87.3876543209877 1107.066775240258 96.1876543209876C1120.2167752402581 108.5376543209875 1126.9667752402581 122.2376543209876 1130.016775240258 143.0376543209877C1130.866775240258 149.0876543209876 1133.516775240258 186.6376543209877 1135.816775240258 226.4876543209876C1138.116775240258 266.3876543209876 1140.4667752402581 304.8376543209876 1141.066775240258 311.9376543209877L1142.1167752402582 324.8376543209876L929.3667752402582 324.8376543209876L716.6667752402582 324.8376543209876L716.6667752402582 274.8376543209876L716.6667752402582 224.8376543209876L666.6667752402582 224.8376543209876L616.6667752402582 224.8376543209876L616.6667752402582 274.8376543209876L616.6667752402582 324.8376543209876L404.1667752402582 324.8376543209876C287.3167752402582 324.8376543209876 191.6667752402582 324.2876543209877 191.6667752402582 323.5876543209876" /> + horiz-adv-x="1333.3333333333333" d="M299.710472470238 998.7186662921195C293.230003720238 997.0696707564052 283.7166108630952 989.7521484349766 279.2205171130952 982.9580636135482L274.6200706845238 976.0071707564052L274.6200706845238 499.9301618278338L274.6200706845238 23.8531528992622L279.2177269345238 16.9061662921195C281.7461867559523 13.0847377206909 286.9414992559523 7.8899832564051 290.7623697916667 5.3609653992623L297.7099144345238 0.7633091492623L662.5983072916666 0.3319475421195C913.7255394345239 0.0350725421196 1029.515159970238 0.4469028992623 1033.9922805059523 1.6522600421195C1042.3438430059523 3.9011439706909 1051.812034970238 12.2387555778338 1055.6786644345239 20.7493582564052C1058.591052827381 27.161188613548 1058.7132626488096 46.4636439706909 1058.7132626488096 499.9301618278338C1058.7132626488096 955.9999162921195 1058.6061197916665 972.6662109349766 1055.6317894345239 979.2147600421195C1051.9811197916665 987.2527064706908 1041.9403831845239 996.0200055778338 1033.7869233630952 998.2884207564052C1027.8483072916665 999.9407645064052 306.1769903273809 1000.3637555778338 299.710472470238 998.7186662921195M482.2484188988095 851.7248046849767L487.1200706845237 846.8531528992623L487.1200706845237 821.7515903992623L487.1200706845237 796.649469863548L482.2567894345237 791.2063895064052L477.3935081845237 785.7633091492623L452.1200706845237 785.7633091492623L426.8466331845238 785.7633091492623L421.9833519345238 791.2063895064052L417.1200706845238 796.649469863548L417.1200706845238 821.7515903992623L417.1200706845238 846.8531528992623L421.991722470238 851.7248046849767L426.8639322916667 856.5970145064052L452.1200706845237 856.5970145064052L477.3762090773809 856.5970145064052L482.2484188988095 851.7248046849767M622.2121465773808 854.8804966492623C628.8812313988094 851.3118582564052 630.4532180059523 844.7309430778338 630.4532180059523 820.383844863548C630.4532180059523 787.2560546849767 628.0771019345239 784.9284877206909 594.2567894345237 784.9329520064052C561.2127046130952 784.9368582564052 558.1368117559523 788.4831752206909 559.0765438988095 825.4848493278338L559.6200706845237 846.8721261135481L565.0631510416666 851.7348493278338L570.5062313988094 856.5970145064052L594.7556733630952 856.5970145064052C608.2009858630952 856.5970145064052 620.434802827381 855.8319475421196 622.2121465773808 854.8804966492623M764.4615885416666 854.6991350421195C771.7975260416666 851.356501113548 773.7869233630952 844.1360770064052 773.7869233630952 820.8453403992623C773.7869233630952 787.903376113548 770.8204055059523 784.9301618278338 737.9532180059523 784.9301618278338C704.8326822916666 784.9301618278338 702.0882626488094 787.7688895064052 702.1792224702381 821.930719863548C702.2679501488094 855.3659877206909 703.3728608630952 856.4496930778338 737.458240327381 856.5378627206909C751.1167224702381 856.5730189706909 761.9705171130952 855.8341796849767 764.4615885416666 854.6991350421195M910.581566220238 851.7248046849767L915.4532180059522 846.8531528992623L915.4532180059522 821.1187778992623C915.4532180059522 795.5970145064052 915.417503720238 795.348688613548 911.0999813988094 791.0311662921196C905.4454055059522 785.3771484349767 899.7964099702381 784.4508091492623 875.3605840773808 785.1723493278338L855.1758742559524 785.7683314706909L850.3148251488095 791.2086216492623L845.4532180059524 796.649469863548L845.4532180059524 821.7515903992623L845.4532180059524 846.8531528992623L850.325427827381 851.7248046849767L855.1970796130952 856.5970145064052L880.4532180059524 856.5970145064052L905.7099144345239 856.5970145064052L910.581566220238 851.7248046849767M482.2484188988095 708.391657363548L487.1200706845237 703.5200055778338L487.1200706845237 678.2633091492623L487.1200706845237 653.0071707564051L482.2484188988095 648.1355189706909L477.3762090773809 643.2633091492623L452.1200706845237 643.2633091492623L426.8639322916667 643.2633091492623L421.991722470238 648.1355189706909L417.1200706845238 653.0071707564051L417.1200706845238 678.2633091492623L417.1200706845238 703.5200055778338L421.991722470238 708.391657363548L426.8639322916667 713.2633091492623L452.1200706845237 713.2633091492623L477.3762090773809 713.2633091492623L482.2484188988095 708.391657363548M625.5815662202381 708.391657363548L630.4532180059523 703.5200055778338L630.4532180059523 679.9753627206909C630.4532180059523 655.1020368278338 628.9141555059523 648.5663225421196 622.2121465773808 644.9798270064051C620.434802827381 644.028376113548 608.2009858630952 643.2633091492623 594.7556733630952 643.2633091492623L570.5062313988094 643.2633091492623L565.094959077381 648.0981305778338C559.6998697916666 652.9184430778338 559.6825706845237 652.9865234349767 559.0503162202381 671.458063613548C558.2428385416666 695.0529296849767 559.6083519345237 704.2365234349767 564.6775483630952 709.3062778992623C568.5056733630952 713.133844863548 569.4889322916666 713.2633091492623 594.6725260416665 713.2633091492623L620.7099144345239 713.2633091492623L625.5815662202381 708.391657363548M765.5458519345237 711.5473493278338C772.0737537202381 708.0534877206909 773.7869233630952 701.2917689706909 773.7869233630952 679.0149832564051C773.7869233630952 655.7242466492623 771.7975260416666 648.5038225421196 764.4615885416666 645.161188613548C759.2037760416666 642.7655412921196 714.7763206845237 642.6165457564051 710.3611421130952 644.9798270064051C703.7768787202381 648.5032645064052 702.1200706845237 655.1957868278338 702.1200706845237 678.2633091492623C702.1200706845237 701.0267020064052 703.7333519345237 707.7917689706909 710.0369233630952 711.4630859349767C713.8789992559523 713.7013671849767 761.3868117559523 713.7733537921196 765.5458519345237 711.5473493278338M911.0592447916666 708.8693359349767C915.4275483630952 704.5015903992623 915.4532180059522 704.3241350421196 915.4532180059522 678.7415457564051L915.4532180059522 653.0071707564051L910.581566220238 648.1355189706909L905.7099144345239 643.2633091492623L880.4532180059524 643.2633091492623L855.1970796130952 643.2633091492623L850.325427827381 648.1355189706909L845.4532180059524 653.0071707564051L845.4532180059524 678.2633091492623L845.4532180059524 703.5200055778338L850.325427827381 708.391657363548L855.1970796130952 713.2633091492623L880.9314546130952 713.2633091492623C906.5140438988094 713.2633091492623 906.6914992559524 713.2376395064051 911.0592447916666 708.8693359349767M476.761253720238 569.805719863548C486.0017671130952 566.5841796849767 487.1200706845237 562.8352957564051 487.1200706845237 535.0819475421195C487.1200706845237 511.0931082564052 486.9627046130952 509.9329520064052 483.0977492559523 505.4396484349767L479.0754278273808 500.7633091492624L452.1200706845237 500.7633091492624L425.1647135416667 500.7633091492624L421.1423921130952 505.4396484349767C417.2679501488095 509.944112720691 417.1211867559523 511.0467912921195 417.1569010416667 535.4396484349767C417.1965215773809 562.3520368278338 417.9191778273809 565.0607421849767 426.2869233630952 569.6623046849767C430.6211867559523 572.0462332564051 470.0134858630952 572.1578403992623 476.761253720238 569.805719863548M625.5944010416665 565.3207868278338L630.4532180059523 559.8777064706909L630.4532180059523 536.4876395064051C630.4532180059523 510.8481305778338 629.0224144345237 505.4245814706909 621.333240327381 501.9212332564052C615.3198474702381 499.1812778992623 574.3315662202381 499.2906528992623 568.7869233630952 502.0613002206909C561.1546688988094 505.8749162921195 558.7919456845237 513.6818359349767 558.7891555059523 535.0981305778338C558.7846912202381 569.4948939706909 561.3695126488094 571.950251113548 596.8444010416666 571.2409877206909L620.7350260416666 570.7633091492623L625.5944010416665 565.3207868278338M763.841052827381 569.0685546849767C772.6396019345237 564.5188895064052 774.0977492559523 559.0657645064052 773.4933965773808 532.9669921849767L772.9532180059523 509.6483537921195L767.5106956845237 504.7895368278337L762.067615327381 499.9301618278338L737.7606956845237 499.9301618278338L713.4532180059523 499.9301618278338L707.6658296130952 505.7175502206909L701.8784412202381 511.5049386135481L702.4158296130952 536.3810546849767C703.1602492559523 570.836969863548 703.6479724702381 571.3230189706909 737.6195126488095 571.4909877206909C753.5938430059523 571.5702287921196 760.1803385416666 570.961969863548 763.841052827381 569.0685546849767M907.153552827381 569.0797153992625C909.8310081845239 567.6952287921195 912.7936197916666 565.1193359349767 913.7372581845239 563.3559430778338C914.6954055059522 561.5652064706909 915.4532180059522 549.1031528992625 915.4532180059522 535.1327287921195C915.4532180059522 511.0986886135481 915.2952938988096 509.9323939706909 911.434802827381 505.4396484349767C907.4320126488096 500.7811662921195 907.327659970238 500.7616350421195 883.7584635416666 500.2175502206909C846.8231956845237 499.365987720691 845.4532180059524 500.6310546849766 845.4532180059524 535.6020368278338C845.4532180059524 560.6254743278338 846.6647135416665 565.129938613548 854.4247581845237 568.958063613548C861.7567894345237 572.5746930778338 900.2227492559523 572.6634207564051 907.153552827381 569.0797153992625M482.2484188988095 423.3916573635481L487.1200706845237 418.5200055778338L487.1200706845237 394.303487720691C487.1200706845237 367.2727957564053 486.0045572916666 363.0289341492624 477.8873697916666 359.1773716492624C470.2171688988095 355.5373046849767 434.022972470238 355.5373046849767 426.3527715773809 359.1773716492624C418.2355840773809 363.0289341492624 417.1200706845238 367.2727957564053 417.1200706845238 394.303487720691L417.1200706845238 418.5200055778338L421.991722470238 423.3916573635481L426.8639322916667 428.2633091492624L452.1200706845237 428.2633091492624L477.3762090773809 428.2633091492624L482.2484188988095 423.3916573635481M621.333240327381 426.272237720691C629.0224144345237 422.7688895064053 630.4532180059523 417.3453403992624 630.4532180059523 391.7058314706909L630.4532180059523 368.3163225421195L625.5944010416665 362.8732421849767L620.7350260416666 357.4301618278338L597.6775483630952 356.950251113548C561.8756510416666 356.2052734349766 559.0514322916665 358.8224609349767 558.8806733630952 392.9005859349766C558.7166108630952 425.708063613548 561.2601376488094 428.2633091492624 594.0793340773808 428.2633091492624C608.2718563988094 428.2633091492624 618.6228608630952 427.5071707564053 621.333240327381 426.272237720691M767.5106956845237 423.4044921849766L772.9532180059523 418.5451171849766L773.4933965773808 395.2264787921196C774.3438430059523 358.4909877206909 771.9013206845237 356.0373046849767 735.3310081845237 356.8899832564053C712.583240327381 357.4206752206909 712.1072358630952 357.5094028992624 707.5698474702381 362.0467912921195C703.0224144345237 366.5942243278337 702.9448474702381 367.0172153992624 702.3940662202381 390.379938613548C701.7891555059523 416.0373046849767 703.3656063988094 422.5914341492625 711.0352492559523 426.3029296849766C713.0067894345237 427.2571707564053 725.2958519345237 428.0886439706909 738.3438430059523 428.1505859349767L762.067615327381 428.2633091492624L767.5106956845237 423.4044921849766M910.581566220238 423.3916573635481L915.4532180059522 418.5200055778338L915.4532180059522 392.4826171849766C915.4532180059522 367.2566127206909 915.3293340773808 366.3213448635481 911.4727492559524 362.4647600421195C906.1970796130952 357.1890903992624 899.8377046130952 356.1991350421195 875.5307849702381 356.8687778992624L855.1719680059523 357.4301618278338L850.3125930059523 362.8732421849767L845.4532180059524 368.3163225421195L845.4532180059524 392.5657645064053C845.4532180059524 405.9418805778338 846.2194010416666 418.2476841492624 847.1619233630952 420.0082868278338C850.7545572916666 426.7208984349766 856.7065662202381 428.1265903992624 881.831566220238 428.1969028992624L905.7099144345239 428.2633091492624L910.581566220238 423.3916573635481M482.2484188988095 280.0585100421195L487.1200706845237 275.1863002206909L487.1200706845237 250.2833984349767C487.1200706845237 227.7186662921195 486.7997581845237 224.9725725421196 483.7110305059523 221.0456752206909C479.1569010416666 215.2560546849767 471.1250930059524 213.282282363548 452.1200706845237 213.282282363548C433.1150483630952 213.282282363548 425.0832403273809 215.2560546849767 420.5291108630952 221.0456752206909C417.4403831845238 224.9725725421196 417.1200706845238 227.7186662921195 417.1200706845238 250.2833984349767L417.1200706845238 275.1863002206909L421.991722470238 280.0585100421195L426.8639322916667 284.9301618278338L452.1200706845237 284.9301618278338L477.3762090773809 284.9301618278338L482.2484188988095 280.0585100421195M910.581566220238 280.0585100421195L915.4532180059522 275.1863002206909L915.4532180059522 250.0847377206909L915.4532180059522 224.9826171849767L910.7288876488096 219.6952287921195C906.0966331845239 214.5110770064052 905.6602492559522 214.3922153992624 888.3795572916666 213.6238002206909C864.7807849702381 212.5741350421195 856.1195126488095 214.0077287921195 850.1825706845237 219.9446707564052L845.4532180059524 224.6740234349766L845.4532180059524 249.9301618278338L845.4532180059524 275.1863002206909L850.325427827381 280.0585100421195L855.1970796130952 284.9301618278338L880.4532180059524 284.9301618278338L905.7099144345239 284.9301618278338L910.581566220238 280.0585100421195M766.5196242559523 210.8297153992624C773.5469680059523 205.9078403992624 773.9364769345237 201.9245814706909 773.4325706845237 140.1288225421196L772.9532180059523 81.3202287921196L767.5106956845237 76.4586216492622L762.067615327381 71.5970145064051L666.6312313988094 71.5970145064051C560.7880394345237 71.5970145064051 565.9297805059523 71.0607421849766 561.110584077381 82.5942243278338C558.2361421130952 89.4742466492623 557.735584077381 191.9117466492624 560.5274367559523 201.9642020064052C563.8181733630952 213.8129743278338 558.6753162202381 213.2633091492622 666.2869233630952 213.2633091492622C748.4236421130952 213.2633091492622 763.5698474702381 212.895563613548 766.5196242559523 210.8297153992624" /> + horiz-adv-x="1333.3333333333333" d="M413.771019345238 997.4985375409047C381.7542782738094 990.5426223623334 352.7040550595238 960.2401670051904 346.7927827380952 927.6324661123334C345.8067336309523 922.1932920051906 344.9998139880952 904.0504348623334 344.9998139880952 887.315501826619L344.9998139880952 856.8874884337619L300.4166666666666 856.3713053980476L255.833519345238 855.8551223623333L244.4216889880952 850.4505464694762C223.3692336309523 840.4801223623333 207.6449032738094 820.1893857551905 203.4886532738094 797.6324661123333C201.0438988095237 784.3634928980476 200.9066220238094 72.819408076619 203.3463541666666 59.9544527194761C208.3134300595237 33.7608143266191 228.239769345238 10.9695196837619 252.8084077380952 3.3813500409047C263.5851934523809 0.0526670051904 267.3558407738094 0.0219750409047 666.6666666666665 0.0219750409047C1065.9774925595239 0.0219750409047 1069.7481398809523 0.0526670051904 1080.524925595238 3.3813500409047C1105.0935639880952 10.9695196837619 1125.0199032738094 33.7608143266191 1129.9869791666665 59.9544527194761C1132.4267113095239 72.819408076619 1132.2894345238094 784.3634928980476 1129.8446800595239 797.6324661123333C1125.6884300595239 820.1893857551905 1109.9640997023807 840.4801223623333 1088.911644345238 850.4505464694762L1077.4998139880952 855.8551223623333L1032.9166666666665 856.3713053980476L988.333519345238 856.8874884337619L988.333519345238 887.315501826619C988.333519345238 904.0504348623334 987.526599702381 922.1932920051906 986.540550595238 927.6324661123334C980.5528273809522 960.6598098623334 951.5104166666666 990.6380464694762 918.782738095238 997.573314326619C905.2693452380952 1000.436595576619 860.1928943452381 1000.8478678980476 845.7230282738094 998.2390509337617C821.4417782738094 993.862376826619 795.0238095238094 973.9957473623334 783.7330729166665 951.6224214694762C775.5310639880952 935.3696312909047 773.3954613095239 922.0861491480476 773.362537202381 887.1051223623333L773.3335193452381 856.6888277194762L666.6666666666665 856.6888277194762L559.9998139880952 856.6888277194762L559.9707961309523 887.1051223623333C559.9378720238094 922.0861491480476 557.8022693452381 935.3696312909047 549.6002604166665 951.6224214694762C538.3095238095237 973.9957473623334 511.8915550595237 993.862376826619 487.6103050595237 998.2390509337617C473.7570684523809 1000.7368187909047 426.4931175595238 1000.2624884337617 413.771019345238 997.4985375409047M479.6387648809523 925.7541178980476C488.3563988095237 919.6480911123334 488.333519345238 919.9036714694762 488.333519345238 830.0219750409047C488.333519345238 737.2853678980476 488.4908854166666 738.6737607551905 477.442894345238 734.0571312909047C469.6744791666666 730.811595576619 435.325706845238 730.811595576619 427.5572916666666 734.0571312909047C416.4903273809523 738.6810152194762 416.6666666666666 737.1012161123333 416.6666666666666 831.772533076619L416.6666666666666 917.0219750409047L422.333519345238 922.6888277194762L427.9998139880952 928.3551223623334L451.962425595238 928.3551223623334C470.9791666666666 928.3551223623334 476.6912202380951 927.8182920051904 479.6387648809523 925.7541178980476M910.3904389880952 923.4929571837617L915.833519345238 918.6307920051904L916.2938988095239 832.6614839694762C916.806175595238 736.9723098623333 916.9953497023808 738.745189326619 905.7760416666666 734.0571312909047C898.0076264880952 730.811595576619 863.6588541666665 730.811595576619 855.8904389880952 734.0571312909047C844.8424479166665 738.6737607551905 844.9998139880952 737.2853678980476 844.9998139880952 830.0219750409047C844.9998139880952 900.8417295051904 845.378162202381 914.2518857551906 847.4903273809523 918.3367071837617C852.2174479166665 927.4778902194762 855.1683407738094 928.3551223623334 881.1778273809523 928.3551223623334L904.9473586309522 928.3551223623334L910.3904389880952 923.4929571837617M434.9998139880952 562.5219750409047L434.9998139880952 481.6888277194762L354.1666666666666 481.6888277194762L273.333519345238 481.6888277194762L273.333519345238 562.5219750409047L273.333519345238 643.3551223623333L354.1666666666666 643.3551223623333L434.9998139880952 643.3551223623333L434.9998139880952 562.5219750409047M648.3335193452381 562.5219750409047L648.3335193452381 481.6888277194762L559.1666666666665 481.6888277194762L469.9998139880951 481.6888277194762L469.9998139880951 562.5219750409047L469.9998139880951 643.3551223623333L559.1666666666665 643.3551223623333L648.3335193452381 643.3551223623333L648.3335193452381 562.5219750409047M863.3335193452381 562.5219750409047L863.3335193452381 481.6888277194762L774.1666666666667 481.6888277194762L684.9998139880952 481.6888277194762L684.9998139880952 562.5219750409047L684.9998139880952 643.3551223623333L774.1666666666667 643.3551223623333L863.3335193452381 643.3551223623333L863.3335193452381 562.5219750409047M1059.9998139880952 562.5219750409047L1059.9998139880952 481.6888277194762L979.1666666666666 481.6888277194762L898.3335193452381 481.6888277194762L898.3335193452381 562.5219750409047L898.3335193452381 643.3551223623333L979.1666666666666 643.3551223623333L1059.9998139880952 643.3551223623333L1059.9998139880952 562.5219750409047M434.9998139880952 357.5219750409048L434.9998139880952 268.3551223623333L354.1666666666666 268.3551223623333L273.333519345238 268.3551223623333L273.333519345238 357.5219750409048L273.333519345238 446.6888277194762L354.1666666666666 446.6888277194762L434.9998139880952 446.6888277194762L434.9998139880952 357.5219750409048M648.3335193452381 357.5219750409048L648.3335193452381 268.3551223623333L559.1666666666665 268.3551223623333L469.9998139880951 268.3551223623333L469.9998139880951 357.5219750409048L469.9998139880951 446.6888277194762L559.1666666666665 446.6888277194762L648.3335193452381 446.6888277194762L648.3335193452381 357.5219750409048M863.3335193452381 357.5219750409048L863.3335193452381 268.3551223623333L774.1666666666667 268.3551223623333L684.9998139880952 268.3551223623333L684.9998139880952 357.5219750409048L684.9998139880952 446.6888277194762L774.1666666666667 446.6888277194762L863.3335193452381 446.6888277194762L863.3335193452381 357.5219750409048M1059.9998139880952 357.5219750409048L1059.9998139880952 268.3551223623333L979.1666666666666 268.3551223623333L898.3335193452381 268.3551223623333L898.3335193452381 357.5219750409048L898.3335193452381 446.6888277194762L979.1666666666666 446.6888277194762L1059.9998139880952 446.6888277194762L1059.9998139880952 357.5219750409048M434.9998139880952 151.6888277194762L434.9998139880952 71.6888277194761L354.1666666666666 71.6888277194761L273.333519345238 71.6888277194761L273.333519345238 151.6888277194762L273.333519345238 231.6888277194761L354.1666666666666 231.6888277194761L434.9998139880952 231.6888277194761L434.9998139880952 151.6888277194762M648.3335193452381 151.6888277194762L648.3335193452381 71.6888277194761L559.1666666666665 71.6888277194761L469.9998139880951 71.6888277194761L469.9998139880951 151.6888277194762L469.9998139880951 231.6888277194761L559.1666666666665 231.6888277194761L648.3335193452381 231.6888277194761L648.3335193452381 151.6888277194762M863.3335193452381 151.6888277194762L863.3335193452381 71.6888277194761L774.1666666666667 71.6888277194761L684.9998139880952 71.6888277194761L684.9998139880952 151.6888277194762L684.9998139880952 231.6888277194761L774.1666666666667 231.6888277194761L863.3335193452381 231.6888277194761L863.3335193452381 151.6888277194762M1059.9998139880952 151.6888277194762L1059.9998139880952 71.6888277194761L979.1666666666666 71.6888277194761L898.3335193452381 71.6888277194761L898.3335193452381 151.6888277194762L898.3335193452381 231.6888277194761L979.1666666666666 231.6888277194761L1059.9998139880952 231.6888277194761L1059.9998139880952 151.6888277194762" /> + horiz-adv-x="1333.3333333333333" d="M625.0838681175594 926.235987959298C570.469470796131 921.0540683164407 520.063220796131 906.1885549235838 470.8567475818452 880.7527290307266C373.6173502604167 830.4882201021553 301.5263904389881 748.8710326021553 263.0922386532738 645.5345370664409C256.3411225818452 627.3827513521553 246.0129975818452 586.3196933164409 242.3416806175595 563.0345370664411C238.0342029389881 535.7164567092982 238.0342029389881 463.6863227807266 242.3416806175595 436.3682424235837C256.7540690104167 344.9558540307266 296.9292922247024 264.5797379592981 360.5492699032738 199.8760549235837C417.0297386532738 142.4329745664409 482.9103190104166 104.2410102807267 559.274158296131 84.6718138521553C599.3723725818452 74.3955861735838 617.8372163318452 72.2605415307267 666.750720796131 72.2443584950124C715.3684663318452 72.2281754592981 733.1575288318452 74.2901174235838 774.250720796131 84.7058540307266C923.819359188988 122.6160102807266 1043.8361002604167 242.6327513521553 1081.7462565104167 392.2013897450123C1092.153064546131 433.2594254592981 1094.2222609747023 451.087550459298 1094.2222609747023 499.7013897450124C1094.2222609747023 548.3369924235838 1092.1486002604167 566.1885549235838 1081.7356538318452 607.2013897450124C1062.5487118675594 682.7717022450124 1023.7903413318452 749.6472602807266 966.5760556175596 805.9028406378695C896.0152297247025 875.2817468878695 805.4940243675594 917.1042915307266 705.9175734747023 926.3330861735838C685.0286225818452 928.2689120664407 646.012439546131 928.2220370664407 625.0838681175594 926.235987959298M555.5833100818452 708.7064120664409C558.5169038318452 707.2421263521553 584.7300734747023 682.3090906378695 613.8338681175595 653.2996040307266L666.750720796131 600.5540683164409L719.6675734747023 653.2996040307266C748.7713681175594 682.3090906378695 774.9845377604165 707.2421263521553 777.9181315104167 708.7064120664409C784.7150065104167 712.0981531378695 800.0152297247023 712.1377736735838 808.0403413318452 708.7845370664409C816.3935779389881 705.2945817092982 872.3439127604167 649.3442468878695 875.8338681175594 640.9910102807266C879.1871047247023 632.9658986735838 879.1474841889881 617.6656754592982 875.7557431175594 610.8688004592982C874.2914574032739 607.9352067092982 849.3584216889881 581.7220370664409 820.3489350818452 552.6182424235838L767.6033993675596 499.7013897450124L820.3489350818452 446.7845370664409C849.3584216889881 417.6807424235838 874.2914574032739 391.4675727807267 875.7557431175594 388.5339790307266C879.1195824032739 381.7929076021553 879.196033296131 366.4575281378696 875.9041806175596 358.5797379592981C872.348377046131 350.0685772450124 818.2373279389881 295.7186888521552 808.7451404389881 291.1232647450124C799.6513904389881 286.7209209950124 786.4248279389881 286.4313004592981 778.3785109747023 290.4586442092981C775.1915690104167 292.0535102807266 748.7713681175594 317.0936888521553 719.6675734747023 346.1031754592981L666.750720796131 398.8487111735837L613.8338681175595 346.1031754592981C584.7300734747023 317.0936888521553 558.3098725818452 292.0535102807266 555.1229306175594 290.4586442092981C547.0766136532737 286.4313004592981 533.8500511532737 286.7209209950124 524.7563011532739 291.1232647450124C515.2641136532737 295.7186888521552 461.1530645461309 350.0685772450124 457.5972609747024 358.5797379592981C454.3054082961309 366.4575281378696 454.381859188988 381.7929076021553 457.7456984747024 388.5339790307266C459.2099841889881 391.4675727807267 484.1430199032738 417.6807424235838 513.1525065104166 446.7845370664409L565.8980422247023 499.7013897450124L513.1525065104166 552.6182424235838C484.1430199032738 581.7220370664409 459.2099841889881 607.9352067092982 457.7456984747024 610.8688004592982C454.3539574032737 617.6656754592982 454.3143368675595 632.9658986735838 457.6675734747024 640.9910102807266C460.9839797247023 648.9290683164411 517.0174618675594 705.2097602807266 525.0877743675594 708.7097602807266C532.8394484747023 712.0708093878695 548.844470796131 712.0691352807266 555.5833100818452 708.7064120664409" /> + horiz-adv-x="1333.3333333333333" d="M446.1091889880952 828.1613892569086C435.1923363095238 824.1574830069086 425.4624255952381 815.6585990783371 384.5896577380952 774.4286883640514C338.7464657738095 728.18371068548 335.9060639880952 723.9861660426229 335.8603050595238 702.4074830069086C335.8089657738095 678.55871068548 331.8284970238095 683.53527318548 428.5316220238095 586.5531303283371L514.9702380952381 499.8650722926228L429.9322916666667 414.8862776497657C333.6103050595238 318.6301392569086 335.8022693452381 321.3488892569085 335.8753720238095 298.2406303283372C335.9468005952381 275.7992240783372 336.7832961309523 274.6195365783371 390.5115327380952 221.2160767569086C433.5500372023809 178.4376169354799 438.2526041666667 174.26574193548 446.4557291666667 171.5905187211943C458.5991443452381 167.6295812211943 477.9261532738095 168.7250053283372 488.3335193452381 173.9638446140514C493.5472470238094 176.588286578337 521.8692336309523 203.7177508640515 581.2498139880952 262.9677508640515L666.6666666666666 348.1971035426228L752.0835193452381 262.9677508640515C811.464099702381 203.7177508640515 839.7860863095239 176.588286578337 844.9998139880953 173.9638446140514C855.4071800595237 168.7250053283372 874.7341889880952 167.6295812211943 886.8776041666666 171.5905187211943C895.0807291666666 174.26574193548 899.7832961309523 178.4376169354799 942.821800595238 221.2160767569086C996.550037202381 274.6195365783371 997.3865327380952 275.7992240783372 997.4579613095239 298.2406303283372C997.5310639880952 321.3488892569085 999.7230282738096 318.6301392569086 903.4010416666669 414.8862776497657L818.3630952380952 499.8650722926228L904.8017113095239 586.5531303283371C1001.5048363095239 683.53527318548 997.5243675595239 678.55871068548 997.4730282738096 702.4074830069086C997.4255952380952 724.5804740783371 994.9267113095239 728.1647374711943 944.4942336309522 778.3823713997657C894.7760416666666 827.8896258640514 892.483630952381 829.5068133640514 870.6811755952381 830.4671928283371C846.2051711309523 831.5447597926229 850.971912202381 835.3042463997657 752.909412202381 737.5866124711943L666.6515997023808 651.63292943548L581.2425595238094 736.9331526497657C484.9892113095237 833.0642910426228 487.8095238095237 830.7914115783371 464.9998139880952 830.6067017569086C458.1248139880952 830.5514562211943 449.6242559523809 829.4510097926229 446.1091889880952 828.1613892569086" /> + horiz-adv-x="1333.3333333333333" d="M166.6666666666666 500L166.6666666666666 125L666.6666666666666 125L1166.6666666666665 125L1166.6666666666665 156.6669921875L1166.6666666666665 188.33349609375L698.3331705729166 188.33349609375L230.0001627604167 188.33349609375L230.0001627604167 531.6669921875L230.0001627604167 875L198.3331705729166 875L166.6666666666666 875L166.6666666666666 500M401.0861002604167 672.7939453125L291.6666666666667 531.93408203125L291.6666666666667 390.96728515625L291.6666666666667 250L697.7081705729166 250L1103.7501627604165 250L1102.8326822916665 254.58349609375C1102.0231119791665 258.62890625 983.3629557291666 675.1669921875 980.3541666666666 684.52685546875C979.2799479166666 687.86865234375 970.3146158854166 680.84130859375 886.2638346354166 610.77685546875C835.1671549479166 568.18310546875 792.7941080729166 533.33349609375 792.1007486979166 533.33349609375C791.4078776041666 533.33349609375 727.7652994791666 596.40576171875 650.6730143229166 673.49365234375L510.5055338541666 813.65380859375L401.0861002604167 672.7939453125" /> + horiz-adv-x="1333.3333333333333" d="M517.495809646379 891.4260973893964C424.8501623249505 885.0622581036821 329.0996042892362 849.419400960825 266.2156757178076 797.8870348893964C251.5605417892362 785.8769902465393 225.1436891106648 758.7246464965393 214.859090896379 745.0996464965393C192.2854301820933 715.1945125679679 178.4584212535219 685.1387089965392 170.5376623249505 648.7575706036821C166.3752739320933 629.6403831036821 166.3886667892362 585.5003161393965 170.5627739320933 566.3189545322537C181.2675730392362 517.122525960825 205.7117694678076 474.8786643536821 246.1035105392362 435.770963460825C263.4517248249505 418.9740884608251 289.8155641106648 398.4283295322537 305.6330864320933 389.3786643536821C310.7826400035219 386.4322357822536 314.9958096463791 383.6878161393965 314.9958096463791 383.2804500679678C314.9958096463791 382.872525960825 311.2737114320933 375.1214098893965 306.7246042892362 366.056119710825C297.2552962535219 347.1861420322537 280.3496042892362 324.1571241751108 258.3049614320933 300.0996464965392C249.9054078606647 290.9327938179679 241.8925730392362 281.2480839965393 240.4980417892362 278.5784411393965C236.6648944678076 271.2380393536821 238.5956980392362 261.1666107822536 244.9193587535219 255.5159411393965C252.1023944678076 249.0974143536821 256.6855417892362 249.0778831036821 288.3295150035219 255.3273250679679C340.4640016106647 265.6230839965393 411.7039569678076 295.8077938179678 453.3295150035219 325.2374813179679L460.8295150035219 330.540494710825L481.6626623249505 327.427213460825C555.4238230392361 316.4060081036821 634.515340896379 321.4796688179679 704.9433542892363 341.7508741751108C774.9433542892363 361.8993116751108 832.7798498249505 394.8128161393965 877.4958096463791 439.9473027465392C932.749715896379 495.7179500679679 956.456747146379 555.3691777465393 951.2569703606646 625.5410527465392C941.1252739320934 762.2664991751108 794.691122146379 874.7402714965393 605.8295150035219 890.8580170322537C587.3256087535219 892.4372581036821 536.9338676820933 892.7614768536821 517.495809646379 891.4260973893964M1011.7017248249504 689.6827938179679C1011.7234882178076 688.9952938179679 1013.2017248249504 682.9411643536821 1014.9868810749504 676.2296688179679C1016.7720373249504 669.5176152465393 1019.3791801820934 655.8044456036821 1020.780965896379 645.7558964965392C1037.355184646379 526.9249813179679 977.4327516106648 411.3083518536821 859.0806310749506 333.763150960825C794.0711444678077 291.1682848893965 710.1554078606648 262.7324589965392 621.8183542892361 253.3641554251107C596.7720373249505 250.708463460825 529.1219257178076 249.6950706036821 517.8624391106648 251.8072357822536C514.4522828606648 252.4473027465392 511.6626623249505 252.6041107822537 511.6626623249505 252.1571241751107C511.6626623249505 250.8948473893965 540.9734882178076 233.7625929251107 555.8295150035218 226.341275960825C586.241903396379 211.1493116751108 629.226278396379 196.6202938179679 664.995809646379 189.4422804251107C724.253622146379 177.5505393536821 797.5175730392361 175.9121464965393 856.1967025035219 185.1660527465392L871.5633319678077 187.5890438179679L885.6565239320933 178.4032179251108C934.1548498249504 146.790494710825 993.109090896379 122.7151598893963 1049.1626623249504 111.6320125679679C1076.2273944678077 106.2804500679679 1081.671590896379 106.380338460825 1088.0577516106648 112.3457402465393C1090.8518364320933 114.9562313179678 1093.6386667892361 119.0856956036821 1094.2508319678077 121.5231956036821C1096.706747146379 131.3083518536821 1093.8244926820933 136.7246464965392 1075.327840896379 157.0851375679679C1046.4852069678077 188.833463460825 1030.5415685749504 211.548307210825 1020.9366578606646 234.575650960825L1018.3741578606648 240.7185081036822L1028.5867694678075 246.9227491751108C1045.2586444678075 257.0499813179679 1069.8189123249504 276.0315661393965 1085.5945819678077 290.9813429251108C1126.2218141106648 329.4813429251107 1152.0181310749506 373.6091331036821 1162.7625507178075 422.985807210825C1166.9902292892361 442.4138206036821 1166.950608753522 486.282682210825 1162.6883319678075 505.9327938179679C1152.384202503522 553.4333518536821 1130.6799614320933 591.6950706036821 1091.6626623249504 631.1426152465392C1070.105184646379 652.9378161393964 1053.9422382178077 665.8329054251108 1028.2977069678075 681.6956286393964C1012.9478185749504 691.1906063179679 1011.6347605392363 691.8228607822537 1011.7017248249504 689.6827938179679" /> + horiz-adv-x="1333.3333333333333" d="M945.3593166301016 749.2365669694732C938.4033166301016 746.2135669694732 906.5283166301016 715.0075669694733 705.5233166301016 514.4285669694732L541.8823166301015 351.1355669694732L471.2443166301015 421.0225669694733C432.3933166301016 459.4615669694732 397.4563166301016 493.0845669694733 393.6053166301016 495.7415669694732C379.1503166301016 505.7155669694732 360.6653166301016 502.2225669694732 345.3933166301016 486.6305669694732C332.6093166301016 473.5785669694732 328.5413166301016 459.1105669694732 333.9893166301016 446.0715669694732C339.5723166301016 432.7105669694733 515.9203166301015 256.3375669694732 529.2763166301015 250.7565669694732C536.4073166301016 247.7775669694733 546.8683166301016 247.7555669694732 553.9273166301016 250.7045669694732C567.4903166301016 256.3715669694732 993.6983166301015 682.5725669694732 999.3653166301016 696.1355669694732C1004.7873166301016 709.1105669694732 1000.6933166301015 723.6125669694733 987.9353166301016 736.6225669694733C974.9703166301016 749.8425669694732 958.1943166301016 754.8135669694732 945.3593166301016 749.2365669694732" /> + horiz-adv-x="1333.3333333333333" d="M362.6630077805268 686.6584528729262C354.6770077805267 683.8124528729262 339.3930077805267 669.0294528729262 334.9520077805268 659.8554528729262C331.1240077805267 651.9484528729262 330.7150077805267 641.2954528729261 333.9420077805268 633.5704528729261C339.6210077805267 619.9784528729263 640.8110077805268 318.7624528729262 654.4010077805267 313.0844528729262C661.4280077805267 310.1484528729262 671.9150077805267 310.1514528729262 678.9540077805268 313.0924528729262C692.4690077805267 318.7394528729262 993.7370077805268 620.0374528729262 999.3860077805268 633.5554528729263C1002.6260077805266 641.3124528729262 1002.2100077805266 651.9484528729262 998.3540077805266 659.9134528729262C991.0490077805266 675.0034528729261 971.5370077805266 689.0714528729261 957.8630077805266 689.1064528729262C943.0240077805267 689.1444528729262 946.5850077805266 692.4064528729261 778.7500077805266 525.0574528729262L666.6670077805268 413.2984528729262L555.4170077805268 524.2344528729261C410.5090077805268 668.7324528729262 393.4000077805267 685.1514528729263 385.4380077805268 687.3624528729262C377.1180077805267 689.6734528729262 370.5530077805268 689.4704528729262 362.6630077805268 686.6584528729262" /> + horiz-adv-x="1333.3333333333333" d="M625.0838681175594 926.235987959298C570.469470796131 921.0540683164407 520.063220796131 906.1885549235838 470.8567475818452 880.7527290307266C373.6173502604167 830.4882201021553 301.5263904389881 748.8710326021553 263.0922386532738 645.5345370664409C256.3411225818452 627.3827513521553 246.0129975818452 586.3196933164409 242.3416806175595 563.0345370664411C238.0342029389881 535.7164567092982 238.0342029389881 463.6863227807266 242.3416806175595 436.3682424235837C256.7540690104167 344.9558540307266 296.9292922247024 264.5797379592981 360.5492699032738 199.8760549235837C417.0297386532738 142.4329745664409 482.9103190104166 104.2410102807267 559.274158296131 84.6718138521553C599.3723725818452 74.3955861735838 617.8372163318452 72.2605415307267 666.750720796131 72.2443584950124C715.3684663318452 72.2281754592981 733.1575288318452 74.2901174235838 774.250720796131 84.7058540307266C923.819359188988 122.6160102807266 1043.8361002604167 242.6327513521553 1081.7462565104167 392.2013897450123C1092.153064546131 433.2594254592981 1094.2222609747023 451.087550459298 1094.2222609747023 499.7013897450124C1094.2222609747023 548.3369924235838 1092.1486002604167 566.1885549235838 1081.7356538318452 607.2013897450124C1062.5487118675594 682.7717022450124 1023.7903413318452 749.6472602807266 966.5760556175596 805.9028406378695C896.0152297247025 875.2817468878695 805.4940243675594 917.1042915307266 705.9175734747023 926.3330861735838C685.0286225818452 928.2689120664407 646.012439546131 928.2220370664407 625.0838681175594 926.235987959298M717.5838681175594 799.1048495664409C783.778064546131 786.9731531378695 840.028064546131 757.1483763521553 885.2657877604165 710.1963674235838C928.656970796131 665.1612111735838 955.6664574032739 611.0038451021553 966.9700288318452 546.3682424235838C969.8550734747022 529.8738227807266 969.8773949032739 471.4497156378695 967.0057431175594 453.8682424235838C950.8489350818452 354.9424611735838 890.7105422247023 272.5110995664409 802.2931315104167 228.0959209950123C706.7981538318452 180.1254968878695 590.6993815104166 186.7315236735837 501.2083100818452 245.2276174235837C437.5526181175595 286.8358763521553 390.7200288318452 352.1483763521553 372.7345377604167 424.3961442092982C365.5280645461309 453.3464790307267 364.3215913318452 464.1433540307266 364.3215913318452 499.7013897450124C364.3215913318452 535.2594254592982 365.5280645461309 546.056300459298 372.7345377604167 575.0066352807266C399.0978190104167 680.9089790307266 485.4125511532738 767.2298495664409 591.4454752604166 793.7337558164409C605.9047386532739 797.3481531378695 621.4365466889881 800.1026174235838 638.4175734747023 802.0635549235838C650.6011672247023 803.4709209950124 704.8182431175594 801.4446933164409 717.5838681175594 799.1048495664409M672.2602074032739 709.0127736735838L667.5838681175595 704.9915683164409L667.1301850818452 602.4011665307266L666.676502046131 499.8107647450124L600.0833100818452 499.3392245664409L533.4901181175594 498.8682424235838L528.8701404389881 494.2516129592981C524.309314546131 489.6935772450124 524.2445824032739 489.3347602807266 523.7730422247023 465.9184656378695C523.3411225818452 444.4698049235838 523.6201404389881 441.6796263521552 526.6904529389881 436.7432424235838C528.5576404389881 433.7410102807266 532.0559663318452 430.5356531378695 534.4644484747023 429.6199165307266C537.246814546131 428.5624388521553 573.3885556175595 428.1215906378695 633.5933547247023 428.4117692092981L728.3433547247023 428.8682424235838L732.9638904389881 433.4887781378695L737.5838681175594 438.1093138521552L738.0308547247023 568.4871040307266C738.3589797247023 664.2421263521553 737.9661225818452 700.1003852807266 736.551502046131 703.5161218878695C732.9527297247023 712.2041799235838 729.9638904389881 713.0345370664409 702.3059663318452 713.0345370664409C677.8924618675595 713.0345370664409 676.7602074032739 712.8833093878695 672.2602074032739 709.0127736735838" /> + horiz-adv-x="1333.3333333333333" d="M735.7521158854167 833.3853609777376C733.8736979166667 832.4727633214876 731.3766276041667 830.1880953527376 730.2023111979167 828.3077242589876C727.4796549479167 823.9483492589876 545.0001627604167 192.6221773839876 545.0001627604167 187.5626070714876C545.0001627604167 180.0118258214876 551.5655924479167 175.2886812902376 569.1969401041667 170.1553805089876C578.3468424479167 167.4913180089876 588.2291666666667 165.3023531652376 591.1569010416667 165.2906344152376C603.3995768229167 165.2422945714876 596.8434244791667 145.0171969152376 696.5939127604167 490.5767672277376C747.0504557291667 665.3707125402376 788.3331705729167 810.1412203527376 788.3331705729167 812.2891695714876C788.3331705729167 821.3389742589876 783.9723307291667 824.1124117589876 758.8404947916667 831.0430758214876C742.0245768229167 835.6802828527376 740.7438151041667 835.8106539464876 735.7521158854167 833.3853609777376M338.7628580729167 624.8399508214876C211.2340494791667 497.3111422277376 216.5231119791667 503.3360445714876 222.3834635416667 492.2701266027376C223.6944986979167 489.7950289464876 276.7799479166667 435.8321383214876 340.3517252604167 372.3531344152376L455.9361979166667 256.9366305089876L463.2936197916667 256.9366305089876C470.3800455729167 256.9366305089876 471.2501627604167 257.5362398839876 486.9918619791667 273.2779391027376C502.7272135416667 289.0132906652376 503.3331705729167 289.8917086339876 503.3331705729167 296.9673922277376L503.3331705729167 304.3155367589876L405.4357096354167 402.3062594152376L307.5377604166667 500.2969820714876L404.5362955729167 597.3668062902376C457.8854166666667 650.7549898839876 502.1876627604167 696.2432711339876 502.9855143229167 698.4517672277376C505.6193033854167 705.7398531652376 503.1783854166667 709.7891695714876 485.9103190104167 726.7823336339876C471.0314127604167 741.4239351964876 468.0851236979167 743.6031344152376 463.1715494791667 743.6031344152376C457.9195963541667 743.6031344152376 449.2521158854167 735.3292086339876 338.7628580729167 624.8399508214876M847.4230143229167 726.7823336339876C830.1549479166667 709.7891695714876 827.7140299479167 705.7398531652376 830.3478190104167 698.4517672277376C831.1456705729167 696.2432711339876 875.4479166666667 650.7549898839876 928.7970377604169 597.3668062902376L1025.7955729166667 500.2969820714876L927.8976236979169 402.3062594152376L830.0001627604167 304.3155367589876L830.0001627604167 296.9673922277376C830.0001627604167 289.8917086339876 830.6061197916667 289.0132906652376 846.3414713541667 273.2779391027376C862.0831705729167 257.5362398839876 862.9532877604167 256.9366305089876 870.0397135416667 256.9366305089876L877.3971354166667 256.9366305089876L992.9816080729169 372.3531344152376C1056.5533854166667 435.8321383214876 1109.6388346354167 489.7950289464876 1110.9498697916667 492.2701266027376C1116.8102213541667 503.3360445714876 1122.0992838541667 497.3111422277376 994.5704752604169 624.8399508214876C884.0812174479167 735.3292086339876 875.4137369791667 743.6031344152376 870.1617838541667 743.6031344152376C865.2482096354167 743.6031344152376 862.3019205729167 741.4239351964876 847.4230143229167 726.7823336339876" /> + horiz-adv-x="1333.3333333333333" d="M591.7996002778186 924.0223214285716C584.1388859921044 917.5758928571428 579.9954708135328 899.4944196428571 571.5925690278186 835.8420758928571C569.6567431349615 821.1796875 567.944689563533 809.1177455357144 567.7867654563901 809.0373883928571C567.6293993849615 808.95703125 562.6254931349615 807.1378348214287 556.6673458135328 804.9938616071429C550.7091984921044 802.8504464285716 539.5607609921044 798.2332589285716 531.8933502778186 794.734375C524.2259395635328 791.2354910714287 517.1009395635328 788.875 516.0596449206757 789.4899553571429C515.0189083135328 790.1043526785716 499.2264975992472 802.2327008928571 480.9658949206757 816.44140625C440.1612074206758 848.19140625 432.5964752778187 853.3331473214287 426.6896672421044 853.3331473214287C418.5518324206758 853.3331473214287 401.7823011706758 840.2310267857142 370.2454708135329 809.2327008928571C338.823595813533 778.34765625 320.9871002778187 758.4224330357142 315.921252063533 748.5474330357142C311.0189083135329 738.9899553571429 313.1963636706758 734.48046875 337.1137743849615 704.6506696428571C349.2432386706758 689.5228794642858 363.5166761706758 671.08984375 368.8330824206758 663.6886160714287L378.4988190278187 650.2310267857144L373.6377699206758 640.5323660714287C370.964220813533 635.1981026785713 366.2862074206758 624.0831473214287 363.2421225992472 615.8331473214287C360.1980377778187 607.5831473214287 357.2756047421043 600.2974330357142 356.7471449206758 599.6428571428571C356.2186850992472 598.98828125 332.9223681349615 595.0574776785713 304.9770556349615 590.9084821428571C277.0317431349615 586.7594866071429 251.7638859921044 582.2606026785713 248.8258279563901 580.9118303571429C238.2052922421044 576.0345982142858 238.1768324206758 575.8074776785713 238.6974797421044 499.1774553571429L239.1673458135329 430.0613839285715L244.3414529563901 424.888392857143C249.4887743849615 419.7427455357144 249.7929038492472 419.6746651785715 302.6455824206758 411.8521205357143L355.7761627778187 403.98828125L360.9742654563901 389.9107142857144C363.8330824206758 382.1679687500001 368.9089752778187 369.9151785714286 372.253283313533 362.6819196428572C375.5975913492472 355.4486607142857 378.3341984921044 348.9648437500001 378.3341984921044 348.2739955357143C378.3341984921044 347.5831473214286 365.8442431349615 331.0011160714286 350.5797342063901 311.4252232142859C335.3146672421044 291.8498883928572 321.4424574206758 273.5831473214286 319.7527252778187 270.8331473214286C315.0138859921043 263.1222098214286 315.7633279563901 253.603236607143 321.8302922421044 244.4436383928572C328.6584172421044 234.1350446428572 361.5356493849615 200.0072544642857 392.0791761706758 171.5223214285714C417.1333056349615 148.1568080357144 421.7605377778187 145.3102678571428 431.2504931349615 147.4218750000001C433.7716984921044 147.9827008928572 454.4636627778186 162.5876116071428 477.2326359921043 179.8766741071428L518.6316315278186 211.3125000000001L530.5663413492472 205.8297991071428C537.1299574206757 202.8141741071428 548.3241538492472 198.29296875 555.4418993849615 195.7818080357143C565.1935734921044 192.3420758928572 568.5853145635328 190.3482142857144 569.2036181349615 187.6919642857144C569.6545109921044 185.7527901785714 573.4084172421044 161.6668526785715 577.5456940278186 134.1668526785714C585.4067431349615 81.9101562499999 586.4781717063901 78.2371651785715 595.1612074206757 73.7745535714286C598.1472565278186 72.2399553571428 616.6427922421044 71.7098214285714 667.7895556349615 71.6914062500001L736.41176545639 71.6668526785714L741.4279484921044 75.8878348214286C746.9435734921044 80.5290178571428 748.6059618849615 84.7087053571428 752.3420109921044 103.3331473214286C754.5434618849615 114.3074776785714 761.0886627778186 158.1947544642857 764.1768324206757 182.6902901785715C765.2192431349615 190.9626116071428 765.4569663492471 191.2756696428572 772.2091984921044 193.2957589285714C776.0362074206757 194.4408482142858 786.6673458135328 198.7209821428572 795.8341984921044 202.8074776785715C805.0004931349615 206.8934151785714 813.2929038492471 210.5831473214286 814.2610958135328 211.0061383928572C815.2292877778186 211.4291294642858 833.2292877778186 198.2661830357143 854.2610958135328 181.7555803571428C875.2929038492473 165.2444196428572 895.0250467063902 150.5184151785715 898.1104261706757 149.0312500000001C910.6249350992472 142.9988839285714 922.0177922421044 150.2494419642858 962.2750467063902 189.8660714285715C1009.9279484921044 236.7600446428572 1022.7549574206759 253.6964285714286 1019.1706940278186 264.9893973214286C1018.5401136706759 266.9765625000001 1009.2449127778186 279.6037946428572 998.5144440278186 293.0507812500001C987.7839752778186 306.4977678571429 973.499377063533 324.8303571428572 966.7700243849616 333.7896205357144L954.535091349247 350.0792410714286L962.0624350992472 366.2896205357144C966.2025020635328 375.2053571428572 970.93129670639 386.2500000000001 972.5708056349616 390.8331473214286C974.2103145635328 395.4168526785715 975.9898904563902 399.6573660714286 976.5261627778186 400.2566964285715C977.061877063533 400.8565848214286 1000.6997118849616 404.8454241071429 1029.0540645635328 409.1210937500001C1057.4089752778186 413.3967633928572 1082.7086404563902 417.9815848214286 1085.2761627778186 419.3091517857144C1095.081408313533 424.3794642857144 1095.1522788492473 424.9955357142859 1094.6372118849615 500.8225446428572L1094.1673458135328 569.9386160714287L1089.1522788492473 574.9525669642858C1084.2371002778186 579.8660714285716 1083.1388859921044 580.1171875 1034.152278849247 587.5479910714287C1006.6606493849616 591.7176339285713 982.5378815278186 595.4748883928571 980.5468100992472 595.8973214285713C978.1360958135328 596.4084821428571 976.2504931349616 598.75390625 974.9033949206759 602.9157366071429C973.7906717063902 606.3537946428571 968.8074127778186 618.7198660714287 963.8297342063902 630.3962053571429C958.6388859921044 642.5714285714287 955.3107609921044 652.5234375 956.0267208135328 653.7299107142858C956.7131047421044 654.88671875 968.68910920639 670.5033482142858 982.6400020635328 688.4341517857142C1016.097033313533 731.43359375 1016.6673458135328 732.3136160714287 1016.6673458135328 740.9006696428571C1016.6673458135328 746.7845982142858 1015.3090868849616 749.8102678571429 1008.7504931349616 758.5345982142858C998.5953592063902 772.0446428571429 966.9452475992472 804.8297991071429 938.7873234921044 831.0061383928571C916.1517208135328 852.0491071428571 910.5071895635328 855.3058035714287 901.57582795639 852.4709821428571C899.5334172421044 851.8225446428571 879.2142208135328 837.2014508928571 856.4223681349615 819.9793526785716L814.9826359921044 788.6662946428571L798.7415645635328 795.7689732142858C789.8090868849615 799.67578125 778.5624350992473 804.1612723214287 773.7488190278186 805.7371651785716C767.4279484921044 807.8063616071429 764.7622118849615 809.6071428571429 764.15395295639 812.2181919642858C763.6902252778186 814.2064732142858 759.9301806349615 838.2159598214287 755.7973681349615 865.5725446428571C751.6651136706757 892.9291294642858 747.49770295639 916.7818080357142 746.5362074206757 918.5786830357142C745.5747118849615 920.375 742.3983725992473 923.3018973214286 739.4776136706757 925.0831473214286C734.44692170639 928.1501116071428 730.5540645635328 928.3214285714286 665.5451359921044 928.3270089285716L596.9229261706757 928.3331473214286L591.7996002778186 924.0223214285716M688.0629931349615 640.8030133928571C737.4798458135328 636.1177455357142 788.0116538492473 592.9771205357142 803.2064083135331 542.5C810.5032833135328 518.2594866071429 810.5032833135328 481.7405133928572 803.2064083135331 457.5000000000001C789.6935734921044 412.6110491071429 748.90395295639 373.6908482142857 702.5004931349615 361.4090401785715C692.0674574206757 358.6478794642857 684.2739306349615 357.8800223214286 666.6673458135328 357.8800223214286C649.0607609921044 357.8800223214286 641.26723420639 358.6478794642857 630.8341984921044 361.4090401785715C584.4307386706757 373.6908482142857 543.6411181349615 412.6110491071429 530.1282833135328 457.5000000000001C522.8314083135328 481.7405133928572 522.8314083135328 518.2594866071429 530.1282833135328 542.5C542.9335288492472 585.0385044642858 581.6578592063901 623.71484375 624.3503815278186 636.6049107142858C637.0283949206757 640.4330357142858 659.9218100992473 643.2667410714287 670.8341984921044 642.3588169642858C674.5004931349615 642.0535714285713 682.2538413492473 641.3537946428571 688.0629931349615 640.8030133928571" /> + horiz-adv-x="1333.3333333333333" d="M623.4732491260393 926.8900943486142C620.2645437688964 926.5876389914716 608.2645437688964 925.5340675629 596.8063964474679 924.547460420043C491.9877580546108 915.5268130986142 380.7578473403251 874.7600720271857 304.6574009117536 817.4737997057572C233.9866419831822 764.2740229200429 187.7215750188964 695.8426613129001 171.4699009117536 620.4726836343285C166.5346330546107 597.586522920043 166.1735839474679 549.9983532771857 170.7489187688965 525.4726836343286C179.7628696617536 477.1484648843286 202.6205705546107 430.1970139914715 237.6936732331822 387.9620809557572C262.2316196617536 358.4140898843286 305.5524901974679 321.5686657771857 339.8783830546107 301.0513666700428C347.8136509117536 296.3086211343285 354.6043875188965 292.1897595271857 354.9687848403251 291.8984648843285C356.3320660903251 290.8102952414715 343.3923339474679 254.7321702414715 334.6652134117536 235.2890898843285C320.1925571617536 203.0452282771857 308.0061732331822 185.6345139914714 271.7980259117536 145.4726836343285C243.1936732331822 113.7438889914714 240.5324009117536 110.1819470271857 239.1981375188965 101.8376389914714C237.7399901974679 92.7193354200428 240.5619768046107 84.8298264914714 247.7768205546107 77.8521479200428C253.5223562688965 72.2957863128999 254.0363071617536 72.1456747057572 266.4955705546107 72.3677729200428C282.3203473403251 72.6501389914715 313.0882044831822 78.8627505986143 347.3276018046108 88.6903175629C429.4542759117536 112.2611880986143 507.5329589474679 153.0095139914714 568.9012625188964 204.3253622057571L585.5764857331822 218.2684425628999L612.1696776974679 216.2265898843286C673.273472340325 211.5351836343285 757.652378590325 216.8655407771857 811.0926687688964 228.7929961343286C918.3934500188966 252.7422148843286 1008.3811732331822 298.4804961343286 1071.539097340325 361.1702282771856C1120.4090750188964 409.6780407771857 1149.125034840325 460.0558309557571 1162.1060616260393 520.0575050629001C1165.2466866260393 534.5742461343286 1165.8019321617537 542.2695586343286 1165.8019321617537 571.3058309557572C1165.8019321617537 600.3421032771857 1165.2466866260393 608.0374157771857 1162.1060616260393 622.5541568486143C1149.329833947468 681.6099604200429 1120.6936732331822 732.3404291700429 1073.453159840325 779.6099604200429C990.5084053760391 862.6049380986143 863.4397669831822 915.3164336343286 719.9202357331822 926.2645363129C699.601597340325 927.8147595271859 637.5669991260393 928.2165452414714 623.4732491260393 926.8900943486142" /> + horiz-adv-x="1333.3333333333333" d="M601.085193452381 998.3131316237918C503.0327380952381 993.452082516649 404.5154389880953 975.112238766649 341.2174479166667 949.9358994809348C289.9942336309524 929.5625735880774 255.9752604166667 905.4141360880774 244.0450148809524 880.9587789452204L239.1666666666667 870.9587789452204L239.1666666666667 821.7924843023633L239.1666666666667 772.6256316237918L243.7001488095239 762.9498503737918C271.1449032738095 704.3745155523633 411.5980282738095 656.4811003737918 589.1382068452381 645.1579976952204C623.4216889880952 642.9716137666489 709.9116443452381 642.9716137666489 744.1951264880952 645.1579976952204C921.7353050595239 656.4811003737918 1062.1884300595239 704.3745155523633 1089.6331845238094 762.9498503737918L1094.1666666666667 772.6256316237918L1094.1666666666667 821.7924843023633L1094.1666666666667 870.9587789452204L1089.565662202381 880.3276405523633C1083.4490327380952 892.7829976952204 1073.5762648809525 903.7204976952204 1058.0712425595239 915.2182655523632C978.8251488095239 973.9844485880774 792.7693452380954 1007.815363766649 601.085193452381 998.3131316237918M238.6644345238096 611.3756316237918L239.1666666666667 557.6256316237918L244.0450148809524 547.6898057309347C267.7849702380953 499.3382432309347 371.8670014880953 456.6697164452204 510.3552827380952 438.5162566237919C566.9791666666667 431.0938235880775 594.6091889880953 429.5000735880775 666.6666666666667 429.5000735880775C738.7241443452381 429.5000735880775 766.3541666666667 431.0938235880775 822.9780505952381 438.5162566237919C961.466331845238 456.6697164452204 1065.548363095238 499.3382432309347 1089.288318452381 547.6898057309347L1094.1666666666667 557.6256316237918L1094.6688988095239 611.3756316237918C1094.9451264880952 640.9381316237918 1094.7810639880954 665.1256316237918 1094.303943452381 665.1256316237918C1093.827380952381 665.1256316237918 1088.085193452381 661.6630200166489 1081.5433407738096 657.4314351952205C1036.7174479166667 628.4336673380776 960.1114211309526 602.7071048380776 876.6666666666667 588.6284218023632C799.964099702381 575.6864575166489 761.1923363095239 572.7562119809347 666.6666666666667 572.7562119809347C572.1409970238096 572.7562119809347 533.3692336309524 575.6864575166489 456.6666666666667 588.6284218023632C372.9518229166667 602.7528637666489 296.760974702381 628.3399173380776 251.7899925595238 657.4314351952205C245.2481398809524 661.6630200166489 239.5059523809524 665.1256316237918 239.0293898809524 665.1256316237918C238.5522693452382 665.1256316237918 238.3882068452382 640.9381316237918 238.6644345238096 611.3756316237918M238.6649925595238 397.3477298380775L239.1666666666667 342.6256316237919L243.964099702381 333.5084441237919C272.7146577380953 278.8706093023633 393.4970238095239 234.3851182309346 554.1666666666667 219.256770016649C615.8954613095239 213.4448280523633 717.4378720238096 213.4448280523633 779.1666666666667 219.256770016649C876.7001488095239 228.4403637666491 960.9668898809522 248.4537566237917 1017.960193452381 275.9699396595062C1054.6058407738094 293.6624619809347 1078.557849702381 312.9621271595062 1089.3692336309523 333.5084441237919L1094.1666666666667 342.6256316237919L1094.6683407738096 397.3477298380775L1095.1700148809523 452.0692700166489L1088.0020461309523 447.1702744809347C1055.2537202380952 424.7902521595062 1001.5427827380952 402.7556539452204 945.3591889880952 388.6518593023633C778.9674479166667 346.8834441237919 554.3658854166667 346.8834441237919 387.9741443452382 388.6518593023633C331.5120907738095 402.8254084095061 278.0611979166667 424.7500735880775 245.331287202381 447.1607878737919L238.163318452381 452.0692700166489L238.6649925595238 397.3477298380775M238.6839657738096 183.2193816237918L239.1666666666667 129.2924843023633L244.0450148809524 119.2924843023633C264.0985863095239 78.1853414452204 340.3843005952382 41.5307655523633 451.8759300595239 19.4325512666489C583.4613095238095 -6.6483639119224 753.5126488095239 -6.3174487333511 885.4551711309523 20.2763012666489C999.6097470238096 43.2852298380776 1075.4596354166667 81.7377968023633 1091.702380952381 124.8343369809347C1094.827380952381 133.1261896595061 1095.0182291666667 137.096613766649 1094.606956845238 185.2138012666491L1094.1666666666667 236.717707516649L1084.1666666666667 230.4152521595062C1036.7040550595239 200.5023057309347 976.8954613095239 179.2171494809347 896.6666666666667 163.6847834095061C823.0606398809525 149.4353414452204 755.5154389880954 143.510676266649 666.6666666666667 143.510676266649C559.9043898809524 143.510676266649 472.6549479166667 153.198176266649 387.6806175595239 174.4866807309346C336.6510416666668 187.2712789452204 282.0606398809524 208.7829976952204 254.9998139880953 226.7701628737917C252.7085193452382 228.2936003737919 247.9908854166667 231.2511896595061 244.5171130952382 233.342707516649L238.2007068452382 237.1462789452204L238.6839657738096 183.2193816237918" /> + horiz-adv-x="1333.3333333333333" d="M195.2010544550365 500.417L195.6240544550365 269.7970000000001L243.9570544550365 269.2850000000001C319.0500544550365 268.4910000000001 356.8540544550365 272.002 385.4110544550365 282.4240000000001C405.8740544550365 289.892 419.5290544550365 300.2150000000001 434.2520544550365 319.3470000000001C448.7570544550365 338.1960000000001 456.4920544550365 361.0810000000001 459.7120544550365 394.6690000000001C463.2310544550365 431.382 460.8580544550365 598.3000000000002 456.3450544550365 631.4630000000002C452.8900544550365 656.854 443.6480544550365 676.142 425.7830544550365 695.248C413.7580544550365 708.1080000000002 400.3880544550365 716.173 382.5060544550365 721.3530000000001C359.6650544550365 727.969 342.6020544550365 729.2710000000002 266.8680544550365 730.1760000000002L194.7790544550365 731.037L195.2010544550365 500.417M562.0950544550365 728.9670000000001C554.4540544550365 728.298 545.7700544550364 726.4080000000001 542.1380544550365 724.623C533.4250544550365 720.3400000000001 522.1340544550364 705.979 519.0110544550364 695.2050000000002C514.0320544550365 678.029 513.1760544550365 645.9630000000002 513.1500544550365 475.4510000000001L513.1240544550365 304.439L527.7070544550365 290.4080000000001C538.5840544550365 279.9430000000001 544.1970544550366 275.8070000000001 549.7900544550365 274.1350000000001C562.8570544550364 270.2290000000001 588.5370544550365 269.1110000000001 666.8740544550365 269.036L743.1240544550365 268.963L743.1240544550365 307.9570000000001L743.1240544550365 346.9500000000001L730.2070544550365 347.916C723.1030544550365 348.4470000000001 698.5400544550364 349.2890000000001 675.6240544550365 349.7870000000001C652.7070544550365 350.2850000000001 625.5200544550364 351.1430000000001 615.2070544550365 351.694L596.4570544550365 352.6960000000001L596.4570544550365 406.4860000000001L596.4570544550365 460.275L623.5400544550365 461.472C638.4360544550365 462.131 658.4990544550365 463.1480000000001 668.1240544550365 463.733L685.6240544550365 464.7970000000001L686.0710544550366 503.5210000000001L686.5180544550365 542.2450000000001L639.4040544550364 542.6870000000001L592.2900544550365 543.1300000000001L591.8510544550365 596.8800000000001L591.4110544550365 650.6300000000001L667.2670544550365 650.6300000000001L743.1240544550365 650.6300000000001L743.1240544550365 690.6300000000001L743.1240544550365 730.6300000000001L659.3740544550365 730.3900000000001C613.3110544550365 730.259 569.5360544550365 729.6180000000002 562.0950544550365 728.9670000000001M795.6220544550365 728.547C796.6570544550366 725.5820000000001 831.9460544550366 592.7840000000001 860.6160544550364 483.9630000000001C903.7000544550364 320.435 906.0740544550366 313.9220000000001 931.2020544550364 290.31C954.0520544550366 268.8360000000001 969.2360544550367 264.9760000000001 990.2200544550363 275.3070000000001C1003.9810544550364 282.0820000000001 1018.8460544550364 296.463 1025.8880544550366 309.815C1032.6160544550364 322.574 1061.0600544550364 424.5870000000001 1113.9440544550364 625.6300000000001C1138.7710544550364 720.0140000000001 1140.1700544550365 726.0240000000001 1137.6820544550365 727.605C1135.3130544550365 729.1090000000002 1092.1820544550365 729.0510000000002 1066.6320544550365 727.509L1049.3060544550365 726.4630000000002L1024.5920544550365 631.567C988.3930544550363 492.571 976.0640544550366 449.3170000000001 968.5050544550367 434.7970000000001L965.9030544550365 429.7970000000001L963.8730544550364 434.7970000000001C961.7580544550364 440.0050000000001 929.5040544550366 562.2950000000001 902.5510544550366 667.297L886.9360544550366 728.1300000000001L875.4460544550366 729.173C869.1270544550364 729.7470000000001 848.4180544550366 730.309 829.4260544550366 730.423C802.4540544550364 730.585 795.0540544550365 730.174 795.6220544550365 728.547M347.2060544550365 645.673C359.3120544550365 640.9550000000002 371.7770544550365 629.7530000000002 374.5570544550365 621.094C378.2570544550365 609.566 380.1710544550365 550.3810000000001 379.2080544550365 477.2970000000001C378.6930544550365 438.2020000000001 377.4510544550365 401.6090000000001 376.4360544550365 395.6300000000001C374.1320544550365 382.0460000000001 368.5560544550365 372.3850000000001 358.6570544550365 364.8270000000001C346.9630544550365 355.8980000000001 337.8040544550365 353.7880000000001 306.2430544550365 352.7550000000001L278.5290544550365 351.8470000000001L277.4940544550365 459.9890000000001C276.9240544550365 519.4660000000001 276.0090544550365 586.7750000000001 275.4600544550365 609.5630000000001L274.4610544550365 650.9960000000001L305.8760544550365 650.2660000000001C333.7210544550365 649.6200000000001 338.4170544550365 649.0980000000002 347.2060544550365 645.673" /> + horiz-adv-x="1333.3333333333333" d="M520.8719117586121 801.963531458128C477.6922061040808 792.2942828136663 431.2599830211993 777.2284423798942 398.2483641211218 762.1765446262148C385.62559107697 756.4205415278416 385.622492703616 756.418217747826 374.7169930909127 739.1610527594448C323.1468923937787 657.558419142094 289.8633912318887 575.0773966788872 274.2661797679072 490.2354137199406C265.6488288771249 443.3601232474387 264.2057614875045 425.5413780886471 264.2057614875045 366.0688761521637C264.2057614875045 335.3608978407771 264.8014237648089 306.7551658500723 265.5303160963348 302.5018738283837C266.8339566850258 294.8907196843092 267.1647080405641 294.5560953620785 286.3637785285579 281.4546236347354C325.3955368554363 254.8186825038291 361.7805097446694 234.6962967563465 401.4993323627949 217.7799528369042C422.8641658252272 208.6808048895766 466.5713695432752 192.7358010166099 470.1492161737941 192.7358010166099C473.2320976610134 192.7358010166099 513.3722990552814 257.2826639135889 513.3722990552814 262.24083587331C513.3722990552814 263.0688761521637 507.184847467365 266.2369629066175 499.6217181102775 269.281114726912C480.6395337570629 276.9217034178492 449.8525469251497 292.9488141846966 448.7774113713155 295.7489691033644C447.9702851126013 297.8535392040614 453.6836855773573 303.855862984077 460.038449326389 307.578558568895C461.74410385776 308.5777839755565 469.5984803101226 306.1873889329538 484.7479768244526 300.0588064387632C579.7681162512536 261.6211612025123 681.332794795018 253.6242595758663 777.0004942528027 277.0487367253628C803.3970860421133 283.5119435417841 834.5001069561334 293.7435469499948 855.7208660576051 302.9449412180041L870.5705949499368 309.3833610475935L877.7526243844835 303.9766995448825C881.7030504108197 301.002261125053 884.9586662125238 297.6707351761761 884.9873261660482 296.5731364155255C885.057039566513 293.8721294441853 861.0702076532674 280.980572511575 838.493135616087 271.5839807222644C828.3428645084184 267.3601232474387 820.038449326389 263.2408358733101 820.038449326389 262.430611241242C820.038449326389 255.9371952846191 859.4606026958701 192.7358010166099 863.5109512628724 192.7358010166099C864.3428645084184 192.7358010166099 876.8393788383953 196.9348715046037 891.2808970413387 202.0673269654867C944.8223377849484 221.0952123256726 991.5032053294876 244.5863045022798 1040.338991541726 277.0766220855487L1066.4729961892858 294.4639187547973L1067.8393788383953 304.0162038051459C1068.5907343767376 309.270270420173 1069.169355600595 338.3190698004983 1069.1252037803006 368.569263448833C1069.055490379836 415.9178304511567 1068.5202463829344 427.5103943551072 1065.2754748879693 451.9023385843868C1051.329696421664 556.7249567098709 1016.500881549472 649.4980008616913 955.7107963442048 743.7443215433334L946.9973958794486 757.2524547733876L925.6015786834766 766.0502859120397C893.9881007593867 779.0487367253627 876.3142045548941 785.1912618996462 848.8897274053976 792.7102394364395C818.2654051745687 801.1076058190886 784.060137939867 808.3562502807463 780.8587436718576 807.1277452458894C779.5310906896733 806.6180628291584 773.9052192721675 796.7536166633954 768.3575817818498 785.2059791730776C760.331245608341 768.4980008616913 757.6852347640344 764.3779388942241 755.4048319754983 765.0324702652542C736.5225701629498 770.4484268880274 637.8858544387051 772.1749954395377 599.2057614875043 767.7660101568113C587.2886429747236 766.4081480344255 576.9276824789839 765.282663913589 576.1809745006726 765.2663974534805C575.4342665223612 765.2493564000335 570.1685810072565 774.6110914891117 564.4784183426555 786.0688761521637C555.6418575370785 803.8651581041388 553.5310906896733 806.9503633713737 550.0028180328181 807.231540753248C547.7309357710055 807.4127955944564 534.6217181102775 805.0417653853162 520.8719117586121 801.963531458128M549.2716019212767 548.4987754550298C595.8494485517956 536.4453285146733 618.9323300390149 479.1935856796617 596.4482092024541 431.4918041149833C582.7138947175587 402.3539265007307 551.3025856548165 384.2214710398476 523.1515399538097 389.1796429995688C484.5767916966446 395.974375764867 456.4706724092705 435.7388993899638 460.7464276377756 477.4693409081668C465.8424772117492 527.2106267331087 506.2499133077987 559.6320055092513 549.2716019212767 548.4987754550298M817.605451650169 548.4987754550298C838.4210984356066 543.111478785781 854.4118033155447 529.4724392815208 864.4195492489297 508.5692634488329C871.5155988229034 493.7474199166873 874.0004942528027 480.4220907145184 872.8122680715478 463.5692634488329C870.1128102868848 425.2710450135115 846.038449326389 396.1788684062303 811.2685035479227 389.1959094596773C775.5721441366137 382.0270481118848 737.0128877462187 413.0526096920553 730.0090147795262 454.5793331622334C722.9230349189529 496.5909520623108 746.923034918953 538.5739110088639 783.6790380173263 548.4654679414743C795.3978606354518 551.6188374224967 805.5078528895184 551.6289071358972 817.605451650169 548.4987754550298" /> + horiz-adv-x="1333.3333333333333" d="M503.4752551616771 997.6634382095074C488.4367506973914 994.543460530936 475.5126435545342 989.7940185666502 459.5829560545343 981.5345319595074C446.4367506973914 974.7186837452218 441.6694515902485 970.1773891023644 319.1320631973914 847.7437953523645L192.2883131973914 721.0083042809359L184.7213489116771 706.0083042809359C180.5595185545342 697.7583042809359 175.0137596259628 684.6333042809359 172.3976881973914 676.8420096380787L167.6415498045342 662.6751569595074L167.1867506973914 460.7571882095073L166.7313935545342 258.8397774952217L170.3742506973914 249.1031703523645C175.0600765902485 236.5786167809359 189.0907685545342 222.1210274952217 200.9752551616771 217.5708042809359C208.9361926616771 214.5228132095073 216.3195631973914 214.358192673793 366.3212373045343 213.8877685666501L523.3346301616771 213.3955810666501L523.8212373045343 127.2019426737931L524.3084024831056 41.0083042809359L528.2710140902485 32.241005173793C530.7414381973914 26.7756033880787 535.8335140902485 20.1411167809359 541.7916614116771 14.6249337452215C558.9138712331056 -1.2271867904927 530.5818399831056 0.0713623166502 848.4752551616771 0.5702462452217L1127.6415498045344 1.0083042809359L1135.9317283759628 5.0881033880788C1146.5048310545342 10.2906703523644 1156.6928890902486 20.4787283880788 1161.8954560545342 31.0518310666501L1165.975255161677 39.3420096380787L1166.4071748045342 390.4882149952217C1166.8374203402486 740.5216971380788 1166.82849176882 741.6634382095074 1163.4350765902486 750.7337507095074C1158.7146524831057 763.3487060666503 1148.334630161677 774.5947998166503 1136.0422194473913 780.4100899952216L1125.975255161677 785.1723667809359L995.8251435545342 785.1740408880788C848.3117506973913 785.1751569595074 854.1147640902485 785.6439069595074 824.7871971259627 771.3648891023645L810.26599176882 764.2951346380788L809.7871971259628 861.8185721380788L809.3084024831056 959.3420096380788L805.4786033759628 967.6751569595074C800.6599649831057 978.160648030936 790.1008131973914 989.1444649952218 779.3084024831056 994.898929280936L770.9752551616771 999.3420096380788L642.6415498045342 999.6266078523644C540.5528221259628 999.8531703523644 512.0930006973914 999.451942673793 503.4752551616771 997.6634382095074M738.4752551616771 813.1528355309359L738.4752551616771 697.7979248166503L647.07067926882 606.0696882095074C596.7983578402485 555.6193533880787 553.22302301882 510.7220319595073 550.2364158759627 506.2973667809359C542.8028221259628 495.2856480309359 532.81677301882 473.5624337452215 528.2682239116771 458.5083042809359C524.6114158759628 446.4056257095073 524.4719069473914 443.451942673793 523.8820631973914 365.5920096380788L523.2721301616771 285.1751569595073L380.8736926616771 285.1751569595073L238.4752551616771 285.1751569595073L238.4752551616771 464.3420096380788L238.4752551616771 643.5083042809359L359.8446748045343 643.5083042809359C500.2693399831056 643.5083042809359 491.0969069473914 642.5350899952216 507.7726881973914 659.2108712452216C524.4484694473914 675.8866524952216 523.4752551616771 666.7142194595074 523.4752551616771 807.1388846380788L523.4752551616771 928.508304280936L630.9752551616771 928.508304280936L738.4752551616771 928.508304280936L738.4752551616771 813.1528355309359M451.8084024831056 796.8420096380788L451.8084024831056 713.5083042809359L369.3084024831056 713.5083042809359C323.9334024831056 713.5083042809359 286.8084024831056 714.0680141023645 286.8084024831056 714.7521658880787C286.8084024831056 715.8436837452216 450.2994739116771 880.1751569595074 451.3854114116771 880.1751569595074C451.6181123045343 880.1751569595074 451.8084024831056 842.6751569595074 451.8084024831056 796.8420096380788M1095.1415498045344 392.6751569595072L1095.1415498045344 71.8420096380787L845.1415498045343 71.8420096380787L595.1415498045342 71.8420096380787L595.1415498045342 250.1338623166501L595.1415498045342 428.4257149952216L718.0584024831056 428.8838623166501L840.9752551616771 429.3420096380788L850.4791614116771 434.0088623166501C861.8736926616771 439.604286423793 873.63317926882 452.0853132095073 877.89099176882 463.1014962452215C880.7369739116771 470.4653355309359 880.9797194473914 479.3414516023644 881.4294962331057 592.2583042809359L881.9121971259627 713.5083042809359L988.5271524831056 713.5083042809359L1095.1415498045344 713.5083042809359L1095.1415498045344 392.6751569595072M810.1415498045343 583.5083042809359L810.1415498045343 500.1751569595073L726.3982462331056 500.1751569595073L642.6543846259628 500.1751569595073L725.9752551616771 583.5083042809359C771.8017060545342 629.3420096380787 809.4864158759628 666.8420096380788 809.7185587331056 666.8420096380788C809.9512596259627 666.8420096380788 810.1415498045343 629.3420096380787 810.1415498045343 583.5083042809359" /> + horiz-adv-x="1333.3333333333333" d="M302.4202562860661 608.9972966317905C279.5812562860662 606.4652966317906 259.1932562860661 596.8472966317906 241.7142562860662 580.3572966317906C216.8582562860661 556.9102966317905 205.0302562860661 527.3582966317906 207.0742562860661 493.8122966317906C208.5852562860661 469.0052966317906 216.4862562860661 449.6462966317906 233.3642562860661 429.3992966317906C254.9152562860661 403.5472966317905 282.1682562860662 390.8072966317906 316.2202562860661 390.6652966317906C336.6922562860662 390.5802966317906 345.5732562860661 392.6012966317906 364.4722562860661 401.6472966317906C376.9872562860661 407.6382966317905 380.9002562860661 410.5272966317906 392.8382562860661 422.5932966317906C408.0112562860661 437.9272966317905 414.9582562860661 448.4302966317906 420.5072562860661 464.4232966317906C436.8092562860661 511.4052966317906 419.2262562860662 564.2422966317906 378.2142562860662 591.5062966317905C356.0122562860662 606.2662966317905 330.6282562860661 612.1242966317907 302.4202562860661 608.9972966317905M652.2942562860661 609.0102966317907C627.1642562860661 606.0252966317905 608.3782562860661 596.7092966317905 589.0302562860661 577.6362966317906C574.7702562860661 563.5792966317906 566.6262562860661 550.2282966317905 560.9832562860661 531.6552966317906C557.8712562860661 521.4152966317906 557.254256286066 516.1782966317905 557.2782562860662 500.2022966317905C557.302256286066 483.9002966317906 557.8872562860661 479.2552966317906 561.1892562860661 469.1232966317905C566.5502562860661 452.6772966317905 576.1052562860662 437.2902966317906 588.9892562860662 424.3562966317906C607.4922562860661 405.7822966317906 623.6512562860662 396.9402966317906 648.100256286066 392.0132966317905C701.1572562860661 381.3222966317906 758.1672562860662 418.6912966317905 773.3852562860661 474.1362966317906C777.5352562860661 489.2572966317906 776.9732562860661 515.6872966317906 772.1602562860661 531.6552966317906C761.0262562860661 568.6032966317905 729.7542562860662 598.6432966317907 694.1872562860661 606.5562966317907C680.6132562860662 609.5762966317907 664.8412562860661 610.5002966317907 652.2942562860661 609.0102966317907M1002.2302562860662 608.9442966317906C943.4722562860662 602.7772966317907 900.0242562860661 547.0712966317906 907.4652562860662 487.4442966317906C910.7562562860662 461.0762966317905 919.680256286066 443.4692966317906 940.3362562860661 422.5932966317906C952.2742562860662 410.5272966317906 956.1872562860661 407.6382966317905 968.7022562860662 401.6472966317906C987.6252562860662 392.5902966317905 996.5042562860662 390.5742966317906 1016.954256286066 390.6932966317906C1052.1162562860661 390.8972966317906 1080.159256286066 404.6912966317905 1102.5512562860663 432.7972966317905C1129.3502562860663 466.4332966317906 1133.9232562860661 509.6502966317906 1114.8592562860663 549.1132966317905C1109.0532562860662 561.1312966317905 1105.6932562860661 565.7432966317906 1094.6252562860661 576.8832966317907C1069.0572562860661 602.6202966317906 1039.5442562860662 612.8612966317905 1002.2302562860662 608.9442966317906" /> + horiz-adv-x="1333.3333333333333" d="M625.0838681175594 926.235987959298C570.469470796131 921.0540683164407 520.063220796131 906.1885549235838 470.8567475818452 880.7527290307266C373.6173502604167 830.4882201021553 301.5263904389881 748.8710326021553 263.0922386532738 645.5345370664409C256.3411225818452 627.3827513521553 246.0129975818452 586.3196933164409 242.3416806175595 563.0345370664411C238.0342029389881 535.7164567092982 238.0342029389881 463.6863227807266 242.3416806175595 436.3682424235837C256.7540690104167 344.9558540307266 296.9292922247024 264.5797379592981 360.5492699032738 199.8760549235837C417.0297386532738 142.4329745664409 482.9103190104166 104.2410102807267 559.274158296131 84.6718138521553C599.3723725818452 74.3955861735838 617.8372163318452 72.2605415307267 666.750720796131 72.2443584950124C715.3684663318452 72.2281754592981 733.1575288318452 74.2901174235838 774.250720796131 84.7058540307266C923.819359188988 122.6160102807266 1043.8361002604167 242.6327513521553 1081.7462565104167 392.2013897450123C1092.153064546131 433.2594254592981 1094.2222609747023 451.087550459298 1094.2222609747023 499.7013897450124C1094.2222609747023 548.3369924235838 1092.1486002604167 566.1885549235838 1081.7356538318452 607.2013897450124C1062.5487118675594 682.7717022450124 1023.7903413318452 749.6472602807266 966.5760556175596 805.9028406378695C896.0152297247025 875.2817468878695 805.4940243675594 917.1042915307266 705.9175734747023 926.3330861735838C685.0286225818452 928.2689120664407 646.012439546131 928.2220370664407 625.0838681175594 926.235987959298M717.5838681175594 799.1048495664409C783.778064546131 786.9731531378695 840.028064546131 757.1483763521553 885.2657877604165 710.1963674235838C928.656970796131 665.1612111735838 955.6664574032739 611.0038451021553 966.9700288318452 546.3682424235838C969.8550734747022 529.8738227807266 969.8773949032739 471.4497156378695 967.0057431175594 453.8682424235838C950.8489350818452 354.9424611735838 890.7105422247023 272.5110995664409 802.2931315104167 228.0959209950123C706.7981538318452 180.1254968878695 590.6993815104166 186.7315236735837 501.2083100818452 245.2276174235837C437.5526181175595 286.8358763521553 390.7200288318452 352.1483763521553 372.7345377604167 424.3961442092982C365.5280645461309 453.3464790307267 364.3215913318452 464.1433540307266 364.3215913318452 499.7013897450124C364.3215913318452 535.2594254592982 365.5280645461309 546.056300459298 372.7345377604167 575.0066352807266C399.0978190104167 680.9089790307266 485.4125511532738 767.2298495664409 591.4454752604166 793.7337558164409C605.9047386532739 797.3481531378695 621.4365466889881 800.1026174235838 638.4175734747023 802.0635549235838C650.6011672247023 803.4709209950124 704.8182431175594 801.4446933164409 717.5838681175594 799.1048495664409M650.2669038318452 641.2493808164409C593.5079752604166 635.7075281378695 543.1285109747023 592.0914567092982 528.1597609747023 535.5345370664409C525.3986002604166 525.1015013521553 524.6307431175595 517.3079745664409 524.6307431175595 499.7013897450124C524.6307431175595 482.0948049235838 525.3986002604166 474.3012781378695 528.1597609747023 463.8682424235838C538.3868815104166 425.2270593878695 566.8450288318452 390.1701397450124 602.5838681175595 372.1868808164409C625.0196940104166 360.8978183164408 639.5900065104166 357.5814120664409 666.750720796131 357.5814120664409C693.9114350818452 357.5814120664409 708.4817475818452 360.8978183164408 730.9175734747023 372.1868808164409C766.6564127604165 390.1701397450124 795.1145600818452 425.2270593878695 805.3416806175594 463.8682424235838C810.3338681175594 482.7315236735838 810.3338681175594 516.6712558164409 805.3416806175594 535.5345370664409C790.9131091889881 590.0490459950124 740.0782877604167 635.5808540307266 688.1463681175594 640.5044031378695C666.7401181175594 642.5334209950124 663.9761672247023 642.5881084950124 650.2669038318452 641.2493808164409" /> + horiz-adv-x="1333.3333333333333" d="M567.7361666666667 758.726C558.7201666666667 704.872 550.9601666666667 659.122 550.4911666666667 657.0590000000001L549.6391666666666 653.3090000000001L488.1271666666667 653.3090000000001L426.6141666666667 653.3090000000001L427.0571666666667 607.0590000000001L427.5001666666667 560.8090000000001L480.4171666666667 560.369C530.6491666666667 559.952 533.3341666666666 559.773 533.3341666666666 556.843C533.3341666666666 555.1460000000001 529.2091666666666 528.124 524.1671666666666 496.793C519.1251666666667 465.462 515.0001666666667 439.121 515.0001666666667 438.256C515.0001666666667 437.305 490.1051666666667 436.51 452.0841666666666 436.246L389.1671666666667 435.809L388.7241666666667 390.3930000000001L388.2801666666667 344.976L444.1721666666667 344.976L500.0641666666667 344.976L499.2011666666667 341.226C497.9701666666667 335.874 466.6671666666667 147.102 466.6671666666667 145.03C466.6671666666667 143.885 483.6251666666667 143.309 517.3681666666666 143.309L568.0691666666667 143.309L569.0361666666668 147.893C569.5681666666667 150.413 576.7691666666667 193.726 585.0391666666667 244.1430000000001C593.3081666666667 294.559 600.4921666666667 337.872 601.0031666666666 340.3930000000001L601.9321666666667 344.976L639.2991666666667 344.976C668.0991666666666 344.976 676.6601666666667 344.4980000000001 676.6361666666667 342.8930000000001C676.6191666666666 341.747 669.2421666666667 296.749 660.2431666666666 242.8970000000001C651.2441666666666 189.045 644.2581666666667 144.607 644.7181666666667 144.1470000000001C645.8451666666667 143.02 745.0001666666667 143.069 745.0001666666667 144.196C745.0001666666667 145.497 776.5371666666667 334.991 777.6521666666667 340.3930000000001L778.5991666666666 344.976L842.6331666666667 344.976L906.6671666666666 344.976L906.6671666666666 390.809L906.6671666666666 436.6430000000001L850.0001666666667 436.6430000000001C809.3691666666666 436.6430000000001 793.3341666666668 437.17 793.3341666666668 438.505C793.3341666666668 440.802 811.2931666666666 551.035 812.5101666666667 556.207L813.3871666666666 559.937L878.7771666666667 560.3729999999999L944.1671666666666 560.8090000000001L944.6101666666666 607.038L945.0531666666666 653.2669999999999L887.0931666666668 653.705L829.1331666666667 654.1429999999999L845.1351666666667 749.143C853.9361666666666 801.393 861.6671666666666 846.966 862.3151666666668 850.417L863.4941666666666 856.691L812.2171666666666 856.25L760.9401666666668 855.809L758.0791666666667 838.309C756.5061666666668 828.684 749.0591666666667 783.122 741.5301666666667 737.059L727.8421666666666 653.3090000000001L689.7231666666667 653.3090000000001L651.6031666666667 653.3090000000001L652.4781666666667 657.0590000000001C653.3191666666667 660.664 685.0001666666667 854.356 685.0001666666667 855.8919999999999C685.0001666666667 856.305 662.3041666666667 856.643 634.5651666666668 856.643L584.1291666666666 856.643L567.7361666666667 758.726M711.0181666666667 555.3929999999999C710.5151666666666 552.872 706.3071666666667 527.1840000000001 701.6671666666666 498.3090000000001C697.0271666666667 469.434 692.8191666666667 443.747 692.3161666666667 441.226L691.4021666666667 436.6430000000001L654.0351666666667 436.6430000000001C632.4281666666667 436.6430000000001 616.6671666666666 437.289 616.6671666666666 438.174C616.6671666666666 440.073 634.7441666666666 551.055 635.8951666666667 556.226L636.7311666666667 559.976L674.3311666666666 559.976L711.9321666666667 559.976L711.0181666666667 555.3929999999999" /> + horiz-adv-x="1333.3333333333333" d="M409.4717837681167 659.4183905612332C389.2134132324025 655.4479664540904 375.991873053831 631.384908418376 383.3054891252596 611.7984128826618C386.0208909109739 604.5272075255189 643.9198864466881 346.5590155612331 652.4868507324024 342.545064668376C660.9913150181167 338.5601316326618 672.3105114466881 338.5584575255189 680.8205560895453 342.541158418376C685.3897525181167 344.6795512755189 728.7396409109738 387.006002168376 818.6202212681167 477.088033418376C962.442765910974 621.232564668376 953.0889712681166 610.4920512755189 951.2720069824024 629.400533418376C950.2441051966882 640.0952878826618 943.9076096609738 649.5495289540903 933.7742391252596 655.506002168376L925.8205560895454 660.1812253826618L670.8205560895453 660.4217387755189C530.5705560895453 660.5539932398046 412.9634132324025 660.1025423469475 409.4717837681167 659.4183905612332" /> + horiz-adv-x="1333.3333333333333" d="M422.3335193452381 657.2909458705358C415.0014880952381 651.8601422991071 395.2341889880953 631.74853515625 391.0718005952381 625.4845842633929C389.565662202381 623.2184012276787 388.3335193452381 618.7295619419642 388.3335193452381 615.5091378348213C388.3335193452381 609.97509765625 395.6627604166667 602.3138253348213 522.0835193452381 475.7117047991072C600.7386532738095 396.9427315848214 658.0645461309524 340.79931640625 661.2498139880953 339.4148297991071C665.9155505952381 337.3874860491072 667.4177827380953 337.3874860491072 672.0835193452381 339.4148297991071C675.268787202381 340.79931640625 732.5946800595239 396.9427315848214 811.2498139880953 475.7117047991072C938.6973586309524 603.34228515625 944.9998139880952 609.93603515625 944.9998139880952 615.6296735491071C944.9998139880952 622.9226422991071 939.767113095238 630.3718610491071 923.935081845238 645.6173967633929C909.0455729166669 659.9550083705358 905.6075148809524 662.1056780133929 897.5745907738095 662.1056780133929C890.952380952381 662.1056780133929 889.8664434523808 661.0811244419642 778.7788318452381 550.0392717633929L666.6666666666666 437.9723074776785L554.5545014880953 550.0392717633929C442.8050595238095 661.7429547991071 442.4200148809524 662.1056780133929 435.6376488095239 662.1056780133929C430.7470238095239 662.1056780133929 427.0059523809524 660.7518833705358 422.3335193452381 657.2909458705358" /> + horiz-adv-x="1333.3333333333333" d="M566.3806427638203 800.0061534763536L566.3806427638203 650.0561534763535L492.2306427638204 649.6061534763536L418.0306427638204 649.1561534763536L542.6306427638203 524.6061534763536L667.2306427638204 400.0061534763536L792.2306427638205 525.0061534763536L917.1806427638202 650.0061534763536L841.7806427638204 650.0061534763536L766.3806427638203 650.0061534763536L766.3806427638203 800.0061534763536L766.3806427638203 950.0061534763536L666.3806427638203 950.0061534763536L566.3806427638203 950.0061534763536L566.3806427638203 800.0061534763536M336.3806427638204 448.1561534763536C320.3306427638204 445.0561534763536 308.2806427638204 437.2561534763536 288.6806427638204 417.4061534763537C261.2306427638204 389.5561534763537 191.8806427638204 315.5061534763536 184.1806427638204 305.8561534763536C175.1806427638204 294.5561534763536 167.9806427638204 278.7561534763536 166.9806427638204 268.0061534763536C165.9306427638204 256.5561534763536 194.7806427638204 97.8061534763535 199.8806427638204 87.2561534763536C204.6306427638204 77.3061534763535 214.6306427638204 66.6561534763535 224.9306427638204 60.5061534763536C243.7806427638204 49.2061534763536 210.7306427638204 50.0061534763536 666.3806427638203 50.0061534763536C1122.0306427638204 50.0061534763536 1088.9806427638205 49.2061534763536 1107.8306427638204 60.5061534763536C1118.4306427638205 66.8561534763536 1128.9806427638202 78.1561534763536 1133.3306427638204 87.8561534763536C1136.7306427638205 95.4061534763537 1166.3806427638203 254.5561534763536 1166.3806427638203 265.1561534763537C1166.3806427638203 273.7061534763536 1160.9306427638203 287.8561534763536 1153.0806427638204 299.5561534763536C1146.7806427638204 308.9561534763536 1080.3806427638203 380.7561534763536 1043.8806427638203 417.6561534763536C1023.8806427638204 437.8561534763536 1012.1806427638206 445.1561534763536 994.6306427638206 448.3561534763536C989.3306427638204 449.3061534763537 965.5306427638204 449.8561534763536 939.5306427638204 449.6061534763536L893.7306427638205 449.1561534763536L969.4806427638204 375.0061534763536L1045.2806427638204 300.8561534763536L953.3806427638204 300.0061534763536C874.6306427638203 299.3061534763537 861.1806427638205 298.8061534763537 859.1306427638203 296.6561534763536C857.8306427638204 295.3061534763537 847.5806427638204 273.0061534763536 836.3306427638204 247.1061534763536L815.9306427638203 200.0061534763536L666.3806427638203 200.0061534763536L516.8306427638204 200.0061534763536L496.4806427638204 247.1061534763536C485.2306427638204 273.0061534763536 474.5806427638204 295.5061534763536 472.7306427638204 297.1061534763536C469.5806427638204 299.8061534763537 462.5806427638204 300.0061534763536 378.2806427638204 300.0061534763536L287.2306427638204 300.0061534763536L322.2306427638204 334.6561534763536C341.4806427638204 353.7061534763536 375.7806427638204 387.4561534763536 398.4306427638204 409.6561534763536L439.6306427638204 450.0061534763536L391.7806427638204 449.8061534763537C365.4306427638204 449.7061534763536 340.4806427638204 449.0061534763536 336.3806427638204 448.1561534763536" /> - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + horiz-adv-x="1333.3333333333333" d="M848.1131333798115 957.5526214051262C795.3603432012401 950.8171303336976 754.9044280226688 933.3070856908404 715.3285351655259 900.0794071194119C657.0835574869544 851.1787374765548 626.3821065940972 785.4711481908405 626.2453878440972 709.4242731908405C626.1527539155258 657.7708133694119 638.338579808383 615.108983012269 664.6443833798115 574.9940276551262C704.2459458798115 514.6045187265548 761.2933789155258 475.9309696194119 830.6131333798115 462.4828669408405C853.6918164155258 458.0057464051263 900.080767308383 458.4510589051263 923.1131333798116 463.3718178336976C998.4524190940972 479.4666839051262 1063.02049945124 527.7557464051262 1097.010454808383 593.4270633694119C1112.9708342726688 624.2641169408405 1126.0891378440972 669.3729339051262 1124.35253070124 687.4460365836976C1123.697954808383 694.2596526551262 1122.5277539155259 696.7981571194119 1118.3006333798114 700.5749428336976C1115.4183789155259 703.1502776551262 1111.18065570124 705.257420512269 1108.8832226655259 705.257420512269C1100.9998521298114 705.257420512269 1063.7465039155259 684.4828669408404 984.7258565940974 636.0202553336977L947.8157003440972 613.3840946194119L895.8809905226686 642.026951762269C867.3168164155259 657.7802999765547 843.0087807012401 671.4186928336976 841.8631333798115 672.3338714051262C840.2632449869544 673.6123312265548 839.7794280226688 688.3857687265548 839.7794280226688 735.937108012269L839.7794280226688 797.8751660479834L906.0294280226686 836.0520633694119C1010.6527539155258 896.3416839051262 1008.061236058383 894.726170512269 1010.842486058383 901.382420512269C1015.846392308383 913.358983012269 1008.8145842726686 922.2568624765548 984.7794280226686 934.3640053336976C956.04784320124 948.8366615836976 920.8670396298116 956.7719294408404 881.4462807012401 957.6703669408404C866.3212807012401 958.015233012269 851.3212807012402 957.962219619412 848.1131333798115 957.5526214051262M415.3776423083829 409.8405678336976C236.4992940940972 230.7256124765547 221.4937137369544 215.2724874765547 216.7208342726687 205.2574205122689C209.7241824869543 190.5777330122691 207.3190485583829 175.5955901551262 209.7414815940972 161.7825321194118C213.3480664155258 141.2161258694118 217.0545396298115 136.079407119412 258.4959458798115 94.2172419408405C282.4680440940972 70.0012821194118 299.5534235583829 54.1050767622689 304.4641378440972 51.4477106908404C328.9407003440972 38.202733012269 357.6689369512401 39.0927999765548 378.9462807012401 53.7563044408404C382.6131333798116 56.2830901551261 472.1025307012401 144.8952553336976 577.8117940940972 250.6720410479833L770.010454808383 442.9940276551262L751.9786467726686 451.7473758694118C695.2035351655259 479.3076437265547 649.2883565940972 524.636326762269 620.4898074869543 581.5559696194119C615.5177092726686 591.3835365836976 611.4485128440972 600.3617731908404 611.447954808383 601.507420512269C611.4468387369543 602.6530678336976 610.8670396298115 603.5905678336976 610.1588923083829 603.5905678336976C609.4513030226686 603.5905678336976 521.799517308383 516.4030678336976 415.3776423083829 409.8405678336976M391.2537583798116 240.3556347979834C412.5199414155258 229.5063044408405 417.7124637369543 203.7390053336975 402.2688253440972 185.6960365836976C378.8341155226687 158.3182464051262 333.4507449869544 181.0141169408404 341.3196065940972 216.1759472979833C343.5210574869544 226.0124428336975 350.7827762369543 235.6089830122691 359.5165932012401 240.2228222979834C367.7811021298116 244.5888937265549 382.8318833798116 244.651951762269 391.2537583798116 240.3556347979834" /> + + diff --git a/public/fonts/icon.symbol.svg b/public/fonts/icon.symbol.svg index 69dfc26ad3..ddc85b1013 100644 --- a/public/fonts/icon.symbol.svg +++ b/public/fonts/icon.symbol.svg @@ -1,21 +1,3 @@ - - - - - - - - - - - - - - - + - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/public/fonts/icon.ttf b/public/fonts/icon.ttf index 184b100713..6570fd3735 100644 Binary files a/public/fonts/icon.ttf and b/public/fonts/icon.ttf differ diff --git a/public/fonts/icon.woff b/public/fonts/icon.woff index 8b721f5d3c..ad3a5291c4 100644 Binary files a/public/fonts/icon.woff and b/public/fonts/icon.woff differ diff --git a/public/fonts/icon.woff2 b/public/fonts/icon.woff2 index 5bd8de1f16..4d949b3a7f 100644 Binary files a/public/fonts/icon.woff2 and b/public/fonts/icon.woff2 differ diff --git a/public/images/users/vk.png b/public/images/users/vk.png deleted file mode 100644 index e3cf2d74ef..0000000000 Binary files a/public/images/users/vk.png and /dev/null differ diff --git a/public/scripts/dependencies/appwrite.js b/public/scripts/dependencies/appwrite.js index 1abd519001..73c8520112 100644 --- a/public/scripts/dependencies/appwrite.js +++ b/public/scripts/dependencies/appwrite.js @@ -48,8 +48,8 @@ mode: '', }; this.headers = { - 'x-sdk-version': 'appwrite:web:4.0.4', - 'X-Appwrite-Response-Format': '0.13.0', + 'x-sdk-version': 'appwrite:web:5.0.0', + 'X-Appwrite-Response-Format': '0.14.0', }; this.realtime = { socket: undefined, @@ -241,26 +241,6 @@ 'content-type': 'application/json', }, payload); }), - /** - * Delete Account - * - * Delete a currently logged in user account. Behind the scene, the user - * record is not deleted but permanently blocked from any access. This is done - * to avoid deleted accounts being overtaken by new users with the same email - * address. Any user-related resources like documents or storage files should - * be deleted separately. - * - * @throws {AppwriteException} - * @returns {Promise} - */ - delete: () => __awaiter(this, void 0, void 0, function* () { - let path = '/account'; - let payload = {}; - const uri = new URL(this.config.endpoint + path); - return yield this.call('delete', uri, { - 'content-type': 'application/json', - }, payload); - }), /** * Update Account Email * @@ -371,7 +351,7 @@ * * Update currently logged in user password. For validation, user is required * to pass in the new password, and the old password. For users created with - * OAuth and Team Invites, oldPassword is optional. + * OAuth, Team Invites and Magic URL, oldPassword is optional. * * @param {string} password * @param {string} oldPassword @@ -768,6 +748,9 @@ /** * Update Session (Refresh Tokens) * + * 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. * * @param {string} sessionId * @throws {AppwriteException} @@ -807,6 +790,24 @@ 'content-type': 'application/json', }, payload); }), + /** + * Update Account Status + * + * 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. + * + * @throws {AppwriteException} + * @returns {Promise} + */ + updateStatus: () => __awaiter(this, void 0, void 0, function* () { + let path = '/account/status'; + let payload = {}; + const uri = new URL(this.config.endpoint + path); + return yield this.call('patch', uri, { + 'content-type': 'application/json', + }, payload); + }), /** * Create Email Verification * @@ -883,9 +884,14 @@ * Get Browser Icon * * You can use this endpoint to show different browser icons to your users. - * The code argument receives the browser code as it appears in your user - * /account/sessions endpoint. Use width, height and quality arguments to - * change the output settings. + * 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. + * + * When 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. * * @param {string} code * @param {number} width @@ -923,6 +929,12 @@ * provider you need. Use width, height and quality arguments to change the * output settings. * + * When 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. + * + * * @param {string} code * @param {number} width * @param {number} height @@ -986,6 +998,12 @@ * users. The code argument receives the 2 letter country code. Use width, * height and quality arguments to change the output settings. * + * When 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. + * + * * @param {string} code * @param {number} width * @param {number} height @@ -1023,6 +1041,12 @@ * remote images in your app or in case you want to make sure a 3rd party * image is properly served using a TLS protocol. * + * When 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. + * + * * @param {string} url * @param {number} width * @param {number} height @@ -1065,6 +1089,12 @@ * the user's initials when reloading the same theme will always return for * the same initials. * + * When 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. + * + * * @param {string} name * @param {number} width * @param {number} height @@ -1104,6 +1134,7 @@ * 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. * + * * @param {string} text * @param {number} size * @param {number} margin @@ -1923,9 +1954,7 @@ /** * Delete Document * - * Delete a document by its unique ID. This endpoint deletes only the parent - * documents, its attributes and relations to other documents. Child documents - * **will not** be deleted. + * Delete a document by its unique ID. * * @param {string} collectionId * @param {string} documentId @@ -2263,7 +2292,7 @@ }, payload); }), /** - * List the currently active function runtimes. + * List runtimes * * Get a list of all runtimes that are currently active on your instance. * @@ -2488,8 +2517,8 @@ if (onProgress) { onProgress({ $id: response.$id, - progress: Math.min((counter + 1) * Appwrite.CHUNK_SIZE, size) / size * 100, - sizeUploaded: end + 1, + progress: Math.min((counter + 1) * Appwrite.CHUNK_SIZE - 1, size) / size * 100, + sizeUploaded: end, chunksTotal: response.chunksTotal, chunksUploaded: response.chunksUploaded }); @@ -2836,23 +2865,6 @@ 'content-type': 'application/json', }, payload); }), - /** - * Get Usage Queue - * - * Get the number of usage stats that are waiting to be processed in the - * Appwrite internal queue server. - * - * @throws {AppwriteException} - * @returns {Promise} - */ - getQueueUsage: () => __awaiter(this, void 0, void 0, function* () { - let path = '/health/queue/usage'; - let payload = {}; - const uri = new URL(this.config.endpoint + path); - return yield this.call('get', uri, { - 'content-type': 'application/json', - }, payload); - }), /** * Get Webhooks Queue * @@ -4329,8 +4341,8 @@ if (onProgress) { onProgress({ $id: response.$id, - progress: Math.min((counter + 1) * Appwrite.CHUNK_SIZE, size) / size * 100, - sizeUploaded: end + 1, + progress: Math.min((counter + 1) * Appwrite.CHUNK_SIZE - 1, size) / size * 100, + sizeUploaded: end, chunksTotal: response.chunksTotal, chunksUploaded: response.chunksUploaded }); @@ -4744,6 +4756,34 @@ 'content-type': 'application/json', }, payload); }), + /** + * List Team Logs + * + * Get the team activity logs list by its unique ID. + * + * @param {string} teamId + * @param {number} limit + * @param {number} offset + * @throws {AppwriteException} + * @returns {Promise} + */ + listLogs: (teamId, limit, offset) => __awaiter(this, void 0, void 0, function* () { + if (typeof teamId === 'undefined') { + throw new AppwriteException('Missing required parameter: "teamId"'); + } + let path = '/teams/{teamId}/logs'.replace('{teamId}', teamId); + let payload = {}; + if (typeof limit !== 'undefined') { + payload['limit'] = limit; + } + if (typeof offset !== 'undefined') { + payload['offset'] = offset; + } + const uri = new URL(this.config.endpoint + path); + return yield this.call('get', uri, { + 'content-type': 'application/json', + }, payload); + }), /** * Get Team Memberships * @@ -5106,7 +5146,11 @@ /** * Delete User * - * Delete a user by its unique ID. + * 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. * * @param {string} userId * @throws {AppwriteException} @@ -5178,6 +5222,26 @@ 'content-type': 'application/json', }, payload); }), + /** + * Get User Memberships + * + * Get the user membership list by its unique ID. + * + * @param {string} userId + * @throws {AppwriteException} + * @returns {Promise} + */ + getMemberships: (userId) => __awaiter(this, void 0, void 0, function* () { + if (typeof userId === 'undefined') { + throw new AppwriteException('Missing required parameter: "userId"'); + } + let path = '/users/{userId}/memberships'.replace('{userId}', userId); + let payload = {}; + const uri = new URL(this.config.endpoint + path); + return yield this.call('get', uri, { + 'content-type': 'application/json', + }, payload); + }), /** * Update Name * @@ -5348,7 +5412,8 @@ /** * Update User Status * - * Update the user status by its unique ID. + * 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. * * @param {string} userId * @param {boolean} status @@ -5536,7 +5601,7 @@ var _a, _b; return __awaiter(this, void 0, void 0, function* () { method = method.toUpperCase(); - headers = Object.assign(Object.assign({}, headers), this.headers); + headers = Object.assign({}, this.headers, headers); let options = { method, headers, diff --git a/public/scripts/events.js b/public/scripts/events.js new file mode 100644 index 0000000000..5880d344b2 --- /dev/null +++ b/public/scripts/events.js @@ -0,0 +1,198 @@ +(function (window) { + document.addEventListener('alpine:init', () => { + Alpine.data('events', () => ({ + events: new Set(), + selected: null, + action: null, + type: null, + subType: null, + resource: null, + resourceName: '', + subResource: null, + subResourceName: '', + hasResource: false, + hasSubResource: false, + attribute: null, + hasAttribute: false, + attributes: [], + load(events) { + this.events = new Set(events); + }, + reset() { + this.hasResource = this.hasSubResource = this.hasAttribute = false; + this.type = this.subType = this.subResource = this.resource = this.attribute = this.selected = this.action = null; + }, + setEvent() { + this.hasResource = this.hasSubResource = this.hasAttribute = this.action = false; + + if (!this.selected) { + this.reset(); + return; + } + + let [type, action] = this.selected.split('.'); + + switch (type) { + case 'users': + if (action === 'update') { + this.hasAttribute = true; + this.attributes = ['email', 'name', 'password', 'status', 'prefs'] + } + this.hasResource = true; + this.type = type; + this.resourceName = 'User ID'; + break; + + case 'collections': + this.hasResource = true; + this.type = type; + this.resourceName = 'Collection ID'; + break; + + case 'teams': + this.hasResource = true; + this.type = type; + this.resourceName = 'Team ID'; + break; + + case 'buckets': + this.hasResource = true; + this.type = type; + this.resourceName = 'Bucket ID'; + break; + + case 'functions': + this.hasResource = true; + this.type = type; + this.resourceName = 'Function ID'; + break; + + case 'sessions': + this.hasResource = this.hasSubResource = true; + this.type = 'users'; + this.subType = type; + this.resourceName = 'User ID'; + this.subResourceName = 'Session ID'; + break; + + case 'verification': + this.hasResource = this.hasSubResource = true; + this.type = 'users'; + this.subType = type; + this.resourceName = 'User ID'; + this.subResourceName = 'Verification ID'; + break; + + case 'recovery': + this.hasResource = this.hasSubResource = true; + this.type = 'users'; + this.subType = type; + this.resourceName = 'User ID'; + this.subResourceName = 'Recovery ID'; + break; + + case 'documents': + this.hasResource = this.hasSubResource = true; + this.type = 'collections'; + this.subType = type; + this.resourceName = 'Collection ID'; + this.subResourceName = 'Document ID'; + break; + + case 'attributes': + this.hasResource = this.hasSubResource = true; + this.type = 'collections'; + this.subType = type; + this.resourceName = 'Collection ID'; + this.subResourceName = 'Attribute ID'; + break; + + case 'indexes': + this.hasResource = this.hasSubResource = true; + this.type = 'collections'; + this.subType = type; + this.resourceName = 'Collection ID'; + this.subResourceName = 'Index ID'; + break; + + case 'files': + this.hasResource = this.hasSubResource = true; + this.type = 'buckets'; + this.subType = type; + this.resourceName = 'Bucket ID'; + this.subResourceName = 'File ID'; + break; + + case 'memberships': + if (action === 'update') { + this.hasAttribute = true; + this.attributes = ['status'] + } + this.hasResource = this.hasSubResource = true; + this.type = 'teams'; + this.subType = type; + this.resourceName = 'Team ID'; + this.subResourceName = 'Membership ID'; + break; + + case 'executions': + this.hasResource = this.hasSubResource = true; + this.type = 'functions'; + this.subType = type; + this.resourceName = 'Function ID'; + this.subResourceName = 'Execution ID'; + break; + + case 'deployments': + this.hasResource = this.hasSubResource = true; + this.type = 'functions'; + this.subType = type; + this.resourceName = 'Function ID'; + this.subResourceName = 'Deployment ID'; + break; + + default: + this.hasResource = true; + this.hasSubResource = true; + + break; + } + this.action = action; + }, + showModal(modal) { + document.documentElement.classList.add("modal-open"); + modal.classList.remove("close"); + modal.classList.add("open"); + }, + closeModal(modal) { + document.documentElement.classList.remove("modal-open"); + modal.classList.add("close"); + modal.classList.remove("open"); + }, + addEvent(modal) { + this.closeModal(modal); + + let event = `${this.type}.${this.resource ? this.resource : '*'}`; + + if (this.hasSubResource) { + event += `.${this.subType}.${this.subResource ? this.subResource : '*'}`; + } + + if (this.action) { + event += `.${this.action}`; + } + + if (this.attribute) { + event += `.${this.attribute}`; + } + + this.events.add(event); + + this.reset(); + }, + removeEvent(value) { + this.events.delete(value); + } + })); + }); +})(window); \ No newline at end of file diff --git a/public/scripts/init.js b/public/scripts/init.js index c18bd7c23c..2a4b85cb09 100644 --- a/public/scripts/init.js +++ b/public/scripts/init.js @@ -58,45 +58,41 @@ window.addEventListener("load", async () => { const sleep = ms => new Promise(resolve => setTimeout(resolve, ms)); let current = {}; window.ls.container.get('console').subscribe(['project', 'console'], response => { - switch (response.event) { - case 'stats.connections': - for (let project in response.payload) { - current[project] = response.payload[project] ?? 0; - } - break; - case 'database.attributes.create': - case 'database.attributes.update': - case 'database.attributes.delete': - document.dispatchEvent(new CustomEvent('database.createAttribute')); - - break; - case 'database.indexes.create': - case 'database.indexes.update': - case 'database.indexes.delete': - document.dispatchEvent(new CustomEvent('database.createIndex')); - - break; - case 'functions.deployments.create': - case 'functions.deployments.update': - case 'functions.deployments.delete': - document.dispatchEvent(new CustomEvent('functions.createDeployment')); - - break; - - case 'functions.executions.create': - case 'functions.executions.update': - case 'functions.executions.delete': - document.dispatchEvent(new CustomEvent('functions.createExecution')); - - break; + if (response.events.includes('stats.connections')) { + for (let project in response.payload) { + current[project] = response.payload[project] ?? 0; + } + return; } + if (response.events.includes('collections.*.attributes.*')) { + document.dispatchEvent(new CustomEvent('database.createAttribute')); + + return; + } + + if (response.events.includes('collections.*.indexes.*')) { + document.dispatchEvent(new CustomEvent('database.createIndex')); + + return; + } + + if (response.events.includes('functions.*.deployments.*')) { + document.dispatchEvent(new CustomEvent('functions.createDeployment')); + + return; + } + + if (response.events.includes('functions.*.executions.*')) { + document.dispatchEvent(new CustomEvent('functions.createExecution')); + + return; + } }); while (true) { let newHistory = {}; - let createdHistory = false; for (const project in current) { let history = realtime?.history ?? {}; diff --git a/public/scripts/routes.js b/public/scripts/routes.js index fdb83b6ce1..8f79ebcdf1 100644 --- a/public/scripts/routes.js +++ b/public/scripts/routes.js @@ -83,8 +83,17 @@ window.ls.router scope: "console", project: true }) - .add("/console/webhooks/:tab", { - template: "/console/webhooks?version=" + APP_ENV.CACHEBUSTER, + .add("/console/webhooks/webhook", { + template: function(window) { + return window.location.pathname + window.location.search + '&version=' + APP_ENV.CACHEBUSTER; + }, + scope: "console", + project: true + }) + .add("/console/webhooks/webhook/new", { + template: function(window) { + return window.location.pathname + window.location.search + '&version=' + APP_ENV.CACHEBUSTER; + }, scope: "console", project: true }) diff --git a/public/scripts/views/service.js b/public/scripts/views/service.js index 43e1c86ce3..457434a62f 100644 --- a/public/scripts/views/service.js +++ b/public/scripts/views/service.js @@ -34,7 +34,7 @@ alert: function(text, classname) { return function(alerts) { - alerts.add({ text: text, class: classname || "success" }, 3000); + alerts.add({ text: text, class: classname || "success" }, 6000); }; }, diff --git a/public/styles/comps/events.less b/public/styles/comps/events.less new file mode 100644 index 0000000000..a7b62f1d43 --- /dev/null +++ b/public/styles/comps/events.less @@ -0,0 +1,20 @@ +.events.row { + border-bottom: solid 1px var(--config-color-fade-super); + + .col { + span.text { + display: inline-block; + width: calc(100% - 28px); + word-break: break-all; + } + + span.action { + .pull-end; + cursor: pointer; + } + } + + &:last-child { + border-bottom: none; + } +} \ No newline at end of file diff --git a/public/styles/comps/scroll.less b/public/styles/comps/scroll.less index 7e61023831..70c28d22e8 100644 --- a/public/styles/comps/scroll.less +++ b/public/styles/comps/scroll.less @@ -3,6 +3,7 @@ [data-views-current="1"] { .scroll-to { opacity: 0!important; + pointer-events: none; } } diff --git a/public/styles/comps/upload-box.less b/public/styles/comps/upload-box.less index fbebd1c5e4..d1850c6313 100644 --- a/public/styles/comps/upload-box.less +++ b/public/styles/comps/upload-box.less @@ -96,6 +96,10 @@ } } +[data-views-current]:not([data-views-current="0"]):not([data-views-current="1"]) .upload-box { + margin-right: 4rem; +} + .icon-button { --p-icon-button-size:var(--icon-button-size, 20px); diff --git a/public/styles/default.less b/public/styles/default.less index 1fb06deda3..fbd111ac6a 100644 --- a/public/styles/default.less +++ b/public/styles/default.less @@ -29,6 +29,7 @@ img[src=""] { @import "comps/box"; @import "comps/cover"; @import "comps/database"; +@import "comps/events"; @import "comps/footer"; @import "comps/loader"; @import "comps/modal"; diff --git a/public/styles/icons.less b/public/styles/icons.less index 1f01bc6144..2f2711d644 100644 --- a/public/styles/icons.less +++ b/public/styles/icons.less @@ -1,10 +1,10 @@ @font-face {font-family: "icon"; - src: url('/fonts/icon.eot?t=1645269945236'); /* IE9*/ - src: url('/fonts/icon.eot?t=1645269945236#iefix') format('embedded-opentype'), /* IE6-IE8 */ - url("/fonts/icon.woff2?t=1645269945236") format("woff2"), - url("/fonts/icon.woff?t=1645269945236") format("woff"), - url('/fonts/icon.ttf?t=1645269945236') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ - url('/fonts/icon.svg?t=1645269945236#icon') format('svg'); /* iOS 4.1- */ + src: url('/fonts/icon.eot?t=1650537780691'); /* IE9*/ + src: url('/fonts/icon.eot?t=1650537780691#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url("/fonts/icon.woff2?t=1650537780691") format("woff2"), + url("/fonts/icon.woff?t=1650537780691") format("woff"), + url('/fonts/icon.ttf?t=1650537780691') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ + url('/fonts/icon.svg?t=1650537780691#icon') format('svg'); /* iOS 4.1- */ font-weight: normal; font-style: normal; } @@ -17,7 +17,6 @@ vertical-align: middle; display: inline-block; text-decoration: inherit; - width: 1em; margin-right: .2em; text-align: center; /* opacity: .8; */ @@ -79,101 +78,101 @@ .icon-down-open:before { content: "\ea22"; } .icon-download:before { content: "\ea23"; } .icon-edit:before { content: "\ea24"; } -.icon-enum:before { content: "\ea25"; } -.icon-export:before { content: "\ea26"; } -.icon-eye:before { content: "\ea27"; } -.icon-facebook:before { content: "\ea28"; } -.icon-file:before { content: "\ea29"; } -.icon-film:before { content: "\ea2a"; } -.icon-filter:before { content: "\ea2b"; } -.icon-fire:before { content: "\ea2c"; } -.icon-float:before { content: "\ea2d"; } -.icon-folder:before { content: "\ea2e"; } -.icon-github:before { content: "\ea2f"; } -.icon-gitlab:before { content: "\ea30"; } -.icon-glasses:before { content: "\ea31"; } -.icon-google:before { content: "\ea32"; } -.icon-hackernews:before { content: "\ea33"; } -.icon-header:before { content: "\ea34"; } -.icon-heart:before { content: "\ea35"; } -.icon-home:before { content: "\ea36"; } -.icon-image:before { content: "\ea37"; } -.icon-inbox:before { content: "\ea38"; } -.icon-info-circled:before { content: "\ea39"; } -.icon-instagram:before { content: "\ea3a"; } -.icon-integer:before { content: "\ea3b"; } -.icon-ip:before { content: "\ea3c"; } -.icon-italic:before { content: "\ea3d"; } -.icon-key-inv:before { content: "\ea3e"; } -.icon-key:before { content: "\ea3f"; } -.icon-keyboard:before { content: "\ea40"; } -.icon-lamp:before { content: "\ea41"; } -.icon-left-dir:before { content: "\ea42"; } -.icon-left-open:before { content: "\ea43"; } -.icon-lifebuoy:before { content: "\ea44"; } -.icon-lightning:before { content: "\ea45"; } -.icon-link-ext:before { content: "\ea46"; } -.icon-link:before { content: "\ea47"; } -.icon-url:before { content: "\ea47"; } -.icon-linkedin:before { content: "\ea48"; } -.icon-list-bullet:before { content: "\ea49"; } -.icon-list-numbered:before { content: "\ea4a"; } -.icon-list:before { content: "\ea4b"; } -.icon-location:before { content: "\ea4c"; } -.icon-lock:before { content: "\ea4d"; } -.icon-login:before { content: "\ea4e"; } -.icon-mail:before { content: "\ea4f"; } -.icon-email:before { content: "\ea4f"; } -.icon-medium:before { content: "\ea50"; } -.icon-menu:before { content: "\ea51"; } -.icon-minus:before { content: "\ea52"; } -.icon-moon-inv:before { content: "\ea53"; } -.icon-moon:before { content: "\ea54"; } -.icon-more:before { content: "\ea55"; } -.icon-network:before { content: "\ea56"; } -.icon-ok-circled:before { content: "\ea57"; } -.icon-ok:before { content: "\ea58"; } -.icon-palette:before { content: "\ea59"; } -.icon-pause:before { content: "\ea5a"; } -.icon-phone:before { content: "\ea5b"; } -.icon-photograph:before { content: "\ea5c"; } -.icon-picture:before { content: "\ea5d"; } -.icon-pinterest:before { content: "\ea5e"; } -.icon-play:before { content: "\ea5f"; } -.icon-plus:before { content: "\ea60"; } -.icon-qrcode:before { content: "\ea61"; } -.icon-question:before { content: "\ea62"; } -.icon-quote-right:before { content: "\ea63"; } -.icon-random:before { content: "\ea64"; } -.icon-reddit:before { content: "\ea65"; } -.icon-refresh:before { content: "\ea66"; } -.icon-right-dir:before { content: "\ea67"; } -.icon-right-open:before { content: "\ea68"; } -.icon-rocket:before { content: "\ea69"; } -.icon-search:before { content: "\ea6a"; } -.icon-shield:before { content: "\ea6b"; } -.icon-shuffle:before { content: "\ea6c"; } -.icon-smile-o:before { content: "\ea6d"; } -.icon-sort:before { content: "\ea6e"; } -.icon-stackoverflow:before { content: "\ea6f"; } -.icon-stopwatch:before { content: "\ea70"; } -.icon-string:before { content: "\ea71"; } -.icon-sun-inv:before { content: "\ea72"; } -.icon-telegram:before { content: "\ea73"; } -.icon-trash-2:before { content: "\ea74"; } -.icon-trash:before { content: "\ea75"; } -.icon-twitter:before { content: "\ea76"; } -.icon-underline:before { content: "\ea77"; } -.icon-up-dir:before { content: "\ea78"; } -.icon-up-open:before { content: "\ea79"; } -.icon-upload:before { content: "\ea7a"; } -.icon-user:before { content: "\ea7b"; } -.icon-users:before { content: "\ea7c"; } -.icon-videocam:before { content: "\ea7d"; } -.icon-warning:before { content: "\ea7e"; } -.icon-whatsapp:before { content: "\ea7f"; } -.icon-wheelchair:before { content: "\ea80"; } -.icon-windows:before { content: "\ea81"; } -.icon-wrench:before { content: "\ea82"; } -.icon-x:before { content: "\ea83"; } -.icon-youtube-play:before { content: "\ea84"; } +.icon-email:before { content: "\ea25"; } +.icon-enum:before { content: "\ea26"; } +.icon-export:before { content: "\ea27"; } +.icon-eye:before { content: "\ea28"; } +.icon-facebook:before { content: "\ea29"; } +.icon-file:before { content: "\ea2a"; } +.icon-film:before { content: "\ea2b"; } +.icon-filter:before { content: "\ea2c"; } +.icon-fire:before { content: "\ea2d"; } +.icon-float:before { content: "\ea2e"; } +.icon-folder:before { content: "\ea2f"; } +.icon-github:before { content: "\ea30"; } +.icon-gitlab:before { content: "\ea31"; } +.icon-glasses:before { content: "\ea32"; } +.icon-google:before { content: "\ea33"; } +.icon-hackernews:before { content: "\ea34"; } +.icon-header:before { content: "\ea35"; } +.icon-heart:before { content: "\ea36"; } +.icon-home:before { content: "\ea37"; } +.icon-image:before { content: "\ea38"; } +.icon-inbox:before { content: "\ea39"; } +.icon-info-circled:before { content: "\ea3a"; } +.icon-instagram:before { content: "\ea3b"; } +.icon-integer:before { content: "\ea3c"; } +.icon-ip:before { content: "\ea3d"; } +.icon-italic:before { content: "\ea3e"; } +.icon-key-inv:before { content: "\ea3f"; } +.icon-key:before { content: "\ea40"; } +.icon-keyboard:before { content: "\ea41"; } +.icon-lamp:before { content: "\ea42"; } +.icon-left-dir:before { content: "\ea43"; } +.icon-left-open:before { content: "\ea44"; } +.icon-lifebuoy:before { content: "\ea45"; } +.icon-lightning:before { content: "\ea46"; } +.icon-link-ext:before { content: "\ea47"; } +.icon-link:before { content: "\ea48"; } +.icon-linkedin:before { content: "\ea49"; } +.icon-list-bullet:before { content: "\ea4a"; } +.icon-list-numbered:before { content: "\ea4b"; } +.icon-list:before { content: "\ea4c"; } +.icon-location:before { content: "\ea4d"; } +.icon-lock:before { content: "\ea4e"; } +.icon-login:before { content: "\ea4f"; } +.icon-mail:before { content: "\ea50"; } +.icon-medium:before { content: "\ea51"; } +.icon-menu:before { content: "\ea52"; } +.icon-minus:before { content: "\ea53"; } +.icon-moon-inv:before { content: "\ea54"; } +.icon-moon:before { content: "\ea55"; } +.icon-more:before { content: "\ea56"; } +.icon-network:before { content: "\ea57"; } +.icon-ok-circled:before { content: "\ea58"; } +.icon-ok:before { content: "\ea59"; } +.icon-palette:before { content: "\ea5a"; } +.icon-pause:before { content: "\ea5b"; } +.icon-phone:before { content: "\ea5c"; } +.icon-photograph:before { content: "\ea5d"; } +.icon-picture:before { content: "\ea5e"; } +.icon-pinterest:before { content: "\ea5f"; } +.icon-play:before { content: "\ea60"; } +.icon-plus:before { content: "\ea61"; } +.icon-qrcode:before { content: "\ea62"; } +.icon-question:before { content: "\ea63"; } +.icon-quote-right:before { content: "\ea64"; } +.icon-random:before { content: "\ea65"; } +.icon-reddit:before { content: "\ea66"; } +.icon-refresh:before { content: "\ea67"; } +.icon-right-dir:before { content: "\ea68"; } +.icon-right-open:before { content: "\ea69"; } +.icon-rocket:before { content: "\ea6a"; } +.icon-search:before { content: "\ea6b"; } +.icon-shield:before { content: "\ea6c"; } +.icon-shuffle:before { content: "\ea6d"; } +.icon-smile-o:before { content: "\ea6e"; } +.icon-sort:before { content: "\ea6f"; } +.icon-stackoverflow:before { content: "\ea70"; } +.icon-stopwatch:before { content: "\ea71"; } +.icon-string:before { content: "\ea72"; } +.icon-sun-inv:before { content: "\ea73"; } +.icon-telegram:before { content: "\ea74"; } +.icon-trash-2:before { content: "\ea75"; } +.icon-trash:before { content: "\ea76"; } +.icon-twitter:before { content: "\ea77"; } +.icon-underline:before { content: "\ea78"; } +.icon-up-dir:before { content: "\ea79"; } +.icon-up-open:before { content: "\ea7a"; } +.icon-upload:before { content: "\ea7b"; } +.icon-url:before { content: "\ea7c"; } +.icon-user:before { content: "\ea7d"; } +.icon-users:before { content: "\ea7e"; } +.icon-videocam:before { content: "\ea7f"; } +.icon-warning:before { content: "\ea80"; } +.icon-whatsapp:before { content: "\ea81"; } +.icon-wheelchair:before { content: "\ea82"; } +.icon-windows:before { content: "\ea83"; } +.icon-wrench:before { content: "\ea84"; } +.icon-x:before { content: "\ea85"; } +.icon-youtube-play:before { content: "\ea86"; } diff --git a/src/Appwrite/Auth/OAuth2.php b/src/Appwrite/Auth/OAuth2.php index 4eafba7610..99b40019ac 100644 --- a/src/Appwrite/Auth/OAuth2.php +++ b/src/Appwrite/Auth/OAuth2.php @@ -7,27 +7,27 @@ abstract class OAuth2 /** * @var string */ - protected $appID; + protected string $appID; /** * @var string */ - protected $appSecret; + protected string $appSecret; /** * @var string */ - protected $callback; + protected string $callback; /** * @var array */ - protected $state; + protected array $state; /** * @var array */ - protected $scopes; + protected array $scopes; /** * OAuth2 constructor. @@ -52,66 +52,69 @@ abstract class OAuth2 /** * @return string */ - abstract public function getName():string; + abstract public function getName(): string; /** * @return string */ - abstract public function getLoginURL():string; + abstract public function getLoginURL(): string; /** * @param string $code * * @return array */ - abstract protected function getTokens(string $code):array; + abstract protected function getTokens(string $code): array; /** * @param string $refreshToken * * @return array */ - abstract public function refreshTokens(string $refreshToken):array; + abstract public function refreshTokens(string $refreshToken): array; /** - * @param $accessToken + * @param string $accessToken * * @return string */ - abstract public function getUserID(string $accessToken):string; + abstract public function getUserEmail(string $accessToken): string; /** - * @param $accessToken + * Check if the OAuth email is verified + * + * @param string $accessToken + * + * @return bool + */ + abstract public function isEmailVerified(string $accessToken): bool; + + /** + * @param string $accessToken * * @return string */ - abstract public function getUserEmail(string $accessToken):string; - - /** - * @param $accessToken - * - * @return string - */ - abstract public function getUserName(string $accessToken):string; + abstract public function getUserName(string $accessToken): string; /** * @param $scope * * @return $this */ - protected function addScope(string $scope):OAuth2 + protected function addScope(string $scope): OAuth2 { // Add a scope to the scopes array if it isn't already present if (!\in_array($scope, $this->scopes)) { $this->scopes[] = $scope; } + return $this; } /** * @return array */ - protected function getScopes():array + protected function getScopes(): array { return $this->scopes; } @@ -121,9 +124,10 @@ abstract class OAuth2 * * @return string */ - public function getAccessToken(string $code):string + public function getAccessToken(string $code): string { $tokens = $this->getTokens($code); + return $tokens['access_token'] ?? ''; } @@ -132,9 +136,10 @@ abstract class OAuth2 * * @return string */ - public function getRefreshToken(string $code):string + public function getRefreshToken(string $code): string { $tokens = $this->getTokens($code); + return $tokens['refresh_token'] ?? ''; } @@ -143,9 +148,10 @@ abstract class OAuth2 * * @return string */ - public function getAccessTokenExpiry(string $code):string + public function getAccessTokenExpiry(string $code): string { $tokens = $this->getTokens($code); + return $tokens['expires_in'] ?? ''; } @@ -170,7 +176,7 @@ abstract class OAuth2 * * @return string */ - protected function request(string $method, string $url = '', array $headers = [], string $payload = ''):string + protected function request(string $method, string $url = '', array $headers = [], string $payload = ''): string { $ch = \curl_init($url); diff --git a/src/Appwrite/Auth/OAuth2/Amazon.php b/src/Appwrite/Auth/OAuth2/Amazon.php index 7ec2769c9a..2e72975fd1 100644 --- a/src/Appwrite/Auth/OAuth2/Amazon.php +++ b/src/Appwrite/Auth/OAuth2/Amazon.php @@ -14,17 +14,17 @@ class Amazon extends OAuth2 /** * @var array */ - protected $user = []; - - /** - * @var array - */ - protected $tokens = []; + protected array $user = []; /** * @var array */ - protected $scopes = [ + protected array $tokens = []; + + /** + * @var array + */ + protected array $scopes = [ "profile" ]; @@ -37,7 +37,7 @@ class Amazon extends OAuth2 } /** - * @param $state + * @param string $state * * @return array */ @@ -52,13 +52,13 @@ class Amazon extends OAuth2 */ public function getLoginURL(): string { - return 'https://www.amazon.com/ap/oa?'.\http_build_query([ - 'response_type' => 'code', - 'client_id' => $this->appID, - 'scope' => \implode(' ', $this->getScopes()), - 'state' => \json_encode($this->state), - 'redirect_uri' => $this->callback - ]); + return 'https://www.amazon.com/ap/oa?' . \http_build_query([ + 'response_type' => 'code', + 'client_id' => $this->appID, + 'scope' => \implode(' ', $this->getScopes()), + 'state' => \json_encode($this->state), + 'redirect_uri' => $this->callback + ]); } /** @@ -68,7 +68,7 @@ class Amazon extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $headers = ['Content-Type: application/x-www-form-urlencoded;charset=UTF-8']; $this->tokens = \json_decode($this->request( 'POST', @@ -92,7 +92,7 @@ class Amazon extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $headers = ['Content-Type: application/x-www-form-urlencoded;charset=UTF-8']; $this->tokens = \json_decode($this->request( @@ -107,7 +107,7 @@ class Amazon extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -123,11 +123,7 @@ class Amazon extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['user_id'])) { - return $user['user_id']; - } - - return ''; + return $user['user_id'] ?? ''; } /** @@ -139,11 +135,23 @@ class Amazon extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['email'])) { - return $user['email']; - } + return $user['email'] ?? ''; + } - return ''; + /** + * Check if the OAuth email is verified + * + * If present, the email is verified. This was verfied through a manual Amazon sign up process + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $email = $this->getUserEmail($accessToken); + + return !empty($email); } /** @@ -155,11 +163,7 @@ class Amazon extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['name'])) { - return $user['name']; - } - - return ''; + return $user['name'] ?? ''; } /** @@ -170,7 +174,7 @@ class Amazon extends OAuth2 protected function getUser(string $accessToken): array { if (empty($this->user)) { - $user = $this->request('GET', 'https://api.amazon.com/user/profile?access_token='.\urlencode($accessToken)); + $user = $this->request('GET', 'https://api.amazon.com/user/profile?access_token=' . \urlencode($accessToken)); $this->user = \json_decode($user, true); } return $this->user; diff --git a/src/Appwrite/Auth/OAuth2/Apple.php b/src/Appwrite/Auth/OAuth2/Apple.php index f1ff4b724d..1ea352e685 100644 --- a/src/Appwrite/Auth/OAuth2/Apple.php +++ b/src/Appwrite/Auth/OAuth2/Apple.php @@ -13,17 +13,17 @@ class Apple extends OAuth2 /** * @var array */ - protected $user = []; - - /** - * @var array - */ - protected $tokens = []; + protected array $user = []; /** * @var array */ - protected $scopes = [ + protected array $tokens = []; + + /** + * @var array + */ + protected array $scopes = [ "name", "email" ]; @@ -31,7 +31,7 @@ class Apple extends OAuth2 /** * @var array */ - protected $claims = []; + protected array $claims = []; /** * @return string @@ -40,13 +40,13 @@ class Apple extends OAuth2 { return 'apple'; } - + /** * @return string */ public function getLoginURL(): string { - return 'https://appleid.apple.com/auth/authorize?'.\http_build_query([ + return 'https://appleid.apple.com/auth/authorize?' . \http_build_query([ 'client_id' => $this->appID, 'redirect_uri' => $this->callback, 'state' => \json_encode($this->state), @@ -63,7 +63,7 @@ class Apple extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $headers = ['Content-Type: application/x-www-form-urlencoded']; $this->tokens = \json_decode($this->request( 'POST', @@ -90,7 +90,7 @@ class Apple extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $headers = ['Content-Type: application/x-www-form-urlencoded']; $this->tokens = \json_decode($this->request( @@ -105,7 +105,7 @@ class Apple extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -122,11 +122,7 @@ class Apple extends OAuth2 */ public function getUserID(string $accessToken): string { - if (isset($this->claims['sub']) && !empty($this->claims['sub'])) { - return $this->claims['sub']; - } - - return ''; + return $this->claims['sub'] ?? ''; } /** @@ -136,14 +132,25 @@ class Apple extends OAuth2 */ public function getUserEmail(string $accessToken): string { - if (isset($this->claims['email']) && - !empty($this->claims['email']) && - isset($this->claims['email_verified']) && - $this->claims['email_verified'] === 'true') { - return $this->claims['email']; + return $this->claims['email'] ?? ''; + } + + /** + * Check if the OAuth email is verified + * + * @link https://developer.apple.com/forums/thread/121411 + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + if ($this->claims['email_verified'] ?? false) { + return true; } - return ''; + return false; } /** @@ -153,17 +160,19 @@ class Apple extends OAuth2 */ public function getUserName(string $accessToken): string { - if (isset($this->claims['email']) && + if ( + isset($this->claims['email']) && !empty($this->claims['email']) && isset($this->claims['email_verified']) && - $this->claims['email_verified'] === 'true') { + $this->claims['email_verified'] === 'true' + ) { return $this->claims['email']; } return ''; } - protected function getAppSecret():string + protected function getAppSecret(): string { try { $secret = \json_decode($this->appSecret, true); @@ -180,18 +189,18 @@ class Apple extends OAuth2 'alg' => 'ES256', 'kid' => $keyID, ]; - + $claims = [ 'iss' => $teamID, 'iat' => \time(), - 'exp' => \time() + 86400*180, + 'exp' => \time() + 86400 * 180, 'aud' => 'https://appleid.apple.com', 'sub' => $bundleID, ]; $pkey = \openssl_pkey_get_private($keyfile); - $payload = $this->encode(\json_encode($headers)).'.'.$this->encode(\json_encode($claims)); + $payload = $this->encode(\json_encode($headers)) . '.' . $this->encode(\json_encode($claims)); $signature = ''; @@ -201,7 +210,7 @@ class Apple extends OAuth2 return ''; } - return $payload.'.'.$this->encode($this->fromDER($signature, 64)); + return $payload . '.' . $this->encode($this->fromDER($signature, 64)); } /** @@ -230,10 +239,10 @@ class Apple extends OAuth2 * @param string $der * @param int $partLength */ - protected function fromDER(string $der, int $partLength):string + protected function fromDER(string $der, int $partLength): string { $hex = \unpack('H*', $der)[1]; - + if ('30' !== \mb_substr($hex, 0, 2, '8bit')) { // SEQUENCE throw new \RuntimeException(); } @@ -252,7 +261,7 @@ class Apple extends OAuth2 $R = \str_pad($R, $partLength, '0', STR_PAD_LEFT); $hex = \mb_substr($hex, 4 + $Rl * 2, null, '8bit'); - + if ('02' !== \mb_substr($hex, 0, 2, '8bit')) { // INTEGER throw new \RuntimeException(); } @@ -261,6 +270,6 @@ class Apple extends OAuth2 $S = $this->retrievePositiveInteger(\mb_substr($hex, 4, $Sl * 2, '8bit')); $S = \str_pad($S, $partLength, '0', STR_PAD_LEFT); - return \pack('H*', $R.$S); + return \pack('H*', $R . $S); } } diff --git a/src/Appwrite/Auth/OAuth2/Auth0.php b/src/Appwrite/Auth/OAuth2/Auth0.php index b1c9c8ce1f..4775139a0b 100644 --- a/src/Appwrite/Auth/OAuth2/Auth0.php +++ b/src/Appwrite/Auth/OAuth2/Auth0.php @@ -8,27 +8,27 @@ use Appwrite\Auth\OAuth2; // https://auth0.com/docs/api/authentication class Auth0 extends OAuth2 -{ - /** +{ + /** * @var array */ - protected $scopes = [ + protected array $scopes = [ 'openid', 'profile', 'email', 'offline_access' ]; - + /** * @var array */ - protected $user = []; - + protected array $user = []; + /** * @var array */ - protected $tokens = []; - + protected array $tokens = []; + /** * @return string */ @@ -42,11 +42,11 @@ class Auth0 extends OAuth2 */ public function getLoginURL(): string { - return 'https://'.$this->getAuth0Domain().'/authorize?'.\http_build_query([ + return 'https://' . $this->getAuth0Domain() . '/authorize?' . \http_build_query([ 'client_id' => $this->appID, 'redirect_uri' => $this->callback, - 'state'=> \json_encode($this->state), - 'scope'=> \implode(' ', $this->getScopes()), + 'state' => \json_encode($this->state), + 'scope' => \implode(' ', $this->getScopes()), 'response_type' => 'code' ]); } @@ -58,11 +58,11 @@ class Auth0 extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $headers = ['Content-Type: application/x-www-form-urlencoded']; $this->tokens = \json_decode($this->request( 'POST', - 'https://'.$this->getAuth0Domain().'/oauth/token', + 'https://' . $this->getAuth0Domain() . '/oauth/token', $headers, \http_build_query([ 'code' => $code, @@ -77,8 +77,8 @@ class Auth0 extends OAuth2 return $this->tokens; } - - + + /** * @param string $refreshToken * @@ -89,7 +89,7 @@ class Auth0 extends OAuth2 $headers = ['Content-Type: application/x-www-form-urlencoded']; $this->tokens = \json_decode($this->request( 'POST', - 'https://'.$this->getAuth0Domain().'/oauth/token', + 'https://' . $this->getAuth0Domain() . '/oauth/token', $headers, \http_build_query([ 'refresh_token' => $refreshToken, @@ -99,7 +99,7 @@ class Auth0 extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -114,12 +114,8 @@ class Auth0 extends OAuth2 public function getUserID(string $accessToken): string { $user = $this->getUser($accessToken); - - if (isset($user['sub'])) { - return $user['sub']; - } - - return ''; + + return $user['sub'] ?? ''; } /** @@ -130,12 +126,28 @@ class Auth0 extends OAuth2 public function getUserEmail(string $accessToken): string { $user = $this->getUser($accessToken); - - if (isset($user['email'])) { - return $user['email']; + + return $user['email'] ?? ''; + } + + /** + * Check if the OAuth email is verified + * + * @link https://auth0.com/docs/api/authentication?javascript#user-profile + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $user = $this->getUser($accessToken); + + if ($user['email_verified'] ?? false) { + return true; } - - return ''; + + return false; } /** @@ -146,15 +158,11 @@ class Auth0 extends OAuth2 public function getUserName(string $accessToken): string { $user = $this->getUser($accessToken); - - if (isset($user['name'])) { - return $user['name']; - } - - return ''; + + return $user['name'] ?? ''; } - - /** + + /** * @param string $accessToken * * @return array @@ -162,8 +170,8 @@ class Auth0 extends OAuth2 protected function getUser(string $accessToken): array { if (empty($this->user)) { - $headers = ['Authorization: Bearer '. \urlencode($accessToken)]; - $user = $this->request('GET', 'https://'.$this->getAuth0Domain().'/userinfo', $headers); + $headers = ['Authorization: Bearer ' . \urlencode($accessToken)]; + $user = $this->request('GET', 'https://' . $this->getAuth0Domain() . '/userinfo', $headers); $this->user = \json_decode($user, true); } @@ -179,10 +187,10 @@ class Auth0 extends OAuth2 { $secret = $this->getAppSecret(); - return (isset($secret['clientSecret'])) ? $secret['clientSecret'] : ''; + return $secret['clientSecret'] ?? ''; } - /** + /** * Extracts the Auth0 Domain from the JSON stored in appSecret * * @return string @@ -190,7 +198,8 @@ class Auth0 extends OAuth2 protected function getAuth0Domain(): string { $secret = $this->getAppSecret(); - return (isset($secret['auth0Domain'])) ? $secret['auth0Domain'] : ''; + + return $secret['auth0Domain'] ?? ''; } /** @@ -199,7 +208,7 @@ class Auth0 extends OAuth2 * @return array */ protected function getAppSecret(): array - { + { try { $secret = \json_decode($this->appSecret, true, 512, JSON_THROW_ON_ERROR); } catch (\Throwable $th) { @@ -207,4 +216,4 @@ class Auth0 extends OAuth2 } return $secret; } -} \ No newline at end of file +} diff --git a/src/Appwrite/Auth/OAuth2/Bitbucket.php b/src/Appwrite/Auth/OAuth2/Bitbucket.php index 74d684c845..bbefe144c1 100644 --- a/src/Appwrite/Auth/OAuth2/Bitbucket.php +++ b/src/Appwrite/Auth/OAuth2/Bitbucket.php @@ -12,17 +12,17 @@ class Bitbucket extends OAuth2 /** * @var array */ - protected $user = []; - - /** - * @var array - */ - protected $tokens = []; + protected array $user = []; /** * @var array */ - protected $scopes = []; + protected array $tokens = []; + + /** + * @var array + */ + protected array $scopes = []; /** * @return string @@ -37,12 +37,12 @@ class Bitbucket extends OAuth2 */ public function getLoginURL(): string { - return 'https://bitbucket.org/site/oauth2/authorize?'.\http_build_query([ - 'response_type' => 'code', - 'client_id' => $this->appID, - 'scope' => \implode(' ', $this->getScopes()), - 'state' => \json_encode($this->state), - ]); + return 'https://bitbucket.org/site/oauth2/authorize?' . \http_build_query([ + 'response_type' => 'code', + 'client_id' => $this->appID, + 'scope' => \implode(' ', $this->getScopes()), + 'state' => \json_encode($this->state), + ]); } /** @@ -52,7 +52,7 @@ class Bitbucket extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { // Required as per Bitbucket Spec. $headers = ['Content-Type: application/x-www-form-urlencoded']; $this->tokens = \json_decode($this->request( @@ -76,7 +76,7 @@ class Bitbucket extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $headers = ['Content-Type: application/x-www-form-urlencoded']; $this->tokens = \json_decode($this->request( @@ -91,7 +91,7 @@ class Bitbucket extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -107,11 +107,7 @@ class Bitbucket extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['uuid'])) { - return $user['uuid']; - } - - return ''; + return $user['uuid'] ?? ''; } /** @@ -123,11 +119,25 @@ class Bitbucket extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['email'])) { - return $user['email']; + return $user['email'] ?? ''; + } + + /** + * Check if the OAuth email is verified + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $user = $this->getUser($accessToken); + + if ($user['is_confirmed'] ?? false) { + return true; } - return ''; + return false; } /** @@ -139,11 +149,7 @@ class Bitbucket extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['display_name'])) { - return $user['display_name']; - } - - return ''; + return $user['display_name'] ?? ''; } /** @@ -154,11 +160,20 @@ class Bitbucket extends OAuth2 protected function getUser(string $accessToken): array { if (empty($this->user)) { - $user = $this->request('GET', 'https://api.bitbucket.org/2.0/user?access_token='.\urlencode($accessToken)); + $user = $this->request('GET', 'https://api.bitbucket.org/2.0/user?access_token=' . \urlencode($accessToken)); $this->user = \json_decode($user, true); - $email = $this->request('GET', 'https://api.bitbucket.org/2.0/user/emails?access_token='.\urlencode($accessToken)); - $this->user['email'] = \json_decode($email, true)['values'][0]['email']; + $emails = $this->request('GET', 'https://api.bitbucket.org/2.0/user/emails?access_token=' . \urlencode($accessToken)); + $emails = \json_decode($emails, true); + if (isset($emails['values'])) { + foreach ($emails['values'] as $email) { + if ($email['is_confirmed']) { + $this->user['email'] = $email['email']; + $this->user['is_confirmed'] = $email['is_confirmed']; + break; + } + } + } } return $this->user; } diff --git a/src/Appwrite/Auth/OAuth2/Bitly.php b/src/Appwrite/Auth/OAuth2/Bitly.php index 02a21dc29e..08350bea6f 100644 --- a/src/Appwrite/Auth/OAuth2/Bitly.php +++ b/src/Appwrite/Auth/OAuth2/Bitly.php @@ -3,7 +3,6 @@ namespace Appwrite\Auth\OAuth2; use Appwrite\Auth\OAuth2; -use Utopia\Exception; // Reference Material // https://dev.bitly.com/v4_documentation.html @@ -14,32 +13,32 @@ class Bitly extends OAuth2 /** * @var string */ - private $endpoint = 'https://bitly.com/oauth/'; + private string $endpoint = 'https://bitly.com/oauth/'; /** * @var string */ - private $resourceEndpoint = 'https://api-ssl.bitly.com/'; + private string $resourceEndpoint = 'https://api-ssl.bitly.com/'; /** * @var array */ - protected $scopes = []; + protected array $scopes = []; /** * @var array */ - protected $user = []; - + protected array $user = []; + /** * @var array */ - protected $tokens = []; + protected array $tokens = []; /** * @return string */ - public function getName():string + public function getName(): string { return 'bitly'; } @@ -47,9 +46,9 @@ class Bitly extends OAuth2 /** * @return string */ - public function getLoginURL():string + public function getLoginURL(): string { - return $this->endpoint . 'authorize?'. + return $this->endpoint . 'authorize?' . \http_build_query([ 'client_id' => $this->appID, 'redirect_uri' => $this->callback, @@ -64,7 +63,7 @@ class Bitly extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $response = $this->request( 'POST', $this->resourceEndpoint . 'oauth/access_token', @@ -91,7 +90,7 @@ class Bitly extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $response = $this->request( 'POST', @@ -109,7 +108,7 @@ class Bitly extends OAuth2 \parse_str($response, $output); $this->tokens = $output; - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -117,51 +116,61 @@ class Bitly extends OAuth2 } /** - * @param $accessToken + * @param string $accessToken * * @return string */ - public function getUserID(string $accessToken):string + public function getUserID(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['login'])) { - return $user['login']; - } - - return ''; + return $user['login'] ?? ''; } /** - * @param $accessToken + * @param string $accessToken * * @return string */ - public function getUserEmail(string $accessToken):string + public function getUserEmail(string $accessToken): string { $user = $this->getUser($accessToken); if (isset($user['emails'])) { - return $user['emails'][0]['email']; + foreach ($user['emails'] as $email) { + if ($email['is_verified'] === true) { + return $email['email']; + } + } } return ''; } /** - * @param $accessToken + * Check if the OAuth email is verified + * + * @link https://dev.bitly.com/api-reference#getUser + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + return true; + } + + /** + * @param string $accessToken * * @return string */ - public function getUserName(string $accessToken):string + public function getUserName(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['name'])) { - return $user['name']; - } - - return ''; + return $user['name'] ?? ''; } /** @@ -172,7 +181,7 @@ class Bitly extends OAuth2 protected function getUser(string $accessToken) { $headers = [ - 'Authorization: Bearer '. \urlencode($accessToken), + 'Authorization: Bearer ' . \urlencode($accessToken), "Accept: application/json" ]; @@ -180,7 +189,6 @@ class Bitly extends OAuth2 $this->user = \json_decode($this->request('GET', $this->resourceEndpoint . "v4/user", $headers), true); } - return $this->user; } } diff --git a/src/Appwrite/Auth/OAuth2/Box.php b/src/Appwrite/Auth/OAuth2/Box.php index 80d59e9198..da925eed1a 100644 --- a/src/Appwrite/Auth/OAuth2/Box.php +++ b/src/Appwrite/Auth/OAuth2/Box.php @@ -12,27 +12,27 @@ class Box extends OAuth2 /** * @var string */ - private $endpoint = 'https://account.box.com/api/oauth2/'; + private string $endpoint = 'https://account.box.com/api/oauth2/'; /** * @var string */ - private $resourceEndpoint = 'https://api.box.com/2.0/'; + private string $resourceEndpoint = 'https://api.box.com/2.0/'; /** * @var array */ - protected $user = []; - - /** - * @var array - */ - protected $tokens = []; + protected array $user = []; /** * @var array */ - protected $scopes = [ + protected array $tokens = []; + + /** + * @var array + */ + protected array $scopes = [ 'manage_app_users', ]; @@ -49,7 +49,7 @@ class Box extends OAuth2 */ public function getLoginURL(): string { - $url = $this->endpoint . 'authorize?'. + $url = $this->endpoint . 'authorize?' . \http_build_query([ 'response_type' => 'code', 'client_id' => $this->appID, @@ -68,7 +68,7 @@ class Box extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $headers = ['Content-Type: application/x-www-form-urlencoded']; $this->tokens = \json_decode($this->request( 'POST', @@ -93,7 +93,7 @@ class Box extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $headers = ['Content-Type: application/x-www-form-urlencoded']; $this->tokens = \json_decode($this->request( @@ -108,7 +108,7 @@ class Box extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -124,11 +124,7 @@ class Box extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['id'])) { - return $user['id']; - } - - return ''; + return $user['id'] ?? ''; } /** @@ -140,11 +136,23 @@ class Box extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['login'])) { - return $user['login']; - } + return $user['login'] ?? ''; + } - return ''; + /** + * Check if the OAuth email is verified + * + * If present, the email is verified. This was verfied through a manual Box sign up process + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $email = $this->getUserEmail($accessToken); + + return !empty($email); } /** @@ -156,11 +164,7 @@ class Box extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['name'])) { - return $user['name']; - } - - return ''; + return $user['name'] ?? ''; } /** @@ -171,7 +175,7 @@ class Box extends OAuth2 protected function getUser(string $accessToken): array { $header = [ - 'Authorization: Bearer '.\urlencode($accessToken), + 'Authorization: Bearer ' . \urlencode($accessToken), ]; if (empty($this->user)) { $user = $this->request( diff --git a/src/Appwrite/Auth/OAuth2/Discord.php b/src/Appwrite/Auth/OAuth2/Discord.php index dece646e55..7cf2ef1b7b 100644 --- a/src/Appwrite/Auth/OAuth2/Discord.php +++ b/src/Appwrite/Auth/OAuth2/Discord.php @@ -12,22 +12,22 @@ class Discord extends OAuth2 /** * @var string */ - private $endpoint = 'https://discordapp.com/api'; + private string $endpoint = 'https://discordapp.com/api'; /** * @var array */ - protected $user = []; + protected array $user = []; /** * @var array */ - protected $tokens = []; + protected array $tokens = []; /** * @var array */ - protected $scopes = [ + protected array $scopes = [ 'identify', 'email' ]; @@ -118,11 +118,7 @@ class Discord extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['id'])) { - return $user['id']; - } - - return ''; + return $user['id'] ?? ''; } /** @@ -134,11 +130,27 @@ class Discord extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['email'])) { - return $user['email']; + return $user['email'] ?? ''; + } + + /** + * Check if the OAuth email is verified + * + * @link https://discord.com/developers/docs/resources/user + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $user = $this->getUser($accessToken); + + if ($user['verified'] ?? false) { + return true; } - return ''; + return false; } /** @@ -150,11 +162,7 @@ class Discord extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['username'])) { - return $user['username']; - } - - return ''; + return $user['username'] ?? ''; } /** diff --git a/src/Appwrite/Auth/OAuth2/Dropbox.php b/src/Appwrite/Auth/OAuth2/Dropbox.php index f67e10b01d..5025cb3dc8 100644 --- a/src/Appwrite/Auth/OAuth2/Dropbox.php +++ b/src/Appwrite/Auth/OAuth2/Dropbox.php @@ -13,17 +13,17 @@ class Dropbox extends OAuth2 /** * @var array */ - protected $user = []; - - /** - * @var array - */ - protected $tokens = []; + protected array $user = []; /** * @var array */ - protected $scopes = []; + protected array $tokens = []; + + /** + * @var array + */ + protected array $scopes = []; /** * @return string @@ -32,17 +32,17 @@ class Dropbox extends OAuth2 { return 'dropbox'; } - + /** * @return string */ public function getLoginURL(): string { - return 'https://www.dropbox.com/oauth2/authorize?'.\http_build_query([ - 'client_id' => $this->appID, - 'redirect_uri' => $this->callback, - 'state' => \json_encode($this->state), - 'response_type' => 'code' + return 'https://www.dropbox.com/oauth2/authorize?' . \http_build_query([ + 'client_id' => $this->appID, + 'redirect_uri' => $this->callback, + 'state' => \json_encode($this->state), + 'response_type' => 'code' ]); } @@ -53,7 +53,7 @@ class Dropbox extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $headers = ['Content-Type: application/x-www-form-urlencoded']; $this->tokens = \json_decode($this->request( 'POST', @@ -77,7 +77,7 @@ class Dropbox extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $headers = ['Content-Type: application/x-www-form-urlencoded']; $this->tokens = \json_decode($this->request( @@ -92,7 +92,7 @@ class Dropbox extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -108,11 +108,7 @@ class Dropbox extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['account_id'])) { - return $user['account_id']; - } - - return ''; + return $user['account_id'] ?? ''; } /** @@ -124,11 +120,27 @@ class Dropbox extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['email'])) { - return $user['email']; + return $user['email'] ?? ''; + } + + /** + * Check if the OAuth email is verified + * + * @link https://www.dropbox.com/developers/documentation/http/documentation#users-get_current_account + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $user = $this->getUser($accessToken); + + if ($user['email_verified'] ?? false) { + return true; } - return ''; + return false; } /** @@ -140,11 +152,7 @@ class Dropbox extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['name'])) { - return $user['name']['display_name']; - } - - return ''; + return $user['name']['display_name'] ?? ''; } /** @@ -155,7 +163,7 @@ class Dropbox extends OAuth2 protected function getUser(string $accessToken): array { if (empty($this->user)) { - $headers = ['Authorization: Bearer '. \urlencode($accessToken)]; + $headers = ['Authorization: Bearer ' . \urlencode($accessToken)]; $user = $this->request('POST', 'https://api.dropboxapi.com/2/users/get_current_account', $headers); $this->user = \json_decode($user, true); } diff --git a/src/Appwrite/Auth/OAuth2/Facebook.php b/src/Appwrite/Auth/OAuth2/Facebook.php index 7759a54042..555daedc58 100644 --- a/src/Appwrite/Auth/OAuth2/Facebook.php +++ b/src/Appwrite/Auth/OAuth2/Facebook.php @@ -3,36 +3,35 @@ namespace Appwrite\Auth\OAuth2; use Appwrite\Auth\OAuth2; -use Utopia\Exception; class Facebook extends OAuth2 { /** * @var string */ - protected $version = 'v2.8'; + protected string $version = 'v2.8'; /** * @var array */ - protected $user = []; - - /** - * @var array - */ - protected $tokens = []; + protected array $user = []; /** * @var array */ - protected $scopes = [ + protected array $tokens = []; + + /** + * @var array + */ + protected array $scopes = [ 'email' ]; /** * @return string */ - public function getName():string + public function getName(): string { return 'facebook'; } @@ -40,10 +39,10 @@ class Facebook extends OAuth2 /** * @return string */ - public function getLoginURL():string + public function getLoginURL(): string { - return 'https://www.facebook.com/'.$this->version.'/dialog/oauth?'.\http_build_query([ - 'client_id'=> $this->appID, + return 'https://www.facebook.com/' . $this->version . '/dialog/oauth?' . \http_build_query([ + 'client_id' => $this->appID, 'redirect_uri' => $this->callback, 'scope' => \implode(' ', $this->getScopes()), 'state' => \json_encode($this->state) @@ -57,7 +56,7 @@ class Facebook extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $this->tokens = \json_decode($this->request( 'GET', 'https://graph.facebook.com/' . $this->version . '/oauth/access_token?' . \http_build_query([ @@ -77,7 +76,7 @@ class Facebook extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $this->tokens = \json_decode($this->request( 'GET', @@ -90,7 +89,7 @@ class Facebook extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -102,15 +101,11 @@ class Facebook extends OAuth2 * * @return string */ - public function getUserID(string $accessToken):string + public function getUserID(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['id'])) { - return $user['id']; - } - - return ''; + return $user['id'] ?? ''; } /** @@ -118,15 +113,27 @@ class Facebook extends OAuth2 * * @return string */ - public function getUserEmail(string $accessToken):string + public function getUserEmail(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['email'])) { - return $user['email']; - } + return $user['email'] ?? ''; + } - return ''; + /** + * Check if the OAuth email is verified + * + * If present, the email is verified. This was verfied through a manual Facebook sign up process + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $email = $this->getUserEmail($accessToken); + + return !empty($email); } /** @@ -134,15 +141,11 @@ class Facebook extends OAuth2 * * @return string */ - public function getUserName(string $accessToken):string + public function getUserName(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['name'])) { - return $user['name']; - } - - return ''; + return $user['name'] ?? ''; } /** @@ -150,10 +153,10 @@ class Facebook extends OAuth2 * * @return array */ - protected function getUser(string $accessToken):array + protected function getUser(string $accessToken): array { if (empty($this->user)) { - $user = $this->request('GET', 'https://graph.facebook.com/'.$this->version.'/me?fields=email,name&access_token='.\urlencode($accessToken)); + $user = $this->request('GET', 'https://graph.facebook.com/' . $this->version . '/me?fields=email,name&access_token=' . \urlencode($accessToken)); $this->user = \json_decode($user, true); } diff --git a/src/Appwrite/Auth/OAuth2/Github.php b/src/Appwrite/Auth/OAuth2/Github.php index dddd4a5181..1130134f68 100644 --- a/src/Appwrite/Auth/OAuth2/Github.php +++ b/src/Appwrite/Auth/OAuth2/Github.php @@ -3,31 +3,30 @@ namespace Appwrite\Auth\OAuth2; use Appwrite\Auth\OAuth2; -use Utopia\Exception; class Github extends OAuth2 { /** * @var array */ - protected $user = []; - - /** - * @var array - */ - protected $tokens = []; + protected array $user = []; /** * @var array */ - protected $scopes = [ + protected array $tokens = []; + + /** + * @var array + */ + protected array $scopes = [ 'user:email', ]; /** * @return string */ - public function getName():string + public function getName(): string { return 'github'; } @@ -35,9 +34,9 @@ class Github extends OAuth2 /** * @return string */ - public function getLoginURL():string + public function getLoginURL(): string { - return 'https://github.com/login/oauth/authorize?'. \http_build_query([ + return 'https://github.com/login/oauth/authorize?' . \http_build_query([ 'client_id' => $this->appID, 'redirect_uri' => $this->callback, 'scope' => \implode(' ', $this->getScopes()), @@ -52,7 +51,7 @@ class Github extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $response = $this->request( 'POST', 'https://github.com/login/oauth/access_token', @@ -78,7 +77,7 @@ class Github extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $response = $this->request( 'POST', @@ -96,7 +95,7 @@ class Github extends OAuth2 \parse_str($response, $output); $this->tokens = $output; - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -104,53 +103,59 @@ class Github extends OAuth2 } /** - * @param $accessToken + * @param string $accessToken * * @return string */ - public function getUserID(string $accessToken):string + public function getUserID(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['id'])) { - return $user['id']; - } - - return ''; + return $user['id'] ?? ''; } /** - * @param $accessToken + * @param string $accessToken * * @return string */ - public function getUserEmail(string $accessToken):string - { - $emails = \json_decode($this->request('GET', 'https://api.github.com/user/emails', ['Authorization: token '.\urlencode($accessToken)]), true); - - foreach ($emails as $email) { - if ($email['primary'] && $email['verified']) { - return $email['email']; - } - } - - return ''; - } - - /** - * @param $accessToken - * - * @return string - */ - public function getUserName(string $accessToken):string + public function getUserEmail(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['name'])) { - return $user['name']; + return $user['email'] ?? ''; + } + + /** + * Check if the OAuth email is verified + * + * @link https://docs.github.com/en/rest/users/emails#list-email-addresses-for-the-authenticated-user + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $user = $this->getUser($accessToken); + + if ($user['verified'] ?? false) { + return true; } - return ''; + return false; + } + + /** + * @param string $accessToken + * + * @return string + */ + public function getUserName(string $accessToken): string + { + $user = $this->getUser($accessToken); + + return $user['name'] ?? ''; } /** @@ -161,7 +166,18 @@ class Github extends OAuth2 protected function getUser(string $accessToken) { if (empty($this->user)) { - $this->user = \json_decode($this->request('GET', 'https://api.github.com/user', ['Authorization: token '.\urlencode($accessToken)]), true); + $this->user = \json_decode($this->request('GET', 'https://api.github.com/user', ['Authorization: token ' . \urlencode($accessToken)]), true); + + $emails = $this->request('GET', 'https://api.github.com/user/emails', ['Authorization: token ' . \urlencode($accessToken)]); + + $emails = \json_decode($emails, true); + foreach ($emails as $email) { + if (isset($email['verified']) && $email['verified'] === true) { + $this->user['email'] = $email['email']; + $this->user['verified'] = $email['verified']; + break; + } + } } return $this->user; diff --git a/src/Appwrite/Auth/OAuth2/Gitlab.php b/src/Appwrite/Auth/OAuth2/Gitlab.php index 19ee1363a7..fa0a93df92 100644 --- a/src/Appwrite/Auth/OAuth2/Gitlab.php +++ b/src/Appwrite/Auth/OAuth2/Gitlab.php @@ -12,17 +12,17 @@ class Gitlab extends OAuth2 /** * @var array */ - protected $user = []; - - /** - * @var array - */ - protected $tokens = []; + protected array $user = []; /** * @var array */ - protected $scopes = [ + protected array $tokens = []; + + /** + * @var array + */ + protected array $scopes = [ 'read_user' ]; @@ -39,7 +39,7 @@ class Gitlab extends OAuth2 */ public function getLoginURL(): string { - return 'https://gitlab.com/oauth/authorize?'.\http_build_query([ + return 'https://gitlab.com/oauth/authorize?' . \http_build_query([ 'client_id' => $this->appID, 'redirect_uri' => $this->callback, 'scope' => \implode(' ', $this->getScopes()), @@ -55,7 +55,7 @@ class Gitlab extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $this->tokens = \json_decode($this->request( 'POST', 'https://gitlab.com/oauth/token?' . \http_build_query([ @@ -76,7 +76,7 @@ class Gitlab extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $this->tokens = \json_decode($this->request( 'POST', @@ -88,7 +88,7 @@ class Gitlab extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -120,11 +120,27 @@ class Gitlab extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['email'])) { - return $user['email']; + return $user['email'] ?? ''; + } + + /** + * Check if the OAuth email is verified + * + * @link https://docs.gitlab.com/ee/api/users.html#list-current-user-for-normal-users + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $user = $this->getUser($accessToken); + + if ($user['confirmed_at'] ?? false) { + return true; } - return ''; + return false; } /** @@ -136,11 +152,7 @@ class Gitlab extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['name'])) { - return $user['name']; - } - - return ''; + return $user['name'] ?? ''; } /** @@ -151,7 +163,7 @@ class Gitlab extends OAuth2 protected function getUser(string $accessToken): array { if (empty($this->user)) { - $user = $this->request('GET', 'https://gitlab.com/api/v4/user?access_token='.\urlencode($accessToken)); + $user = $this->request('GET', 'https://gitlab.com/api/v4/user?access_token=' . \urlencode($accessToken)); $this->user = \json_decode($user, true); } diff --git a/src/Appwrite/Auth/OAuth2/Google.php b/src/Appwrite/Auth/OAuth2/Google.php index 5b3ab938b3..e675a1f861 100644 --- a/src/Appwrite/Auth/OAuth2/Google.php +++ b/src/Appwrite/Auth/OAuth2/Google.php @@ -14,12 +14,12 @@ class Google extends OAuth2 /** * @var string */ - protected $version = 'v4'; + protected string $version = 'v4'; /** * @var array */ - protected $scopes = [ + protected array $scopes = [ 'https://www.googleapis.com/auth/userinfo.email', 'https://www.googleapis.com/auth/userinfo.profile', 'openid' @@ -28,12 +28,12 @@ class Google extends OAuth2 /** * @var array */ - protected $user = []; - + protected array $user = []; + /** * @var array */ - protected $tokens = []; + protected array $tokens = []; /** * @return string @@ -48,7 +48,7 @@ class Google extends OAuth2 */ public function getLoginURL(): string { - return 'https://accounts.google.com/o/oauth2/v2/auth?'. \http_build_query([ + return 'https://accounts.google.com/o/oauth2/v2/auth?' . \http_build_query([ 'client_id' => $this->appID, 'redirect_uri' => $this->callback, 'scope' => \implode(' ', $this->getScopes()), @@ -64,7 +64,7 @@ class Google extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $this->tokens = \json_decode($this->request( 'POST', 'https://oauth2.googleapis.com/token?' . \http_build_query([ @@ -86,7 +86,7 @@ class Google extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $this->tokens = \json_decode($this->request( 'POST', @@ -98,7 +98,7 @@ class Google extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -114,11 +114,7 @@ class Google extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['id'])) { - return $user['id']; - } - - return ''; + return $user['id'] ?? ''; } /** @@ -130,11 +126,27 @@ class Google extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['email'])) { - return $user['email']; + return $user['email'] ?? ''; + } + + /** + * Check if the OAuth email is verified + * + * @link https://www.oauth.com/oauth2-servers/signing-in-with-google/verifying-the-user-info/ + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $user = $this->getUser($accessToken); + + if ($user['email_verified'] ?? false) { + return true; } - return ''; + return false; } /** @@ -146,11 +158,7 @@ class Google extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['name'])) { - return $user['name']; - } - - return ''; + return $user['name'] ?? ''; } /** @@ -161,7 +169,7 @@ class Google extends OAuth2 protected function getUser(string $accessToken): array { if (empty($this->user)) { - $user = $this->request('GET', 'https://www.googleapis.com/oauth2/v2/userinfo?access_token='.\urlencode($accessToken)); + $user = $this->request('GET', 'https://www.googleapis.com/oauth2/v3/userinfo?access_token=' . \urlencode($accessToken)); $this->user = \json_decode($user, true); } diff --git a/src/Appwrite/Auth/OAuth2/Linkedin.php b/src/Appwrite/Auth/OAuth2/Linkedin.php index 2519859a1b..3ada765319 100644 --- a/src/Appwrite/Auth/OAuth2/Linkedin.php +++ b/src/Appwrite/Auth/OAuth2/Linkedin.php @@ -9,17 +9,17 @@ class Linkedin extends OAuth2 /** * @var array */ - protected $user = []; - - /** - * @var array - */ - protected $tokens = []; + protected array $user = []; /** * @var array */ - protected $scopes = [ + protected array $tokens = []; + + /** + * @var array + */ + protected array $scopes = [ 'r_liteprofile', 'r_emailaddress', ]; @@ -40,7 +40,7 @@ class Linkedin extends OAuth2 /** * @return string */ - public function getName():string + public function getName(): string { return 'linkedin'; } @@ -48,15 +48,15 @@ class Linkedin extends OAuth2 /** * @return string */ - public function getLoginURL():string + public function getLoginURL(): string { - return 'https://www.linkedin.com/oauth/v2/authorization?'.\http_build_query([ - 'response_type' => 'code', - 'client_id' => $this->appID, - 'redirect_uri' => $this->callback, - 'scope' => \implode(' ', $this->getScopes()), - 'state' => \json_encode($this->state), - ]); + return 'https://www.linkedin.com/oauth/v2/authorization?' . \http_build_query([ + 'response_type' => 'code', + 'client_id' => $this->appID, + 'redirect_uri' => $this->callback, + 'scope' => \implode(' ', $this->getScopes()), + 'state' => \json_encode($this->state), + ]); } /** @@ -66,7 +66,7 @@ class Linkedin extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $this->tokens = \json_decode($this->request( 'POST', 'https://www.linkedin.com/oauth/v2/accessToken', @@ -89,7 +89,7 @@ class Linkedin extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $this->tokens = \json_decode($this->request( 'POST', @@ -104,7 +104,7 @@ class Linkedin extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -112,48 +112,51 @@ class Linkedin extends OAuth2 } /** - * @param $accessToken + * @param string $accessToken * * @return string */ - public function getUserID(string $accessToken):string + public function getUserID(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['id'])) { - return $user['id']; - } - - return ''; + return $user['id'] ?? ''; } /** - * @param $accessToken + * @param string $accessToken * * @return string */ - public function getUserEmail(string $accessToken):string + public function getUserEmail(string $accessToken): string { - $email = \json_decode($this->request('GET', 'https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~))', ['Authorization: Bearer '.\urlencode($accessToken)]), true); + $email = \json_decode($this->request('GET', 'https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~))', ['Authorization: Bearer ' . \urlencode($accessToken)]), true); - if ( - isset($email['elements']) && - isset($email['elements'][0]) && - isset($email['elements'][0]['handle~']) && - isset($email['elements'][0]['handle~']['emailAddress']) - ) { - return $email['elements'][0]['handle~']['emailAddress']; - } - - return ''; + return $email['elements'][0]['handle~']['emailAddress'] ?? ''; } /** - * @param $accessToken + * Check if the OAuth email is verified + * + * If present, the email is verified. This was verfied through a manual Linkedin sign up process + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $email = $this->getUserEmail($accessToken); + + return !empty($email); + } + + /** + * @param string $accessToken * * @return string */ - public function getUserName(string $accessToken):string + public function getUserName(string $accessToken): string { $user = $this->getUser($accessToken); $name = ''; @@ -163,7 +166,7 @@ class Linkedin extends OAuth2 } if (isset($user['localizedLastName'])) { - $name = (empty($name)) ? $user['localizedLastName'] : $name.' '.$user['localizedLastName']; + $name = (empty($name)) ? $user['localizedLastName'] : $name . ' ' . $user['localizedLastName']; } return $name; @@ -177,7 +180,7 @@ class Linkedin extends OAuth2 protected function getUser(string $accessToken) { if (empty($this->user)) { - $this->user = \json_decode($this->request('GET', 'https://api.linkedin.com/v2/me', ['Authorization: Bearer '.\urlencode($accessToken)]), true); + $this->user = \json_decode($this->request('GET', 'https://api.linkedin.com/v2/me', ['Authorization: Bearer ' . \urlencode($accessToken)]), true); } return $this->user; diff --git a/src/Appwrite/Auth/OAuth2/Microsoft.php b/src/Appwrite/Auth/OAuth2/Microsoft.php index ebfd2e4e83..84f128a08e 100644 --- a/src/Appwrite/Auth/OAuth2/Microsoft.php +++ b/src/Appwrite/Auth/OAuth2/Microsoft.php @@ -13,17 +13,17 @@ class Microsoft extends OAuth2 /** * @var array */ - protected $user = []; - - /** - * @var array - */ - protected $tokens = []; + protected array $user = []; /** * @var array */ - protected $scopes = [ + protected array $tokens = []; + + /** + * @var array + */ + protected array $scopes = [ 'offline_access', 'user.read' ]; @@ -35,17 +35,17 @@ class Microsoft extends OAuth2 { return 'microsoft'; } - + /** * @return string */ public function getLoginURL(): string { - return 'https://login.microsoftonline.com/'.$this->getTenantID().'/oauth2/v2.0/authorize?'.\http_build_query([ + return 'https://login.microsoftonline.com/' . $this->getTenantID() . '/oauth2/v2.0/authorize?' . \http_build_query([ 'client_id' => $this->appID, 'redirect_uri' => $this->callback, - 'state'=> \json_encode($this->state), - 'scope'=> \implode(' ', $this->getScopes()), + 'state' => \json_encode($this->state), + 'scope' => \implode(' ', $this->getScopes()), 'response_type' => 'code', 'response_mode' => 'query' ]); @@ -58,7 +58,7 @@ class Microsoft extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $headers = ['Content-Type: application/x-www-form-urlencoded']; $this->tokens = \json_decode($this->request( 'POST', @@ -83,7 +83,7 @@ class Microsoft extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $headers = ['Content-Type: application/x-www-form-urlencoded']; $this->tokens = \json_decode($this->request( @@ -98,7 +98,7 @@ class Microsoft extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -114,11 +114,7 @@ class Microsoft extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['id'])) { - return $user['id']; - } - - return ''; + return $user['id'] ?? ''; } /** @@ -130,11 +126,23 @@ class Microsoft extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['userPrincipalName'])) { - return $user['userPrincipalName']; - } + return $user['userPrincipalName'] ?? ''; + } - return ''; + /** + * Check if the OAuth email is verified + * + * If present, the email is verified. This was verfied through a manual Microsoft sign up process + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $email = $this->getUserEmail($accessToken); + + return !empty($email); } /** @@ -146,11 +154,7 @@ class Microsoft extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['displayName'])) { - return $user['displayName']; - } - - return ''; + return $user['displayName'] ?? ''; } /** @@ -161,7 +165,7 @@ class Microsoft extends OAuth2 protected function getUser(string $accessToken): array { if (empty($this->user)) { - $headers = ['Authorization: Bearer '. \urlencode($accessToken)]; + $headers = ['Authorization: Bearer ' . \urlencode($accessToken)]; $user = $this->request('GET', 'https://graph.microsoft.com/v1.0/me', $headers); $this->user = \json_decode($user, true); } @@ -175,7 +179,7 @@ class Microsoft extends OAuth2 * @return array */ protected function getAppSecret(): array - { + { try { $secret = \json_decode($this->appSecret, true, 512, JSON_THROW_ON_ERROR); } catch (\Throwable $th) { @@ -192,7 +196,8 @@ class Microsoft extends OAuth2 protected function getClientSecret(): string { $secret = $this->getAppSecret(); - return (isset($secret['clientSecret'])) ? $secret['clientSecret'] : ''; + + return $secret['clientSecret'] ?? ''; } /** @@ -203,6 +208,7 @@ class Microsoft extends OAuth2 protected function getTenantID(): string { $secret = $this->getAppSecret(); - return (isset($secret['tenantID'])) ? $secret['tenantID'] : 'common'; + + return $secret['tenantID'] ?? 'common'; } } diff --git a/src/Appwrite/Auth/OAuth2/Mock.php b/src/Appwrite/Auth/OAuth2/Mock.php index aef92dac23..f80287947e 100644 --- a/src/Appwrite/Auth/OAuth2/Mock.php +++ b/src/Appwrite/Auth/OAuth2/Mock.php @@ -10,29 +10,29 @@ class Mock extends OAuth2 /** * @var string */ - protected $version = 'v1'; + protected string $version = 'v1'; /** * @var array */ - protected $scopes = [ + protected array $scopes = [ 'email' ]; /** * @var array */ - protected $user = []; - + protected array $user = []; + /** * @var array */ - protected $tokens = []; + protected array $tokens = []; /** * @return string */ - public function getName():string + public function getName(): string { return 'mock'; } @@ -40,9 +40,9 @@ class Mock extends OAuth2 /** * @return string */ - public function getLoginURL():string + public function getLoginURL(): string { - return 'http://localhost/'.$this->version.'/mock/tests/general/oauth2?'. \http_build_query([ + return 'http://localhost/' . $this->version . '/mock/tests/general/oauth2?' . \http_build_query([ 'client_id' => $this->appID, 'redirect_uri' => $this->callback, 'scope' => \implode(' ', $this->getScopes()), @@ -57,16 +57,16 @@ class Mock extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $this->tokens = \json_decode($this->request( 'GET', 'http://localhost/' . $this->version . '/mock/tests/general/oauth2/token?' . - \http_build_query([ - 'client_id' => $this->appID, - 'redirect_uri' => $this->callback, - 'client_secret' => $this->appSecret, - 'code' => $code - ]) + \http_build_query([ + 'client_id' => $this->appID, + 'redirect_uri' => $this->callback, + 'client_secret' => $this->appSecret, + 'code' => $code + ]) ), true); } @@ -78,20 +78,20 @@ class Mock extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $this->tokens = \json_decode($this->request( 'GET', 'http://localhost/' . $this->version . '/mock/tests/general/oauth2/token?' . - \http_build_query([ - 'client_id' => $this->appID, - 'client_secret' => $this->appSecret, - 'refresh_token' => $refreshToken, - 'grant_type' => 'refresh_token' - ]) + \http_build_query([ + 'client_id' => $this->appID, + 'client_secret' => $this->appSecret, + 'refresh_token' => $refreshToken, + 'grant_type' => 'refresh_token' + ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -103,15 +103,11 @@ class Mock extends OAuth2 * * @return string */ - public function getUserID(string $accessToken):string + public function getUserID(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['id'])) { - return $user['id']; - } - - return ''; + return $user['id'] ?? ''; } /** @@ -119,15 +115,23 @@ class Mock extends OAuth2 * * @return string */ - public function getUserEmail(string $accessToken):string + public function getUserEmail(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['email'])) { - return $user['email']; - } + return $user['email'] ?? ''; + } - return ''; + /** + * Check if the OAuth email is verified + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + return true; } /** @@ -135,15 +139,11 @@ class Mock extends OAuth2 * * @return string */ - public function getUserName(string $accessToken):string + public function getUserName(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['name'])) { - return $user['name']; - } - - return ''; + return $user['name'] ?? ''; } /** @@ -151,10 +151,10 @@ class Mock extends OAuth2 * * @return array */ - protected function getUser(string $accessToken):array + protected function getUser(string $accessToken): array { if (empty($this->user)) { - $user = $this->request('GET', 'http://localhost/'.$this->version.'/mock/tests/general/oauth2/user?token='.\urlencode($accessToken)); + $user = $this->request('GET', 'http://localhost/' . $this->version . '/mock/tests/general/oauth2/user?token=' . \urlencode($accessToken)); $this->user = \json_decode($user, true); } diff --git a/src/Appwrite/Auth/OAuth2/Notion.php b/src/Appwrite/Auth/OAuth2/Notion.php index 5c117caa3c..5d9d75bffd 100644 --- a/src/Appwrite/Auth/OAuth2/Notion.php +++ b/src/Appwrite/Auth/OAuth2/Notion.php @@ -9,32 +9,32 @@ class Notion extends OAuth2 /** * @var string */ - private $endpoint = 'https://api.notion.com/v1'; + private string $endpoint = 'https://api.notion.com/v1'; /** * @var string */ - private $version = '2021-08-16'; + private string $version = '2021-08-16'; /** * @var array */ - protected $user = []; - - /** - * @var array - */ - protected $tokens = []; + protected array $user = []; /** * @var array */ - protected $scopes = []; + protected array $tokens = []; + + /** + * @var array + */ + protected array $scopes = []; /** * @return string */ - public function getName():string + public function getName(): string { return 'notion'; } @@ -42,9 +42,9 @@ class Notion extends OAuth2 /** * @return string */ - public function getLoginURL():string + public function getLoginURL(): string { - return $this->endpoint . '/oauth/authorize?'. \http_build_query([ + return $this->endpoint . '/oauth/authorize?' . \http_build_query([ 'client_id' => $this->appID, 'redirect_uri' => $this->callback, 'response_type' => 'code', @@ -60,7 +60,7 @@ class Notion extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $headers = ['Authorization: Basic ' . \base64_encode($this->appID . ':' . $this->appSecret)]; $this->tokens = \json_decode($this->request( 'POST', @@ -82,7 +82,7 @@ class Notion extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $headers = ['Authorization: Basic ' . \base64_encode($this->appID . ':' . $this->appSecret)]; $this->tokens = \json_decode($this->request( @@ -95,7 +95,7 @@ class Notion extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -103,51 +103,55 @@ class Notion extends OAuth2 } /** - * @param $accessToken + * @param string $accessToken * * @return string */ - public function getUserID(string $accessToken):string + public function getUserID(string $accessToken): string { $response = $this->getUser($accessToken); - if (isset($response['bot']['owner']['user']['id'])) { - return $response['bot']['owner']['user']['id']; - } - - return ''; + return $response['bot']['owner']['user']['id'] ?? ''; } /** - * @param $accessToken + * @param string $accessToken * * @return string */ - public function getUserEmail(string $accessToken):string + public function getUserEmail(string $accessToken): string { $response = $this->getUser($accessToken); - if(isset($response['bot']['owner']['user']['person']['email'])){ - return $response['bot']['owner']['user']['person']['email']; - } - - return ''; + return $response['bot']['owner']['user']['person']['email'] ?? ''; } /** - * @param $accessToken + * Check if the OAuth email is verified + * + * If present, the email is verified. This was verfied through a manual Notion sign up process + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $email = $this->getUserEmail($accessToken); + + return !empty($email); + } + + /** + * @param string $accessToken * * @return string */ - public function getUserName(string $accessToken):string + public function getUserName(string $accessToken): string { $response = $this->getUser($accessToken); - if (isset($response['bot']['owner']['user']['name'])) { - return $response['bot']['owner']['user']['name']; - } - - return ''; + return $response['bot']['owner']['user']['name'] ?? ''; } /** @@ -155,11 +159,11 @@ class Notion extends OAuth2 * * @return array */ - protected function getUser(string $accessToken) + protected function getUser(string $accessToken): array { $headers = [ 'Notion-Version: ' . $this->version, - 'Authorization: Bearer '.\urlencode($accessToken) + 'Authorization: Bearer ' . \urlencode($accessToken) ]; if (empty($this->user)) { diff --git a/src/Appwrite/Auth/OAuth2/Okta.php b/src/Appwrite/Auth/OAuth2/Okta.php index 7b1b0d19e1..3de3df96d5 100644 --- a/src/Appwrite/Auth/OAuth2/Okta.php +++ b/src/Appwrite/Auth/OAuth2/Okta.php @@ -8,27 +8,27 @@ use Appwrite\Auth\OAuth2; // https://developer.okta.com/docs/guides/sign-into-web-app-redirect/php/main/ class Okta extends OAuth2 -{ - /** +{ + /** * @var array */ - protected $scopes = [ + protected array $scopes = [ 'openid', 'profile', 'email', 'offline_access' ]; - + /** * @var array */ - protected $user = []; - + protected array $user = []; + /** * @var array */ - protected $tokens = []; - + protected array $tokens = []; + /** * @return string */ @@ -42,11 +42,11 @@ class Okta extends OAuth2 */ public function getLoginURL(): string { - return 'https://'.$this->getOktaDomain().'/oauth2/'.$this->getAuthorizationServerId().'/v1/authorize?'.\http_build_query([ + return 'https://' . $this->getOktaDomain() . '/oauth2/' . $this->getAuthorizationServerId() . '/v1/authorize?' . \http_build_query([ 'client_id' => $this->appID, 'redirect_uri' => $this->callback, - 'state'=> \json_encode($this->state), - 'scope'=> \implode(' ', $this->getScopes()), + 'state' => \json_encode($this->state), + 'scope' => \implode(' ', $this->getScopes()), 'response_type' => 'code' ]); } @@ -58,11 +58,11 @@ class Okta extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $headers = ['Content-Type: application/x-www-form-urlencoded']; $this->tokens = \json_decode($this->request( 'POST', - 'https://'.$this->getOktaDomain().'/oauth2/'.$this->getAuthorizationServerId().'/v1/token', + 'https://' . $this->getOktaDomain() . '/oauth2/' . $this->getAuthorizationServerId() . '/v1/token', $headers, \http_build_query([ 'code' => $code, @@ -77,8 +77,8 @@ class Okta extends OAuth2 return $this->tokens; } - - + + /** * @param string $refreshToken * @@ -89,7 +89,7 @@ class Okta extends OAuth2 $headers = ['Content-Type: application/x-www-form-urlencoded']; $this->tokens = \json_decode($this->request( 'POST', - 'https://'.$this->getOktaDomain().'/oauth2/'.$this->getAuthorizationServerId().'/v1/token', + 'https://' . $this->getOktaDomain() . '/oauth2/' . $this->getAuthorizationServerId() . '/v1/token', $headers, \http_build_query([ 'refresh_token' => $refreshToken, @@ -99,7 +99,7 @@ class Okta extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -114,12 +114,8 @@ class Okta extends OAuth2 public function getUserID(string $accessToken): string { $user = $this->getUser($accessToken); - - if (isset($user['sub'])) { - return $user['sub']; - } - - return ''; + + return $user['sub'] ?? ''; } /** @@ -130,12 +126,28 @@ class Okta extends OAuth2 public function getUserEmail(string $accessToken): string { $user = $this->getUser($accessToken); - - if (isset($user['email'])) { - return $user['email']; + + return $user['email'] ?? ''; + } + + /** + * Check if the OAuth email is verified + * + * @link https://developer.okta.com/docs/reference/api/oidc/#userinfo + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $user = $this->getUser($accessToken); + + if ($user['email_verified'] ?? false) { + return true; } - - return ''; + + return false; } /** @@ -146,15 +158,11 @@ class Okta extends OAuth2 public function getUserName(string $accessToken): string { $user = $this->getUser($accessToken); - - if (isset($user['name'])) { - return $user['name']; - } - - return ''; + + return $user['name'] ?? ''; } - - /** + + /** * @param string $accessToken * * @return array @@ -162,8 +170,8 @@ class Okta extends OAuth2 protected function getUser(string $accessToken): array { if (empty($this->user)) { - $headers = ['Authorization: Bearer '. \urlencode($accessToken)]; - $user = $this->request('GET', 'https://'.$this->getOktaDomain().'/oauth2/'.$this->getAuthorizationServerId().'/v1/userinfo', $headers); + $headers = ['Authorization: Bearer ' . \urlencode($accessToken)]; + $user = $this->request('GET', 'https://' . $this->getOktaDomain() . '/oauth2/' . $this->getAuthorizationServerId() . '/v1/userinfo', $headers); $this->user = \json_decode($user, true); } @@ -179,10 +187,10 @@ class Okta extends OAuth2 { $secret = $this->getAppSecret(); - return (isset($secret['clientSecret'])) ? $secret['clientSecret'] : ''; + return $secret['clientSecret'] ?? ''; } - /** + /** * Extracts the Okta Domain from the JSON stored in appSecret * * @return string @@ -190,7 +198,8 @@ class Okta extends OAuth2 protected function getOktaDomain(): string { $secret = $this->getAppSecret(); - return (isset($secret['oktaDomain'])) ? $secret['oktaDomain'] : ''; + + return $secret['oktaDomain'] ?? ''; } /** @@ -201,7 +210,8 @@ class Okta extends OAuth2 protected function getAuthorizationServerId(): string { $secret = $this->getAppSecret(); - return (isset($secret['authorizationServerId'])) ? $secret['authorizationServerId'] : 'default'; + + return $secret['authorizationServerId'] ?? 'default'; } /** @@ -210,7 +220,7 @@ class Okta extends OAuth2 * @return array */ protected function getAppSecret(): array - { + { try { $secret = \json_decode($this->appSecret, true, 512, JSON_THROW_ON_ERROR); } catch (\Throwable $th) { diff --git a/src/Appwrite/Auth/OAuth2/Paypal.php b/src/Appwrite/Auth/OAuth2/Paypal.php index 39544c6bd8..74f4291594 100644 --- a/src/Appwrite/Auth/OAuth2/Paypal.php +++ b/src/Appwrite/Auth/OAuth2/Paypal.php @@ -12,7 +12,7 @@ class Paypal extends OAuth2 /** * @var array */ - private $endpoint = [ + private array $endpoint = [ 'sandbox' => 'https://www.sandbox.paypal.com/', 'live' => 'https://www.paypal.com/', ]; @@ -20,7 +20,7 @@ class Paypal extends OAuth2 /** * @var array */ - private $resourceEndpoint = [ + private array $resourceEndpoint = [ 'sandbox' => 'https://api.sandbox.paypal.com/v1/', 'live' => 'https://api.paypal.com/v1/', ]; @@ -28,22 +28,22 @@ class Paypal extends OAuth2 /** * @var string */ - protected $environment = 'live'; + protected string $environment = 'live'; /** * @var array */ - protected $user = []; - - /** - * @var array - */ - protected $tokens = []; + protected array $user = []; /** * @var array */ - protected $scopes = [ + protected array $tokens = []; + + /** + * @var array + */ + protected array $scopes = [ 'openid', 'profile', 'email' @@ -62,7 +62,7 @@ class Paypal extends OAuth2 */ public function getLoginURL(): string { - $url = $this->endpoint[$this->environment] . 'connect/?'. + $url = $this->endpoint[$this->environment] . 'connect/?' . \http_build_query([ 'flowEntry' => 'static', 'response_type' => 'code', @@ -83,7 +83,7 @@ class Paypal extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $this->tokens = \json_decode($this->request( 'POST', $this->resourceEndpoint[$this->environment] . 'oauth2/token', @@ -103,7 +103,7 @@ class Paypal extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $this->tokens = \json_decode($this->request( 'POST', @@ -115,7 +115,7 @@ class Paypal extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -131,11 +131,7 @@ class Paypal extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['payer_id'])) { - return $user['payer_id']; - } - - return ''; + return $user['payer_id'] ?? ''; } /** @@ -148,12 +144,38 @@ class Paypal extends OAuth2 $user = $this->getUser($accessToken); if (isset($user['emails'])) { - return $user['emails'][0]['value']; + $email = array_filter($user['emails'], function ($email) { + return $email['primary'] === true; + }); + + if (!empty($email)) { + return $email[0]['value']; + } } return ''; } + /** + * Check if the OAuth email is verified + * + * @link https://developer.paypal.com/docs/api/identity/v1/#userinfo_get + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $user = $this->getUser($accessToken); + + if ($user['verified_account'] ?? false) { + return true; + } + + return false; + } + /** * @param string $accessToken * @@ -163,11 +185,7 @@ class Paypal extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['name'])) { - return $user['name']; - } - - return ''; + return $user['name'] ?? ''; } /** @@ -179,7 +197,7 @@ class Paypal extends OAuth2 { $header = [ 'Content-Type: application/json', - 'Authorization: Bearer '.\urlencode($accessToken), + 'Authorization: Bearer ' . \urlencode($accessToken), ]; if (empty($this->user)) { $user = $this->request( diff --git a/src/Appwrite/Auth/OAuth2/PaypalSandbox.php b/src/Appwrite/Auth/OAuth2/PaypalSandbox.php index 82698555d4..0f56a09c21 100644 --- a/src/Appwrite/Auth/OAuth2/PaypalSandbox.php +++ b/src/Appwrite/Auth/OAuth2/PaypalSandbox.php @@ -6,7 +6,7 @@ use Appwrite\Auth\OAuth2\Paypal; class PaypalSandbox extends Paypal { - protected $environment = 'sandbox'; + protected string $environment = 'sandbox'; /** * @return string diff --git a/src/Appwrite/Auth/OAuth2/Salesforce.php b/src/Appwrite/Auth/OAuth2/Salesforce.php index 04ef1901b5..636c3f4c3c 100644 --- a/src/Appwrite/Auth/OAuth2/Salesforce.php +++ b/src/Appwrite/Auth/OAuth2/Salesforce.php @@ -14,17 +14,17 @@ class Salesforce extends OAuth2 /** * @var array */ - protected $user = []; - - /** - * @var array - */ - protected $tokens = []; + protected array $user = []; /** * @var array */ - protected $scopes = [ + protected array $tokens = []; + + /** + * @var array + */ + protected array $scopes = [ "openid" ]; @@ -37,7 +37,7 @@ class Salesforce extends OAuth2 } /** - * @param $state + * @param string $state * * @return array */ @@ -52,13 +52,13 @@ class Salesforce extends OAuth2 */ public function getLoginURL(): string { - return 'https://login.salesforce.com/services/oauth2/authorize?'.\http_build_query([ - 'response_type' => 'code', - 'client_id' => $this->appID, - 'redirect_uri'=> $this->callback, - 'scope'=> \implode(' ', $this->getScopes()), - 'state' => \json_encode($this->state) - ]); + return 'https://login.salesforce.com/services/oauth2/authorize?' . \http_build_query([ + 'response_type' => 'code', + 'client_id' => $this->appID, + 'redirect_uri' => $this->callback, + 'scope' => \implode(' ', $this->getScopes()), + 'state' => \json_encode($this->state) + ]); } /** @@ -68,7 +68,7 @@ class Salesforce extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $headers = [ 'Authorization: Basic ' . \base64_encode($this->appID . ':' . $this->appSecret), 'Content-Type: application/x-www-form-urlencoded', @@ -93,7 +93,7 @@ class Salesforce extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $headers = [ 'Authorization: Basic ' . \base64_encode($this->appID . ':' . $this->appSecret), @@ -109,7 +109,7 @@ class Salesforce extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -125,11 +125,7 @@ class Salesforce extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['user_id'])) { - return $user['user_id']; - } - - return ''; + return $user['user_id'] ?? ''; } /** @@ -141,11 +137,27 @@ class Salesforce extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['email'])) { - return $user['email']; + return $user['email'] ?? ''; + } + + /** + * Check if the OAuth email is verified + * + * @link https://help.salesforce.com/s/articleView?id=sf.remoteaccess_using_userinfo_endpoint.htm&type=5 + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $user = $this->getUser($accessToken); + + if ($user['email_verified'] ?? false) { + return true; } - return ''; + return false; } /** @@ -157,11 +169,7 @@ class Salesforce extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['name'])) { - return $user['name']; - } - - return ''; + return $user['name'] ?? ''; } /** @@ -172,7 +180,7 @@ class Salesforce extends OAuth2 protected function getUser(string $accessToken): array { if (empty($this->user)) { - $user = $this->request('GET', 'https://login.salesforce.com/services/oauth2/userinfo?access_token='.\urlencode($accessToken)); + $user = $this->request('GET', 'https://login.salesforce.com/services/oauth2/userinfo?access_token=' . \urlencode($accessToken)); $this->user = \json_decode($user, true); } return $this->user; diff --git a/src/Appwrite/Auth/OAuth2/Slack.php b/src/Appwrite/Auth/OAuth2/Slack.php index 92c210151b..c8adfdd697 100644 --- a/src/Appwrite/Auth/OAuth2/Slack.php +++ b/src/Appwrite/Auth/OAuth2/Slack.php @@ -3,24 +3,23 @@ namespace Appwrite\Auth\OAuth2; use Appwrite\Auth\OAuth2; -use Utopia\Exception; class Slack extends OAuth2 { /** * @var array */ - protected $user = []; - - /** - * @var array - */ - protected $tokens = []; + protected array $user = []; /** * @var array */ - protected $scopes = [ + protected array $tokens = []; + + /** + * @var array + */ + protected array $scopes = [ 'identity.avatar', 'identity.basic', 'identity.email', @@ -30,7 +29,7 @@ class Slack extends OAuth2 /** * @return string */ - public function getName():string + public function getName(): string { return 'slack'; } @@ -38,11 +37,11 @@ class Slack extends OAuth2 /** * @return string */ - public function getLoginURL():string + public function getLoginURL(): string { // https://api.slack.com/docs/oauth#step_1_-_sending_users_to_authorize_and_or_install - return 'https://slack.com/oauth/authorize?'.\http_build_query([ - 'client_id'=> $this->appID, + return 'https://slack.com/oauth/authorize?' . \http_build_query([ + 'client_id' => $this->appID, 'scope' => \implode(' ', $this->getScopes()), 'redirect_uri' => $this->callback, 'state' => \json_encode($this->state) @@ -56,7 +55,7 @@ class Slack extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { // https://api.slack.com/docs/oauth#step_3_-_exchanging_a_verification_code_for_an_access_token $this->tokens = \json_decode($this->request( 'GET', @@ -77,7 +76,7 @@ class Slack extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $this->tokens = \json_decode($this->request( 'GET', @@ -89,7 +88,7 @@ class Slack extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -101,15 +100,11 @@ class Slack extends OAuth2 * * @return string */ - public function getUserID(string $accessToken):string + public function getUserID(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['user']['id'])) { - return $user['user']['id']; - } - - return ''; + return $user['user']['id'] ?? ''; } /** @@ -117,15 +112,29 @@ class Slack extends OAuth2 * * @return string */ - public function getUserEmail(string $accessToken):string + public function getUserEmail(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['user']['email'])) { - return $user['user']['email']; - } + return $user['user']['email'] ?? ''; + } - return ''; + /** + * Check if the OAuth email is verified + * + * If present, the email is verified. This was verfied through a manual Slack sign up process + * + * @link https://slack.com/help/articles/207262907-Change-your-email-address + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $email = $this->getUserEmail($accessToken); + + return !empty($email); } /** @@ -133,29 +142,26 @@ class Slack extends OAuth2 * * @return string */ - public function getUserName(string $accessToken):string + public function getUserName(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['user']['name'])) { - return $user['user']['name']; - } - - return ''; + return $user['user']['name'] ?? ''; } /** + * @link https://api.slack.com/methods/users.identity + * * @param string $accessToken * * @return array */ - protected function getUser(string $accessToken):array + protected function getUser(string $accessToken): array { if (empty($this->user)) { - // https://api.slack.com/methods/users.identity $user = $this->request( 'GET', - 'https://slack.com/api/users.identity?token='.\urlencode($accessToken) + 'https://slack.com/api/users.identity?token=' . \urlencode($accessToken) ); $this->user = \json_decode($user, true); diff --git a/src/Appwrite/Auth/OAuth2/Spotify.php b/src/Appwrite/Auth/OAuth2/Spotify.php index 5c1a43299a..98f4226d84 100644 --- a/src/Appwrite/Auth/OAuth2/Spotify.php +++ b/src/Appwrite/Auth/OAuth2/Spotify.php @@ -13,34 +13,34 @@ class Spotify extends OAuth2 /** * @var string */ - private $endpoint = 'https://accounts.spotify.com/'; + private string $endpoint = 'https://accounts.spotify.com/'; /** * @var string */ - private $resourceEndpoint = 'https://api.spotify.com/v1/'; + private string $resourceEndpoint = 'https://api.spotify.com/v1/'; /** * @var array */ - protected $scopes = [ + protected array $scopes = [ 'user-read-email', ]; /** * @var array */ - protected $user = []; - + protected array $user = []; + /** * @var array */ - protected $tokens = []; + protected array $tokens = []; /** * @return string */ - public function getName():string + public function getName(): string { return 'spotify'; } @@ -48,9 +48,9 @@ class Spotify extends OAuth2 /** * @return string */ - public function getLoginURL():string + public function getLoginURL(): string { - return $this->endpoint . 'authorize?'. + return $this->endpoint . 'authorize?' . \http_build_query([ 'response_type' => 'code', 'client_id' => $this->appID, @@ -67,7 +67,7 @@ class Spotify extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $headers = ['Authorization: Basic ' . \base64_encode($this->appID . ':' . $this->appSecret)]; $this->tokens = \json_decode($this->request( 'POST', @@ -89,7 +89,7 @@ class Spotify extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $headers = ['Authorization: Basic ' . \base64_encode($this->appID . ':' . $this->appSecret)]; $this->tokens = \json_decode($this->request( @@ -102,7 +102,7 @@ class Spotify extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -110,51 +110,55 @@ class Spotify extends OAuth2 } /** - * @param $accessToken + * @param string $accessToken * * @return string */ - public function getUserID(string $accessToken):string + public function getUserID(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['id'])) { - return $user['id']; - } - - return ''; + return $user['id'] ?? ''; } /** - * @param $accessToken + * @param string $accessToken * * @return string */ - public function getUserEmail(string $accessToken):string + public function getUserEmail(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['email'])) { - return $user['email']; - } - - return ''; + return $user['email'] ?? ''; } /** - * @param $accessToken + * Check if the OAuth email is verified + * + * Spotify does not assure that the email is verified + * + * @link https://developer.spotify.com/documentation/web-api/reference/#/operations/get-current-users-profile + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + return false; + } + + /** + * @param string $accessToken * * @return string */ - public function getUserName(string $accessToken):string + public function getUserName(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['display_name'])) { - return $user['display_name']; - } - - return ''; + return $user['display_name'] ?? ''; } /** @@ -167,8 +171,8 @@ class Spotify extends OAuth2 if (empty($this->user)) { $this->user = \json_decode($this->request( 'GET', - $this->resourceEndpoint . "me", - ['Authorization: Bearer '.\urlencode($accessToken)] + $this->resourceEndpoint . 'me', + ['Authorization: Bearer ' . \urlencode($accessToken)] ), true); } diff --git a/src/Appwrite/Auth/OAuth2/Stripe.php b/src/Appwrite/Auth/OAuth2/Stripe.php index 589e6b7b81..e2ca3a92ba 100644 --- a/src/Appwrite/Auth/OAuth2/Stripe.php +++ b/src/Appwrite/Auth/OAuth2/Stripe.php @@ -10,38 +10,37 @@ class Stripe extends OAuth2 /** * @var array */ - protected $user = []; - + protected array $user = []; + /** * @var array */ - protected $tokens = []; + protected array $tokens = []; /** * @var string */ - protected $stripeAccountId = ''; + protected string $stripeAccountId = ''; /** * @var array */ - protected $scopes = [ + protected array $scopes = [ 'read_write', ]; - /** - * @return string + /** + * @var array */ - - protected $grantType = [ - 'authorize' => 'authorization_code', - 'refresh' => 'refresh_token', + protected array $grantType = [ + 'authorize' => 'authorization_code', + 'refresh' => 'refresh_token', ]; /** * @return string */ - public function getName():string + public function getName(): string { return 'stripe'; } @@ -49,9 +48,9 @@ class Stripe extends OAuth2 /** * @return string */ - public function getLoginURL():string + public function getLoginURL(): string { - return 'https://connect.stripe.com/oauth/authorize?'. \http_build_query([ + return 'https://connect.stripe.com/oauth/authorize?' . \http_build_query([ 'response_type' => 'code', // The only option at the moment is "code." 'client_id' => $this->appID, 'redirect_uri' => $this->callback, @@ -67,7 +66,7 @@ class Stripe extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $this->tokens = \json_decode($this->request( 'POST', 'https://connect.stripe.com/oauth/token', @@ -89,7 +88,7 @@ class Stripe extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $this->tokens = \json_decode($this->request( 'POST', @@ -101,7 +100,7 @@ class Stripe extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -110,51 +109,59 @@ class Stripe extends OAuth2 } /** - * @param $accessToken + * @param string $accessToken * * @return string */ - public function getUserID(string $accessToken):string + public function getUserID(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['id'])) { - return $user['id']; - } - - return ''; + return $user['id'] ?? ''; } /** - * @param $accessToken + * @param string $accessToken * * @return string */ - public function getUserEmail(string $accessToken):string + public function getUserEmail(string $accessToken): string { $user = $this->getUser($accessToken); - - if(empty($user)) { - return ''; + + if (empty($user)) { + return ''; } return $user['email'] ?? ''; } /** - * @param $accessToken + * Check if the OAuth email is verified + * + * If present, the email is verified. This was verfied through a manual Stripe sign up process + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $email = $this->getUserEmail($accessToken); + + return !empty($email); + } + + /** + * @param string $accessToken * * @return string */ - public function getUserName(string $accessToken):string + public function getUserName(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['name'])) { - return $user['name']; - } - - return ''; + return $user['name'] ?? ''; } /** @@ -166,15 +173,13 @@ class Stripe extends OAuth2 { if (empty($this->user) && !empty($this->stripeAccountId)) { $this->user = \json_decode( - $this->request( - 'GET', - 'https://api.stripe.com/v1/accounts/' . $this->stripeAccountId, - ['Authorization: Bearer '.\urlencode($accessToken)] - ), - true + $this->request( + 'GET', + 'https://api.stripe.com/v1/accounts/' . $this->stripeAccountId, + ['Authorization: Bearer ' . \urlencode($accessToken)] + ), + true ); - - } return $this->user; diff --git a/src/Appwrite/Auth/OAuth2/Tradeshift.php b/src/Appwrite/Auth/OAuth2/Tradeshift.php index 38b58432a0..8fdcde5f29 100644 --- a/src/Appwrite/Auth/OAuth2/Tradeshift.php +++ b/src/Appwrite/Auth/OAuth2/Tradeshift.php @@ -12,35 +12,37 @@ class Tradeshift extends OAuth2 const TRADESHIFT_SANDBOX_API_DOMAIN = 'api-sandbox.tradeshift.com'; const TRADESHIFT_API_DOMAIN = 'api.tradeshift.com'; - private $apiDomain = [ + private array $apiDomain = [ 'sandbox' => self::TRADESHIFT_SANDBOX_API_DOMAIN, 'live' => self::TRADESHIFT_API_DOMAIN, ]; - private $endpoint = [ + private array $endpoint = [ 'sandbox' => 'https://' . self::TRADESHIFT_SANDBOX_API_DOMAIN . '/tradeshift/', 'live' => 'https://' . self::TRADESHIFT_API_DOMAIN . '/tradeshift/', ]; - private $resourceEndpoint = [ + private array $resourceEndpoint = [ 'sandbox' => 'https://' . self::TRADESHIFT_SANDBOX_API_DOMAIN . '/tradeshift/rest/external/', 'live' => 'https://' . self::TRADESHIFT_API_DOMAIN . '/tradeshift/rest/external/', ]; - protected $environment = 'live'; + protected string $environment = 'live'; /** * @var array */ - protected $user = []; - + protected array $user = []; + /** * @var array */ - protected $tokens = []; + protected array $tokens = []; - - protected $scopes = [ + /** + * @var array + */ + protected array$scopes = [ 'openid', 'offline', ]; @@ -78,7 +80,7 @@ class Tradeshift extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $this->tokens = \json_decode($this->request( 'POST', $this->endpoint[$this->environment] . 'auth/token', @@ -98,7 +100,7 @@ class Tradeshift extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $this->tokens = \json_decode($this->request( 'POST', @@ -109,8 +111,8 @@ class Tradeshift extends OAuth2 'refresh_token' => $refreshToken, ]) ), true); - - if(empty($this->tokens['refresh_token'])) { + + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -141,6 +143,22 @@ class Tradeshift extends OAuth2 return $user['Username'] ?? ''; } + /** + * Check if the OAuth email is verified + * + * If present, the email is verified. This was verfied through a manual Tradeshift sign up process + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $email = $this->getUser($accessToken); + + return !empty($email); + } + /** * @param string $accessToken * diff --git a/src/Appwrite/Auth/OAuth2/TradeshiftBox.php b/src/Appwrite/Auth/OAuth2/TradeshiftBox.php index 6ba3c29f0a..27a4c0a456 100644 --- a/src/Appwrite/Auth/OAuth2/TradeshiftBox.php +++ b/src/Appwrite/Auth/OAuth2/TradeshiftBox.php @@ -6,7 +6,7 @@ use Appwrite\Auth\OAuth2\Tradeshift; class TradeshiftBox extends Tradeshift { - protected $environment = 'sandbox'; + protected string $environment = 'sandbox'; /** * @return string diff --git a/src/Appwrite/Auth/OAuth2/Twitch.php b/src/Appwrite/Auth/OAuth2/Twitch.php index 0deeb088e2..04e542ffb9 100644 --- a/src/Appwrite/Auth/OAuth2/Twitch.php +++ b/src/Appwrite/Auth/OAuth2/Twitch.php @@ -13,34 +13,34 @@ class Twitch extends OAuth2 /** * @var string */ - private $endpoint = 'https://id.twitch.tv/oauth2/'; + private string $endpoint = 'https://id.twitch.tv/oauth2/'; /** * @var string */ - private $resourceEndpoint = 'https://api.twitch.tv/helix/users'; + private string $resourceEndpoint = 'https://api.twitch.tv/helix/users'; /** * @var array */ - protected $scopes = [ + protected array $scopes = [ 'user:read:email', ]; /** * @var array */ - protected $user = []; - + protected array $user = []; + /** * @var array */ - protected $tokens = []; + protected array $tokens = []; /** * @return string */ - public function getName():string + public function getName(): string { return 'twitch'; } @@ -48,9 +48,9 @@ class Twitch extends OAuth2 /** * @return string */ - public function getLoginURL():string + public function getLoginURL(): string { - return $this->endpoint . 'authorize?'. + return $this->endpoint . 'authorize?' . \http_build_query([ 'response_type' => 'code', 'client_id' => $this->appID, @@ -68,7 +68,7 @@ class Twitch extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $this->tokens = \json_decode($this->request( 'POST', $this->endpoint . 'token?' . \http_build_query([ @@ -89,7 +89,7 @@ class Twitch extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $this->tokens = \json_decode($this->request( 'POST', @@ -101,7 +101,7 @@ class Twitch extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -109,51 +109,57 @@ class Twitch extends OAuth2 } /** - * @param $accessToken + * @param string $accessToken * * @return string */ - public function getUserID(string $accessToken):string + public function getUserID(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['id'])) { - return $user['id']; - } - - return ''; + return $user['id'] ?? ''; } /** - * @param $accessToken + * @param string $accessToken * * @return string */ - public function getUserEmail(string $accessToken):string + public function getUserEmail(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['email'])) { - return $user['email']; - } - - return ''; + return $user['email'] ?? ''; } /** - * @param $accessToken + * Check if the OAuth email is verified + * + * If present, the email is verified + * + * @link https://dev.twitch.tv/docs/api/reference#get-users + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $email = $this->getUserEmail($accessToken); + + return !empty($email); + } + + /** + * @param string $accessToken * * @return string */ - public function getUserName(string $accessToken):string + public function getUserName(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['display_name'])) { - return $user['display_name']; - } - - return ''; + return $user['display_name'] ?? ''; } /** @@ -168,8 +174,8 @@ class Twitch extends OAuth2 'GET', $this->resourceEndpoint, [ - 'Authorization: Bearer '.\urlencode($accessToken), - 'Client-Id: '. \urlencode($this->appID) + 'Authorization: Bearer ' . \urlencode($accessToken), + 'Client-Id: ' . \urlencode($this->appID) ] ), true); diff --git a/src/Appwrite/Auth/OAuth2/Vk.php b/src/Appwrite/Auth/OAuth2/Vk.php deleted file mode 100644 index 5e54b14394..0000000000 --- a/src/Appwrite/Auth/OAuth2/Vk.php +++ /dev/null @@ -1,191 +0,0 @@ - $this->appID, - 'redirect_uri' => $this->callback, - 'response_type' => 'code', - 'state' => \json_encode($this->state), - 'v' => $this->version, - 'scope' => \implode(' ', $this->getScopes()) - ]); - } - - /** - * @param string $code - * - * @return array - */ - protected function getTokens(string $code): array - { - if(empty($this->tokens)) { - $headers = ['Content-Type: application/x-www-form-urlencoded;charset=UTF-8']; - $this->tokens = \json_decode($this->request( - 'POST', - 'https://oauth.vk.com/access_token?', - $headers, - \http_build_query([ - 'code' => $code, - 'client_id' => $this->appID, - 'client_secret' => $this->appSecret, - 'redirect_uri' => $this->callback - ]) - ), true); - - $this->user['email'] = $this->tokens['email']; - $this->user['user_id'] = $this->tokens['user_id']; - } - - return $this->tokens; - } - - /** - * @param string $refreshToken - * - * @return array - */ - public function refreshTokens(string $refreshToken):array - { - $headers = ['Content-Type: application/x-www-form-urlencoded;charset=UTF-8']; - $this->tokens = \json_decode($this->request( - 'POST', - 'https://oauth.vk.com/access_token?', - $headers, - \http_build_query([ - 'refresh_token' => $refreshToken, - 'client_id' => $this->appID, - 'client_secret' => $this->appSecret, - 'grant_type' => 'refresh_token' - ]) - ), true); - - if(empty($this->tokens['refresh_token'])) { - $this->tokens['refresh_token'] = $refreshToken; - } - - $this->user['email'] = $this->tokens['email']; - $this->user['user_id'] = $this->tokens['user_id']; - - return $this->tokens; - } - - /** - * @param string $accessToken - * - * @return string - */ - public function getUserID(string $accessToken): string - { - $user = $this->getUser($accessToken); - - if (isset($user['user_id'])) { - return $user['user_id']; - } - - return ''; - } - - /** - * @param string $accessToken - * - * @return string - */ - public function getUserEmail(string $accessToken): string - { - $user = $this->getUser($accessToken); - - if (isset($user['email'])) { - return $user['email']; - } - - return ''; - } - - /** - * @param string $accessToken - * - * @return string - */ - public function getUserName(string $accessToken): string - { - $user = $this->getUser($accessToken); - - if (isset($user['name'])) { - return $user['name']; - } - - return ''; - } - - /** - * @param string $accessToken - * - * @return array - */ - protected function getUser(string $accessToken): array - { - if (empty($this->user['name'])) { - $user = $this->request( - 'GET', - 'https://api.vk.com/method/users.get?'. \http_build_query([ - 'v' => $this->version, - 'fields' => 'id,name,email,first_name,last_name', - 'access_token' => $accessToken - ]) - ); - - $user = \json_decode($user, true); - $this->user['name'] = $user['response'][0]['first_name'] ." ".$user['response'][0]['last_name']; - } - return $this->user; - } -} diff --git a/src/Appwrite/Auth/OAuth2/WordPress.php b/src/Appwrite/Auth/OAuth2/WordPress.php index 5b957d9495..6c1aade1de 100644 --- a/src/Appwrite/Auth/OAuth2/WordPress.php +++ b/src/Appwrite/Auth/OAuth2/WordPress.php @@ -12,24 +12,24 @@ class WordPress extends OAuth2 /** * @var array */ - protected $user = []; - - /** - * @var array - */ - protected $tokens = []; + protected array $user = []; /** * @var array */ - protected $scopes = [ + protected array $tokens = []; + + /** + * @var array + */ + protected array $scopes = [ 'auth', ]; /** * @return string */ - public function getName():string + public function getName(): string { return 'wordpress'; } @@ -37,9 +37,9 @@ class WordPress extends OAuth2 /** * @return string */ - public function getLoginURL():string + public function getLoginURL(): string { - return 'https://public-api.wordpress.com/oauth2/authorize?'. \http_build_query([ + return 'https://public-api.wordpress.com/oauth2/authorize?' . \http_build_query([ 'client_id' => $this->appID, 'redirect_uri' => $this->callback, 'response_type' => 'code', @@ -55,7 +55,7 @@ class WordPress extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $this->tokens = \json_decode($this->request( 'POST', 'https://public-api.wordpress.com/oauth2/token', @@ -78,7 +78,7 @@ class WordPress extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $this->tokens = \json_decode($this->request( 'POST', @@ -92,7 +92,7 @@ class WordPress extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -100,51 +100,63 @@ class WordPress extends OAuth2 } /** - * @param $accessToken + * @param string $accessToken * * @return string */ - public function getUserID(string $accessToken):string + public function getUserID(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['ID'])) { - return $user['ID']; + return $user['ID'] ?? ''; + } + + /** + * @param string $accessToken + * + * @return string + */ + public function getUserEmail(string $accessToken): string + { + $user = $this->getUser($accessToken); + + if ($user['verified']) { + return $user['email'] ?? ''; } return ''; } /** - * @param $accessToken - * - * @return string + * Check if the OAuth email is verified + * + * @link https://developer.wordpress.com/docs/api/1.1/get/me/ + * + * @param string $accessToken + * + * @return bool */ - public function getUserEmail(string $accessToken):string + public function isEmailVerified(string $accessToken): bool { $user = $this->getUser($accessToken); - if (isset($user['email']) && $user['verified']) { - return $user['email']; + if ($user['email_verified'] ?? false) { + return true; } - return ''; + return false; } /** - * @param $accessToken + * @param string $accessToken * * @return string */ - public function getUserName(string $accessToken):string + public function getUserName(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['username'])) { - return $user['username']; - } - - return ''; + return $user['username'] ?? ''; } /** @@ -155,7 +167,7 @@ class WordPress extends OAuth2 protected function getUser(string $accessToken) { if (empty($this->user)) { - $this->user = \json_decode($this->request('GET', 'https://public-api.wordpress.com/rest/v1/me', ['Authorization: Bearer '.$accessToken]), true); + $this->user = \json_decode($this->request('GET', 'https://public-api.wordpress.com/rest/v1/me', ['Authorization: Bearer ' . $accessToken]), true); } return $this->user; diff --git a/src/Appwrite/Auth/OAuth2/Yahoo.php b/src/Appwrite/Auth/OAuth2/Yahoo.php index ffefbe9c63..d8abbbfd69 100644 --- a/src/Appwrite/Auth/OAuth2/Yahoo.php +++ b/src/Appwrite/Auth/OAuth2/Yahoo.php @@ -13,17 +13,17 @@ class Yahoo extends OAuth2 /** * @var string */ - private $endpoint = 'https://api.login.yahoo.com/oauth2/'; + private string $endpoint = 'https://api.login.yahoo.com/oauth2/'; /** * @var string */ - private $resourceEndpoint = 'https://api.login.yahoo.com/openid/v1/userinfo'; + private string $resourceEndpoint = 'https://api.login.yahoo.com/openid/v1/userinfo'; /** * @var array */ - protected $scopes = [ + protected array $scopes = [ 'sdct-r', 'sdpp-w', ]; @@ -31,17 +31,17 @@ class Yahoo extends OAuth2 /** * @var array */ - protected $user = []; - + protected array $user = []; + /** * @var array */ - protected $tokens = []; + protected array $tokens = []; /** * @return string */ - public function getName():string + public function getName(): string { return 'yahoo'; } @@ -60,9 +60,9 @@ class Yahoo extends OAuth2 /** * @return string */ - public function getLoginURL():string + public function getLoginURL(): string { - return $this->endpoint . 'request_auth?'. + return $this->endpoint . 'request_auth?' . \http_build_query([ 'response_type' => 'code', 'client_id' => $this->appID, @@ -79,7 +79,7 @@ class Yahoo extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $headers = [ 'Authorization: Basic ' . \base64_encode($this->appID . ':' . $this->appSecret), 'Content-Type: application/x-www-form-urlencoded', @@ -105,7 +105,7 @@ class Yahoo extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $headers = [ 'Authorization: Basic ' . \base64_encode($this->appID . ':' . $this->appSecret), @@ -122,7 +122,7 @@ class Yahoo extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -130,51 +130,55 @@ class Yahoo extends OAuth2 } /** - * @param $accessToken + * @param string $accessToken * * @return string */ - public function getUserID(string $accessToken):string + public function getUserID(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['sub'])) { - return $user['sub']; - } - - return ''; + return $user['sub'] ?? ''; } /** - * @param $accessToken + * @param string $accessToken * * @return string */ - public function getUserEmail(string $accessToken):string + public function getUserEmail(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['email'])) { - return $user['email']; - } - - return ''; + return $user['email'] ?? ''; } /** - * @param $accessToken + * Check if the OAuth email is verified + * + * If present, the email is verified. This was verfied through a manual Yahoo sign up process + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $email = $this->getUserEmail($accessToken); + + return !empty($email); + } + + /** + * @param string $accessToken * * @return string */ - public function getUserName(string $accessToken):string + public function getUserName(string $accessToken): string { $user = $this->getUser($accessToken); - if (isset($user['name'])) { - return $user['name']; - } - - return ''; + return $user['name'] ?? ''; } /** @@ -188,7 +192,7 @@ class Yahoo extends OAuth2 $this->user = \json_decode($this->request( 'GET', $this->resourceEndpoint, - ['Authorization: Bearer '.\urlencode($accessToken)] + ['Authorization: Bearer ' . \urlencode($accessToken)] ), true); } diff --git a/src/Appwrite/Auth/OAuth2/Yammer.php b/src/Appwrite/Auth/OAuth2/Yammer.php index 6e9f4fb86b..80bd44b244 100644 --- a/src/Appwrite/Auth/OAuth2/Yammer.php +++ b/src/Appwrite/Auth/OAuth2/Yammer.php @@ -12,17 +12,17 @@ class Yammer extends OAuth2 /** * @var string */ - private $endpoint = 'https://www.yammer.com/oauth2/'; + private string $endpoint = 'https://www.yammer.com/oauth2/'; /** * @var array */ - protected $user = []; - + protected array $user = []; + /** * @var array */ - protected $tokens = []; + protected array $tokens = []; /** * @return string @@ -37,13 +37,13 @@ class Yammer extends OAuth2 */ public function getLoginURL(): string { - return $this->endpoint . 'oauth2/authorize?'. - \http_build_query([ - 'client_id' => $this->appID, - 'response_type' => 'code', - 'redirect_uri' => $this->callback, - 'state' => \json_encode($this->state) - ]); + return $this->endpoint . 'oauth2/authorize?' . + \http_build_query([ + 'client_id' => $this->appID, + 'response_type' => 'code', + 'redirect_uri' => $this->callback, + 'state' => \json_encode($this->state) + ]); } /** @@ -53,7 +53,7 @@ class Yammer extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $headers = ['Content-Type: application/x-www-form-urlencoded']; $this->tokens = \json_decode($this->request( 'POST', @@ -76,7 +76,7 @@ class Yammer extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $headers = ['Content-Type: application/x-www-form-urlencoded']; $this->tokens = \json_decode($this->request( @@ -91,7 +91,7 @@ class Yammer extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -107,11 +107,7 @@ class Yammer extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['id'])) { - return $user['id']; - } - - return ''; + return $user['id'] ?? ''; } /** @@ -123,11 +119,23 @@ class Yammer extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['email'])) { - return $user['email']; - } - - return ''; + return $user['email'] ?? ''; + } + + /** + * Check if the OAuth email is verified + * + * If present, the email is verified. This was verfied through a manual Yammer sign up process + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $email = $this->getUserEmail($accessToken); + + return !empty($email); } /** @@ -139,11 +147,7 @@ class Yammer extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['full_name'])) { - return $user['full_name']; - } - - return ''; + return $user['full_name'] ?? ''; } /** @@ -154,7 +158,7 @@ class Yammer extends OAuth2 protected function getUser(string $accessToken): array { if (empty($this->user)) { - $headers = ['Authorization: Bearer '. \urlencode($accessToken)]; + $headers = ['Authorization: Bearer ' . \urlencode($accessToken)]; $user = $this->request('GET', 'https://www.yammer.com/api/v1/users/current.json', $headers); $this->user = \json_decode($user, true); } diff --git a/src/Appwrite/Auth/OAuth2/Yandex.php b/src/Appwrite/Auth/OAuth2/Yandex.php index 1f6dda0d1b..efab408275 100644 --- a/src/Appwrite/Auth/OAuth2/Yandex.php +++ b/src/Appwrite/Auth/OAuth2/Yandex.php @@ -14,17 +14,17 @@ class Yandex extends OAuth2 /** * @var array */ - protected $user = []; - - /** - * @var array - */ - protected $tokens = []; + protected array $user = []; /** * @var array */ - protected $scopes = []; + protected array $tokens = []; + + /** + * @var array + */ + protected array $scopes = []; /** * @return string @@ -35,7 +35,7 @@ class Yandex extends OAuth2 } /** - * @param $state + * @param string $state * * @return array */ @@ -50,12 +50,12 @@ class Yandex extends OAuth2 */ public function getLoginURL(): string { - return 'https://oauth.yandex.com/authorize?'.\http_build_query([ - 'response_type' => 'code', - 'client_id' => $this->appID, - 'scope'=> \implode(' ', $this->getScopes()), - 'state' => \json_encode($this->state) - ]); + return 'https://oauth.yandex.com/authorize?' . \http_build_query([ + 'response_type' => 'code', + 'client_id' => $this->appID, + 'scope' => \implode(' ', $this->getScopes()), + 'state' => \json_encode($this->state) + ]); } /** @@ -65,7 +65,7 @@ class Yandex extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $headers = [ 'Authorization: Basic ' . \base64_encode($this->appID . ':' . $this->appSecret), 'Content-Type: application/x-www-form-urlencoded', @@ -89,7 +89,7 @@ class Yandex extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $headers = [ 'Authorization: Basic ' . \base64_encode($this->appID . ':' . $this->appSecret), @@ -105,7 +105,7 @@ class Yandex extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -121,11 +121,7 @@ class Yandex extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['id'])) { - return $user['id']; - } - - return ''; + return $user['id'] ?? ''; } /** @@ -137,11 +133,19 @@ class Yandex extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['default_email'])) { - return $user['default_email']; - } + return $user['default_email'] ?? ''; + } - return ''; + /** + * Check if the OAuth email is verified + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + return false; } /** @@ -153,11 +157,7 @@ class Yandex extends OAuth2 { $user = $this->getUser($accessToken); - if (isset($user['display_name'])) { - return $user['display_name']; - } - - return ''; + return $user['display_name'] ?? ''; } /** @@ -168,7 +168,7 @@ class Yandex extends OAuth2 protected function getUser(string $accessToken): array { if (empty($this->user)) { - $user = $this->request('GET', 'https://login.yandex.ru/info?'.\http_build_query([ + $user = $this->request('GET', 'https://login.yandex.ru/info?' . \http_build_query([ 'format' => 'json', 'oauth_token' => $accessToken ])); diff --git a/src/Appwrite/Auth/OAuth2/Zoom.php b/src/Appwrite/Auth/OAuth2/Zoom.php index 9aa77ceb91..ee4185934c 100644 --- a/src/Appwrite/Auth/OAuth2/Zoom.php +++ b/src/Appwrite/Auth/OAuth2/Zoom.php @@ -9,34 +9,34 @@ class Zoom extends OAuth2 /** * @var string */ - private $endpoint = 'https://zoom.us'; + private string $endpoint = 'https://zoom.us'; /** * @var string */ - private $version = '2022-03-26'; + private string $version = '2022-03-26'; /** * @var array */ - protected $user = []; - - /** - * @var array - */ - protected $tokens = []; + protected array $user = []; /** * @var array */ - protected $scopes = [ + protected array $tokens = []; + + /** + * @var array + */ + protected array $scopes = [ 'user_profile' ]; /** * @return string */ - public function getName():string + public function getName(): string { return 'zoom'; } @@ -44,9 +44,9 @@ class Zoom extends OAuth2 /** * @return string */ - public function getLoginURL():string + public function getLoginURL(): string { - return $this->endpoint . '/oauth/authorize?'. \http_build_query([ + return $this->endpoint . '/oauth/authorize?' . \http_build_query([ 'client_id' => $this->appID, 'redirect_uri' => $this->callback, 'response_type' => 'code', @@ -62,7 +62,7 @@ class Zoom extends OAuth2 */ protected function getTokens(string $code): array { - if(empty($this->tokens)) { + if (empty($this->tokens)) { $headers = ['Authorization: Basic ' . \base64_encode($this->appID . ':' . $this->appSecret), 'Content-Type: application/x-www-form-urlencoded']; $this->tokens = \json_decode($this->request( 'POST', @@ -84,7 +84,7 @@ class Zoom extends OAuth2 * * @return array */ - public function refreshTokens(string $refreshToken):array + public function refreshTokens(string $refreshToken): array { $headers = ['Authorization: Basic ' . \base64_encode($this->appID . ':' . $this->appSecret), 'Content-Type: application/x-www-form-urlencoded']; $this->tokens = \json_decode($this->request( @@ -97,7 +97,7 @@ class Zoom extends OAuth2 ]) ), true); - if(empty($this->tokens['refresh_token'])) { + if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; } @@ -105,35 +105,58 @@ class Zoom extends OAuth2 } /** - * @param $accessToken + * @param string $accessToken * * @return string */ - public function getUserID(string $accessToken):string + public function getUserID(string $accessToken): string { $response = $this->getUser($accessToken); + return $response['id'] ?? ''; } /** - * @param $accessToken + * @param string $accessToken * * @return string */ - public function getUserEmail(string $accessToken):string + public function getUserEmail(string $accessToken): string { $response = $this->getUser($accessToken); + return $response['email'] ?? ''; } /** - * @param $accessToken + * Check if the OAuth email is verified + * + * @link https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/user + * + * @param string $accessToken + * + * @return bool + */ + public function isEmailVerified(string $accessToken): bool + { + $user = $this->getUser($accessToken); + + if (($user['verified'] ?? false) === 1) { + return true; + } + + return false; + } + + /** + * @param string $accessToken * * @return string */ - public function getUserName(string $accessToken):string + public function getUserName(string $accessToken): string { $response = $this->getUser($accessToken); + return ($response['first_name'] ?? '') . ' ' . ($response['last_name'] ?? ''); } @@ -145,7 +168,7 @@ class Zoom extends OAuth2 protected function getUser(string $accessToken) { $headers = [ - 'Authorization: Bearer '.\urlencode($accessToken) + 'Authorization: Bearer ' . \urlencode($accessToken) ]; if (empty($this->user)) { diff --git a/src/Appwrite/Event/Audit.php b/src/Appwrite/Event/Audit.php new file mode 100644 index 0000000000..b2d34424ea --- /dev/null +++ b/src/Appwrite/Event/Audit.php @@ -0,0 +1,130 @@ +resource = $resource; + + return $this; + } + + /** + * Returns the set audit resource. + * + * @return string + */ + public function getResource(): string + { + return $this->resource; + } + + /** + * Set mode for this audit event + * + * @param string $mode + * @return self + */ + public function setMode(string $mode): self + { + $this->mode = $mode; + + return $this; + } + + /** + * Returns the set audit mode. + * + * @return string + */ + public function getMode(): string + { + return $this->mode; + } + + /** + * Set user agent for this audit event. + * + * @param string $userAgent + * @return self + */ + public function setUserAgent(string $userAgent): self + { + $this->userAgent = $userAgent; + + return $this; + } + + /** + * Returns the set audit user agent. + * + * @return string + */ + public function getUserAgent(): string + { + return $this->userAgent; + } + + /** + * Set IP for this audit event. + * + * @param string $ip + * @return self + */ + public function setIP(string $ip): self + { + $this->ip = $ip; + + return $this; + } + + /** + * Returns the set audit IP. + * + * @return string + */ + public function getIP(): string + { + return $this->ip; + } + + /** + * Executes the event and sends it to the audit worker. + * + * @return string|bool + * @throws \InvalidArgumentException + */ + public function trigger(): string|bool + { + return Resque::enqueue($this->queue, $this->class, [ + 'project' => $this->project, + 'user' => $this->user, + 'payload' => $this->payload, + 'resource' => $this->resource, + 'mode' => $this->mode, + 'ip' => $this->ip, + 'userAgent' => $this->userAgent, + 'events' => Event::generateEvents($this->getEvent(), $this->getParams()) + ]); + } +} \ No newline at end of file diff --git a/src/Appwrite/Event/Build.php b/src/Appwrite/Event/Build.php new file mode 100644 index 0000000000..970de82653 --- /dev/null +++ b/src/Appwrite/Event/Build.php @@ -0,0 +1,103 @@ +resource = $resource; + + return $this; + } + + /** + * Returns set resource document for the build event. + * + * @return null|Document + */ + public function getResource(): ?Document + { + return $this->resource; + } + + /** + * Sets deployment for the build event. + * + * @param Document $deployment + * @return self + */ + public function setDeployment(Document $deployment): self + { + $this->deployment = $deployment; + + return $this; + } + + /** + * Returns set deployment for the build event. + * + * @return null|Document + */ + public function getDeployment(): ?Document + { + return $this->deployment; + } + + /** + * Sets type for the build event. + * + * @param string $type Can be `BUILD_TYPE_DEPLOYMENT` or `BUILD_TYPE_RETRY`. + * @return self + */ + public function setType(string $type): self + { + $this->type = $type; + + return $this; + } + + /** + * Returns set type for the function event. + * + * @return string + */ + public function getType(): string + { + return $this->type; + } + + /** + * Executes the function event and sends it to the functions worker. + * + * @return string|bool + * @throws \InvalidArgumentException + */ + public function trigger(): string|bool + { + return Resque::enqueue($this->queue, $this->class, [ + 'project' => $this->project, + 'resource' => $this->resource, + 'deployment' => $this->deployment, + 'type' => $this->type + ]); + } +} diff --git a/src/Appwrite/Event/Certificate.php b/src/Appwrite/Event/Certificate.php new file mode 100644 index 0000000000..d3d9091804 --- /dev/null +++ b/src/Appwrite/Event/Certificate.php @@ -0,0 +1,78 @@ +domain = $domain; + + return $this; + } + + /** + * Returns the set domain for this certificate event. + * + * @return null|Document + */ + public function getDomain(): ?Document + { + return $this->domain; + } + + /** + * Set if the certificate needs to be validated. + * + * @param bool $skipRenewCheck + * @return self + */ + public function setSkipRenewCheck(bool $skipRenewCheck): self + { + $this->skipRenewCheck = $skipRenewCheck; + + return $this; + } + + /** + * Return if the certificate needs be validated. + * + * @return bool + */ + public function getSkipRenewCheck(): bool + { + return $this->skipRenewCheck; + } + + /** + * Executes the event and sends it to the certificates worker. + * + * @return string|bool + * @throws \InvalidArgumentException + */ + public function trigger(): string|bool + { + return Resque::enqueue($this->queue, $this->class, [ + 'project' => $this->project, + 'domain' => $this->domain, + 'skipRenewCheck' => $this->skipRenewCheck + ]); + } +} diff --git a/src/Appwrite/Event/Database.php b/src/Appwrite/Event/Database.php new file mode 100644 index 0000000000..5e5e687857 --- /dev/null +++ b/src/Appwrite/Event/Database.php @@ -0,0 +1,103 @@ +type = $type; + + return $this; + } + + /** + * Returns the set type for the database event. + * @return string + */ + public function getType(): string + { + return $this->type; + } + + /** + * Set the collection for this database event. + * + * @param Document $collection + * @return self + */ + public function setCollection(Document $collection): self + { + $this->collection = $collection; + + return $this; + } + + /** + * Returns set collection for this event. + * + * @return null|Document + */ + public function getCollection(): ?Document + { + return $this->collection; + } + + /** + * Set the document for this database event. + * + * @param Document $document + * @return self + */ + public function setDocument(Document $document): self + { + $this->document = $document; + + return $this; + } + + /** + * Returns set document for this database event. + * @return null|Document + */ + public function getDocument(): ?Document + { + return $this->document; + } + + /** + * Executes the event and send it to the database worker. + * + * @return string|bool + * @throws \InvalidArgumentException + */ + public function trigger(): string|bool + { + return Resque::enqueue($this->queue, $this->class, [ + 'project' => $this->project, + 'user' => $this->user, + 'type' => $this->type, + 'collection' => $this->collection, + 'document' => $this->document, + 'events' => Event::generateEvents($this->getEvent(), $this->getParams()) + ]); + } +} \ No newline at end of file diff --git a/src/Appwrite/Event/Delete.php b/src/Appwrite/Event/Delete.php new file mode 100644 index 0000000000..1c2be4b013 --- /dev/null +++ b/src/Appwrite/Event/Delete.php @@ -0,0 +1,123 @@ +type = $type; + + return $this; + } + + /** + * Returns the set type for the delete event. + * + * @return string + */ + public function getType(): string + { + return $this->type; + } + + /** + * Set timestamp. + * + * @param int $timestamp + * @return self + */ + public function setTimestamp(int $timestamp): self + { + $this->timestamp = $timestamp; + + return $this; + } + + /** + * Set timestamp for 1 day interval. + * + * @param int $timestamp + * @return self + */ + public function setTimestamp1d(int $timestamp): self + { + $this->timestamp1d = $timestamp; + + return $this; + } + + /** + * Sets timestamp for 30m interval. + * + * @param int $timestamp + * @return self + */ + public function setTimestamp30m(int $timestamp): self + { + $this->timestamp30m = $timestamp; + + return $this; + } + + /** + * Sets the document for the delete event. + * + * @param Document $document + * @return self + */ + public function setDocument(Document $document): self + { + $this->document = $document; + + return $this; + } + + /** + * Returns the set document for the delete event. + * + * @return null|Document + */ + public function getDocument(): ?Document + { + return $this->document; + } + + /** + * Executes this event and sends it to the deletes worker. + * + * @return string|bool + * @throws \InvalidArgumentException + */ + public function trigger(): string|bool + { + return Resque::enqueue($this->queue, $this->class, [ + 'project' => $this->project, + 'type' => $this->type, + 'document' => $this->document, + 'timestamp' => $this->timestamp, + 'timestamp1d' => $this->timestamp1d, + 'timestamp30m' => $this->timestamp30m + ]); + } +} diff --git a/src/Appwrite/Event/Event.php b/src/Appwrite/Event/Event.php index 2bd73248c3..3b6c754e61 100644 --- a/src/Appwrite/Event/Event.php +++ b/src/Appwrite/Event/Event.php @@ -2,12 +2,13 @@ namespace Appwrite\Event; +use InvalidArgumentException; use Resque; +use Utopia\Database\Document; class Event { - - const DATABASE_QUEUE_NAME= 'v1-database'; + const DATABASE_QUEUE_NAME = 'v1-database'; const DATABASE_CLASS_NAME = 'DatabaseV1'; const DELETE_QUEUE_NAME = 'v1-deletes'; @@ -16,9 +17,6 @@ class Event const AUDITS_QUEUE_NAME = 'v1-audits'; const AUDITS_CLASS_NAME = 'AuditsV1'; - const USAGE_QUEUE_NAME = 'v1-usage'; - const USAGE_CLASS_NAME = 'UsageV1'; - const MAILS_QUEUE_NAME = 'v1-mails'; const MAILS_CLASS_NAME = 'MailsV1'; @@ -33,27 +31,20 @@ class Event const BUILDS_QUEUE_NAME = 'v1-builds'; const BUILDS_CLASS_NAME = 'BuildsV1'; - - /** - * @var string - */ - protected $queue = ''; + + protected string $queue = ''; + protected string $class = ''; + protected string $event = ''; + protected array $params = []; + protected array $payload = []; + protected ?Document $project = null; + protected ?Document $user = null; + protected ?Document $context = null; /** - * @var string - */ - protected $class = ''; - - /** - * @var array - */ - protected $params = []; - - /** - * Event constructor. - * * @param string $queue * @param string $class + * @return void */ public function __construct(string $queue, string $class) { @@ -62,48 +53,172 @@ class Event } /** + * Set queue used for this event. + * * @param string $queue - * return $this + * @return Event */ public function setQueue(string $queue): self { $this->queue = $queue; + return $this; } /** + * Get queue used for this event. + * * @return string */ - public function getQueue() + public function getQueue(): string { return $this->queue; } /** - * @param string $class - * return $this + * Set event name used for this event. + * @param string $event + * @return Event */ - public function setClass(string $class): self + public function setEvent(string $event): self { - $this->class = $class; + $this->event = $event; + return $this; } /** + * Get event name used for this event. + * * @return string */ - public function getClass() + public function getEvent(): string + { + return $this->event; + } + + /** + * Set project for this event. + * + * @param Document $project + * @return self + */ + public function setProject(Document $project): self + { + $this->project = $project; + + return $this; + } + + /** + * Get project for this event. + * + * @return Document + */ + public function getProject(): Document + { + return $this->project; + } + + /** + * Set user for this event. + * + * @param Document $user + * @return self + */ + public function setUser(Document $user): self + { + $this->user = $user; + + return $this; + } + + /** + * Get project for this event. + * + * @return Document + */ + public function getUser(): Document + { + return $this->user; + } + + /** + * Set payload for this event. + * + * @param array $payload + * @return self + */ + public function setPayload(array $payload): self + { + $this->payload = $payload; + + return $this; + } + + /** + * Get payload for this event. + * + * @return array + */ + public function getPayload(): array + { + return $this->payload; + } + + /** + * Set context for this event. + * + * @param Document $context + * @return self + */ + public function setContext(Document $context): self + { + $this->context = $context; + + return $this; + } + + /** + * Get context for this event. + * + * @return null|Document + */ + public function getContext(): ?Document + { + return $this->context; + } + + /** + * Set class used for this event. + * @param string $class + * @return self + */ + public function setClass(string $class): self + { + $this->class = $class; + + return $this; + } + + /** + * Get class used for this event. + * + * @return string + */ + public function getClass(): string { return $this->class; } /** - * @param string $key - * @param mixed $value + * Set param of event. * - * @return $this + * @param string $key + * @param mixed $value + * @return self */ - public function setParam(string $key, $value): self + public function setParam(string $key, mixed $value): self { $this->params[$key] = $value; @@ -111,29 +226,186 @@ class Event } /** - * @param string $key + * Get param of event. * - * @return mixed|null + * @param string $key + * @return mixed */ - public function getParam(string $key) + public function getParam(string $key): mixed { - return (isset($this->params[$key])) ? $this->params[$key] : null; + return $this->params[$key] ?? null; + } + + /** + * Get all params of the event. + * + * @return array + */ + public function getParams(): array + { + return $this->params; } /** * Execute Event. + * + * @return string|bool + * @throws InvalidArgumentException */ - public function trigger(): void + public function trigger(): string|bool { - Resque::enqueue($this->queue, $this->class, $this->params); - - $this->reset(); + return Resque::enqueue($this->queue, $this->class, [ + 'project' => $this->project, + 'user' => $this->user, + 'payload' => $this->payload, + 'context' => $this->context, + 'events' => Event::generateEvents($this->getEvent(), $this->getParams()) + ]); } + /** + * Resets event. + * + * @return self + */ public function reset(): self { $this->params = []; return $this; } + + /** + * Parses event pattern and returns the parts in their respective section. + * + * @param string $pattern + * @return array + */ + public static function parseEventPattern(string $pattern): array + { + $parts = \explode('.', $pattern); + $count = \count($parts); + + /** + * Identify all sections of the pattern. + */ + $type = $parts[0] ?? false; + $resource = $parts[1] ?? false; + $hasSubResource = $count > 3 && \str_starts_with($parts[3], '['); + + if ($hasSubResource) { + $subType = $parts[2]; + $subResource = $parts[3]; + if ($count === 6) { + $attribute = $parts[5]; + } + } else { + if ($count === 4) { + $attribute = $parts[3]; + } + } + + $subType ??= false; + $subResource ??= false; + $attribute ??= false; + $action = match (true) { + !$hasSubResource && $count > 2 => $parts[2], + $hasSubResource && $count > 4 => $parts[4], + default => false + }; + + return [ + 'type' => $type, + 'resource' => $resource, + 'subType' => $subType, + 'subResource' => $subResource, + 'action' => $action, + 'attribute' => $attribute, + ]; + } + + /** + * Generates all possible events from a pattern. + * + * @param string $pattern + * @param array $params + * @return array + * @throws \InvalidArgumentException + */ + static function generateEvents(string $pattern, array $params = []): array + { + // $params = \array_filter($params, fn($param) => !\is_array($param)); + $paramKeys = \array_keys($params); + $paramValues = \array_values($params); + + $patterns = []; + + $parsed = self::parseEventPattern($pattern); + $type = $parsed['type']; + $resource = $parsed['resource']; + $subType = $parsed['subType']; + $subResource = $parsed['subResource']; + $action = $parsed['action']; + $attribute = $parsed['attribute']; + + if ($resource && !\in_array(\trim($resource, "\[\]"), $paramKeys)) { + throw new InvalidArgumentException("{$resource} is missing from the params."); + } + + if ($subResource && !\in_array(\trim($subResource, "\[\]"), $paramKeys)) { + throw new InvalidArgumentException("{$subResource} is missing from the params."); + } + + /** + * Create all possible patterns including placeholders. + */ + if ($action) { + if ($subResource) { + if ($attribute) { + $patterns[] = \implode('.', [$type, $resource, $subType, $subResource, $action, $attribute]); + } + $patterns[] = \implode('.', [$type, $resource, $subType, $subResource, $action]); + $patterns[] = \implode('.', [$type, $resource, $subType, $subResource]); + } else { + $patterns[] = \implode('.', [$type, $resource, $action]); + } + if ($attribute) { + $patterns[] = \implode('.', [$type, $resource, $action, $attribute]); + } + } + if ($subResource) { + $patterns[] = \implode('.', [$type, $resource, $subType, $subResource]); + } + $patterns[] = \implode('.', [$type, $resource]); + + /** + * Removes all duplicates. + */ + $patterns = \array_unique($patterns); + + /** + * Set all possible values of the patterns and replace placeholders. + */ + $events = []; + foreach ($patterns as $eventPattern) { + $events[] = \str_replace($paramKeys, $paramValues, $eventPattern); + $events[] = \str_replace($paramKeys, '*', $eventPattern); + foreach ($paramKeys as $key) { + foreach ($paramKeys as $current) { + if ($current === $key) continue; + + $filtered = \array_filter($paramKeys, fn(string $k) => $k === $current); + $events[] = \str_replace($paramKeys, $paramValues, \str_replace($filtered, '*', $eventPattern)); + } + } + } + + /** + * Remove [] from the events. + */ + $events = \array_map(fn (string $event) => \str_replace(['[', ']'], '', $event), $events); + $events = \array_unique($events); + + return $events; + } } diff --git a/src/Appwrite/Event/Func.php b/src/Appwrite/Event/Func.php new file mode 100644 index 0000000000..98652431f0 --- /dev/null +++ b/src/Appwrite/Event/Func.php @@ -0,0 +1,178 @@ +function = $function; + + return $this; + } + + /** + * Returns set function document for the function event. + * + * @return null|Document + */ + public function getFunction(): ?Document + { + return $this->function; + } + + /** + * Sets execution for the function event. + * + * @param Document $execution + * @return self + */ + public function setExecution(Document $execution): self + { + $this->execution = $execution; + + return $this; + } + + /** + * Returns set execution for the function event. + * + * @return null|Document + */ + public function getExecution(): ?Document + { + return $this->execution; + } + + /** + * Sets type for the function event. + * + * @param string $type Can be `schedule`, `event` or `http`. + * @return self + */ + public function setType(string $type): self + { + $this->type = $type; + + return $this; + } + + /** + * Returns set type for the function event. + * + * @return string + */ + public function getType(): string + { + return $this->type; + } + + /** + * Sets custom data for the function event. + * + * @param string $data + * @return self + */ + public function setData(string $data): self + { + $this->data = $data; + + return $this; + } + + /** + * Returns set custom data for the function event. + * + * @return string + */ + public function getData(): string + { + return $this->data; + } + + /** + * Sets JWT for the function event. + * + * @param string $jwt + * @return self + */ + public function setJWT(string $jwt): self + { + $this->jwt = $jwt; + + return $this; + } + + /** + * Returns set JWT for the function event. + * + * @return string + */ + public function getJWT(): string + { + return $this->jwt; + } + + /** + * Executes the function event and sends it to the functions worker. + * + * @return string|bool + * @throws \InvalidArgumentException + */ + public function trigger(): string|bool + { + return Resque::enqueue($this->queue, $this->class, [ + 'project' => $this->project, + 'user' => $this->user, + 'function' => $this->function, + 'execution' => $this->execution, + 'type' => $this->type, + 'jwt' => $this->jwt, + 'payload' => $this->payload, + 'data' => $this->data + ]); + } + + /** + * Schedules the function event and schedules it in the functions worker queue. + * + * @param \DateTime|int $at + * @return void + * @throws \Resque_Exception + * @throws \ResqueScheduler_InvalidTimestampException + */ + public function schedule(DateTime|int $at): void + { + ResqueScheduler::enqueueAt($at, $this->queue, $this->class, [ + 'project' => $this->project, + 'user' => $this->user, + 'function' => $this->function, + 'execution' => $this->execution, + 'type' => $this->type, + 'payload' => $this->payload, + 'data' => $this->data + ]); + } +} diff --git a/src/Appwrite/Event/Mail.php b/src/Appwrite/Event/Mail.php new file mode 100644 index 0000000000..b3325c00be --- /dev/null +++ b/src/Appwrite/Event/Mail.php @@ -0,0 +1,181 @@ +team = $team; + + return $this; + } + + /** + * Returns set team for the mail event. + * + * @return null|Document + */ + public function getTeam(): ?Document + { + return $this->team; + } + + /** + * Sets recipient for the mail event. + * + * @param string $recipient + * @return self + */ + public function setRecipient(string $recipient): self + { + $this->recipient = $recipient; + + return $this; + } + + /** + * Returns set recipient for mail event. + * + * @return string + */ + public function getRecipient(): string + { + return $this->recipient; + } + + /** + * Sets url for the mail event. + * + * @param string $url + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * Returns set url for the mail event. + * + * @return string + */ + public function getURL(): string + { + return $this->url; + } + + /** + * Sets type for the mail event (use the constants starting with MAIL_TYPE_*). + * + * @param string $type + * @return self + */ + public function setType(string $type): self + { + $this->type = $type; + + return $this; + } + + /** + * Returns set type for the mail event. + * + * @return string + */ + public function getType(): string + { + return $this->type; + } + + /** + * Sets name for the mail event. + * + * @param string $name + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } + + /** + * Returns set name for the mail event. + * + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * Sets locale for the mail event. + * + * @param string $locale + * @return self + */ + public function setLocale(string $locale): self + { + $this->locale = $locale; + + return $this; + } + + /** + * Returns set locale for the mail event. + * + * @return string + */ + public function getLocale(): string + { + return $this->locale; + } + + /** + * Executes the event and sends it to the mails worker. + * + * @return string|bool + * @throws \InvalidArgumentException + */ + public function trigger(): string|bool + { + return Resque::enqueue($this->queue, $this->class, [ + 'project' => $this->project, + 'user' => $this->user, + 'payload' => $this->payload, + 'recipient' => $this->recipient, + 'url' => $this->url, + 'locale' => $this->locale, + 'type' => $this->type, + 'name' => $this->name, + 'team' => $this->team, + 'events' => Event::generateEvents($this->getEvent(), $this->getParams()) + ]); + } +} diff --git a/src/Appwrite/Event/Validator/Event.php b/src/Appwrite/Event/Validator/Event.php new file mode 100644 index 0000000000..b68cdfaa06 --- /dev/null +++ b/src/Appwrite/Event/Validator/Event.php @@ -0,0 +1,127 @@ + 6) { + return false; + } + + /** + * Identify all sections of the pattern. + */ + $type = $parts[0] ?? false; + $resource = $parts[1] ?? false; + $hasSubResource = $count > 3 && ($events[$type]['$resource'] ?? false) && ($events[$type][$parts[2]]['$resource'] ?? false); + + if (!$type || !$resource) { + return false; + } + + if ($hasSubResource) { + $subType = $parts[2]; + $subResource = $parts[3]; + if ($count === 6) { + $attribute = $parts[5]; + } + } else { + if ($count === 4) { + $attribute = $parts[3]; + } + } + + $subType ??= false; + $subResource ??= false; + $attribute ??= false; + + $action = match (true) { + !$hasSubResource && $count > 2 => $parts[2], + $hasSubResource && $count > 4 => $parts[4], + default => false + }; + + if (!\array_key_exists($type, $events)) { + return false; + } + + if ($subType) { + if ($action && !\array_key_exists($action, $events[$type][$subType])) { + return false; + } + if (!($subResource) || !\array_key_exists($subType, $events[$type])) { + return false; + } + } else { + if ($action && !\array_key_exists($action, $events[$type])) { + return false; + } + } + + if ($attribute) { + if (($subType)) { + if (!\array_key_exists($attribute, $events[$type][$subType][$action])) { + return false; + } + } else { + if (!\array_key_exists($attribute, $events[$type][$action])) { + return false; + } + } + } + + return true; + } + + /** + * Is array + * + * Function will return true if object is array. + * + * @return bool + */ + public function isArray(): bool + { + return false; + } + + /** + * Get Type + * + * Returns validator type. + * + * @return string + */ + public function getType(): string + { + return self::TYPE_STRING; + } +} diff --git a/src/Appwrite/Extend/Exception.php b/src/Appwrite/Extend/Exception.php index 4f396990fd..95c51ed991 100644 --- a/src/Appwrite/Extend/Exception.php +++ b/src/Appwrite/Extend/Exception.php @@ -46,6 +46,7 @@ class Exception extends \Exception const GENERAL_ROUTE_NOT_FOUND = 'general_route_not_found'; const GENERAL_CURSOR_NOT_FOUND = 'general_cursor_not_found'; const GENERAL_SERVER_ERROR = 'general_server_error'; + const GENERAL_PROTOCOL_UNSUPPORTED = 'general_protocol_unsupported'; /** Users */ const USER_COUNT_EXCEEDED = 'user_count_exceeded'; @@ -145,6 +146,7 @@ class Exception extends \Exception const PROJECT_INVALID_SUCCESS_URL = 'project_invalid_success_url'; const PROJECT_INVALID_FAILURE_URL = 'project_invalid_failure_url'; const PROJECT_MISSING_USER_ID = 'project_missing_user_id'; + const PROJECT_RESERVED_PROJECT = 'project_reserved_project'; /** Webhooks */ const WEBHOOK_NOT_FOUND = 'webhook_not_found'; diff --git a/src/Appwrite/Messaging/Adapter.php b/src/Appwrite/Messaging/Adapter.php index 6ef2d5cfde..1910847245 100644 --- a/src/Appwrite/Messaging/Adapter.php +++ b/src/Appwrite/Messaging/Adapter.php @@ -6,5 +6,5 @@ abstract class Adapter { public abstract function subscribe(string $projectId, mixed $identifier, array $roles, array $channels): void; public abstract function unsubscribe(mixed $identifier): void; - public static abstract function send(string $projectId, array $payload, string $event, array $channels, array $roles, array $options): void; + public static abstract function send(string $projectId, array $payload, array $events, array $channels, array $roles, array $options): void; } diff --git a/src/Appwrite/Messaging/Adapter/Realtime.php b/src/Appwrite/Messaging/Adapter/Realtime.php index d7d138a790..ad38444cbe 100644 --- a/src/Appwrite/Messaging/Adapter/Realtime.php +++ b/src/Appwrite/Messaging/Adapter/Realtime.php @@ -11,7 +11,7 @@ class Realtime extends Adapter /** * Connection Tree * - * [CONNECTION_ID] -> + * [CONNECTION_ID] -> * 'projectId' -> [PROJECT_ID] * 'roles' -> [ROLE_x, ROLE_Y] * 'channels' -> [CHANNEL_NAME_X, CHANNEL_NAME_Y, CHANNEL_NAME_Z] @@ -20,13 +20,13 @@ class Realtime extends Adapter /** * Subscription Tree - * - * [PROJECT_ID] -> - * [ROLE_X] -> + * + * [PROJECT_ID] -> + * [ROLE_X] -> * [CHANNEL_NAME_X] -> [CONNECTION_ID] * [CHANNEL_NAME_Y] -> [CONNECTION_ID] * [CHANNEL_NAME_Z] -> [CONNECTION_ID] - * [ROLE_Y] -> + * [ROLE_Y] -> * [CHANNEL_NAME_X] -> [CONNECTION_ID] * [CHANNEL_NAME_Y] -> [CONNECTION_ID] * [CHANNEL_NAME_Z] -> [CONNECTION_ID] @@ -35,12 +35,12 @@ class Realtime extends Adapter /** * Adds a subscription. - * - * @param string $projectId - * @param mixed $identifier - * @param array $roles - * @param array $channels - * @return void + * + * @param string $projectId + * @param mixed $identifier + * @param array $roles + * @param array $channels + * @return void */ public function subscribe(string $projectId, mixed $identifier, array $roles, array $channels): void { @@ -69,7 +69,7 @@ class Realtime extends Adapter * Removes Subscription. * * @param mixed $connection - * @return void + * @return void */ public function unsubscribe(mixed $connection): void { @@ -99,9 +99,9 @@ class Realtime extends Adapter /** * Checks if Channel has a subscriber. - * @param string $projectId - * @param string $role - * @param string $channel + * @param string $projectId + * @param string $role + * @param string $channel * @return bool */ public function hasSubscriber(string $projectId, string $role, string $channel = ''): bool @@ -118,16 +118,16 @@ class Realtime extends Adapter } /** - * Sends an event to the Realtime Server. - * @param string $projectId - * @param array $payload - * @param string $event - * @param array $channels - * @param array $roles - * @param array $options - * @return void + * Sends an event to the Realtime Server + * @param string $projectId + * @param array $payload + * @param string $event + * @param array $channels + * @param array $roles + * @param array $options + * @return void */ - public static function send(string $projectId, array $payload, string $event, array $channels, array $roles, array $options = []): void + public static function send(string $projectId, array $payload, array $events, array $channels, array $roles, array $options = []): void { if (empty($channels) || empty($roles) || empty($projectId)) return; @@ -142,7 +142,7 @@ class Realtime extends Adapter 'permissionsChanged' => $permissionsChanged, 'userId' => $userId, 'data' => [ - 'event' => $event, + 'events' => $events, 'channels' => $channels, 'timestamp' => time(), 'payload' => $payload @@ -152,7 +152,7 @@ class Realtime extends Adapter /** * Identifies the receivers of all subscriptions, based on the permissions and event. - * + * * Example of performance with an event with user:XXX permissions and with X users spread across 10 different channels: * - 0.014 ms (±6.88%) | 10 Connections / 100 Subscriptions * - 0.070 ms (±3.71%) | 100 Connections / 1,000 Subscriptions @@ -160,7 +160,7 @@ class Realtime extends Adapter * - 10.866 ms (±1.01%) | 10,000 Connections / 100,000 Subscriptions * - 110.201 ms (±2.32%) | 100,000 Connections / 1,000,000 Subscriptions * - 1,121.328 ms (±0.84%) | 1,000,000 Connections / 10,000,000 Subscriptions - * + * * @param array $event */ public function getSubscribers(array $event) @@ -205,10 +205,10 @@ class Realtime extends Adapter } /** - * Converts the channels from the Query Params into an array. + * Converts the channels from the Query Params into an array. * Also renames the account channel to account.USER_ID and removes all illegal account channel variations. - * @param array $channels - * @param string $userId + * @param array $channels + * @param string $userId * @return array */ public static function convertChannels(array $channels, string $userId): array @@ -235,9 +235,9 @@ class Realtime extends Adapter /** * Create channels array based on the event name and payload. * - * @param string $event - * @param Document $payload - * @param Document|null $project + * @param string $event + * @param Document $payload + * @param Document|null $project * @return array */ public static function fromPayload(string $event, Document $payload, Document $project = null, Document $collection = null, Document $bucket = null): array @@ -246,77 +246,73 @@ class Realtime extends Adapter $roles = []; $permissionsChanged = false; $projectId = null; + // TODO: add method here to remove all the magic index accesses + $parts = explode('.', $event); - switch (true) { - case strpos($event, 'account.recovery.') === 0: - case strpos($event, 'account.sessions.') === 0: - case strpos($event, 'account.verification.') === 0: + switch ($parts[0]) { + case 'users': $channels[] = 'account'; - $channels[] = 'account.' . $payload->getAttribute('userId'); - $roles = ['user:' . $payload->getAttribute('userId')]; + $channels[] = 'account.' . $parts[1]; + $roles = ['user:' . $parts[1]]; break; - case strpos($event, 'account.') === 0: - $channels[] = 'account'; - $channels[] = 'account.' . $payload->getId(); - $roles = ['user:' . $payload->getId()]; - - break; - case strpos($event, 'teams.memberships') === 0: - $permissionsChanged = in_array($event, ['teams.memberships.update', 'teams.memberships.delete', 'teams.memberships.update.status']); - $channels[] = 'memberships'; - $channels[] = 'memberships.' . $payload->getId(); - $roles = ['team:' . $payload->getAttribute('teamId')]; - - break; - case strpos($event, 'teams.') === 0: - $permissionsChanged = $event === 'teams.create'; - $channels[] = 'teams'; - $channels[] = 'teams.' . $payload->getId(); - $roles = ['team:' . $payload->getId()]; - - break; - case strpos($event, 'database.attributes.') === 0: - case strpos($event, 'database.indexes.') === 0: - $channels[] = 'console'; - $projectId = 'console'; - $roles = ['team:' . $project->getAttribute('teamId')]; - - break; - case strpos($event, 'database.documents.') === 0: - if ($collection->isEmpty()) { - throw new \Exception('Collection needs to be passed to Realtime for Document events in the Database.'); + case 'teams': + if ($parts[2] === 'memberships') { + $permissionsChanged = $parts[4] ?? false; + $channels[] = 'memberships'; + $channels[] = 'memberships.' . $parts[3]; + $roles = ['team:' . $parts[1]]; + } else { + $permissionsChanged = $parts[2] === 'create'; + $channels[] = 'teams'; + $channels[] = 'teams.' . $parts[1]; + $roles = ['team:' . $parts[1]]; } - - $channels[] = 'documents'; - $channels[] = 'collections.' . $payload->getAttribute('$collection') . '.documents'; - $channels[] = 'collections.' . $payload->getAttribute('$collection') . '.documents.' . $payload->getId(); - - $roles = ($collection->getAttribute('permission') === 'collection') ? $collection->getRead() : $payload->getRead(); - break; - case strpos($event, 'storage.files') === 0: - if($bucket->isEmpty()) { - throw new \Exception('Bucket needs to be pased to Realtime for File events in the Storage.'); - } - $channels[] = 'files'; - $channels[] = 'buckets.' . $payload->getAttribute('bucketId') . '.files'; - $channels[] = 'buckets.' . $payload->getAttribute('bucketId') . '.files.' . $payload->getId(); - $roles = $payload->getRead(); - - break; - case strpos($event, 'functions.executions.') === 0: - if (!empty($payload->getRead())) { + case 'collections': + if (in_array($parts[2], ['attributes', 'indexes'])) { $channels[] = 'console'; - $channels[] = 'executions'; - $channels[] = 'executions.' . $payload->getId(); - $channels[] = 'functions.' . $payload->getAttribute('functionId'); - $roles = $payload->getRead(); + $projectId = 'console'; + $roles = ['team:' . $project->getAttribute('teamId')]; + } elseif ($parts[2] === 'documents') { + if ($collection->isEmpty()) { + throw new \Exception('Collection needs to be passed to Realtime for Document events in the Database.'); + } + + $channels[] = 'documents'; + $channels[] = 'collections.' . $payload->getCollection() . '.documents'; + $channels[] = 'collections.' . $payload->getCollection() . '.documents.' . $payload->getId(); + + $roles = ($collection->getAttribute('permission') === 'collection') ? $collection->getRead() : $payload->getRead(); } break; - case strpos($event, 'functions.deployments.') === 0: - $channels[] = 'console'; - $roles = ['team:' . $project->getAttribute('teamId')]; + case 'buckets': + if ($parts[2] === 'files') { + if ($bucket->isEmpty()) { + throw new \Exception('Bucket needs to be pased to Realtime for File events in the Storage.'); + } + $channels[] = 'files'; + $channels[] = 'buckets.' . $payload->getAttribute('bucketId') . '.files'; + $channels[] = 'buckets.' . $payload->getAttribute('bucketId') . '.files.' . $payload->getId(); + $roles = ($bucket->getAttribute('permission') === 'bucket') ? $bucket->getRead() : $payload->getRead(); + } + + break; + + case 'functions': + if ($parts[2] === 'executions') { + if (!empty($payload->getRead())) { + $channels[] = 'console'; + $channels[] = 'executions'; + $channels[] = 'executions.' . $payload->getId(); + $channels[] = 'functions.' . $payload->getAttribute('functionId'); + $roles = $payload->getRead(); + } + } elseif ($parts[2] === 'deployments') { + $channels[] = 'console'; + $roles = ['team:' . $project->getAttribute('teamId')]; + } + break; } diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index 723f210b81..b5c32733ea 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -8,6 +8,8 @@ use Utopia\Database\Database; use Utopia\CLI\Console; use Utopia\Config\Config; use Exception; +use Utopia\App; +use Utopia\Database\Validator\Authorization; abstract class Migration { @@ -40,6 +42,7 @@ abstract class Migration '0.13.2' => 'V12', '0.13.3' => 'V12', '0.13.4' => 'V12', + '0.14.0' => 'V13', ]; /** @@ -49,15 +52,20 @@ abstract class Migration public function __construct() { + Authorization::disable(); + Authorization::setDefaultStatus(false); $this->collections = array_merge([ '_metadata' => [ - '$id' => '_metadata' + '$id' => '_metadata', + '$collection' => Database::METADATA ], 'audit' => [ - '$id' => 'audit' + '$id' => 'audit', + '$collection' => Database::METADATA ], 'abuse' => [ - '$id' => 'abuse' + '$id' => 'abuse', + '$collection' => Database::METADATA ] ], Config::getParam('collections', [])); } @@ -92,6 +100,7 @@ abstract class Migration Runtime::enableCoroutine(SWOOLE_HOOK_ALL); foreach ($this->collections as $collection) { + if ($collection['$collection'] !== Database::METADATA) return; $sum = 0; $nextDocument = null; $collectionCount = $this->projectDB->count($collection['$id']); @@ -188,6 +197,53 @@ abstract class Migration return $result; } + /** + * Creates colletion from the config collection. + * + * @param string $id + * @param string|null $name + * @return void + * @throws \Throwable + */ + protected function createCollection(string $id, string $name = null): void + { + $name ??= $id; + + if (!$this->projectDB->exists(App::getEnv('_APP_DB_SCHEMA', 'appwrite'), $name)) { + $attributes = []; + $indexes = []; + $collection = $this->collections[$id]; + + foreach ($collection['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'], + ]); + } + + foreach ($collection['indexes'] as $index) { + $indexes[] = new Document([ + '$id' => $index['$id'], + 'type' => $index['type'], + 'attributes' => $index['attributes'], + 'lengths' => $index['lengths'], + 'orders' => $index['orders'], + ]); + } + + try { + $this->projectDB->createCollection($name, $attributes, $indexes); + } catch (\Throwable $th) { + throw $th; + } + } + } + /** * Executes migration for set project. */ diff --git a/src/Appwrite/Migration/Version/V12.php b/src/Appwrite/Migration/Version/V12.php index 0b8f194d20..6b8e88c7d6 100644 --- a/src/Appwrite/Migration/Version/V12.php +++ b/src/Appwrite/Migration/Version/V12.php @@ -297,53 +297,6 @@ class V12 extends Migration } } - /** - * Creates colletion from the config collection. - * - * @param string $id - * @param string|null $name - * @return void - * @throws \Throwable - */ - protected function createCollection(string $id, string $name = null): void - { - $name ??= $id; - - if (!$this->projectDB->exists(App::getEnv('_APP_DB_SCHEMA', 'appwrite'), $name)) { - $attributes = []; - $indexes = []; - $collection = $this->collections[$id]; - - foreach ($collection['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'], - ]); - } - - foreach ($collection['indexes'] as $index) { - $indexes[] = new Document([ - '$id' => $index['$id'], - 'type' => $index['type'], - 'attributes' => $index['attributes'], - 'lengths' => $index['lengths'], - 'orders' => $index['orders'], - ]); - } - - try { - $this->projectDB->createCollection($name, $attributes, $indexes); - } catch (\Throwable $th) { - throw $th; - } - } - } - /** * Migrates permissions to dedicated table. * diff --git a/src/Appwrite/Migration/Version/V13.php b/src/Appwrite/Migration/Version/V13.php new file mode 100644 index 0000000000..5c5ad08e8e --- /dev/null +++ b/src/Appwrite/Migration/Version/V13.php @@ -0,0 +1,335 @@ +project->getAttribute('name') . ' (' . $this->project->getId() . ')'); + Console::info('Migrating Collections'); + $this->migrateCollections(); + Console::info('Migrating Documents'); + $this->forEachDocument([$this, 'fixDocument']); + } + + /** + * Migrate all Collections. + * + * @return void + */ + protected function migrateCollections(): void + { + foreach ($this->collections as $collection) { + $id = $collection['$id']; + + Console::log("- {$id}"); + switch ($id) { + case 'projects': + try { + /** + * Rename providers to authProviders. + */ + $this->projectDB->renameAttribute($id, 'providers', 'authProviders'); + } catch (\Throwable $th) { + Console::warning("'providers' from {$id}: {$th->getMessage()}"); + } + break; + case 'users': + try { + /** + * Recreate sessions for new subquery. + */ + $this->projectDB->deleteAttribute($id, 'sessions'); + $this->projectDB->createAttribute( + collection: $id, + id: 'sessions', + required: false, + type: Database::VAR_STRING, + format: '', + size: 16384, + filters: ['subQuerySessions'] + ); + } catch (\Throwable $th) { + Console::warning("'sessions' from {$id}: {$th->getMessage()}"); + } + try { + /** + * Recreate tokens for new subquery. + */ + $this->projectDB->deleteAttribute($id, 'tokens'); + $this->projectDB->createAttribute( + collection: $id, + id: 'tokens', + required: false, + type: Database::VAR_STRING, + format: '', + size: 16384, + filters: ['subQueryTokens'] + ); + } catch (\Throwable $th) { + Console::warning("'tokens' from {$id}: {$th->getMessage()}"); + } + try { + /** + * Recreate memberships for new subquery. + */ + $this->projectDB->deleteAttribute($id, 'memberships'); + $this->projectDB->createAttribute( + collection: $id, + id: 'memberships', + required: false, + type: Database::VAR_STRING, + format: '', + size: 16384, + filters: ['subQueryMemberships'] + ); + } catch (\Throwable $th) { + Console::warning("'memberships' from {$id}: {$th->getMessage()}"); + } + break; + case 'sessions': + try { + /** + * Add new index for users. + */ + $this->projectDB->createIndex(collection: $id, id: '_key_user', type: Database::INDEX_KEY, attributes: ['userId'], orders: [Database::ORDER_ASC]); + } catch (\Throwable $th) { + Console::warning("'_key_user' from {$id}: {$th->getMessage()}"); + } + break; + case 'builds': + try { + /** + * Increase stdout size. + */ + $this->projectDB->updateAttribute($id, 'stdout', size: 1_000_000); + } catch (\Throwable $th) { + Console::warning("'stdout' from {$id}: {$th->getMessage()}"); + } + try { + /** + * Increase stderr size. + */ + $this->projectDB->updateAttribute($id, 'stderr', size: 1_000_000); + } catch (\Throwable $th) { + Console::warning("'stderr' from {$id}: {$th->getMessage()}"); + } + break; + case 'executions': + try { + /** + * Rename stdout to response. + * Increase response size. + */ + $this->projectDB->renameAttribute($id, 'stdout', 'response'); + $this->projectDB->updateAttribute($id, 'response', size: 1_000_000); + } catch (\Throwable $th) { + Console::warning("'stdout' from {$id}: {$th->getMessage()}"); + } + try { + /** + * Increase stderr size. + */ + $this->projectDB->updateAttribute($id, 'stderr', size: 1_000_000); + } catch (\Throwable $th) { + Console::warning("'stderr' from {$id}: {$th->getMessage()}"); + } + break; + case 'stats': + try { + /** + * Increase value size ot BIGINT. + */ + $this->projectDB->updateAttribute($id, 'value', size: 8); + } catch (\Throwable $th) { + Console::warning("'size' from {$id}: {$th->getMessage()}"); + } + break; + case 'tokens': + try { + /** + * Create new Tokens collection. + */ + $this->createCollection('tokens'); + } catch (\Throwable $th) { + Console::warning("'tokens': {$th->getMessage()}"); + } + break; + } + usleep(100000); + } + } + + /** + * Fix run on each document + * + * @param \Utopia\Database\Document $document + * @return \Utopia\Database\Document + */ + protected function fixDocument(Document $document) + { + switch ($document->getCollection()) { + case 'projects': + /** + * Bump Project version number. + */ + $document->setAttribute('version', '0.14.0'); + + break; + + case 'functions': + /** + * Migrate events. + */ + if (!empty($document->getAttribute('events'))) { + $document->setAttribute('events', $this->migrateEvents($document->getAttribute('events'))); + } + + break; + + case 'webhooks': + /** + * Migrate events. + */ + if (!empty($document->getAttribute('events'))) { + $document->setAttribute('events', $this->migrateEvents($document->getAttribute('events'))); + } + + break; + + case 'users': + /** + * Remove deleted users. + */ + if ($document->getAttribute('deleted', false) === true) { + $this->projectDB->deleteDocument('users', $document->getId()); + } + break; + } + + return $document; + } + + public function migrateEvents(array $events): array + { + return array_filter(array_unique(array_map(function ($event) { + if (!in_array($event, $this->events)) return $event; + $parts = \explode('.', $event); + $first = array_shift($parts); + switch ($first) { + case 'account': + case 'users': + $first = 'users'; + + switch ($parts[0]) { + case 'recovery': + case 'sessions': + case 'verification': + $second = array_shift($parts); + return 'users.*.' . $second . '.*.' . implode('.', $parts); + + default: + return 'users.*.' . implode('.', $parts); + } + case 'functions': + switch ($parts[0]) { + case 'deployments': + case 'executions': + $second = array_shift($parts); + return 'functions.*.' . $second . '.*.' . implode('.', $parts); + + default: + return 'functions.*.' . implode('.', $parts); + } + case 'teams': + switch ($parts[0]) { + case 'memberships': + $second = array_shift($parts); + return 'teams.*.' . $second . '.*.' . implode('.', $parts); + + default: + return 'teams.*.' . implode('.', $parts); + } + case 'storage': + $second = array_shift($parts); + switch ($second) { + case 'buckets': + return 'buckets.*.' . implode('.', $parts); + case 'files': + return 'buckets.*.' . $second . '.*.' . implode('.', $parts); + } + case 'database': + $second = array_shift($parts); + switch ($second) { + case 'collections': + return 'collections.*.' . implode('.', $parts); + case 'documents': + case 'indexes': + case 'attributes': + return 'collections.*.' . $second . '.*.' . implode('.', $parts); + } + } + return ''; + }, $events))); + } +} diff --git a/src/Appwrite/Network/Validator/Host.php b/src/Appwrite/Network/Validator/Host.php index 703907c3d3..c81a931f37 100644 --- a/src/Appwrite/Network/Validator/Host.php +++ b/src/Appwrite/Network/Validator/Host.php @@ -2,6 +2,7 @@ namespace Appwrite\Network\Validator; +use Utopia\Validator\Hostname; use Utopia\Validator; /** @@ -45,17 +46,16 @@ class Host extends Validator */ public function isValid($value): bool { + // Check if value is valid URL $urlValidator = new URL(); if (!$urlValidator->isValid($value)) { return false; } - if (\in_array(\parse_url($value, PHP_URL_HOST), $this->whitelist)) { - return true; - } - - return false; + $hostname = \parse_url($value, PHP_URL_HOST); + $hostnameValidator = new Hostname($this->whitelist); + return $hostnameValidator->isValid($hostname); } /** diff --git a/src/Appwrite/Network/Validator/Origin.php b/src/Appwrite/Network/Validator/Origin.php index 8831707cef..30efe50c4c 100644 --- a/src/Appwrite/Network/Validator/Origin.php +++ b/src/Appwrite/Network/Validator/Origin.php @@ -2,6 +2,7 @@ namespace Appwrite\Network\Validator; +use Utopia\Validator\Hostname; use Utopia\Validator; class Origin extends Validator @@ -122,11 +123,9 @@ class Origin extends Validator return true; } - if (\in_array($host, $this->clients)) { - return true; - } - - return false; + $validator = new Hostname($this->clients); + + return $validator->isValid($host); } /** diff --git a/src/Appwrite/Resque/Worker.php b/src/Appwrite/Resque/Worker.php index 9682688736..88489b5412 100644 --- a/src/Appwrite/Resque/Worker.php +++ b/src/Appwrite/Resque/Worker.php @@ -209,7 +209,7 @@ abstract class Worker throw new \Exception("Project does not exist: {$projectId}"); } - if ($type === self::DATABASE_CONSOLE && !$database->exists($database->getDefaultDatabase(), 'realtime')) { + if ($type === self::DATABASE_CONSOLE && !$database->exists($database->getDefaultDatabase(), '_metadata')) { throw new \Exception('Console project not ready'); } diff --git a/src/Appwrite/Utopia/Database/Validator/OrderAttributes.php b/src/Appwrite/Utopia/Database/Validator/OrderAttributes.php new file mode 100644 index 0000000000..628615f006 --- /dev/null +++ b/src/Appwrite/Utopia/Database/Validator/OrderAttributes.php @@ -0,0 +1,25 @@ +getAttribute('status') === 'available'; + }); + + parent::__construct($attributes, $indexes, $strict); + } +} \ No newline at end of file diff --git a/src/Appwrite/Utopia/Database/Validator/Queries.php b/src/Appwrite/Utopia/Database/Validator/Queries.php new file mode 100644 index 0000000000..73bf04be40 --- /dev/null +++ b/src/Appwrite/Utopia/Database/Validator/Queries.php @@ -0,0 +1,25 @@ +getAttribute('status') === 'available'; + }); + + parent::__construct($attributes, $indexes, $strict); + } +} \ No newline at end of file diff --git a/src/Appwrite/Utopia/Request/Filters/V14.php b/src/Appwrite/Utopia/Request/Filters/V14.php new file mode 100644 index 0000000000..7130307f0d --- /dev/null +++ b/src/Appwrite/Utopia/Request/Filters/V14.php @@ -0,0 +1,34 @@ +convertEvents($content); + break; + } + + return $content; + } + + private function convertEvents($content) + { + $migration = new MigrationV13(); + + $events = $content['events'] ?? []; + $content['events'] = $migration->migrateEvents($events); + + return $content; + } +} diff --git a/src/Appwrite/Utopia/Response/Filters/V11.php b/src/Appwrite/Utopia/Response/Filters/V11.php index 805e2a09c4..746269c8e7 100644 --- a/src/Appwrite/Utopia/Response/Filters/V11.php +++ b/src/Appwrite/Utopia/Response/Filters/V11.php @@ -4,7 +4,6 @@ namespace Appwrite\Utopia\Response\Filters; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Filter; -use Exception; class V11 extends Filter { diff --git a/src/Appwrite/Utopia/Response/Filters/V12.php b/src/Appwrite/Utopia/Response/Filters/V12.php index a713076e1c..6b19b2ce0f 100644 --- a/src/Appwrite/Utopia/Response/Filters/V12.php +++ b/src/Appwrite/Utopia/Response/Filters/V12.php @@ -4,7 +4,6 @@ namespace Appwrite\Utopia\Response\Filters; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Filter; -use Exception; class V12 extends Filter { diff --git a/src/Appwrite/Utopia/Response/Filters/V13.php b/src/Appwrite/Utopia/Response/Filters/V13.php new file mode 100644 index 0000000000..c3795d2180 --- /dev/null +++ b/src/Appwrite/Utopia/Response/Filters/V13.php @@ -0,0 +1,97 @@ +parseProject($content); + break; + + case Response::MODEL_PROJECT_LIST: + $parsedResponse = $this->parseProjectList($content); + break; + + case Response::MODEL_MEMBERSHIP: + $parsedResponse = $this->parseMembership($content); + break; + case Response::MODEL_MEMBERSHIP_LIST: + $parsedResponse = $this->parseMembershipList($content); + break; + + case Response::MODEL_EXECUTION: + $parsedResponse = $this->parseExecution($content); + break; + case Response::MODEL_EXECUTION_LIST: + $parsedResponse = $this->parseExecutionList($content); + break; + } + + return $parsedResponse; + } + + protected function parseExecution($content) { + $content['stdout'] = $content['response']; + unset($content['response']); + + return $content; + } + + protected function parseExecutionList($content) { + $executions = $content['executions']; + $parsedResponse = []; + foreach ($executions as $document) { + $parsedResponse[] = $this->parseExecution($document); + } + $content['executions'] = $parsedResponse; + return $content; + } + + protected function parseProject($content) { + $content['providers'] = $content['authProviders']; + unset($content['authProviders']); + + return $content; + } + + protected function parseProjectList($content) { + $projects = $content['projects']; + $parsedResponse = []; + foreach ($projects as $document) { + $parsedResponse[] = $this->parseProject($document); + } + $content['projects'] = $parsedResponse; + return $content; + } + + protected function parseMembership($content) { + $content['name'] = $content['userName']; + unset($content['userName']); + + $content['email'] = $content['userEmail']; + unset($content['userEmail']); + + unset($content['teamName']); + + return $content; + } + + protected function parseMembershipList($content) { + $memberships = $content['memberships']; + $parsedResponse = []; + foreach ($memberships as $document) { + $parsedResponse[] = $this->parseMembership($document); + } + $content['memberships'] = $parsedResponse; + return $content; + } +} \ No newline at end of file diff --git a/src/Appwrite/Utopia/Response/Model/Execution.php b/src/Appwrite/Utopia/Response/Model/Execution.php index 31d32ffbb0..a8031bb0cd 100644 --- a/src/Appwrite/Utopia/Response/Model/Execution.php +++ b/src/Appwrite/Utopia/Response/Model/Execution.php @@ -53,9 +53,9 @@ class Execution extends Model 'default' => 0, 'example' => 0, ]) - ->addRule('stdout', [ + ->addRule('response', [ 'type' => self::TYPE_STRING, - 'description' => 'The script stdout output string. Logs the last 4,000 characters of the execution stdout output.', + 'description' => 'The script response output string. Logs the last 4,000 characters of the execution response output.', 'default' => '', 'example' => '', ]) diff --git a/src/Appwrite/Utopia/Response/Model/Membership.php b/src/Appwrite/Utopia/Response/Model/Membership.php index 2ea309ab36..2e093b7650 100644 --- a/src/Appwrite/Utopia/Response/Model/Membership.php +++ b/src/Appwrite/Utopia/Response/Model/Membership.php @@ -22,24 +22,30 @@ class Membership extends Model 'default' => '', 'example' => '5e5ea5c16897e', ]) + ->addRule('userName', [ + 'type' => self::TYPE_STRING, + 'description' => 'User name.', + 'default' => '', + 'example' => 'John Doe', + ]) + ->addRule('userEmail', [ + 'type' => self::TYPE_STRING, + 'description' => 'User email address.', + 'default' => '', + 'example' => 'john@appwrite.io', + ]) ->addRule('teamId', [ 'type' => self::TYPE_STRING, 'description' => 'Team ID.', 'default' => '', 'example' => '5e5ea5c16897e', ]) - ->addRule('name', [ + ->addRule('teamName', [ 'type' => self::TYPE_STRING, - 'description' => 'User name.', + 'description' => 'Team name.', 'default' => '', 'example' => 'VIP', ]) - ->addRule('email', [ - 'type' => self::TYPE_STRING, - 'description' => 'User email address.', - 'default' => '', - 'example' => 'john@appwrite.io', - ]) ->addRule('invited', [ 'type' => self::TYPE_INTEGER, 'description' => 'Date, the user has been invited to join the team in Unix timestamp.', diff --git a/tests/e2e/Scopes/ProjectCustom.php b/tests/e2e/Scopes/ProjectCustom.php index 07b5d3be5c..049583743c 100644 --- a/tests/e2e/Scopes/ProjectCustom.php +++ b/tests/e2e/Scopes/ProjectCustom.php @@ -98,54 +98,11 @@ trait ProjectCustom ], [ 'name' => 'Webhook Test', 'events' => [ - 'account.create', - 'account.update.email', - 'account.update.name', - 'account.update.password', - 'account.update.prefs', - 'account.recovery.create', - 'account.recovery.update', - 'account.verification.create', - 'account.verification.update', - 'account.delete', - 'account.sessions.create', - 'account.sessions.update', - 'account.sessions.delete', - 'database.collections.create', - 'database.collections.update', - 'database.collections.delete', - 'database.attributes.create', - 'database.attributes.delete', - 'database.indexes.create', - 'database.indexes.delete', - 'database.documents.create', - 'database.documents.update', - 'database.documents.delete', - 'functions.create', - 'functions.update', - 'functions.delete', - 'functions.deployments.create', - 'functions.deployments.update', - 'functions.deployments.delete', - 'functions.executions.create', - 'functions.executions.update', - 'storage.files.create', - 'storage.files.update', - 'storage.files.delete', - 'storage.buckets.create', - 'storage.buckets.update', - 'storage.buckets.delete', - 'users.create', - 'users.update.prefs', - 'users.update.status', - 'users.delete', - 'users.sessions.delete', - 'teams.create', - 'teams.update', - 'teams.delete', - 'teams.memberships.create', - 'teams.memberships.update.status', - 'teams.memberships.delete', + 'collections.*', + 'functions.*', + 'buckets.*', + 'teams.*', + 'users.*' ], 'url' => 'http://request-catcher:5000/webhook', 'security' => false, diff --git a/tests/e2e/Services/Account/AccountBase.php b/tests/e2e/Services/Account/AccountBase.php index cca6c8ff72..301ffff8ac 100644 --- a/tests/e2e/Services/Account/AccountBase.php +++ b/tests/e2e/Services/Account/AccountBase.php @@ -310,7 +310,8 @@ trait AccountBase { sleep(10); $session = $data['session'] ?? ''; - + $sessionId = $data['sessionId'] ?? ''; + $userId = $data['id'] ?? ''; /** * Test for SUCCESS */ @@ -326,8 +327,7 @@ trait AccountBase $this->assertNotEmpty($response['body']['logs']); $this->assertCount(2, $response['body']['logs']); $this->assertIsNumeric($response['body']['total']); - - $this->assertContains($response['body']['logs'][0]['event'], ['account.create', 'account.sessions.create']); + $this->assertContains($response['body']['logs'][0]['event'], ["users.{$userId}.create", "users.{$userId}.sessions.{$sessionId}.create"]); $this->assertEquals($response['body']['logs'][0]['ip'], filter_var($response['body']['logs'][0]['ip'], FILTER_VALIDATE_IP)); $this->assertIsNumeric($response['body']['logs'][0]['time']); @@ -349,7 +349,7 @@ trait AccountBase $this->assertEquals('--', $response['body']['logs'][0]['countryCode']); $this->assertEquals('Unknown', $response['body']['logs'][0]['countryName']); - $this->assertContains($response['body']['logs'][1]['event'], ['account.create', 'account.sessions.create']); + $this->assertContains($response['body']['logs'][1]['event'], ["users.{$userId}.create", "users.{$userId}.sessions.{$sessionId}.create"]); $this->assertEquals($response['body']['logs'][1]['ip'], filter_var($response['body']['logs'][1]['ip'], FILTER_VALIDATE_IP)); $this->assertIsNumeric($response['body']['logs'][1]['time']); @@ -445,7 +445,7 @@ trait AccountBase { $email = $data['email'] ?? ''; $session = $data['session'] ?? ''; - $newName = 'New Name'; + $newName = 'Lorem'; /** * Test for SUCCESS @@ -477,7 +477,7 @@ trait AccountBase ])); $this->assertEquals($response['headers']['status-code'], 401); - + $response = $this->client->call(Client::METHOD_PATCH, '/account/name', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', @@ -485,7 +485,7 @@ trait AccountBase 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, ]), [ ]); - + $this->assertEquals($response['headers']['status-code'], 400); $response = $this->client->call(Client::METHOD_PATCH, '/account/name', array_merge([ @@ -496,7 +496,7 @@ trait AccountBase ]), [ 'name' => 'ocSRq1d3QphHivJyUmYY7WMnrxyjdk5YvVwcDqx2zS0coxESN8RmsQwLWw5Whnf0WbVohuFWTRAaoKgCOO0Y0M7LwgFnZmi8881Y72222222222222222222222222222' ]); - + $this->assertEquals($response['headers']['status-code'], 400); $data['name'] = $newName; @@ -532,7 +532,6 @@ trait AccountBase $this->assertNotEmpty($response['body']['$id']); $this->assertIsNumeric($response['body']['registration']); $this->assertEquals($response['body']['email'], $email); - $this->assertEquals($response['body']['name'], 'New Name'); $response = $this->client->call(Client::METHOD_POST, '/account/sessions', array_merge([ 'origin' => 'http://localhost', @@ -625,7 +624,6 @@ trait AccountBase $this->assertNotEmpty($response['body']['$id']); $this->assertIsNumeric($response['body']['registration']); $this->assertEquals($response['body']['email'], $newEmail); - $this->assertEquals($response['body']['name'], 'New Name'); /** * Test for FAILURE @@ -637,7 +635,7 @@ trait AccountBase ])); $this->assertEquals($response['headers']['status-code'], 401); - + $response = $this->client->call(Client::METHOD_PATCH, '/account/email', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', @@ -645,7 +643,7 @@ trait AccountBase 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, ]), [ ]); - + $this->assertEquals($response['headers']['status-code'], 400); // Test if we can create a new account with the old email @@ -1279,7 +1277,7 @@ trait AccountBase $expireTime = strpos($lastEmail['text'], 'expire='.$response['body']['expire'], 0); $this->assertNotFalse($expireTime); - + $secretTest = strpos($lastEmail['text'], 'secret='.$response['body']['secret'], 0); $this->assertNotFalse($secretTest); @@ -1339,6 +1337,7 @@ trait AccountBase { $id = $data['id'] ?? ''; $token = $data['token'] ?? ''; + $email = $data['email'] ?? ''; /** * Test for SUCCESS @@ -1361,6 +1360,20 @@ trait AccountBase $sessionId = $response['body']['$id']; $session = $this->client->parseCookie((string)$response['headers']['set-cookie'])['a_session_'.$this->getProject()['$id']]; + $response = $this->client->call(Client::METHOD_GET, '/account', array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + ])); + + $this->assertEquals($response['headers']['status-code'], 200); + $this->assertNotEmpty($response['body']); + $this->assertNotEmpty($response['body']['$id']); + $this->assertIsNumeric($response['body']['registration']); + $this->assertEquals($response['body']['email'], $email); + $this->assertTrue($response['body']['emailVerification']); + /** * Test for FAILURE */ diff --git a/tests/e2e/Services/Account/AccountCustomClientTest.php b/tests/e2e/Services/Account/AccountCustomClientTest.php index 2b06828a6e..e041946fe5 100644 --- a/tests/e2e/Services/Account/AccountCustomClientTest.php +++ b/tests/e2e/Services/Account/AccountCustomClientTest.php @@ -17,7 +17,7 @@ class AccountCustomClientTest extends Scope /** * @depends testCreateAccountSession */ - public function testCreateOAuth2AccountSession():array + public function testCreateOAuth2AccountSession(): array { $provider = 'mock'; $appId = '1'; @@ -26,7 +26,7 @@ class AccountCustomClientTest extends Scope /** * Test for SUCCESS */ - $response = $this->client->call(Client::METHOD_PATCH, '/projects/'.$this->getProject()['$id'].'/oauth2', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $this->getProject()['$id'] . '/oauth2', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => 'console', @@ -39,7 +39,7 @@ class AccountCustomClientTest extends Scope $this->assertEquals($response['headers']['status-code'], 200); - $response = $this->client->call(Client::METHOD_GET, '/account/sessions/oauth2/'.$provider, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/account/sessions/oauth2/' . $provider, array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -54,9 +54,9 @@ class AccountCustomClientTest extends Scope return []; } - public function testBlockedAccount():array + public function testBlockedAccount(): array { - $email = uniqid().'user@localhost.test'; + $email = uniqid() . 'user@localhost.test'; $password = 'password'; $name = 'User Name (blocked)'; @@ -77,7 +77,7 @@ class AccountCustomClientTest extends Scope $id = $response['body']['$id']; $this->assertEquals($response['headers']['status-code'], 201); - + $response = $this->client->call(Client::METHOD_POST, '/account/sessions', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', @@ -90,13 +90,13 @@ class AccountCustomClientTest extends Scope $this->assertEquals($response['headers']['status-code'], 201); $sessionId = $response['body']['$id']; - $session = $this->client->parseCookie((string)$response['headers']['set-cookie'])['a_session_'.$this->getProject()['$id']]; + $session = $this->client->parseCookie((string)$response['headers']['set-cookie'])['a_session_' . $this->getProject()['$id']]; $response = $this->client->call(Client::METHOD_GET, '/account', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ])); $this->assertEquals($response['headers']['status-code'], 200); @@ -115,7 +115,7 @@ class AccountCustomClientTest extends Scope 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ])); $this->assertEquals($response['headers']['status-code'], 401); @@ -134,9 +134,89 @@ class AccountCustomClientTest extends Scope return []; } - public function testCreateJWT():array + + public function testSelfBlockedAccount(): array { - $email = uniqid().'user@localhost.test'; + $email = uniqid() . 'user55@localhost.test'; + $password = 'password'; + $name = 'User Name (self blocked)'; + + /** + * Test for SUCCESS + */ + $response = $this->client->call(Client::METHOD_POST, '/account', array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ]), [ + 'userId' => 'unique()', + 'email' => $email, + 'password' => $password, + 'name' => $name, + ]); + + $id = $response['body']['$id']; + + $this->assertEquals($response['headers']['status-code'], 201); + + $response = $this->client->call(Client::METHOD_POST, '/account/sessions', array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ]), [ + 'email' => $email, + 'password' => $password, + ]); + + $this->assertEquals($response['headers']['status-code'], 201); + + $session = $this->client->parseCookie((string)$response['headers']['set-cookie'])['a_session_' . $this->getProject()['$id']]; + + $response = $this->client->call(Client::METHOD_GET, '/account', array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, + ])); + + $this->assertEquals($response['headers']['status-code'], 200); + + $response = $this->client->call(Client::METHOD_PATCH, '/account/status', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, + ], [ + 'status' => false, + ]); + + $this->assertEquals($response['headers']['status-code'], 200); + + $response = $this->client->call(Client::METHOD_GET, '/account', array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, + ])); + + $this->assertEquals($response['headers']['status-code'], 401); + + $response = $this->client->call(Client::METHOD_POST, '/account/sessions', array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ]), [ + 'email' => $email, + 'password' => $password, + ]); + + $this->assertEquals($response['headers']['status-code'], 401); + + return []; + } + + public function testCreateJWT(): array + { + $email = uniqid() . 'user@localhost.test'; $password = 'password'; $name = 'User Name (JWT)'; @@ -157,7 +237,7 @@ class AccountCustomClientTest extends Scope $id = $response['body']['$id']; $this->assertEquals($response['headers']['status-code'], 201); - + $response = $this->client->call(Client::METHOD_POST, '/account/sessions', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', @@ -170,13 +250,13 @@ class AccountCustomClientTest extends Scope $this->assertEquals($response['headers']['status-code'], 201); $sessionId = $response['body']['$id']; - $session = $this->client->parseCookie((string)$response['headers']['set-cookie'])['a_session_'.$this->getProject()['$id']]; + $session = $this->client->parseCookie((string)$response['headers']['set-cookie'])['a_session_' . $this->getProject()['$id']]; $response = $this->client->call(Client::METHOD_GET, '/account', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ])); $this->assertEquals($response['headers']['status-code'], 200); @@ -185,7 +265,7 @@ class AccountCustomClientTest extends Scope 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ])); $this->assertEquals($response['headers']['status-code'], 201); @@ -212,11 +292,11 @@ class AccountCustomClientTest extends Scope $this->assertEquals($response['headers']['status-code'], 200); - $response = $this->client->call(Client::METHOD_DELETE, '/account/sessions/'.$sessionId, array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/account/sessions/' . $sessionId, array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ])); $this->assertEquals($response['headers']['status-code'], 204); @@ -249,7 +329,7 @@ class AccountCustomClientTest extends Scope $this->assertNotEmpty($response['body']); $this->assertNotEmpty($response['body']['$id']); - $session = $this->client->parseCookie((string)$response['headers']['set-cookie'])['a_session_'.$this->getProject()['$id']]; + $session = $this->client->parseCookie((string)$response['headers']['set-cookie'])['a_session_' . $this->getProject()['$id']]; /** * Test for FAILURE @@ -258,7 +338,7 @@ class AccountCustomClientTest extends Scope 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ]); $this->assertEquals(401, $response['headers']['status-code']); @@ -278,7 +358,7 @@ class AccountCustomClientTest extends Scope 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ]), [ 'oldPassword' => '', ]); @@ -293,7 +373,7 @@ class AccountCustomClientTest extends Scope */ public function testUpdateAnonymousAccountEmail($session) { - $email = uniqid().'new@localhost.test'; + $email = uniqid() . 'new@localhost.test'; /** * Test for FAILURE @@ -302,7 +382,7 @@ class AccountCustomClientTest extends Scope 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ]), [ 'email' => $email, 'password' => '', @@ -316,7 +396,7 @@ class AccountCustomClientTest extends Scope public function testConvertAnonymousAccount() { $session = $this->testCreateAnonymousAccount(); - $email = uniqid().'new@localhost.test'; + $email = uniqid() . 'new@localhost.test'; $password = 'new-password'; /** @@ -336,7 +416,7 @@ class AccountCustomClientTest extends Scope 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ]), [ 'email' => $email, 'password' => $password, @@ -347,13 +427,13 @@ class AccountCustomClientTest extends Scope /** * Test for SUCCESS */ - $email = uniqid().'new@localhost.test'; + $email = uniqid() . 'new@localhost.test'; $response = $this->client->call(Client::METHOD_PATCH, '/account/email', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ]), [ 'email' => $email, 'password' => $password, @@ -394,14 +474,14 @@ class AccountCustomClientTest extends Scope 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ])); $this->assertEquals($response['headers']['status-code'], 200); $userId = $response['body']['$id'] ?? ''; - - $response = $this->client->call(Client::METHOD_PATCH, '/projects/'.$this->getProject()['$id'].'/oauth2', array_merge([ + + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $this->getProject()['$id'] . '/oauth2', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => 'console', @@ -414,26 +494,26 @@ class AccountCustomClientTest extends Scope $this->assertEquals($response['headers']['status-code'], 200); - $response = $this->client->call(Client::METHOD_GET, '/account/sessions/oauth2/'.$provider, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/account/sessions/oauth2/' . $provider, array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ]), [ 'success' => 'http://localhost/v1/mock/tests/general/oauth2/success', 'failure' => 'http://localhost/v1/mock/tests/general/oauth2/failure', ]); - $session = $this->client->parseCookie((string)$response['headers']['set-cookie'])['a_session_'.$this->getProject()['$id']]; + $session = $this->client->parseCookie((string)$response['headers']['set-cookie'])['a_session_' . $this->getProject()['$id']]; $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals('success', $response['body']['result']); - + $response = $this->client->call(Client::METHOD_GET, '/account', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ])); $this->assertEquals($response['headers']['status-code'], 200); @@ -449,7 +529,7 @@ class AccountCustomClientTest extends Scope 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ])); $this->assertEquals(200, $response['headers']['status-code']); @@ -458,14 +538,14 @@ class AccountCustomClientTest extends Scope $this->assertGreaterThan(\time() + 14400 - 5, $response['body']['providerAccessTokenExpiry']); // 5 seconds allowed networking delay $initialExpiry = $response['body']['providerAccessTokenExpiry']; - + sleep(3); $response = $this->client->call(Client::METHOD_PATCH, '/account/sessions/current', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ])); $this->assertEquals(200, $response['headers']['status-code']); @@ -476,14 +556,15 @@ class AccountCustomClientTest extends Scope return []; } - public function testGetSessionByID() { + public function testGetSessionByID() + { $session = $this->testCreateAnonymousAccount(); $response = $this->client->call(Client::METHOD_GET, '/account/sessions/current', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ])); $this->assertEquals($response['headers']['status-code'], 200); @@ -491,11 +572,11 @@ class AccountCustomClientTest extends Scope $sessionID = $response['body']['$id']; - $response = $this->client->call(Client::METHOD_GET, '/account/sessions/'.$sessionID, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/account/sessions/' . $sessionID, array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ])); $this->assertEquals($response['headers']['status-code'], 200); @@ -505,9 +586,90 @@ class AccountCustomClientTest extends Scope 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ])); $this->assertEquals($response['headers']['status-code'], 404); } -} \ No newline at end of file + + /** + * @depends testUpdateAccountName + */ + public function testUpdateAccountNameSearch($data): void + { + $id = $data['id'] ?? ''; + $email = $data['email'] ?? ''; + $newName = 'Lorem'; + + /** + * Test for SUCCESS + */ + $response = $this->client->call(Client::METHOD_GET, '/users', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], [ + 'search' => $newName + ]); + + $this->assertEquals($response['headers']['status-code'], 200); + $this->assertNotEmpty($response['body']); + $this->assertNotEmpty($response['body']['users']); + $this->assertCount(1, $response['body']['users']); + $this->assertEquals($response['body']['users'][0]['email'], $email); + + $response = $this->client->call(Client::METHOD_GET, '/users', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], [ + 'search' => $id + ]); + + $this->assertEquals($response['headers']['status-code'], 200); + $this->assertNotEmpty($response['body']); + $this->assertNotEmpty($response['body']['users']); + $this->assertCount(1, $response['body']['users']); + $this->assertEquals($response['body']['users'][0]['email'], $email); + } + + /** + * @depends testUpdateAccountEmail + */ + public function testUpdateAccountEmailSearch($data): void + { + $id = $data['id'] ?? ''; + $email = $data['email'] ?? ''; + + /** + * Test for SUCCESS + */ + $response = $this->client->call(Client::METHOD_GET, '/users', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], [ + 'search' => '"' . $email . '"' + ]); + + $this->assertEquals($response['headers']['status-code'], 200); + $this->assertNotEmpty($response['body']); + $this->assertNotEmpty($response['body']['users']); + $this->assertCount(1, $response['body']['users']); + $this->assertEquals($response['body']['users'][0]['email'], $email); + + $response = $this->client->call(Client::METHOD_GET, '/users', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], [ + 'search' => $id + ]); + + $this->assertEquals($response['headers']['status-code'], 200); + $this->assertNotEmpty($response['body']); + $this->assertNotEmpty($response['body']['users']); + $this->assertCount(1, $response['body']['users']); + $this->assertEquals($response['body']['users'][0]['email'], $email); + } +} diff --git a/tests/e2e/Services/Account/AccountCustomServerTest.php b/tests/e2e/Services/Account/AccountCustomServerTest.php index fabbc5b77f..832dd34389 100644 --- a/tests/e2e/Services/Account/AccountCustomServerTest.php +++ b/tests/e2e/Services/Account/AccountCustomServerTest.php @@ -33,7 +33,7 @@ class AccountCustomServerTest extends Scope ]); $this->assertEquals(401, $response['headers']['status-code']); - + return []; } } \ No newline at end of file diff --git a/tests/e2e/Services/Database/DatabaseBase.php b/tests/e2e/Services/Database/DatabaseBase.php index 94e737ff37..640ab99361 100644 --- a/tests/e2e/Services/Database/DatabaseBase.php +++ b/tests/e2e/Services/Database/DatabaseBase.php @@ -1428,6 +1428,7 @@ trait DatabaseBase ]), [ 'key' => 'probability', 'required' => false, + 'default' => 0, 'min' => 0, 'max' => 1, ]); diff --git a/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php b/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php index a0f6cca5e6..0180a87de3 100644 --- a/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php +++ b/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php @@ -28,8 +28,8 @@ class FunctionsConsoleClientTest extends Scope 'funcKey3' => 'funcValue3', ], 'events' => [ - 'account.create', - 'account.delete', + 'users.*.create', + 'users.*.delete', ], 'schedule' => '0 0 1 1 *', 'timeout' => 10, diff --git a/tests/e2e/Services/Functions/FunctionsCustomClientTest.php b/tests/e2e/Services/Functions/FunctionsCustomClientTest.php index d2443783c0..8927302819 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomClientTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomClientTest.php @@ -33,8 +33,8 @@ class FunctionsCustomClientTest extends Scope 'funcKey3' => 'funcValue3', ], 'events' => [ - 'account.create', - 'account.delete', + 'users.*.create', + 'users.*.delete', ], 'schedule' => '0 0 1 1 *', 'timeout' => 10, @@ -65,8 +65,8 @@ class FunctionsCustomClientTest extends Scope 'funcKey3' => 'funcValue3', ], 'events' => [ - 'account.create', - 'account.delete', + 'users.*.create', + 'users.*.delete', ], 'schedule' => '0 0 1 1 *', 'timeout' => 10, @@ -208,7 +208,7 @@ class FunctionsCustomClientTest extends Scope 'x-appwrite-key' => $apikey, ]); - $output = json_decode($executions['body']['stdout'], true); + $output = json_decode($executions['body']['response'], true); $this->assertEquals(200, $executions['headers']['status-code']); $this->assertEquals('completed', $executions['body']['status']); $this->assertEquals($functionId, $output['APPWRITE_FUNCTION_ID']); @@ -383,7 +383,7 @@ class FunctionsCustomClientTest extends Scope 'async' => false ]); - $output = json_decode($execution['body']['stdout'], true); + $output = json_decode($execution['body']['response'], true); $this->assertEquals(201, $execution['headers']['status-code']); $this->assertEquals('completed', $execution['body']['status']); $this->assertEquals($functionId, $output['APPWRITE_FUNCTION_ID']); diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index 9ae65e0771..307a634393 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -16,7 +16,7 @@ class FunctionsCustomServerTest extends Scope use ProjectCustom; use SideServer; - public function testCreate():array + public function testCreate(): array { /** * Test for SUCCESS @@ -34,8 +34,8 @@ class FunctionsCustomServerTest extends Scope 'funcKey3' => 'funcValue3', ], 'events' => [ - 'account.create', - 'account.delete', + 'users.*.create', + 'users.*.delete', ], 'schedule' => '0 0 1 1 *', 'timeout' => 10, @@ -56,12 +56,12 @@ class FunctionsCustomServerTest extends Scope 'funcKey3' => 'funcValue3', ], $response1['body']['vars']); $this->assertEquals([ - 'account.create', - 'account.delete', + 'users.*.create', + 'users.*.delete', ], $response1['body']['events']); $this->assertEquals('0 0 1 1 *', $response1['body']['schedule']); $this->assertEquals(10, $response1['body']['timeout']); - + /** * Test for FAILURE */ @@ -74,7 +74,7 @@ class FunctionsCustomServerTest extends Scope /** * @depends testCreate */ - public function testList(array $data):array + public function testList(array $data): array { /** * Test for SUCCESS @@ -132,8 +132,8 @@ class FunctionsCustomServerTest extends Scope 'funcKey3' => 'funcValue3', ], 'events' => [ - 'account.create', - 'account.delete', + 'users.*.create', + 'users.*.delete', ], 'schedule' => '0 0 1 1 *', 'timeout' => 10, @@ -193,7 +193,7 @@ class FunctionsCustomServerTest extends Scope /** * @depends testList */ - public function testGet(array $data):array + public function testGet(array $data): array { /** * Test for SUCCESS @@ -222,12 +222,12 @@ class FunctionsCustomServerTest extends Scope /** * @depends testGet */ - public function testUpdate($data):array + public function testUpdate($data): array { /** * Test for SUCCESS */ - $response1 = $this->client->call(Client::METHOD_PUT, '/functions/'.$data['functionId'], array_merge([ + $response1 = $this->client->call(Client::METHOD_PUT, '/functions/' . $data['functionId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -238,8 +238,8 @@ class FunctionsCustomServerTest extends Scope 'key6' => 'value6', ], 'events' => [ - 'account.update.name', - 'account.update.email', + 'users.*.update.name', + 'users.*.update.email', ], 'schedule' => '0 0 1 1 *', 'timeout' => 5, @@ -257,12 +257,12 @@ class FunctionsCustomServerTest extends Scope 'key6' => 'value6', ], $response1['body']['vars']); $this->assertEquals([ - 'account.update.name', - 'account.update.email', + 'users.*.update.name', + 'users.*.update.email', ], $response1['body']['events']); $this->assertEquals('0 0 1 1 *', $response1['body']['schedule']); $this->assertEquals(5, $response1['body']['timeout']); - + /** * Test for FAILURE */ @@ -273,16 +273,16 @@ class FunctionsCustomServerTest extends Scope /** * @depends testUpdate */ - public function testCreateDeployment($data):array + public function testCreateDeployment($data): array { /** * Test for SUCCESS */ $folder = 'php'; - $code = realpath(__DIR__ . '/../../../resources/functions'). "/$folder/code.tar.gz"; + $code = realpath(__DIR__ . '/../../../resources/functions') . "/$folder/code.tar.gz"; $this->packageCode($folder); - $deployment = $this->client->call(Client::METHOD_POST, '/functions/'.$data['functionId'].'/deployments', array_merge([ + $deployment = $this->client->call(Client::METHOD_POST, '/functions/' . $data['functionId'] . '/deployments', array_merge([ 'content-type' => 'multipart/form-data', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -306,16 +306,17 @@ class FunctionsCustomServerTest extends Scope /** * @depends testUpdate */ - public function testCreateDeploymentLarge($data): array { + public function testCreateDeploymentLarge($data): array + { /** * Test for Large Code File SUCCESS */ $folder = 'php-large'; - $code = realpath(__DIR__ . '/../../../resources/functions'). "/$folder/code.tar.gz"; + $code = realpath(__DIR__ . '/../../../resources/functions') . "/$folder/code.tar.gz"; $this->packageCode($folder); - $chunkSize = 5*1024*1024; + $chunkSize = 5 * 1024 * 1024; $handle = @fopen($code, "rb"); $mimeType = 'application/x-gzip'; $counter = 0; @@ -328,10 +329,10 @@ class FunctionsCustomServerTest extends Scope while (!feof($handle)) { $curlFile = new \CURLFile('data://' . $mimeType . ';base64,' . base64_encode(@fread($handle, $chunkSize)), $mimeType, 'php-large-fx.tar.gz'); $headers['content-range'] = 'bytes ' . ($counter * $chunkSize) . '-' . min(((($counter * $chunkSize) + $chunkSize) - 1), $size) . '/' . $size; - if(!empty($id)) { + if (!empty($id)) { $headers['x-appwrite-id'] = $id; } - $largeTag = $this->client->call(Client::METHOD_POST, '/functions/'.$data['functionId'].'/deployments', array_merge($headers, $this->getHeaders()), [ + $largeTag = $this->client->call(Client::METHOD_POST, '/functions/' . $data['functionId'] . '/deployments', array_merge($headers, $this->getHeaders()), [ 'entrypoint' => 'index.php', 'code' => $curlFile, ]); @@ -345,19 +346,19 @@ class FunctionsCustomServerTest extends Scope $this->assertIsInt($largeTag['body']['dateCreated']); $this->assertEquals('index.php', $largeTag['body']['entrypoint']); $this->assertGreaterThan(10000, $largeTag['body']['size']); - + return $data; } /** * @depends testCreateDeployment */ - public function testUpdateDeployment($data):array + public function testUpdateDeployment($data): array { /** * Test for SUCCESS */ - $response = $this->client->call(Client::METHOD_PATCH, '/functions/'.$data['functionId'].'/deployments/'.$data['deploymentId'], array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/functions/' . $data['functionId'] . '/deployments/' . $data['deploymentId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -367,7 +368,7 @@ class FunctionsCustomServerTest extends Scope $this->assertIsInt($response['body']['dateCreated']); $this->assertIsInt($response['body']['dateUpdated']); $this->assertEquals($data['deploymentId'], $response['body']['deployment']); - + /** * Test for FAILURE */ @@ -378,12 +379,12 @@ class FunctionsCustomServerTest extends Scope /** * @depends testCreateDeployment */ - public function testListDeployments(array $data):array + public function testListDeployments(array $data): array { /** * Test for SUCCESS */ - $function = $this->client->call(Client::METHOD_GET, '/functions/'.$data['functionId'].'/deployments', array_merge([ + $function = $this->client->call(Client::METHOD_GET, '/functions/' . $data['functionId'] . '/deployments', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -396,7 +397,7 @@ class FunctionsCustomServerTest extends Scope /** * Test search queries */ - $function = $this->client->call(Client::METHOD_GET, '/functions/'.$data['functionId'].'/deployments', array_merge([ + $function = $this->client->call(Client::METHOD_GET, '/functions/' . $data['functionId'] . '/deployments', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders(), [ @@ -409,7 +410,7 @@ class FunctionsCustomServerTest extends Scope $this->assertCount(2, $function['body']['deployments']); $this->assertEquals($function['body']['deployments'][0]['$id'], $data['deploymentId']); - $function = $this->client->call(Client::METHOD_GET, '/functions/'.$data['functionId'].'/deployments', array_merge([ + $function = $this->client->call(Client::METHOD_GET, '/functions/' . $data['functionId'] . '/deployments', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders(), [ @@ -422,7 +423,7 @@ class FunctionsCustomServerTest extends Scope $this->assertCount(2, $function['body']['deployments']); $this->assertEquals($function['body']['deployments'][0]['$id'], $data['deploymentId']); - $function = $this->client->call(Client::METHOD_GET, '/functions/'.$data['functionId'].'/deployments', array_merge([ + $function = $this->client->call(Client::METHOD_GET, '/functions/' . $data['functionId'] . '/deployments', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders(), [ @@ -441,12 +442,12 @@ class FunctionsCustomServerTest extends Scope /** * @depends testCreateDeployment */ - public function testGetDeployment(array $data):array + public function testGetDeployment(array $data): array { /** * Test for SUCCESS */ - $function = $this->client->call(Client::METHOD_GET, '/functions/'.$data['functionId'].'/deployments/' . $data['deploymentId'], array_merge([ + $function = $this->client->call(Client::METHOD_GET, '/functions/' . $data['functionId'] . '/deployments/' . $data['deploymentId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -456,7 +457,7 @@ class FunctionsCustomServerTest extends Scope /** * Test for FAILURE */ - $function = $this->client->call(Client::METHOD_GET, '/functions/'.$data['functionId'].'/deployments/x', array_merge([ + $function = $this->client->call(Client::METHOD_GET, '/functions/' . $data['functionId'] . '/deployments/x', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -469,12 +470,12 @@ class FunctionsCustomServerTest extends Scope /** * @depends testUpdateDeployment */ - public function testCreateExecution($data):array + public function testCreateExecution($data): array { /** * Test for SUCCESS */ - $execution = $this->client->call(Client::METHOD_POST, '/functions/'.$data['functionId'].'/executions', array_merge([ + $execution = $this->client->call(Client::METHOD_POST, '/functions/' . $data['functionId'] . '/executions', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -490,13 +491,13 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals($data['functionId'], $execution['body']['functionId']); $this->assertEquals('waiting', $execution['body']['status']); $this->assertEquals(0, $execution['body']['statusCode']); - $this->assertEquals('', $execution['body']['stdout']); + $this->assertEquals('', $execution['body']['response']); $this->assertEquals('', $execution['body']['stderr']); $this->assertEquals(0, $execution['body']['time']); sleep(5); - $execution = $this->client->call(Client::METHOD_GET, '/functions/'.$data['functionId'].'/executions/'.$executionId, array_merge([ + $execution = $this->client->call(Client::METHOD_GET, '/functions/' . $data['functionId'] . '/executions/' . $executionId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -507,13 +508,13 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals($data['functionId'], $execution['body']['functionId']); $this->assertEquals('completed', $execution['body']['status']); $this->assertEquals(200, $execution['body']['statusCode']); - $this->assertStringContainsString($execution['body']['functionId'], $execution['body']['stdout']); - $this->assertStringContainsString($data['deploymentId'], $execution['body']['stdout']); - $this->assertStringContainsString('Test1', $execution['body']['stdout']); - $this->assertStringContainsString('http', $execution['body']['stdout']); - $this->assertStringContainsString('PHP', $execution['body']['stdout']); - $this->assertStringContainsString('8.0', $execution['body']['stdout']); - $this->assertStringContainsString('êä', $execution['body']['stdout']); // tests unknown utf-8 chars + $this->assertStringContainsString($execution['body']['functionId'], $execution['body']['response']); + $this->assertStringContainsString($data['deploymentId'], $execution['body']['response']); + $this->assertStringContainsString('Test1', $execution['body']['response']); + $this->assertStringContainsString('http', $execution['body']['response']); + $this->assertStringContainsString('PHP', $execution['body']['response']); + $this->assertStringContainsString('8.0', $execution['body']['response']); + $this->assertStringContainsString('êä', $execution['body']['response']); // tests unknown utf-8 chars $this->assertEquals('', $execution['body']['stderr']); $this->assertLessThan(0.500, $execution['body']['time']); @@ -529,12 +530,12 @@ class FunctionsCustomServerTest extends Scope /** * @depends testCreateExecution */ - public function testListExecutions(array $data):array + public function testListExecutions(array $data): array { /** * Test for SUCCESS */ - $function = $this->client->call(Client::METHOD_GET, '/functions/'.$data['functionId'].'/executions', array_merge([ + $function = $this->client->call(Client::METHOD_GET, '/functions/' . $data['functionId'] . '/executions', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -549,7 +550,7 @@ class FunctionsCustomServerTest extends Scope * Test search queries */ - $response = $this->client->call(Client::METHOD_GET, '/functions/'.$data['functionId'].'/executions', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/functions/' . $data['functionId'] . '/executions', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -562,7 +563,7 @@ class FunctionsCustomServerTest extends Scope $this->assertCount(1, $response['body']['executions']); $this->assertEquals($data['functionId'], $response['body']['executions'][0]['functionId']); - $response = $this->client->call(Client::METHOD_GET, '/functions/'.$data['functionId'].'/executions', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/functions/' . $data['functionId'] . '/executions', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -581,12 +582,12 @@ class FunctionsCustomServerTest extends Scope /** * @depends testUpdateDeployment */ - public function testSyncCreateExecution($data):array + public function testSyncCreateExecution($data): array { /** * Test for SUCCESS */ - $execution = $this->client->call(Client::METHOD_POST, '/functions/'.$data['functionId'].'/executions', array_merge([ + $execution = $this->client->call(Client::METHOD_POST, '/functions/' . $data['functionId'] . '/executions', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -596,12 +597,12 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(201, $execution['headers']['status-code']); $this->assertEquals('completed', $execution['body']['status']); - $this->assertStringContainsString($data['deploymentId'], $execution['body']['stdout']); - $this->assertStringContainsString('Test1', $execution['body']['stdout']); - $this->assertStringContainsString('http', $execution['body']['stdout']); - $this->assertStringContainsString('PHP', $execution['body']['stdout']); - $this->assertStringContainsString('8.0', $execution['body']['stdout']); - $this->assertStringContainsString('êä', $execution['body']['stdout']); // tests unknown utf-8 chars + $this->assertStringContainsString($data['deploymentId'], $execution['body']['response']); + $this->assertStringContainsString('Test1', $execution['body']['response']); + $this->assertStringContainsString('http', $execution['body']['response']); + $this->assertStringContainsString('PHP', $execution['body']['response']); + $this->assertStringContainsString('8.0', $execution['body']['response']); + $this->assertStringContainsString('êä', $execution['body']['response']); // tests unknown utf-8 chars $this->assertLessThan(0.500, $execution['body']['time']); return $data; @@ -610,12 +611,12 @@ class FunctionsCustomServerTest extends Scope /** * @depends testListExecutions */ - public function testGetExecution(array $data):array + public function testGetExecution(array $data): array { /** * Test for SUCCESS */ - $function = $this->client->call(Client::METHOD_GET, '/functions/'.$data['functionId'].'/executions/' . $data['executionId'], array_merge([ + $function = $this->client->call(Client::METHOD_GET, '/functions/' . $data['functionId'] . '/executions/' . $data['executionId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -626,7 +627,7 @@ class FunctionsCustomServerTest extends Scope /** * Test for FAILURE */ - $function = $this->client->call(Client::METHOD_GET, '/functions/'.$data['functionId'].'/executions/x', array_merge([ + $function = $this->client->call(Client::METHOD_GET, '/functions/' . $data['functionId'] . '/executions/x', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -639,12 +640,12 @@ class FunctionsCustomServerTest extends Scope /** * @depends testGetExecution */ - public function testDeleteDeployment($data):array + public function testDeleteDeployment($data): array { /** * Test for SUCCESS */ - $function = $this->client->call(Client::METHOD_DELETE, '/functions/'.$data['functionId'].'/deployments/' . $data['deploymentId'], array_merge([ + $function = $this->client->call(Client::METHOD_DELETE, '/functions/' . $data['functionId'] . '/deployments/' . $data['deploymentId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -652,11 +653,11 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(204, $function['headers']['status-code']); $this->assertEmpty($function['body']); - $function = $this->client->call(Client::METHOD_GET, '/functions/'.$data['functionId'].'/deployments/' . $data['deploymentId'], array_merge([ + $function = $this->client->call(Client::METHOD_GET, '/functions/' . $data['functionId'] . '/deployments/' . $data['deploymentId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - + $this->assertEquals(404, $function['headers']['status-code']); /** @@ -669,12 +670,12 @@ class FunctionsCustomServerTest extends Scope /** * @depends testCreateDeployment */ - public function testDelete($data):array + public function testDelete($data): array { /** * Test for SUCCESS */ - $function = $this->client->call(Client::METHOD_DELETE, '/functions/'. $data['functionId'], array_merge([ + $function = $this->client->call(Client::METHOD_DELETE, '/functions/' . $data['functionId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -686,7 +687,7 @@ class FunctionsCustomServerTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - + $this->assertEquals(404, $function['headers']['status-code']); /** @@ -702,15 +703,15 @@ class FunctionsCustomServerTest extends Scope $entrypoint = 'index.php'; $timeout = 2; $folder = 'timeout'; - $code = realpath(__DIR__ . '/../../../resources/functions'). "/$folder/code.tar.gz"; + $code = realpath(__DIR__ . '/../../../resources/functions') . "/$folder/code.tar.gz"; $this->packageCode($folder); - + $function = $this->client->call(Client::METHOD_POST, '/functions', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'functionId' => 'unique()', - 'name' => 'Test '.$name, + 'name' => 'Test ' . $name, 'runtime' => $name, 'vars' => [], 'events' => [], @@ -722,7 +723,7 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(201, $function['headers']['status-code']); - $deployment = $this->client->call(Client::METHOD_POST, '/functions/'.$functionId.'/deployments', array_merge([ + $deployment = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/deployments', array_merge([ 'content-type' => 'multipart/form-data', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -735,8 +736,8 @@ class FunctionsCustomServerTest extends Scope // Allow build step to run sleep(20); - - $execution = $this->client->call(Client::METHOD_POST, '/functions/'.$functionId.'/executions', array_merge([ + + $execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -744,12 +745,12 @@ class FunctionsCustomServerTest extends Scope ]); $executionId = $execution['body']['$id'] ?? ''; - + $this->assertEquals(201, $execution['headers']['status-code']); - sleep(5); + sleep(10); - $executions = $this->client->call(Client::METHOD_GET, '/functions/'.$functionId.'/executions', array_merge([ + $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -761,14 +762,15 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals($executions['body']['executions'][0]['$id'], $executionId); $this->assertEquals($executions['body']['executions'][0]['trigger'], 'http'); $this->assertEquals($executions['body']['executions'][0]['status'], 'failed'); - $this->assertEquals($executions['body']['executions'][0]['statusCode'], 124); + $this->assertEquals($executions['body']['executions'][0]['statusCode'], 500); $this->assertGreaterThan(2, $executions['body']['executions'][0]['time']); - $this->assertLessThan(3, $executions['body']['executions'][0]['time']); - $this->assertEquals($executions['body']['executions'][0]['stdout'], ''); - $this->assertEquals($executions['body']['executions'][0]['stderr'], 'Execution timed out.'); + $this->assertLessThan(7, $executions['body']['executions'][0]['time']); + $this->assertGreaterThan(5, $executions['body']['executions'][0]['time']); + $this->assertEquals($executions['body']['executions'][0]['response'], ''); + $this->assertEquals($executions['body']['executions'][0]['stderr'], 'An internal curl error has occurred within the executor! Error Msg: Operation timed out'); - // Cleanup : Delete function - $response = $this->client->call(Client::METHOD_DELETE, '/functions/'. $functionId, [ + // Cleanup : Delete function + $response = $this->client->call(Client::METHOD_DELETE, '/functions/' . $functionId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -786,7 +788,7 @@ class FunctionsCustomServerTest extends Scope $entrypoint = 'index.php'; $timeout = 2; $folder = 'php-fn'; - $code = realpath(__DIR__ . '/../../../resources/functions'). "/$folder/code.tar.gz"; + $code = realpath(__DIR__ . '/../../../resources/functions') . "/$folder/code.tar.gz"; $this->packageCode($folder); $function = $this->client->call(Client::METHOD_POST, '/functions', array_merge([ @@ -794,7 +796,7 @@ class FunctionsCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'functionId' => 'unique()', - 'name' => 'Test '.$name, + 'name' => 'Test ' . $name, 'runtime' => $name, 'vars' => [], 'events' => [], @@ -806,7 +808,7 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(201, $function['headers']['status-code']); - $deployment = $this->client->call(Client::METHOD_POST, '/functions/'.$functionId.'/deployments', array_merge([ + $deployment = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/deployments', array_merge([ 'content-type' => 'multipart/form-data', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -820,14 +822,14 @@ class FunctionsCustomServerTest extends Scope // Allow build step to run sleep(10); - $deployment = $this->client->call(Client::METHOD_PATCH, '/functions/'.$functionId.'/deployments/'.$deploymentId, array_merge([ + $deployment = $this->client->call(Client::METHOD_PATCH, '/functions/' . $functionId . '/deployments/' . $deploymentId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); $this->assertEquals(200, $deployment['headers']['status-code']); - - $execution = $this->client->call(Client::METHOD_POST, '/functions/'.$functionId.'/executions', array_merge([ + + $execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -835,24 +837,24 @@ class FunctionsCustomServerTest extends Scope ]); $executionId = $execution['body']['$id'] ?? ''; - + $this->assertEquals(201, $execution['headers']['status-code']); $executionId = $execution['body']['$id'] ?? ''; - + sleep(10); - $executions = $this->client->call(Client::METHOD_GET, '/functions/'.$functionId.'/executions/'.$executionId, array_merge([ + $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions/' . $executionId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $output = json_decode($executions['body']['stdout'], true); + $output = json_decode($executions['body']['response'], true); $this->assertEquals(200, $executions['headers']['status-code']); $this->assertEquals('completed', $executions['body']['status']); $this->assertEquals($functionId, $output['APPWRITE_FUNCTION_ID']); - $this->assertEquals('Test '.$name, $output['APPWRITE_FUNCTION_NAME']); + $this->assertEquals('Test ' . $name, $output['APPWRITE_FUNCTION_NAME']); $this->assertEquals($deploymentId, $output['APPWRITE_FUNCTION_DEPLOYMENT']); $this->assertEquals('http', $output['APPWRITE_FUNCTION_TRIGGER']); $this->assertEquals('PHP', $output['APPWRITE_FUNCTION_RUNTIME_NAME']); @@ -864,21 +866,21 @@ class FunctionsCustomServerTest extends Scope $this->assertEmpty($output['APPWRITE_FUNCTION_JWT']); $this->assertEquals($this->getProject()['$id'], $output['APPWRITE_FUNCTION_PROJECT_ID']); - $executions = $this->client->call(Client::METHOD_GET, '/functions/'.$functionId.'/executions', array_merge([ + $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - + $this->assertEquals($executions['headers']['status-code'], 200); $this->assertEquals($executions['body']['total'], 1); $this->assertIsArray($executions['body']['executions']); $this->assertCount(1, $executions['body']['executions']); $this->assertEquals($executions['body']['executions'][0]['$id'], $executionId); $this->assertEquals($executions['body']['executions'][0]['trigger'], 'http'); - $this->assertStringContainsString('foobar', $executions['body']['executions'][0]['stdout']); + $this->assertStringContainsString('foobar', $executions['body']['executions'][0]['response']); // Cleanup : Delete function - $response = $this->client->call(Client::METHOD_DELETE, '/functions/'. $functionId, [ + $response = $this->client->call(Client::METHOD_DELETE, '/functions/' . $functionId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -892,9 +894,9 @@ class FunctionsCustomServerTest extends Scope { $name = 'node-17.0'; $folder = 'node'; - $code = realpath(__DIR__ . '/../../../resources/functions'). "/$folder/code.tar.gz"; + $code = realpath(__DIR__ . '/../../../resources/functions') . "/$folder/code.tar.gz"; $this->packageCode($folder); - + $entrypoint = 'index.js'; $timeout = 2; @@ -903,7 +905,7 @@ class FunctionsCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'functionId' => 'unique()', - 'name' => 'Test '.$name, + 'name' => 'Test ' . $name, 'runtime' => $name, 'vars' => [ 'CUSTOM_VARIABLE' => 'variable', @@ -917,7 +919,7 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(201, $function['headers']['status-code']); - $deployment = $this->client->call(Client::METHOD_POST, '/functions/'.$functionId.'/deployments', array_merge([ + $deployment = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/deployments', array_merge([ 'content-type' => 'multipart/form-data', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -932,7 +934,7 @@ class FunctionsCustomServerTest extends Scope // Allow build step to run sleep(10); - $execution = $this->client->call(Client::METHOD_POST, '/functions/'.$functionId.'/executions', array_merge([ + $execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -940,24 +942,24 @@ class FunctionsCustomServerTest extends Scope ]); $executionId = $execution['body']['$id'] ?? ''; - + $this->assertEquals(201, $execution['headers']['status-code']); $executionId = $execution['body']['$id'] ?? ''; - + sleep(10); - $executions = $this->client->call(Client::METHOD_GET, '/functions/'.$functionId.'/executions/'.$executionId, array_merge([ + $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions/' . $executionId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $output = json_decode($executions['body']['stdout'], true); + $output = json_decode($executions['body']['response'], true); $this->assertEquals(200, $executions['headers']['status-code']); $this->assertEquals('completed', $executions['body']['status']); $this->assertEquals($functionId, $output['APPWRITE_FUNCTION_ID']); - $this->assertEquals('Test '.$name, $output['APPWRITE_FUNCTION_NAME']); + $this->assertEquals('Test ' . $name, $output['APPWRITE_FUNCTION_NAME']); $this->assertEquals($deploymentId, $output['APPWRITE_FUNCTION_DEPLOYMENT']); $this->assertEquals('http', $output['APPWRITE_FUNCTION_TRIGGER']); $this->assertEquals('Node.js', $output['APPWRITE_FUNCTION_RUNTIME_NAME']); @@ -970,21 +972,21 @@ class FunctionsCustomServerTest extends Scope $this->assertEmpty($output['APPWRITE_FUNCTION_JWT']); $this->assertEquals($this->getProject()['$id'], $output['APPWRITE_FUNCTION_PROJECT_ID']); - $executions = $this->client->call(Client::METHOD_GET, '/functions/'.$functionId.'/executions', array_merge([ + $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - + $this->assertEquals($executions['headers']['status-code'], 200); $this->assertEquals($executions['body']['total'], 1); $this->assertIsArray($executions['body']['executions']); $this->assertCount(1, $executions['body']['executions']); $this->assertEquals($executions['body']['executions'][0]['$id'], $executionId); $this->assertEquals($executions['body']['executions'][0]['trigger'], 'http'); - $this->assertStringContainsString('foobar', $executions['body']['executions'][0]['stdout']); + $this->assertStringContainsString('foobar', $executions['body']['executions'][0]['response']); // Cleanup : Delete function - $response = $this->client->call(Client::METHOD_DELETE, '/functions/'. $functionId, [ + $response = $this->client->call(Client::METHOD_DELETE, '/functions/' . $functionId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -997,7 +999,7 @@ class FunctionsCustomServerTest extends Scope { $name = 'python-3.9'; $folder = 'python'; - $code = realpath(__DIR__ . '/../../../resources/functions'). "/$folder/code.tar.gz"; + $code = realpath(__DIR__ . '/../../../resources/functions') . "/$folder/code.tar.gz"; $this->packageCode($folder); $entrypoint = 'main.py'; @@ -1008,7 +1010,7 @@ class FunctionsCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'functionId' => 'unique()', - 'name' => 'Test '.$name, + 'name' => 'Test ' . $name, 'runtime' => $name, 'vars' => [ 'CUSTOM_VARIABLE' => 'variable', @@ -1022,7 +1024,7 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(201, $function['headers']['status-code']); - $deployment = $this->client->call(Client::METHOD_POST, '/functions/'.$functionId.'/deployments', array_merge([ + $deployment = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/deployments', array_merge([ 'content-type' => 'multipart/form-data', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1037,7 +1039,7 @@ class FunctionsCustomServerTest extends Scope // Allow build step to run sleep(30); - $execution = $this->client->call(Client::METHOD_POST, '/functions/'.$functionId.'/executions', array_merge([ + $execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1045,24 +1047,24 @@ class FunctionsCustomServerTest extends Scope ]); $executionId = $execution['body']['$id'] ?? ''; - + $this->assertEquals(201, $execution['headers']['status-code']); $executionId = $execution['body']['$id'] ?? ''; - + sleep(30); - $executions = $this->client->call(Client::METHOD_GET, '/functions/'.$functionId.'/executions/'.$executionId, array_merge([ + $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions/' . $executionId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $output = json_decode($executions['body']['stdout'], true); + $output = json_decode($executions['body']['response'], true); $this->assertEquals(200, $executions['headers']['status-code']); $this->assertEquals('completed', $executions['body']['status']); $this->assertEquals($functionId, $output['APPWRITE_FUNCTION_ID']); - $this->assertEquals('Test '.$name, $output['APPWRITE_FUNCTION_NAME']); + $this->assertEquals('Test ' . $name, $output['APPWRITE_FUNCTION_NAME']); $this->assertEquals($deploymentId, $output['APPWRITE_FUNCTION_DEPLOYMENT']); $this->assertEquals('http', $output['APPWRITE_FUNCTION_TRIGGER']); $this->assertEquals('Python', $output['APPWRITE_FUNCTION_RUNTIME_NAME']); @@ -1075,21 +1077,21 @@ class FunctionsCustomServerTest extends Scope $this->assertEmpty($output['APPWRITE_FUNCTION_JWT']); $this->assertEquals($this->getProject()['$id'], $output['APPWRITE_FUNCTION_PROJECT_ID']); - $executions = $this->client->call(Client::METHOD_GET, '/functions/'.$functionId.'/executions', array_merge([ + $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - + $this->assertEquals($executions['headers']['status-code'], 200); $this->assertEquals($executions['body']['total'], 1); $this->assertIsArray($executions['body']['executions']); $this->assertCount(1, $executions['body']['executions']); $this->assertEquals($executions['body']['executions'][0]['$id'], $executionId); $this->assertEquals($executions['body']['executions'][0]['trigger'], 'http'); - $this->assertStringContainsString('foobar', $executions['body']['executions'][0]['stdout']); + $this->assertStringContainsString('foobar', $executions['body']['executions'][0]['response']); // Cleanup : Delete function - $response = $this->client->call(Client::METHOD_DELETE, '/functions/'. $functionId, [ + $response = $this->client->call(Client::METHOD_DELETE, '/functions/' . $functionId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1102,9 +1104,9 @@ class FunctionsCustomServerTest extends Scope { $name = 'dart-2.15'; $folder = 'dart'; - $code = realpath(__DIR__ . '/../../../resources/functions'). "/$folder/code.tar.gz"; + $code = realpath(__DIR__ . '/../../../resources/functions') . "/$folder/code.tar.gz"; $this->packageCode($folder); - + $entrypoint = 'main.dart'; $timeout = 2; @@ -1113,7 +1115,7 @@ class FunctionsCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'functionId' => 'unique()', - 'name' => 'Test '.$name, + 'name' => 'Test ' . $name, 'runtime' => $name, 'vars' => [ 'CUSTOM_VARIABLE' => 'variable', @@ -1127,7 +1129,7 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(201, $function['headers']['status-code']); - $deployment = $this->client->call(Client::METHOD_POST, '/functions/'.$functionId.'/deployments', array_merge([ + $deployment = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/deployments', array_merge([ 'content-type' => 'multipart/form-data', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1142,7 +1144,7 @@ class FunctionsCustomServerTest extends Scope // Allow build step to run sleep(40); - $execution = $this->client->call(Client::METHOD_POST, '/functions/'.$functionId.'/executions', array_merge([ + $execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1150,24 +1152,24 @@ class FunctionsCustomServerTest extends Scope ]); $executionId = $execution['body']['$id'] ?? ''; - + $this->assertEquals(201, $execution['headers']['status-code']); $executionId = $execution['body']['$id'] ?? ''; - + sleep(10); - $executions = $this->client->call(Client::METHOD_GET, '/functions/'.$functionId.'/executions/'.$executionId, array_merge([ + $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions/' . $executionId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $output = json_decode($executions['body']['stdout'], true); + $output = json_decode($executions['body']['response'], true); $this->assertEquals(200, $executions['headers']['status-code']); $this->assertEquals('completed', $executions['body']['status']); $this->assertEquals($functionId, $output['APPWRITE_FUNCTION_ID']); - $this->assertEquals('Test '.$name, $output['APPWRITE_FUNCTION_NAME']); + $this->assertEquals('Test ' . $name, $output['APPWRITE_FUNCTION_NAME']); $this->assertEquals($deploymentId, $output['APPWRITE_FUNCTION_DEPLOYMENT']); $this->assertEquals('http', $output['APPWRITE_FUNCTION_TRIGGER']); $this->assertEquals('Dart', $output['APPWRITE_FUNCTION_RUNTIME_NAME']); @@ -1180,21 +1182,21 @@ class FunctionsCustomServerTest extends Scope $this->assertEmpty($output['APPWRITE_FUNCTION_JWT']); $this->assertEquals($this->getProject()['$id'], $output['APPWRITE_FUNCTION_PROJECT_ID']); - $executions = $this->client->call(Client::METHOD_GET, '/functions/'.$functionId.'/executions', array_merge([ + $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - + $this->assertEquals($executions['headers']['status-code'], 200); $this->assertEquals($executions['body']['total'], 1); $this->assertIsArray($executions['body']['executions']); $this->assertCount(1, $executions['body']['executions']); $this->assertEquals($executions['body']['executions'][0]['$id'], $executionId); $this->assertEquals($executions['body']['executions'][0]['trigger'], 'http'); - $this->assertStringContainsString('foobar', $executions['body']['executions'][0]['stdout']); + $this->assertStringContainsString('foobar', $executions['body']['executions'][0]['response']); // Cleanup : Delete function - $response = $this->client->call(Client::METHOD_DELETE, '/functions/'. $functionId, [ + $response = $this->client->call(Client::METHOD_DELETE, '/functions/' . $functionId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1207,9 +1209,9 @@ class FunctionsCustomServerTest extends Scope { $name = 'ruby-3.1'; $folder = 'ruby'; - $code = realpath(__DIR__ . '/../../../resources/functions'). "/$folder/code.tar.gz"; + $code = realpath(__DIR__ . '/../../../resources/functions') . "/$folder/code.tar.gz"; $this->packageCode($folder); - + $entrypoint = 'main.rb'; $timeout = 2; @@ -1218,7 +1220,7 @@ class FunctionsCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'functionId' => 'unique()', - 'name' => 'Test '.$name, + 'name' => 'Test ' . $name, 'runtime' => $name, 'vars' => [ 'CUSTOM_VARIABLE' => 'variable', @@ -1232,7 +1234,7 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(201, $function['headers']['status-code']); - $deployment = $this->client->call(Client::METHOD_POST, '/functions/'.$functionId.'/deployments', array_merge([ + $deployment = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/deployments', array_merge([ 'content-type' => 'multipart/form-data', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1247,7 +1249,7 @@ class FunctionsCustomServerTest extends Scope // Allow build step to run sleep(30); - $execution = $this->client->call(Client::METHOD_POST, '/functions/'.$functionId.'/executions', array_merge([ + $execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1255,24 +1257,24 @@ class FunctionsCustomServerTest extends Scope ]); $executionId = $execution['body']['$id'] ?? ''; - + $this->assertEquals(201, $execution['headers']['status-code']); $executionId = $execution['body']['$id'] ?? ''; - + sleep(10); - $executions = $this->client->call(Client::METHOD_GET, '/functions/'.$functionId.'/executions/'.$executionId, array_merge([ + $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions/' . $executionId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $output = json_decode($executions['body']['stdout'], true); + $output = json_decode($executions['body']['response'], true); $this->assertEquals(200, $executions['headers']['status-code']); $this->assertEquals('completed', $executions['body']['status']); $this->assertEquals($functionId, $output['APPWRITE_FUNCTION_ID']); - $this->assertEquals('Test '.$name, $output['APPWRITE_FUNCTION_NAME']); + $this->assertEquals('Test ' . $name, $output['APPWRITE_FUNCTION_NAME']); $this->assertEquals($deploymentId, $output['APPWRITE_FUNCTION_DEPLOYMENT']); $this->assertEquals('http', $output['APPWRITE_FUNCTION_TRIGGER']); $this->assertEquals('Ruby', $output['APPWRITE_FUNCTION_RUNTIME_NAME']); @@ -1285,21 +1287,21 @@ class FunctionsCustomServerTest extends Scope $this->assertEmpty($output['APPWRITE_FUNCTION_JWT']); $this->assertEquals($this->getProject()['$id'], $output['APPWRITE_FUNCTION_PROJECT_ID']); - $executions = $this->client->call(Client::METHOD_GET, '/functions/'.$functionId.'/executions', array_merge([ + $executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - + $this->assertEquals($executions['headers']['status-code'], 200); $this->assertEquals($executions['body']['total'], 1); $this->assertIsArray($executions['body']['executions']); $this->assertCount(1, $executions['body']['executions']); $this->assertEquals($executions['body']['executions'][0]['$id'], $executionId); $this->assertEquals($executions['body']['executions'][0]['trigger'], 'http'); - $this->assertStringContainsString('foobar', $executions['body']['executions'][0]['stdout']); + $this->assertStringContainsString('foobar', $executions['body']['executions'][0]['response']); // Cleanup : Delete function - $response = $this->client->call(Client::METHOD_DELETE, '/functions/'. $functionId, [ + $response = $this->client->call(Client::METHOD_DELETE, '/functions/' . $functionId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1314,7 +1316,7 @@ class FunctionsCustomServerTest extends Scope // $folder = 'swift'; // $code = realpath(__DIR__ . '/../../../resources/functions'). "/$folder/code.tar.gz"; // $this->packageCode($folder); - + // $entrypoint = 'index.swift'; // $timeout = 5; @@ -1360,11 +1362,11 @@ class FunctionsCustomServerTest extends Scope // ]); // $executionId = $execution['body']['$id'] ?? ''; - + // $this->assertEquals(201, $execution['headers']['status-code']); // $executionId = $execution['body']['$id'] ?? ''; - + // sleep(10); // $executions = $this->client->call(Client::METHOD_GET, '/functions/'.$functionId.'/executions/'.$executionId, array_merge([ @@ -1372,7 +1374,7 @@ class FunctionsCustomServerTest extends Scope // 'x-appwrite-project' => $this->getProject()['$id'], // ], $this->getHeaders())); - // $output = json_decode($executions['body']['stdout'], true); + // $output = json_decode($executions['body']['response'], true); // $this->assertEquals(200, $executions['headers']['status-code']); // $this->assertEquals('completed', $executions['body']['status']); @@ -1394,14 +1396,14 @@ class FunctionsCustomServerTest extends Scope // 'content-type' => 'application/json', // 'x-appwrite-project' => $this->getProject()['$id'], // ], $this->getHeaders())); - + // $this->assertEquals($executions['headers']['status-code'], 200); // $this->assertEquals($executions['body']['total'], 1); // $this->assertIsArray($executions['body']['executions']); // $this->assertCount(1, $executions['body']['executions']); // $this->assertEquals($executions['body']['executions'][0]['$id'], $executionId); // $this->assertEquals($executions['body']['executions'][0]['trigger'], 'http'); - // $this->assertStringContainsString('foobar', $executions['body']['executions'][0]['stdout']); + // $this->assertStringContainsString('foobar', $executions['body']['executions'][0]['response']); // // Cleanup : Delete function // $response = $this->client->call(Client::METHOD_DELETE, '/functions/'. $functionId, [ @@ -1432,6 +1434,5 @@ class FunctionsCustomServerTest extends Scope $this->assertArrayHasKey('image', $runtime); $this->assertArrayHasKey('base', $runtime); $this->assertArrayHasKey('supports', $runtime); - } -} \ No newline at end of file +} diff --git a/tests/e2e/Services/Health/HealthCustomServerTest.php b/tests/e2e/Services/Health/HealthCustomServerTest.php index a15e456e5f..47a2268e21 100644 --- a/tests/e2e/Services/Health/HealthCustomServerTest.php +++ b/tests/e2e/Services/Health/HealthCustomServerTest.php @@ -146,27 +146,6 @@ class HealthCustomServerTest extends Scope return []; } - public function testUsageSuccess(): array - { - /** - * Test for SUCCESS - */ - $response = $this->client->call(Client::METHOD_GET, '/health/queue/usage', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), []); - - $this->assertEquals(200, $response['headers']['status-code']); - $this->assertIsInt($response['body']['size']); - $this->assertLessThan(200, $response['body']['size']); - - /** - * Test for FAILURE - */ - - return []; - } - public function testCertificatesSuccess(): array { /** diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index 5d1b0937fa..1154515648 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -81,7 +81,7 @@ class ProjectsConsoleClientTest extends Scope /** * @depends testCreateProject */ - public function testListProject($data):array + public function testListProject($data): array { $id = $data['projectId'] ?? ''; @@ -174,7 +174,7 @@ class ProjectsConsoleClientTest extends Scope $response = $this->client->call(Client::METHOD_GET, '/projects', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()),[ + ], $this->getHeaders()), [ 'cursor' => $response['body']['projects'][0]['$id'] ]); @@ -186,7 +186,7 @@ class ProjectsConsoleClientTest extends Scope $response = $this->client->call(Client::METHOD_GET, '/projects', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()),[ + ], $this->getHeaders()), [ 'cursor' => $response['body']['projects'][0]['$id'], 'cursorDirection' => Database::CURSOR_BEFORE ]); @@ -202,7 +202,7 @@ class ProjectsConsoleClientTest extends Scope $response = $this->client->call(Client::METHOD_GET, '/projects', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()),[ + ], $this->getHeaders()), [ 'cursor' => 'unknown' ]); @@ -214,14 +214,14 @@ class ProjectsConsoleClientTest extends Scope /** * @depends testCreateProject */ - public function testGetProject($data):array + public function testGetProject($data): array { $id = $data['projectId'] ?? ''; /** * Test for SUCCESS */ - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -255,14 +255,14 @@ class ProjectsConsoleClientTest extends Scope /** * @depends testCreateProject */ - public function testGetProjectUsage($data):array + public function testGetProjectUsage($data): array { $id = $data['projectId'] ?? ''; /** * Test for SUCCESS */ - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/usage', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/usage', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -303,14 +303,14 @@ class ProjectsConsoleClientTest extends Scope /** * @depends testGetProjectUsage */ - public function testUpdateProject($data):array + public function testUpdateProject($data): array { $id = $data['projectId'] ?? ''; /** * Test for SUCCESS */ - $response = $this->client->call(Client::METHOD_PATCH, '/projects/'.$id, array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -330,7 +330,7 @@ class ProjectsConsoleClientTest extends Scope /** * Test for FAILURE */ - + $response = $this->client->call(Client::METHOD_POST, '/projects', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -347,7 +347,7 @@ class ProjectsConsoleClientTest extends Scope /** * @depends testGetProjectUsage */ - public function testUpdateProjectOAuth($data):array + public function testUpdateProjectOAuth($data): array { $id = $data['projectId'] ?? ''; $providers = require('app/config/providers.php'); @@ -357,20 +357,20 @@ class ProjectsConsoleClientTest extends Scope */ foreach ($providers as $key => $provider) { - $response = $this->client->call(Client::METHOD_PATCH, '/projects/'.$id.'/oauth2', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/oauth2', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'provider' => $key, - 'appId' => 'AppId-'.ucfirst($key), - 'secret' => 'Secret-'.ucfirst($key), + 'appId' => 'AppId-' . ucfirst($key), + 'secret' => 'Secret-' . ucfirst($key), ]); - + $this->assertEquals(200, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); } - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -380,15 +380,15 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals($id, $response['body']['$id']); foreach ($providers as $key => $provider) { - $this->assertEquals('AppId-'.ucfirst($key), $response['body']['provider'.ucfirst($key).'Appid']); - $this->assertEquals('Secret-'.ucfirst($key), $response['body']['provider'.ucfirst($key).'Secret']); + $this->assertEquals('AppId-' . ucfirst($key), $response['body']['provider' . ucfirst($key) . 'Appid']); + $this->assertEquals('Secret-' . ucfirst($key), $response['body']['provider' . ucfirst($key) . 'Secret']); } /** * Test for FAILURE */ - - $response = $this->client->call(Client::METHOD_PATCH, '/projects/'.$id.'/oauth2', array_merge([ + + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/oauth2', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -405,15 +405,15 @@ class ProjectsConsoleClientTest extends Scope /** * @depends testGetProjectUsage */ - public function testUpdateProjectAuthStatus($data):array + public function testUpdateProjectAuthStatus($data): array { $id = $data['projectId'] ?? ''; $auth = require('app/config/auth.php'); - - $originalEmail = uniqid().'user@localhost.test'; + + $originalEmail = uniqid() . 'user@localhost.test'; $originalPassword = 'password'; $originalName = 'User Name'; - + $response = $this->client->call(Client::METHOD_POST, '/account', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', @@ -434,33 +434,33 @@ class ProjectsConsoleClientTest extends Scope 'password' => $originalPassword, ]); - $session = $this->client->parseCookie((string)$response['headers']['set-cookie'])['a_session_'.$id]; + $session = $this->client->parseCookie((string)$response['headers']['set-cookie'])['a_session_' . $id]; /** * Test for SUCCESS */ foreach ($auth as $index => $method) { - $response = $this->client->call(Client::METHOD_PATCH, '/projects/'.$id.'/auth/'.$index, array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/auth/' . $index, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'status' => false, ]); - + $this->assertEquals(200, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); $this->assertEquals(200, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals(false, $response['body']['auth'. ucfirst($method['key'])]); + $this->assertEquals(false, $response['body']['auth' . ucfirst($method['key'])]); } - - $email = uniqid().'user@localhost.test'; + + $email = uniqid() . 'user@localhost.test'; $password = 'password'; $name = 'User Name'; @@ -483,7 +483,7 @@ class ProjectsConsoleClientTest extends Scope $response = $this->client->call(Client::METHOD_POST, '/teams', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $id, - 'cookie' => 'a_session_'.$id.'='.$session, + 'cookie' => 'a_session_' . $id . '=' . $session, ]), [ 'teamId' => 'unique()', 'name' => 'Arsenal' @@ -493,10 +493,10 @@ class ProjectsConsoleClientTest extends Scope $teamUid = $response['body']['$id']; - $response = $this->client->call(Client::METHOD_POST, '/teams/'.$teamUid.'/memberships', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/teams/' . $teamUid . '/memberships', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $id, - 'cookie' => 'a_session_'.$id.'=' . $session, + 'cookie' => 'a_session_' . $id . '=' . $session, ]), [ 'email' => $email, 'name' => 'Friend User', @@ -509,7 +509,7 @@ class ProjectsConsoleClientTest extends Scope $response = $this->client->call(Client::METHOD_POST, '/account/jwt', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $id, - 'cookie' => 'a_session_'.$id.'=' . $session, + 'cookie' => 'a_session_' . $id . '=' . $session, ])); $this->assertEquals($response['headers']['status-code'], 501); @@ -522,7 +522,7 @@ class ProjectsConsoleClientTest extends Scope 'email' => $originalEmail, 'password' => $originalPassword, ]); - + $this->assertEquals($response['headers']['status-code'], 501); $response = $this->client->call(Client::METHOD_POST, '/account/anonymous', array_merge([ @@ -536,7 +536,7 @@ class ProjectsConsoleClientTest extends Scope // Cleanup foreach ($auth as $index => $method) { - $response = $this->client->call(Client::METHOD_PATCH, '/projects/'.$id.'/auth/'.$index, array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/auth/' . $index, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -550,14 +550,14 @@ class ProjectsConsoleClientTest extends Scope /** * @depends testGetProjectUsage */ - public function testUpdateProjectAuthLimit($data):array + public function testUpdateProjectAuthLimit($data): array { $id = $data['projectId'] ?? ''; - + /** * Test for SUCCESS */ - $response = $this->client->call(Client::METHOD_PATCH, '/projects/'.$id.'/auth/limit', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/auth/limit', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -566,8 +566,8 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); - - $email = uniqid().'user@localhost.test'; + + $email = uniqid() . 'user@localhost.test'; $password = 'password'; $name = 'User Name'; @@ -590,7 +590,7 @@ class ProjectsConsoleClientTest extends Scope /** * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_PATCH, '/projects/'.$id.'/auth/limit', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/auth/limit', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -599,7 +599,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); - + $response = $this->client->call(Client::METHOD_POST, '/account', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', @@ -649,13 +649,13 @@ class ProjectsConsoleClientTest extends Scope * Test for Disabled */ foreach ($services as $service) { - if(!$service['optional']) { + if (!$service['optional']) { continue; } $key = $service['key'] ?? ''; - - $response = $this->client->call(Client::METHOD_PATCH, '/projects/'.$id.'/service', array_merge([ + + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/service', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'cookie' => 'a_session_console=' . $this->getRoot()['session'], @@ -667,7 +667,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'cookie' => 'a_session_console=' . $this->getRoot()['session'], @@ -675,13 +675,13 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals(false, $response['body']['serviceStatusFor'.ucfirst($key)]); + $this->assertEquals(false, $response['body']['serviceStatusFor' . ucfirst($key)]); } - + /** * Admin request must succeed */ - + $response = $this->client->call(Client::METHOD_GET, '/functions', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', @@ -690,17 +690,17 @@ class ProjectsConsoleClientTest extends Scope 'cookie' => 'a_session_console=' . $this->getRoot()['session'], 'x-appwrite-mode' => 'admin' ])); - + $this->assertEquals(200, $response['headers']['status-code']); foreach ($services as $service) { - if(!$service['optional']) { + if (!$service['optional']) { continue; } $key = $service['key'] ?? ''; - $response = $this->client->call(Client::METHOD_PATCH, '/projects/'.$id.'/service/', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/service/', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -713,7 +713,7 @@ class ProjectsConsoleClientTest extends Scope } /** @depends testUpdateProjectServiceStatusAdmin */ - public function testUpdateProjectServiceStatus($data):void + public function testUpdateProjectServiceStatus($data): void { $id = $data['projectId']; @@ -723,13 +723,13 @@ class ProjectsConsoleClientTest extends Scope * Test for Disabled */ foreach ($services as $service) { - if(!$service['optional']) { + if (!$service['optional']) { continue; } $key = $service['key'] ?? ''; - $response = $this->client->call(Client::METHOD_PATCH, '/projects/'.$id.'/service', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/service', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'cookie' => 'a_session_console=' . $this->getRoot()['session'], @@ -741,7 +741,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'cookie' => 'a_session_console=' . $this->getRoot()['session'], @@ -749,7 +749,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals(false, $response['body']['serviceStatusFor'.ucfirst($key)]); + $this->assertEquals(false, $response['body']['serviceStatusFor' . ucfirst($key)]); } /** @@ -776,7 +776,7 @@ class ProjectsConsoleClientTest extends Scope // Cleanup foreach ($services as $service) { - $response = $this->client->call(Client::METHOD_PATCH, '/projects/'.$id.'/service/', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/service/', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -793,12 +793,12 @@ class ProjectsConsoleClientTest extends Scope { $id = $data['projectId'] ?? ''; - $response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/webhooks', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/projects/' . $id . '/webhooks', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'name' => 'Webhook Test', - 'events' => ['account.create', 'account.update.email'], + 'events' => ['users.*.create', 'users.*.update.email'], 'url' => 'https://appwrite.io', 'security' => true, 'httpUser' => 'username', @@ -807,25 +807,25 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); - $this->assertContains('account.create', $response['body']['events']); - $this->assertContains('account.update.email', $response['body']['events']); + $this->assertContains('users.*.create', $response['body']['events']); + $this->assertContains('users.*.update.email', $response['body']['events']); $this->assertCount(2, $response['body']['events']); $this->assertEquals('https://appwrite.io', $response['body']['url']); $this->assertIsBool($response['body']['security']); $this->assertEquals(true, $response['body']['security']); $this->assertEquals('username', $response['body']['httpUser']); - + $data = array_merge($data, ['webhookId' => $response['body']['$id']]); /** * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/webhooks', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/projects/' . $id . '/webhooks', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'name' => 'Webhook Test', - 'events' => ['account.unknown', 'account.update.email'], + 'events' => ['account.unknown', 'users.*.update.email'], 'url' => 'https://appwrite.io', 'security' => true, 'httpUser' => 'username', @@ -834,12 +834,12 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); - $response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/webhooks', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/projects/' . $id . '/webhooks', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'name' => 'Webhook Test', - 'events' => ['account.create', 'account.update.email'], + 'events' => ['users.*.create', 'users.*.update.email'], 'url' => 'invalid://appwrite.io', ]); @@ -855,14 +855,14 @@ class ProjectsConsoleClientTest extends Scope { $id = $data['projectId'] ?? ''; - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/webhooks', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/webhooks', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(1, $response['body']['total']); - + /** * Test for FAILURE */ @@ -878,7 +878,7 @@ class ProjectsConsoleClientTest extends Scope $id = $data['projectId'] ?? ''; $webhookId = $data['webhookId'] ?? ''; - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/webhooks/'.$webhookId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/webhooks/' . $webhookId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -886,17 +886,17 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); $this->assertEquals($webhookId, $response['body']['$id']); - $this->assertContains('account.create', $response['body']['events']); - $this->assertContains('account.update.email', $response['body']['events']); + $this->assertContains('users.*.create', $response['body']['events']); + $this->assertContains('users.*.update.email', $response['body']['events']); $this->assertCount(2, $response['body']['events']); $this->assertEquals('https://appwrite.io', $response['body']['url']); $this->assertEquals('username', $response['body']['httpUser']); $this->assertEquals('password', $response['body']['httpPass']); - + /** * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/webhooks/error', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/webhooks/error', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -914,12 +914,12 @@ class ProjectsConsoleClientTest extends Scope $id = $data['projectId'] ?? ''; $webhookId = $data['webhookId'] ?? ''; - $response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/webhooks/'.$webhookId, array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/projects/' . $id . '/webhooks/' . $webhookId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'name' => 'Webhook Test Update', - 'events' => ['account.delete', 'account.sessions.delete', 'storage.files.create'], + 'events' => ['users.*.delete', 'users.*.sessions.*.delete', 'buckets.*.files.*.create'], 'url' => 'https://appwrite.io/new', 'security' => false, 'httpUser' => '', @@ -930,9 +930,9 @@ class ProjectsConsoleClientTest extends Scope $this->assertNotEmpty($response['body']['$id']); $this->assertEquals($webhookId, $response['body']['$id']); $this->assertEquals('Webhook Test Update', $response['body']['name']); - $this->assertContains('account.delete', $response['body']['events']); - $this->assertContains('account.sessions.delete', $response['body']['events']); - $this->assertContains('storage.files.create', $response['body']['events']); + $this->assertContains('users.*.delete', $response['body']['events']); + $this->assertContains('users.*.sessions.*.delete', $response['body']['events']); + $this->assertContains('buckets.*.files.*.create', $response['body']['events']); $this->assertCount(3, $response['body']['events']); $this->assertEquals('https://appwrite.io/new', $response['body']['url']); $this->assertIsBool($response['body']['security']); @@ -940,7 +940,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals('', $response['body']['httpUser']); $this->assertEquals('', $response['body']['httpPass']); - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/webhooks/'.$webhookId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/webhooks/' . $webhookId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -949,25 +949,25 @@ class ProjectsConsoleClientTest extends Scope $this->assertNotEmpty($response['body']['$id']); $this->assertEquals($webhookId, $response['body']['$id']); $this->assertEquals('Webhook Test Update', $response['body']['name']); - $this->assertContains('account.delete', $response['body']['events']); - $this->assertContains('account.sessions.delete', $response['body']['events']); - $this->assertContains('storage.files.create', $response['body']['events']); + $this->assertContains('users.*.delete', $response['body']['events']); + $this->assertContains('users.*.sessions.*.delete', $response['body']['events']); + $this->assertContains('buckets.*.files.*.create', $response['body']['events']); $this->assertCount(3, $response['body']['events']); $this->assertEquals('https://appwrite.io/new', $response['body']['url']); $this->assertIsBool($response['body']['security']); $this->assertEquals(false, $response['body']['security']); $this->assertEquals('', $response['body']['httpUser']); $this->assertEquals('', $response['body']['httpPass']); - + /** * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/webhooks/'.$webhookId, array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/projects/' . $id . '/webhooks/' . $webhookId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'name' => 'Webhook Test Update', - 'events' => ['account.delete', 'account.sessions.delete', 'storage.files.create', 'unknown'], + 'events' => ['users.*.delete', 'users.*.sessions.*.delete', 'buckets.*.files.*.unknown'], 'url' => 'https://appwrite.io/new', 'security' => false, 'httpUser' => '', @@ -976,12 +976,12 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); - $response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/webhooks/'.$webhookId, array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/projects/' . $id . '/webhooks/' . $webhookId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'name' => 'Webhook Test Update', - 'events' => ['account.delete', 'account.sessions.delete', 'storage.files.create'], + 'events' => ['users.*.delete', 'users.*.sessions.*.delete', 'buckets.*.files.*.create'], 'url' => 'appwrite.io/new', 'security' => false, 'httpUser' => '', @@ -990,12 +990,12 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); - $response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/webhooks/'.$webhookId, array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/projects/' . $id . '/webhooks/' . $webhookId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'name' => 'Webhook Test Update', - 'events' => ['account.delete', 'account.sessions.delete', 'storage.files.create'], + 'events' => ['users.*.delete', 'users.*.sessions.*.delete', 'buckets.*.files.*.create'], 'url' => 'invalid://appwrite.io/new', ]); @@ -1012,7 +1012,7 @@ class ProjectsConsoleClientTest extends Scope $id = $data['projectId'] ?? ''; $webhookId = $data['webhookId'] ?? ''; - $response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/webhooks/'.$webhookId, array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/projects/' . $id . '/webhooks/' . $webhookId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1020,17 +1020,17 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(204, $response['headers']['status-code']); $this->assertEmpty($response['body']); - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/webhooks/'.$webhookId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/webhooks/' . $webhookId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); $this->assertEquals(404, $response['headers']['status-code']); - + /** * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/webhooks/error', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/projects/' . $id . '/webhooks/error', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1049,7 +1049,7 @@ class ProjectsConsoleClientTest extends Scope { $id = $data['projectId'] ?? ''; - $response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/keys', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/projects/' . $id . '/keys', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1063,13 +1063,13 @@ class ProjectsConsoleClientTest extends Scope $this->assertContains('teams.read', $response['body']['scopes']); $this->assertContains('teams.write', $response['body']['scopes']); $this->assertNotEmpty($response['body']['secret']); - + $data = array_merge($data, ['keyId' => $response['body']['$id']]); /** * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/keys', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/projects/' . $id . '/keys', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1089,14 +1089,14 @@ class ProjectsConsoleClientTest extends Scope { $id = $data['projectId'] ?? ''; - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/keys', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/keys', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(1, $response['body']['total']); - + /** * Test for FAILURE */ @@ -1112,7 +1112,7 @@ class ProjectsConsoleClientTest extends Scope $id = $data['projectId'] ?? ''; $keyId = $data['keyId'] ?? ''; - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/keys/'.$keyId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/keys/' . $keyId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1125,11 +1125,11 @@ class ProjectsConsoleClientTest extends Scope $this->assertContains('teams.write', $response['body']['scopes']); $this->assertCount(2, $response['body']['scopes']); $this->assertNotEmpty($response['body']['secret']); - + /** * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/keys/error', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/keys/error', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1147,7 +1147,7 @@ class ProjectsConsoleClientTest extends Scope $id = $data['projectId'] ?? ''; $keyId = $data['keyId'] ?? ''; - $response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/keys/'.$keyId, array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/projects/' . $id . '/keys/' . $keyId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1164,7 +1164,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertContains('collections.read', $response['body']['scopes']); $this->assertCount(3, $response['body']['scopes']); - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/keys/'.$keyId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/keys/' . $keyId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1177,11 +1177,11 @@ class ProjectsConsoleClientTest extends Scope $this->assertContains('users.write', $response['body']['scopes']); $this->assertContains('collections.read', $response['body']['scopes']); $this->assertCount(3, $response['body']['scopes']); - + /** * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/keys/'.$keyId, array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/projects/' . $id . '/keys/' . $keyId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1202,7 +1202,7 @@ class ProjectsConsoleClientTest extends Scope $id = $data['projectId'] ?? ''; $keyId = $data['keyId'] ?? ''; - $response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/keys/'.$keyId, array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/projects/' . $id . '/keys/' . $keyId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1210,17 +1210,17 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(204, $response['headers']['status-code']); $this->assertEmpty($response['body']); - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/keys/'.$keyId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/keys/' . $keyId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); $this->assertEquals(404, $response['headers']['status-code']); - + /** * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/keys/error', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/projects/' . $id . '/keys/error', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1239,7 +1239,7 @@ class ProjectsConsoleClientTest extends Scope { $id = $data['projectId'] ?? ''; - $response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/platforms', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/projects/' . $id . '/platforms', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1257,10 +1257,10 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals('', $response['body']['key']); $this->assertEquals('', $response['body']['store']); $this->assertEquals('localhost', $response['body']['hostname']); - + $data = array_merge($data, ['platformWebId' => $response['body']['$id']]); - $response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/platforms', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/projects/' . $id . '/platforms', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1278,10 +1278,10 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals('com.example.ios', $response['body']['key']); $this->assertEquals('', $response['body']['store']); $this->assertEquals('', $response['body']['hostname']); - + $data = array_merge($data, ['platformFultteriOSId' => $response['body']['$id']]); - $response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/platforms', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/projects/' . $id . '/platforms', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1299,10 +1299,10 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals('com.example.android', $response['body']['key']); $this->assertEquals('', $response['body']['store']); $this->assertEquals('', $response['body']['hostname']); - + $data = array_merge($data, ['platformFultterAndroidId' => $response['body']['$id']]); - $response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/platforms', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/projects/' . $id . '/platforms', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1323,7 +1323,7 @@ class ProjectsConsoleClientTest extends Scope $data = array_merge($data, ['platformAppleIosId' => $response['body']['$id']]); - $response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/platforms', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/projects/' . $id . '/platforms', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1344,7 +1344,7 @@ class ProjectsConsoleClientTest extends Scope $data = array_merge($data, ['platformAppleMacOsId' => $response['body']['$id']]); - $response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/platforms', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/projects/' . $id . '/platforms', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1365,7 +1365,7 @@ class ProjectsConsoleClientTest extends Scope $data = array_merge($data, ['platformAppleWatchOsId' => $response['body']['$id']]); - $response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/platforms', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/projects/' . $id . '/platforms', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1389,7 +1389,7 @@ class ProjectsConsoleClientTest extends Scope /** * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/platforms', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/projects/' . $id . '/platforms', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1414,7 +1414,7 @@ class ProjectsConsoleClientTest extends Scope sleep(1); - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/platforms', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1425,7 +1425,7 @@ class ProjectsConsoleClientTest extends Scope /** * Test for FAILURE */ - + return $data; } @@ -1438,7 +1438,7 @@ class ProjectsConsoleClientTest extends Scope $platformWebId = $data['platformWebId'] ?? ''; - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/'.$platformWebId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/platforms/' . $platformWebId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1451,10 +1451,10 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals('', $response['body']['key']); $this->assertEquals('', $response['body']['store']); $this->assertEquals('localhost', $response['body']['hostname']); - + $platformFultteriOSId = $data['platformFultteriOSId'] ?? ''; - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/'.$platformFultteriOSId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/platforms/' . $platformFultteriOSId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1467,10 +1467,10 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals('com.example.ios', $response['body']['key']); $this->assertEquals('', $response['body']['store']); $this->assertEquals('', $response['body']['hostname']); - + $platformFultterAndroidId = $data['platformFultterAndroidId'] ?? ''; - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/'.$platformFultterAndroidId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/platforms/' . $platformFultterAndroidId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1486,7 +1486,7 @@ class ProjectsConsoleClientTest extends Scope $platformAppleIosId = $data['platformAppleIosId'] ?? ''; - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/'.$platformAppleIosId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/platforms/' . $platformAppleIosId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1502,7 +1502,7 @@ class ProjectsConsoleClientTest extends Scope $platformAppleMacOsId = $data['platformAppleMacOsId'] ?? ''; - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/'.$platformAppleMacOsId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/platforms/' . $platformAppleMacOsId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1518,7 +1518,7 @@ class ProjectsConsoleClientTest extends Scope $platformAppleWatchOsId = $data['platformAppleWatchOsId'] ?? ''; - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/'.$platformAppleWatchOsId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/platforms/' . $platformAppleWatchOsId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1534,7 +1534,7 @@ class ProjectsConsoleClientTest extends Scope $platformAppleTvOsId = $data['platformAppleTvOsId'] ?? ''; - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/'.$platformAppleTvOsId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/platforms/' . $platformAppleTvOsId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1551,7 +1551,7 @@ class ProjectsConsoleClientTest extends Scope /** * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/error', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/platforms/error', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1570,7 +1570,7 @@ class ProjectsConsoleClientTest extends Scope $platformWebId = $data['platformWebId'] ?? ''; - $response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/platforms/'.$platformWebId, array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/projects/' . $id . '/platforms/' . $platformWebId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1591,7 +1591,7 @@ class ProjectsConsoleClientTest extends Scope $platformFultteriOSId = $data['platformFultteriOSId'] ?? ''; - $response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/platforms/'.$platformFultteriOSId, array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/projects/' . $id . '/platforms/' . $platformFultteriOSId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1609,10 +1609,10 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals('com.example.ios2', $response['body']['key']); $this->assertEquals('', $response['body']['store']); $this->assertEquals('', $response['body']['hostname']); - + $platformFultterAndroidId = $data['platformFultterAndroidId'] ?? ''; - $response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/platforms/'.$platformFultterAndroidId, array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/projects/' . $id . '/platforms/' . $platformFultterAndroidId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1633,7 +1633,7 @@ class ProjectsConsoleClientTest extends Scope $platformAppleIosId = $data['platformAppleIosId'] ?? ''; - $response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/platforms/'.$platformAppleIosId, array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/projects/' . $id . '/platforms/' . $platformAppleIosId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1654,7 +1654,7 @@ class ProjectsConsoleClientTest extends Scope $platformAppleMacOsId = $data['platformAppleMacOsId'] ?? ''; - $response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/platforms/'.$platformAppleMacOsId, array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/projects/' . $id . '/platforms/' . $platformAppleMacOsId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1675,7 +1675,7 @@ class ProjectsConsoleClientTest extends Scope $platformAppleWatchOsId = $data['platformAppleWatchOsId'] ?? ''; - $response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/platforms/'.$platformAppleWatchOsId, array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/projects/' . $id . '/platforms/' . $platformAppleWatchOsId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1696,7 +1696,7 @@ class ProjectsConsoleClientTest extends Scope $platformAppleTvOsId = $data['platformAppleTvOsId'] ?? ''; - $response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/platforms/'.$platformAppleTvOsId, array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/projects/' . $id . '/platforms/' . $platformAppleTvOsId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1718,7 +1718,7 @@ class ProjectsConsoleClientTest extends Scope /** * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/platforms/error', array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/projects/' . $id . '/platforms/error', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1739,10 +1739,10 @@ class ProjectsConsoleClientTest extends Scope public function testDeleteProjectPlatform($data): array { $id = $data['projectId'] ?? ''; - + $platformWebId = $data['platformWebId'] ?? ''; - $response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/platforms/'.$platformWebId, array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/projects/' . $id . '/platforms/' . $platformWebId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1750,7 +1750,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(204, $response['headers']['status-code']); $this->assertEmpty($response['body']); - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/'.$platformWebId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/platforms/' . $platformWebId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1759,7 +1759,7 @@ class ProjectsConsoleClientTest extends Scope $platformFultteriOSId = $data['platformFultteriOSId'] ?? ''; - $response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/platforms/'.$platformFultteriOSId, array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/projects/' . $id . '/platforms/' . $platformFultteriOSId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1767,7 +1767,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(204, $response['headers']['status-code']); $this->assertEmpty($response['body']); - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/'.$platformFultteriOSId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/platforms/' . $platformFultteriOSId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1776,7 +1776,7 @@ class ProjectsConsoleClientTest extends Scope $platformFultterAndroidId = $data['platformFultterAndroidId'] ?? ''; - $response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/platforms/'.$platformFultterAndroidId, array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/projects/' . $id . '/platforms/' . $platformFultterAndroidId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1784,7 +1784,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(204, $response['headers']['status-code']); $this->assertEmpty($response['body']); - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/'.$platformFultterAndroidId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/platforms/' . $platformFultterAndroidId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1793,7 +1793,7 @@ class ProjectsConsoleClientTest extends Scope $platformAppleIosId = $data['platformAppleIosId'] ?? ''; - $response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/platforms/'.$platformAppleIosId, array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/projects/' . $id . '/platforms/' . $platformAppleIosId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1801,7 +1801,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(204, $response['headers']['status-code']); $this->assertEmpty($response['body']); - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/'.$platformAppleIosId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/platforms/' . $platformAppleIosId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1810,7 +1810,7 @@ class ProjectsConsoleClientTest extends Scope $platformAppleMacOsId = $data['platformAppleMacOsId'] ?? ''; - $response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/platforms/'.$platformAppleMacOsId, array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/projects/' . $id . '/platforms/' . $platformAppleMacOsId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1818,7 +1818,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(204, $response['headers']['status-code']); $this->assertEmpty($response['body']); - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/'.$platformAppleMacOsId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/platforms/' . $platformAppleMacOsId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1827,7 +1827,7 @@ class ProjectsConsoleClientTest extends Scope $platformAppleWatchOsId = $data['platformAppleWatchOsId'] ?? ''; - $response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/platforms/'.$platformAppleWatchOsId, array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/projects/' . $id . '/platforms/' . $platformAppleWatchOsId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1835,7 +1835,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(204, $response['headers']['status-code']); $this->assertEmpty($response['body']); - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/'.$platformAppleWatchOsId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/platforms/' . $platformAppleWatchOsId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1844,7 +1844,7 @@ class ProjectsConsoleClientTest extends Scope $platformAppleTvOsId = $data['platformAppleTvOsId'] ?? ''; - $response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/platforms/'.$platformAppleTvOsId, array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/projects/' . $id . '/platforms/' . $platformAppleTvOsId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1852,7 +1852,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(204, $response['headers']['status-code']); $this->assertEmpty($response['body']); - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/'.$platformAppleTvOsId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/platforms/' . $platformAppleTvOsId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1862,7 +1862,7 @@ class ProjectsConsoleClientTest extends Scope /** * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/webhooks/error', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/projects/' . $id . '/webhooks/error', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1881,7 +1881,7 @@ class ProjectsConsoleClientTest extends Scope { $id = $data['projectId'] ?? ''; - $response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/domains', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/projects/' . $id . '/domains', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1895,21 +1895,32 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals('com', $response['body']['tld']); $this->assertEquals('example.com', $response['body']['registerable']); $this->assertEquals(false, $response['body']['verification']); - + $data = array_merge($data, ['domainId' => $response['body']['$id']]); /** * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/platforms', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/projects/' . $id . '/platforms', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'domain' => '123', ]); - + $this->assertEquals(400, $response['headers']['status-code']); + $response = $this->client->call(Client::METHOD_POST, '/projects/' . $id . '/platforms', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'type' => 'web', + 'name' => 'Too Long Hostname', + 'key' => '', + 'store' => '', + 'hostname' => \str_repeat("bestdomain", 25) . '.com' // 250 + 4 chars total (exactly above limit) + ]); + return $data; } @@ -1919,8 +1930,8 @@ class ProjectsConsoleClientTest extends Scope public function testListProjectDomain($data): array { $id = $data['projectId'] ?? ''; - - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/domains', array_merge([ + + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/domains', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1931,7 +1942,7 @@ class ProjectsConsoleClientTest extends Scope /** * Test for FAILURE */ - + return $data; } @@ -1943,7 +1954,7 @@ class ProjectsConsoleClientTest extends Scope $id = $data['projectId'] ?? ''; $domainId = $data['domainId'] ?? ''; - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/domains/'.$domainId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/domains/' . $domainId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1956,11 +1967,11 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals('com', $response['body']['tld']); $this->assertEquals('example.com', $response['body']['registerable']); $this->assertEquals(false, $response['body']['verification']); - + /** * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/domains/error', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/domains/error', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -1978,7 +1989,7 @@ class ProjectsConsoleClientTest extends Scope $id = $data['projectId'] ?? ''; $domainId = $data['domainId'] ?? ''; - $response = $this->client->call(Client::METHOD_PATCH, '/projects/'.$id.'/domains/'.$domainId.'/verification', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/domains/' . $domainId . '/verification', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -2000,7 +2011,7 @@ class ProjectsConsoleClientTest extends Scope $id = $data['projectId'] ?? ''; $domainId = $data['domainId'] ?? ''; - $response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/domains/'.$domainId, array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/projects/' . $id . '/domains/' . $domainId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -2008,7 +2019,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(204, $response['headers']['status-code']); $this->assertEmpty($response['body']); - $response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/domains/'.$domainId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/domains/' . $domainId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -2018,7 +2029,7 @@ class ProjectsConsoleClientTest extends Scope /** * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/domains/error', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/projects/' . $id . '/domains/error', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); diff --git a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php index 0b19665bf8..9d75bc159e 100644 --- a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php @@ -2,17 +2,10 @@ namespace Tests\E2E\Services\Realtime; -use Exception; -use SebastianBergmann\RecursionContext\InvalidArgumentException; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\Exception as FrameworkException; use Tests\E2E\Client; use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\SideConsole; -use WebSocket\BadOpcodeException; -use WebSocket\ConnectionException; -use WebSocket\TimeoutException; class RealtimeConsoleClientTest extends Scope { @@ -23,12 +16,11 @@ class RealtimeConsoleClientTest extends Scope public function testAttributes() { $user = $this->getUser(); - $session = $user['session'] ?? ''; $projectId = 'console'; $client = $this->getWebsocket(['console'], [ 'origin' => 'http://localhost', - 'cookie' => 'a_session_console='. $this->getRoot()['session'], + 'cookie' => 'a_session_console=' . $this->getRoot()['session'], ], $projectId); $response = json_decode($client->receive(), true); @@ -55,9 +47,9 @@ class RealtimeConsoleClientTest extends Scope 'permission' => 'collection' ]); - $data = ['actorsId' => $actors['body']['$id']]; + $actorsId = $actors['body']['$id']; - $name = $this->client->call(Client::METHOD_POST, '/database/collections/' . $data['actorsId'] . '/attributes/string', array_merge([ + $name = $this->client->call(Client::METHOD_POST, '/database/collections/' . $actorsId . '/attributes/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -66,6 +58,8 @@ class RealtimeConsoleClientTest extends Scope 'required' => true, ]); + $attributeKey = $name['body']['key']; + $this->assertEquals($name['headers']['status-code'], 201); $this->assertEquals($name['body']['key'], 'name'); $this->assertEquals($name['body']['type'], 'string'); @@ -81,7 +75,16 @@ class RealtimeConsoleClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(1, $response['data']['channels']); $this->assertContains('console', $response['data']['channels']); - $this->assertEquals('database.attributes.create', $response['data']['event']); + $this->assertContains("collections.{$actorsId}.attributes.{$actorsId}_{$attributeKey}.create", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.attributes.*.create", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.attributes.{$actorsId}_{$attributeKey}", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.attributes.*", $response['data']['events']); + $this->assertContains("collections.{$actorsId}", $response['data']['events']); + $this->assertContains("collections.*.attributes.{$actorsId}_{$attributeKey}.create", $response['data']['events']); + $this->assertContains("collections.*.attributes.*.create", $response['data']['events']); + $this->assertContains("collections.*.attributes.{$actorsId}_{$attributeKey}", $response['data']['events']); + $this->assertContains("collections.*.attributes.*", $response['data']['events']); + $this->assertContains("collections.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $this->assertEquals('processing', $response['data']['payload']['status']); @@ -94,12 +97,23 @@ class RealtimeConsoleClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(1, $response['data']['channels']); $this->assertContains('console', $response['data']['channels']); - $this->assertEquals('database.attributes.update', $response['data']['event']); + $this->assertContains("collections.{$actorsId}.attributes.{$actorsId}_{$attributeKey}.update", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.attributes.*.update", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.attributes.{$actorsId}_{$attributeKey}", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.attributes.*", $response['data']['events']); + $this->assertContains("collections.{$actorsId}", $response['data']['events']); + $this->assertContains("collections.*.attributes.{$actorsId}_{$attributeKey}.update", $response['data']['events']); + $this->assertContains("collections.*.attributes.*.update", $response['data']['events']); + $this->assertContains("collections.*.attributes.{$actorsId}_{$attributeKey}", $response['data']['events']); + $this->assertContains("collections.*.attributes.*", $response['data']['events']); + $this->assertContains("collections.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $this->assertEquals('available', $response['data']['payload']['status']); $client->close(); + $data = ['actorsId' => $actorsId]; + return $data; } @@ -108,13 +122,11 @@ class RealtimeConsoleClientTest extends Scope */ public function testIndexes(array $data) { - $user = $this->getUser(); - $session = $user['session'] ?? ''; $projectId = 'console'; - + $actorsId = $data['actorsId']; $client = $this->getWebsocket(['console'], [ 'origin' => 'http://localhost', - 'cookie' => 'a_session_console='. $this->getRoot()['session'], + 'cookie' => 'a_session_console=' . $this->getRoot()['session'], ], $projectId); $response = json_decode($client->receive(), true); @@ -130,7 +142,7 @@ class RealtimeConsoleClientTest extends Scope /** * Test Indexes */ - $index = $this->client->call(Client::METHOD_POST, '/database/collections/' . $data['actorsId'] . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/database/collections/' . $actorsId . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -142,6 +154,7 @@ class RealtimeConsoleClientTest extends Scope ]); $this->assertEquals($index['headers']['status-code'], 201); + $indexKey = $index['body']['key']; $response = json_decode($client->receive(), true); @@ -152,7 +165,16 @@ class RealtimeConsoleClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(1, $response['data']['channels']); $this->assertContains('console', $response['data']['channels']); - $this->assertEquals('database.indexes.create', $response['data']['event']); + $this->assertContains("collections.{$actorsId}.indexes.{$actorsId}_{$indexKey}.create", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.indexes.*.create", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.indexes.{$actorsId}_{$indexKey}", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.indexes.*", $response['data']['events']); + $this->assertContains("collections.{$actorsId}", $response['data']['events']); + $this->assertContains("collections.*.indexes.{$actorsId}_{$indexKey}.create", $response['data']['events']); + $this->assertContains("collections.*.indexes.*.create", $response['data']['events']); + $this->assertContains("collections.*.indexes.{$actorsId}_{$indexKey}", $response['data']['events']); + $this->assertContains("collections.*.indexes.*", $response['data']['events']); + $this->assertContains("collections.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $this->assertEquals('processing', $response['data']['payload']['status']); @@ -165,7 +187,16 @@ class RealtimeConsoleClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(1, $response['data']['channels']); $this->assertContains('console', $response['data']['channels']); - $this->assertEquals('database.indexes.update', $response['data']['event']); + $this->assertContains("collections.{$actorsId}.indexes.{$actorsId}_{$indexKey}.update", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.indexes.*.update", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.indexes.{$actorsId}_{$indexKey}", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.indexes.*", $response['data']['events']); + $this->assertContains("collections.{$actorsId}", $response['data']['events']); + $this->assertContains("collections.*.indexes.{$actorsId}_{$indexKey}.update", $response['data']['events']); + $this->assertContains("collections.*.indexes.*.update", $response['data']['events']); + $this->assertContains("collections.*.indexes.{$actorsId}_{$indexKey}", $response['data']['events']); + $this->assertContains("collections.*.indexes.*", $response['data']['events']); + $this->assertContains("collections.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $this->assertEquals('available', $response['data']['payload']['status']); @@ -179,13 +210,12 @@ class RealtimeConsoleClientTest extends Scope */ public function testDeleteIndex(array $data) { - $user = $this->getUser(); - $session = $user['session'] ?? ''; + $actorsId = $data['actorsId']; $projectId = 'console'; $client = $this->getWebsocket(['console'], [ 'origin' => 'http://localhost', - 'cookie' => 'a_session_console='. $this->getRoot()['session'], + 'cookie' => 'a_session_console=' . $this->getRoot()['session'], ], $projectId); $response = json_decode($client->receive(), true); @@ -201,13 +231,13 @@ class RealtimeConsoleClientTest extends Scope /** * Test Delete Index */ - $attribute = $this->client->call(Client::METHOD_DELETE, '/database/collections/' . $data['actorsId'] . '/indexes/key_name', array_merge([ + $attribute = $this->client->call(Client::METHOD_DELETE, '/database/collections/' . $actorsId . '/indexes/key_name', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); $this->assertEquals($attribute['headers']['status-code'], 204); - + $indexKey = 'key_name'; $response = json_decode($client->receive(), true); $this->assertArrayHasKey('type', $response); @@ -217,7 +247,16 @@ class RealtimeConsoleClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(1, $response['data']['channels']); $this->assertContains('console', $response['data']['channels']); - $this->assertEquals('database.indexes.delete', $response['data']['event']); + $this->assertContains("collections.{$actorsId}.indexes.{$actorsId}_{$indexKey}.delete", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.indexes.*.delete", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.indexes.{$actorsId}_{$indexKey}", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.indexes.*", $response['data']['events']); + $this->assertContains("collections.{$actorsId}", $response['data']['events']); + $this->assertContains("collections.*.indexes.{$actorsId}_{$indexKey}.delete", $response['data']['events']); + $this->assertContains("collections.*.indexes.*.delete", $response['data']['events']); + $this->assertContains("collections.*.indexes.{$actorsId}_{$indexKey}", $response['data']['events']); + $this->assertContains("collections.*.indexes.*", $response['data']['events']); + $this->assertContains("collections.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $client->close(); @@ -230,13 +269,12 @@ class RealtimeConsoleClientTest extends Scope */ public function testDeleteAttribute(array $data) { - $user = $this->getUser(); - $session = $user['session'] ?? ''; + $actorsId = $data['actorsId']; $projectId = 'console'; $client = $this->getWebsocket(['console'], [ 'origin' => 'http://localhost', - 'cookie' => 'a_session_console='. $this->getRoot()['session'], + 'cookie' => 'a_session_console=' . $this->getRoot()['session'], ], $projectId); $response = json_decode($client->receive(), true); @@ -258,7 +296,7 @@ class RealtimeConsoleClientTest extends Scope ], $this->getHeaders())); $this->assertEquals($attribute['headers']['status-code'], 204); - + $attributeKey = 'name'; $response = json_decode($client->receive(), true); $this->assertArrayHasKey('type', $response); @@ -268,9 +306,18 @@ class RealtimeConsoleClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(1, $response['data']['channels']); $this->assertContains('console', $response['data']['channels']); - $this->assertEquals('database.attributes.delete', $response['data']['event']); + $this->assertContains("collections.{$actorsId}.attributes.{$actorsId}_{$attributeKey}.delete", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.attributes.*.delete", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.attributes.{$actorsId}_{$attributeKey}", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.attributes.*", $response['data']['events']); + $this->assertContains("collections.{$actorsId}", $response['data']['events']); + $this->assertContains("collections.*.attributes.{$actorsId}_{$attributeKey}.delete", $response['data']['events']); + $this->assertContains("collections.*.attributes.*.delete", $response['data']['events']); + $this->assertContains("collections.*.attributes.{$actorsId}_{$attributeKey}", $response['data']['events']); + $this->assertContains("collections.*.attributes.*", $response['data']['events']); + $this->assertContains("collections.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $client->close(); } -} \ No newline at end of file +} diff --git a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php index c5155a97a8..017792a61f 100644 --- a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php @@ -25,7 +25,7 @@ class RealtimeCustomClientTest extends Scope $headers = [ 'origin' => 'http://localhost', - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session ]; $client = $this->getWebsocket(['documents'], $headers); @@ -240,7 +240,7 @@ class RealtimeCustomClientTest extends Scope $client = $this->getWebsocket(['account'], [ 'origin' => 'http://localhost', - 'cookie' => 'a_session_'.$projectId.'=' . $session + 'cookie' => 'a_session_' . $projectId . '=' . $session ]); $response = json_decode($client->receive(), true); @@ -278,7 +278,12 @@ class RealtimeCustomClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertContains('account', $response['data']['channels']); $this->assertContains('account.' . $userId, $response['data']['channels']); - $this->assertEquals('account.update.name', $response['data']['event']); + $this->assertContains("users.{$userId}.update.name", $response['data']['events']); + $this->assertContains("users.{$userId}.update", $response['data']['events']); + $this->assertContains("users.{$userId}", $response['data']['events']); + $this->assertContains("users.*.update.name", $response['data']['events']); + $this->assertContains("users.*.update", $response['data']['events']); + $this->assertContains("users.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $this->assertEquals($name, $response['data']['payload']['name']); @@ -291,7 +296,7 @@ class RealtimeCustomClientTest extends Scope 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, - 'cookie' => 'a_session_'.$projectId.'=' . $session, + 'cookie' => 'a_session_' . $projectId . '=' . $session, ]), [ 'password' => 'new-password', 'oldPassword' => 'password', @@ -307,7 +312,12 @@ class RealtimeCustomClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertContains('account', $response['data']['channels']); $this->assertContains('account.' . $userId, $response['data']['channels']); - $this->assertEquals('account.update.password', $response['data']['event']); + $this->assertContains("users.{$userId}.update.password", $response['data']['events']); + $this->assertContains("users.{$userId}.update", $response['data']['events']); + $this->assertContains("users.{$userId}", $response['data']['events']); + $this->assertContains("users.*.update.password", $response['data']['events']); + $this->assertContains("users.*.update", $response['data']['events']); + $this->assertContains("users.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $this->assertEquals($name, $response['data']['payload']['name']); @@ -319,7 +329,7 @@ class RealtimeCustomClientTest extends Scope 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, - 'cookie' => 'a_session_'.$projectId.'=' . $session, + 'cookie' => 'a_session_' . $projectId . '=' . $session, ]), [ 'email' => 'torsten@appwrite.io', 'password' => 'new-password', @@ -335,23 +345,27 @@ class RealtimeCustomClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertContains('account', $response['data']['channels']); $this->assertContains('account.' . $userId, $response['data']['channels']); - $this->assertEquals('account.update.email', $response['data']['event']); + $this->assertContains("users.{$userId}.update.email", $response['data']['events']); + $this->assertContains("users.{$userId}.update", $response['data']['events']); + $this->assertContains("users.{$userId}", $response['data']['events']); + $this->assertContains("users.*.update.email", $response['data']['events']); + $this->assertContains("users.*.update", $response['data']['events']); + $this->assertContains("users.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); - $this->assertEquals('torsten@appwrite.io', $response['data']['payload']['email']); /** * Test Account Verification Create */ - $this->client->call(Client::METHOD_POST, '/account/verification', array_merge([ + $verification = $this->client->call(Client::METHOD_POST, '/account/verification', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, - 'cookie' => 'a_session_'.$projectId.'=' . $session, + 'cookie' => 'a_session_' . $projectId . '=' . $session, ]), [ 'url' => 'http://localhost/verification', ]); - + $verificationId = $verification['body']['$id']; $response = json_decode($client->receive(), true); $this->assertArrayHasKey('type', $response); @@ -362,7 +376,16 @@ class RealtimeCustomClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertContains('account', $response['data']['channels']); $this->assertContains('account.' . $userId, $response['data']['channels']); - $this->assertEquals('account.verification.create', $response['data']['event']); + $this->assertContains("users.{$userId}.verification.{$verificationId}.create", $response['data']['events']); + $this->assertContains("users.{$userId}.verification.{$verificationId}", $response['data']['events']); + $this->assertContains("users.{$userId}.verification.*.create", $response['data']['events']); + $this->assertContains("users.{$userId}.verification.*", $response['data']['events']); + $this->assertContains("users.{$userId}", $response['data']['events']); + $this->assertContains("users.*.verification.{$verificationId}.create", $response['data']['events']); + $this->assertContains("users.*.verification.{$verificationId}", $response['data']['events']); + $this->assertContains("users.*.verification.*.create", $response['data']['events']); + $this->assertContains("users.*.verification.*", $response['data']['events']); + $this->assertContains("users.*", $response['data']['events']); $lastEmail = $this->getLastEmail(); $verification = substr($lastEmail['text'], strpos($lastEmail['text'], '&secret=', 0) + 8, 256); @@ -370,11 +393,11 @@ class RealtimeCustomClientTest extends Scope /** * Test Account Verification Complete */ - $response = $this->client->call(Client::METHOD_PUT, '/account/verification', array_merge([ + $verification = $this->client->call(Client::METHOD_PUT, '/account/verification', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, - 'cookie' => 'a_session_'.$projectId.'=' . $session, + 'cookie' => 'a_session_' . $projectId . '=' . $session, ]), [ 'userId' => $userId, 'secret' => $verification, @@ -390,8 +413,16 @@ class RealtimeCustomClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertContains('account', $response['data']['channels']); $this->assertContains('account.' . $userId, $response['data']['channels']); - $this->assertEquals('account.verification.update', $response['data']['event']); - + $this->assertContains("users.{$userId}.verification.{$verificationId}.update", $response['data']['events']); + $this->assertContains("users.{$userId}.verification.{$verificationId}", $response['data']['events']); + $this->assertContains("users.{$userId}.verification.*.update", $response['data']['events']); + $this->assertContains("users.{$userId}.verification.*", $response['data']['events']); + $this->assertContains("users.{$userId}", $response['data']['events']); + $this->assertContains("users.*.verification.{$verificationId}.update", $response['data']['events']); + $this->assertContains("users.*.verification.{$verificationId}", $response['data']['events']); + $this->assertContains("users.*.verification.*.update", $response['data']['events']); + $this->assertContains("users.*.verification.*", $response['data']['events']); + $this->assertContains("users.*", $response['data']['events']); /** * Test Acoount Prefs Update */ @@ -399,7 +430,7 @@ class RealtimeCustomClientTest extends Scope 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, - 'cookie' => 'a_session_'.$projectId.'=' . $session, + 'cookie' => 'a_session_' . $projectId . '=' . $session, ]), [ 'prefs' => [ 'prefKey1' => 'prefValue1', @@ -417,7 +448,12 @@ class RealtimeCustomClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertContains('account', $response['data']['channels']); $this->assertContains('account.' . $userId, $response['data']['channels']); - $this->assertEquals('account.update.prefs', $response['data']['event']); + $this->assertContains("users.{$userId}.update.prefs", $response['data']['events']); + $this->assertContains("users.{$userId}.update", $response['data']['events']); + $this->assertContains("users.{$userId}", $response['data']['events']); + $this->assertContains("users.*.update.prefs", $response['data']['events']); + $this->assertContains("users.*.update", $response['data']['events']); + $this->assertContains("users.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); /** @@ -432,7 +468,7 @@ class RealtimeCustomClientTest extends Scope 'password' => 'new-password', ]); - $sessionNew = $this->client->parseCookie((string)$response['headers']['set-cookie'])['a_session_'.$projectId]; + $sessionNew = $this->client->parseCookie((string)$response['headers']['set-cookie'])['a_session_' . $projectId]; $sessionNewId = $response['body']['$id']; $response = json_decode($client->receive(), true); @@ -445,17 +481,26 @@ class RealtimeCustomClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertContains('account', $response['data']['channels']); $this->assertContains('account.' . $userId, $response['data']['channels']); - $this->assertEquals('account.sessions.create', $response['data']['event']); + $this->assertContains("users.{$userId}.sessions.{$sessionNewId}.create", $response['data']['events']); + $this->assertContains("users.{$userId}.sessions.{$sessionNewId}", $response['data']['events']); + $this->assertContains("users.{$userId}.sessions.*.create", $response['data']['events']); + $this->assertContains("users.{$userId}.sessions.*", $response['data']['events']); + $this->assertContains("users.{$userId}", $response['data']['events']); + $this->assertContains("users.*.sessions.{$sessionNewId}.create", $response['data']['events']); + $this->assertContains("users.*.sessions.{$sessionNewId}", $response['data']['events']); + $this->assertContains("users.*.sessions.*.create", $response['data']['events']); + $this->assertContains("users.*.sessions.*", $response['data']['events']); + $this->assertContains("users.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); /** * Test Account Session Delete */ - $this->client->call(Client::METHOD_DELETE, '/account/sessions/'.$sessionNewId, array_merge([ + $this->client->call(Client::METHOD_DELETE, '/account/sessions/' . $sessionNewId, array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, - 'cookie' => 'a_session_'.$projectId.'=' . $sessionNew, + 'cookie' => 'a_session_' . $projectId . '=' . $sessionNew, ])); $response = json_decode($client->receive(), true); @@ -468,13 +513,22 @@ class RealtimeCustomClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertContains('account', $response['data']['channels']); $this->assertContains('account.' . $userId, $response['data']['channels']); - $this->assertEquals('account.sessions.delete', $response['data']['event']); + $this->assertContains("users.{$userId}.sessions.{$sessionNewId}.delete", $response['data']['events']); + $this->assertContains("users.{$userId}.sessions.{$sessionNewId}", $response['data']['events']); + $this->assertContains("users.{$userId}.sessions.*.delete", $response['data']['events']); + $this->assertContains("users.{$userId}.sessions.*", $response['data']['events']); + $this->assertContains("users.{$userId}", $response['data']['events']); + $this->assertContains("users.*.sessions.{$sessionNewId}.delete", $response['data']['events']); + $this->assertContains("users.*.sessions.{$sessionNewId}", $response['data']['events']); + $this->assertContains("users.*.sessions.*.delete", $response['data']['events']); + $this->assertContains("users.*.sessions.*", $response['data']['events']); + $this->assertContains("users.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); /** * Test Account Create Recovery */ - $this->client->call(Client::METHOD_POST, '/account/recovery', array_merge([ + $recovery = $this->client->call(Client::METHOD_POST, '/account/recovery', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, @@ -482,7 +536,7 @@ class RealtimeCustomClientTest extends Scope 'email' => 'torsten@appwrite.io', 'url' => 'http://localhost/recovery', ]); - + $recoveryId = $recovery['body']['$id']; $response = json_decode($client->receive(), true); $lastEmail = $this->getLastEmail(); @@ -496,7 +550,16 @@ class RealtimeCustomClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertContains('account', $response['data']['channels']); $this->assertContains('account.' . $userId, $response['data']['channels']); - $this->assertEquals('account.recovery.create', $response['data']['event']); + $this->assertContains("users.{$userId}.recovery.{$recoveryId}.create", $response['data']['events']); + $this->assertContains("users.{$userId}.recovery.{$recoveryId}", $response['data']['events']); + $this->assertContains("users.{$userId}.recovery.*.create", $response['data']['events']); + $this->assertContains("users.{$userId}.recovery.*", $response['data']['events']); + $this->assertContains("users.{$userId}", $response['data']['events']); + $this->assertContains("users.*.recovery.{$recoveryId}.create", $response['data']['events']); + $this->assertContains("users.*.recovery.{$recoveryId}", $response['data']['events']); + $this->assertContains("users.*.recovery.*.create", $response['data']['events']); + $this->assertContains("users.*.recovery.*", $response['data']['events']); + $this->assertContains("users.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $response = $this->client->call(Client::METHOD_PUT, '/account/recovery', array_merge([ @@ -520,7 +583,16 @@ class RealtimeCustomClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertContains('account', $response['data']['channels']); $this->assertContains('account.' . $userId, $response['data']['channels']); - $this->assertEquals('account.recovery.update', $response['data']['event']); + $this->assertContains("users.{$userId}.recovery.{$recoveryId}.update", $response['data']['events']); + $this->assertContains("users.{$userId}.recovery.{$recoveryId}", $response['data']['events']); + $this->assertContains("users.{$userId}.recovery.*.update", $response['data']['events']); + $this->assertContains("users.{$userId}.recovery.*", $response['data']['events']); + $this->assertContains("users.{$userId}", $response['data']['events']); + $this->assertContains("users.*.recovery.{$recoveryId}.update", $response['data']['events']); + $this->assertContains("users.*.recovery.{$recoveryId}", $response['data']['events']); + $this->assertContains("users.*.recovery.*.update", $response['data']['events']); + $this->assertContains("users.*.recovery.*", $response['data']['events']); + $this->assertContains("users.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $client->close(); @@ -534,7 +606,7 @@ class RealtimeCustomClientTest extends Scope $client = $this->getWebsocket(['documents', 'collections'], [ 'origin' => 'http://localhost', - 'cookie' => 'a_session_'.$projectId.'=' . $session + 'cookie' => 'a_session_' . $projectId . '=' . $session ]); $response = json_decode($client->receive(), true); @@ -564,9 +636,9 @@ class RealtimeCustomClientTest extends Scope 'permission' => 'document' ]); - $data = ['actorsId' => $actors['body']['$id']]; + $actorsId = $actors['body']['$id']; - $name = $this->client->call(Client::METHOD_POST, '/database/collections/' . $data['actorsId'] . '/attributes/string', array_merge([ + $name = $this->client->call(Client::METHOD_POST, '/database/collections/' . $actorsId . '/attributes/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -587,7 +659,7 @@ class RealtimeCustomClientTest extends Scope /** * Test Document Create */ - $document = $this->client->call(Client::METHOD_POST, '/database/collections/' . $data['actorsId'] . '/documents', array_merge([ + $document = $this->client->call(Client::METHOD_POST, '/database/collections/' . $actorsId . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -601,6 +673,8 @@ class RealtimeCustomClientTest extends Scope $response = json_decode($client->receive(), true); + $documentId = $document['body']['$id']; + $this->assertArrayHasKey('type', $response); $this->assertArrayHasKey('data', $response); $this->assertEquals('event', $response['type']); @@ -608,18 +682,25 @@ class RealtimeCustomClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(3, $response['data']['channels']); $this->assertContains('documents', $response['data']['channels']); - $this->assertContains('collections.' . $data['actorsId'] . '.documents.' . $document['body']['$id'], $response['data']['channels']); - $this->assertContains('collections.' . $actors['body']['$id'] . '.documents', $response['data']['channels']); - $this->assertEquals('database.documents.create', $response['data']['event']); + $this->assertContains('collections.' . $actorsId . '.documents.' . $documentId, $response['data']['channels']); + $this->assertContains('collections.' . $actorsId . '.documents', $response['data']['channels']); + $this->assertContains("collections.{$actorsId}.documents.{$documentId}.create", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.documents.{$documentId}", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.documents.*.create", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("collections.{$actorsId}", $response['data']['events']); + $this->assertContains("collections.*.documents.{$documentId}.create", $response['data']['events']); + $this->assertContains("collections.*.documents.{$documentId}", $response['data']['events']); + $this->assertContains("collections.*.documents.*.create", $response['data']['events']); + $this->assertContains("collections.*.documents.*", $response['data']['events']); + $this->assertContains("collections.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $this->assertEquals($response['data']['payload']['name'], 'Chris Evans'); - $data['documentId'] = $document['body']['$id']; - /** * Test Document Update */ - $document = $this->client->call(Client::METHOD_PATCH, '/database/collections/' . $data['actorsId'] . '/documents/' . $data['documentId'], array_merge([ + $document = $this->client->call(Client::METHOD_PATCH, '/database/collections/' . $actorsId . '/documents/' . $documentId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -640,9 +721,18 @@ class RealtimeCustomClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(3, $response['data']['channels']); $this->assertContains('documents', $response['data']['channels']); - $this->assertContains('collections.' . $data['actorsId'] . '.documents.' . $data['documentId'], $response['data']['channels']); - $this->assertContains('collections.' . $data['actorsId'] . '.documents', $response['data']['channels']); - $this->assertEquals('database.documents.update', $response['data']['event']); + $this->assertContains("collections.{$actorsId}.documents.{$documentId}", $response['data']['channels']); + $this->assertContains("collections.{$actorsId}.documents", $response['data']['channels']); + $this->assertContains("collections.{$actorsId}.documents.{$documentId}.update", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.documents.{$documentId}", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.documents.*.update", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("collections.{$actorsId}", $response['data']['events']); + $this->assertContains("collections.*.documents.{$documentId}.update", $response['data']['events']); + $this->assertContains("collections.*.documents.{$documentId}", $response['data']['events']); + $this->assertContains("collections.*.documents.*.update", $response['data']['events']); + $this->assertContains("collections.*.documents.*", $response['data']['events']); + $this->assertContains("collections.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $this->assertEquals($response['data']['payload']['name'], 'Chris Evans 2'); @@ -650,7 +740,7 @@ class RealtimeCustomClientTest extends Scope /** * Test Document Delete */ - $document = $this->client->call(Client::METHOD_POST, '/database/collections/' . $data['actorsId'] . '/documents', array_merge([ + $document = $this->client->call(Client::METHOD_POST, '/database/collections/' . $actorsId . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -664,7 +754,9 @@ class RealtimeCustomClientTest extends Scope $client->receive(); - $this->client->call(Client::METHOD_DELETE, '/database/collections/' . $data['actorsId'] . '/documents/' . $document['body']['$id'], array_merge([ + $documentId = $document['body']['$id']; + + $this->client->call(Client::METHOD_DELETE, '/database/collections/' . $actorsId . '/documents/' . $documentId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -678,9 +770,18 @@ class RealtimeCustomClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(3, $response['data']['channels']); $this->assertContains('documents', $response['data']['channels']); - $this->assertContains('collections.' . $data['actorsId'] . '.documents.' . $document['body']['$id'], $response['data']['channels']); - $this->assertContains('collections.' . $data['actorsId'] . '.documents', $response['data']['channels']); - $this->assertEquals('database.documents.delete', $response['data']['event']); + $this->assertContains("collections.{$actorsId}.documents.{$documentId}", $response['data']['channels']); + $this->assertContains("collections.{$actorsId}.documents", $response['data']['channels']); + $this->assertContains("collections.{$actorsId}.documents.{$documentId}.delete", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.documents.{$documentId}", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.documents.*.delete", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("collections.{$actorsId}", $response['data']['events']); + $this->assertContains("collections.*.documents.{$documentId}.delete", $response['data']['events']); + $this->assertContains("collections.*.documents.{$documentId}", $response['data']['events']); + $this->assertContains("collections.*.documents.*.delete", $response['data']['events']); + $this->assertContains("collections.*.documents.*", $response['data']['events']); + $this->assertContains("collections.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $this->assertEquals($response['data']['payload']['name'], 'Bradley Cooper'); @@ -695,7 +796,7 @@ class RealtimeCustomClientTest extends Scope $client = $this->getWebsocket(['documents', 'collections'], [ 'origin' => 'http://localhost', - 'cookie' => 'a_session_'.$projectId.'=' . $session + 'cookie' => 'a_session_' . $projectId . '=' . $session ]); $response = json_decode($client->receive(), true); @@ -725,9 +826,9 @@ class RealtimeCustomClientTest extends Scope 'permission' => 'collection' ]); - $data = ['actorsId' => $actors['body']['$id']]; + $actorsId = $actors['body']['$id']; - $name = $this->client->call(Client::METHOD_POST, '/database/collections/' . $data['actorsId'] . '/attributes/string', array_merge([ + $name = $this->client->call(Client::METHOD_POST, '/database/collections/' . $actorsId . '/attributes/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -748,7 +849,7 @@ class RealtimeCustomClientTest extends Scope /** * Test Document Create */ - $document = $this->client->call(Client::METHOD_POST, '/database/collections/' . $data['actorsId'] . '/documents', array_merge([ + $document = $this->client->call(Client::METHOD_POST, '/database/collections/' . $actorsId . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -760,6 +861,8 @@ class RealtimeCustomClientTest extends Scope 'write' => [], ]); + $documentId = $document['body']['$id']; + $response = json_decode($client->receive(), true); $this->assertArrayHasKey('type', $response); @@ -769,18 +872,25 @@ class RealtimeCustomClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(3, $response['data']['channels']); $this->assertContains('documents', $response['data']['channels']); - $this->assertContains('collections.' . $data['actorsId'] . '.documents.' . $document['body']['$id'], $response['data']['channels']); - $this->assertContains('collections.' . $actors['body']['$id'] . '.documents', $response['data']['channels']); - $this->assertEquals('database.documents.create', $response['data']['event']); + $this->assertContains("collections.{$actorsId}.documents.{$documentId}", $response['data']['channels']); + $this->assertContains("collections.{$actorsId}.documents", $response['data']['channels']); + $this->assertContains("collections.{$actorsId}.documents.{$documentId}.create", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.documents.{$documentId}", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.documents.*.create", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("collections.{$actorsId}", $response['data']['events']); + $this->assertContains("collections.*.documents.{$documentId}.create", $response['data']['events']); + $this->assertContains("collections.*.documents.{$documentId}", $response['data']['events']); + $this->assertContains("collections.*.documents.*.create", $response['data']['events']); + $this->assertContains("collections.*.documents.*", $response['data']['events']); + $this->assertContains("collections.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $this->assertEquals($response['data']['payload']['name'], 'Chris Evans'); - $data['documentId'] = $document['body']['$id']; - /** * Test Document Update */ - $document = $this->client->call(Client::METHOD_PATCH, '/database/collections/' . $data['actorsId'] . '/documents/' . $data['documentId'], array_merge([ + $document = $this->client->call(Client::METHOD_PATCH, '/database/collections/' . $actorsId . '/documents/' . $documentId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -800,9 +910,18 @@ class RealtimeCustomClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(3, $response['data']['channels']); $this->assertContains('documents', $response['data']['channels']); - $this->assertContains('collections.' . $data['actorsId'] . '.documents.' . $data['documentId'], $response['data']['channels']); - $this->assertContains('collections.' . $data['actorsId'] . '.documents', $response['data']['channels']); - $this->assertEquals('database.documents.update', $response['data']['event']); + $this->assertContains("collections.{$actorsId}.documents.{$documentId}", $response['data']['channels']); + $this->assertContains("collections.{$actorsId}.documents", $response['data']['channels']); + $this->assertContains("collections.{$actorsId}.documents.{$documentId}.update", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.documents.{$documentId}", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.documents.*.update", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("collections.{$actorsId}", $response['data']['events']); + $this->assertContains("collections.*.documents.{$documentId}.update", $response['data']['events']); + $this->assertContains("collections.*.documents.{$documentId}", $response['data']['events']); + $this->assertContains("collections.*.documents.*.update", $response['data']['events']); + $this->assertContains("collections.*.documents.*", $response['data']['events']); + $this->assertContains("collections.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $this->assertEquals($response['data']['payload']['name'], 'Chris Evans 2'); @@ -810,7 +929,7 @@ class RealtimeCustomClientTest extends Scope /** * Test Document Delete */ - $document = $this->client->call(Client::METHOD_POST, '/database/collections/' . $data['actorsId'] . '/documents', array_merge([ + $document = $this->client->call(Client::METHOD_POST, '/database/collections/' . $actorsId . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -822,9 +941,11 @@ class RealtimeCustomClientTest extends Scope 'write' => [], ]); + $documentId = $document['body']['$id']; + $client->receive(); - $this->client->call(Client::METHOD_DELETE, '/database/collections/' . $data['actorsId'] . '/documents/' . $document['body']['$id'], array_merge([ + $this->client->call(Client::METHOD_DELETE, '/database/collections/' . $actorsId . '/documents/' . $documentId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -838,9 +959,18 @@ class RealtimeCustomClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(3, $response['data']['channels']); $this->assertContains('documents', $response['data']['channels']); - $this->assertContains('collections.' . $data['actorsId'] . '.documents.' . $document['body']['$id'], $response['data']['channels']); - $this->assertContains('collections.' . $data['actorsId'] . '.documents', $response['data']['channels']); - $this->assertEquals('database.documents.delete', $response['data']['event']); + $this->assertContains("collections.{$actorsId}.documents.{$documentId}", $response['data']['channels']); + $this->assertContains("collections.{$actorsId}.documents", $response['data']['channels']); + $this->assertContains("collections.{$actorsId}.documents.{$documentId}.delete", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.documents.{$documentId}", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.documents.*.delete", $response['data']['events']); + $this->assertContains("collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("collections.{$actorsId}", $response['data']['events']); + $this->assertContains("collections.*.documents.{$documentId}.delete", $response['data']['events']); + $this->assertContains("collections.*.documents.{$documentId}", $response['data']['events']); + $this->assertContains("collections.*.documents.*.delete", $response['data']['events']); + $this->assertContains("collections.*.documents.*", $response['data']['events']); + $this->assertContains("collections.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $this->assertEquals($response['data']['payload']['name'], 'Bradley Cooper'); @@ -855,7 +985,7 @@ class RealtimeCustomClientTest extends Scope $client = $this->getWebsocket(['files'], [ 'origin' => 'http://localhost', - 'cookie' => 'a_session_'.$projectId.'=' . $session + 'cookie' => 'a_session_' . $projectId . '=' . $session ]); $response = json_decode($client->receive(), true); @@ -883,11 +1013,12 @@ class RealtimeCustomClientTest extends Scope 'permission' => 'bucket' ]); - $data = ['bucketId' => $bucket1['body']['$id']]; + $bucketId = $bucket1['body']['$id']; + /** * Test File Create */ - $file = $this->client->call(Client::METHOD_POST, '/storage/buckets/' . $data['bucketId'] . '/files', array_merge([ + $file = $this->client->call(Client::METHOD_POST, '/storage/buckets/' . $bucketId . '/files', array_merge([ 'content-type' => 'multipart/form-data', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -897,6 +1028,8 @@ class RealtimeCustomClientTest extends Scope 'write' => ['role:all'], ]); + $fileId = $file['body']['$id']; + $response = json_decode($client->receive(), true); $this->assertArrayHasKey('type', $response); @@ -906,17 +1039,26 @@ class RealtimeCustomClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(3, $response['data']['channels']); $this->assertContains('files', $response['data']['channels']); - $this->assertContains('buckets.' . $data['bucketId'] . '.files.' . $file['body']['$id'], $response['data']['channels']); - $this->assertContains('buckets.' . $data['bucketId'] . '.files', $response['data']['channels']); - $this->assertEquals('storage.files.create', $response['data']['event']); + $this->assertContains("buckets.{$bucketId}.files.{$fileId}", $response['data']['channels']); + $this->assertContains("buckets.{$bucketId}.files", $response['data']['channels']); + $this->assertContains("buckets.{$bucketId}.files.{$fileId}.create", $response['data']['events']); + $this->assertContains("buckets.{$bucketId}.files.{$fileId}", $response['data']['events']); + $this->assertContains("buckets.{$bucketId}.files.*.create", $response['data']['events']); + $this->assertContains("buckets.{$bucketId}.files.*", $response['data']['events']); + $this->assertContains("buckets.{$bucketId}", $response['data']['events']); + $this->assertContains("buckets.*.files.{$fileId}.create", $response['data']['events']); + $this->assertContains("buckets.*.files.{$fileId}", $response['data']['events']); + $this->assertContains("buckets.*.files.*.create", $response['data']['events']); + $this->assertContains("buckets.*.files.*", $response['data']['events']); + $this->assertContains("buckets.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); - $data['fileId'] = $file['body']['$id']; + $fileId = $file['body']['$id']; /** * Test File Update */ - $this->client->call(Client::METHOD_PUT, '/storage/buckets/' . $data['bucketId'] . '/files/' . $data['fileId'], array_merge([ + $this->client->call(Client::METHOD_PUT, '/storage/buckets/' . $bucketId . '/files/' . $fileId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -933,15 +1075,24 @@ class RealtimeCustomClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(3, $response['data']['channels']); $this->assertContains('files', $response['data']['channels']); - $this->assertContains('buckets.' . $data['bucketId'] . '.files.' . $file['body']['$id'], $response['data']['channels']); - $this->assertContains('buckets.' . $data['bucketId'] . '.files', $response['data']['channels']); - $this->assertEquals('storage.files.update', $response['data']['event']); + $this->assertContains("buckets.{$bucketId}.files.{$fileId}", $response['data']['channels']); + $this->assertContains("buckets.{$bucketId}.files", $response['data']['channels']); + $this->assertContains("buckets.{$bucketId}.files.{$fileId}.update", $response['data']['events']); + $this->assertContains("buckets.{$bucketId}.files.{$fileId}", $response['data']['events']); + $this->assertContains("buckets.{$bucketId}.files.*.update", $response['data']['events']); + $this->assertContains("buckets.{$bucketId}.files.*", $response['data']['events']); + $this->assertContains("buckets.{$bucketId}", $response['data']['events']); + $this->assertContains("buckets.*.files.{$fileId}.update", $response['data']['events']); + $this->assertContains("buckets.*.files.{$fileId}", $response['data']['events']); + $this->assertContains("buckets.*.files.*.update", $response['data']['events']); + $this->assertContains("buckets.*.files.*", $response['data']['events']); + $this->assertContains("buckets.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); /** * Test File Delete */ - $this->client->call(Client::METHOD_DELETE, '/storage/buckets/' . $data['bucketId'] . '/files/' . $data['fileId'], array_merge([ + $this->client->call(Client::METHOD_DELETE, '/storage/buckets/' . $bucketId . '/files/' . $fileId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -955,9 +1106,18 @@ class RealtimeCustomClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(3, $response['data']['channels']); $this->assertContains('files', $response['data']['channels']); - $this->assertContains('buckets.' . $data['bucketId'] . '.files.' . $file['body']['$id'], $response['data']['channels']); - $this->assertContains('buckets.' . $data['bucketId'] . '.files', $response['data']['channels']); - $this->assertEquals('storage.files.delete', $response['data']['event']); + $this->assertContains("buckets.{$bucketId}.files.{$fileId}", $response['data']['channels']); + $this->assertContains("buckets.{$bucketId}.files", $response['data']['channels']); + $this->assertContains("buckets.{$bucketId}.files.{$fileId}.delete", $response['data']['events']); + $this->assertContains("buckets.{$bucketId}.files.{$fileId}", $response['data']['events']); + $this->assertContains("buckets.{$bucketId}.files.*.delete", $response['data']['events']); + $this->assertContains("buckets.{$bucketId}.files.*", $response['data']['events']); + $this->assertContains("buckets.{$bucketId}", $response['data']['events']); + $this->assertContains("buckets.*.files.{$fileId}.delete", $response['data']['events']); + $this->assertContains("buckets.*.files.{$fileId}", $response['data']['events']); + $this->assertContains("buckets.*.files.*.delete", $response['data']['events']); + $this->assertContains("buckets.*.files.*", $response['data']['events']); + $this->assertContains("buckets.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $client->close(); @@ -971,7 +1131,7 @@ class RealtimeCustomClientTest extends Scope $client = $this->getWebsocket(['executions'], [ 'origin' => 'http://localhost', - 'cookie' => 'a_session_'.$projectId.'=' . $session + 'cookie' => 'a_session_' . $projectId . '=' . $session ]); $response = json_decode($client->receive(), true); @@ -1007,11 +1167,12 @@ class RealtimeCustomClientTest extends Scope $folder = 'timeout'; $stderr = ''; - $stdout= ''; - $code = realpath(__DIR__ . '/../../../resources/functions'). "/$folder/code.tar.gz"; - Console::execute('cd '.realpath(__DIR__ . "/../../../resources/functions") . "/$folder && tar --exclude code.tar.gz -czf code.tar.gz .", '', $stdout, $stderr); - - $deployment = $this->client->call(Client::METHOD_POST, '/functions/'.$functionId.'/deployments', array_merge([ + $stdout = ''; + $code = realpath(__DIR__ . '/../../../resources/functions') . "/{$folder}/code.tar.gz"; + + Console::execute('cd ' . realpath(__DIR__ . "/../../../resources/functions") . "/{$folder} && tar --exclude code.tar.gz -czf code.tar.gz .", '', $stdout, $stderr); + + $deployment = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/deployments', array_merge([ 'content-type' => 'multipart/form-data', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1028,7 +1189,7 @@ class RealtimeCustomClientTest extends Scope // Wait for deployment to be built. sleep(5); - $response = $this->client->call(Client::METHOD_PATCH, '/functions/'.$functionId.'/deployments/'.$deploymentId, array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/functions/' . $functionId . '/deployments/' . $deploymentId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1037,7 +1198,7 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals($response['headers']['status-code'], 200); $this->assertNotEmpty($response['body']['$id']); - $execution = $this->client->call(Client::METHOD_POST, '/functions/'.$functionId.'/executions', array_merge([ + $execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), []); @@ -1048,6 +1209,8 @@ class RealtimeCustomClientTest extends Scope $response = json_decode($client->receive(), true); $responseUpdate = json_decode($client->receive(), true); + $executionId = $execution['body']['$id']; + $this->assertArrayHasKey('type', $response); $this->assertArrayHasKey('data', $response); $this->assertEquals('event', $response['type']); @@ -1056,9 +1219,18 @@ class RealtimeCustomClientTest extends Scope $this->assertCount(4, $response['data']['channels']); $this->assertContains('console', $response['data']['channels']); $this->assertContains('executions', $response['data']['channels']); - $this->assertContains('executions.' . $execution['body']['$id'], $response['data']['channels']); - $this->assertContains('functions.' . $execution['body']['functionId'], $response['data']['channels']); - $this->assertEquals('functions.executions.create', $response['data']['event']); + $this->assertContains("executions.{$executionId}", $response['data']['channels']); + $this->assertContains("functions.{$functionId}", $response['data']['channels']); + $this->assertContains("functions.{$functionId}.executions.{$executionId}.create", $response['data']['events']); + $this->assertContains("functions.{$functionId}.executions.{$executionId}", $response['data']['events']); + $this->assertContains("functions.{$functionId}.executions.*.create", $response['data']['events']); + $this->assertContains("functions.{$functionId}.executions.*", $response['data']['events']); + $this->assertContains("functions.{$functionId}", $response['data']['events']); + $this->assertContains("functions.*.executions.{$executionId}.create", $response['data']['events']); + $this->assertContains("functions.*.executions.{$executionId}", $response['data']['events']); + $this->assertContains("functions.*.executions.*.create", $response['data']['events']); + $this->assertContains("functions.*.executions.*", $response['data']['events']); + $this->assertContains("functions.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $this->assertArrayHasKey('type', $responseUpdate); @@ -1069,15 +1241,24 @@ class RealtimeCustomClientTest extends Scope $this->assertCount(4, $responseUpdate['data']['channels']); $this->assertContains('console', $responseUpdate['data']['channels']); $this->assertContains('executions', $responseUpdate['data']['channels']); - $this->assertContains('executions.' . $execution['body']['$id'], $responseUpdate['data']['channels']); - $this->assertContains('functions.' . $execution['body']['functionId'], $responseUpdate['data']['channels']); - $this->assertEquals('functions.executions.update', $responseUpdate['data']['event']); + $this->assertContains("executions.{$executionId}", $responseUpdate['data']['channels']); + $this->assertContains("functions.{$functionId}", $responseUpdate['data']['channels']); + $this->assertContains("functions.{$functionId}.executions.{$executionId}.update", $responseUpdate['data']['events']); + $this->assertContains("functions.{$functionId}.executions.{$executionId}", $responseUpdate['data']['events']); + $this->assertContains("functions.{$functionId}.executions.*.update", $responseUpdate['data']['events']); + $this->assertContains("functions.{$functionId}.executions.*", $responseUpdate['data']['events']); + $this->assertContains("functions.{$functionId}", $responseUpdate['data']['events']); + $this->assertContains("functions.*.executions.{$executionId}.update", $responseUpdate['data']['events']); + $this->assertContains("functions.*.executions.{$executionId}", $responseUpdate['data']['events']); + $this->assertContains("functions.*.executions.*.update", $responseUpdate['data']['events']); + $this->assertContains("functions.*.executions.*", $responseUpdate['data']['events']); + $this->assertContains("functions.*", $responseUpdate['data']['events']); $this->assertNotEmpty($responseUpdate['data']['payload']); $client->close(); // Cleanup : Delete function - $response = $this->client->call(Client::METHOD_DELETE, '/functions/'. $functionId, [ + $response = $this->client->call(Client::METHOD_DELETE, '/functions/' . $functionId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1094,7 +1275,7 @@ class RealtimeCustomClientTest extends Scope $client = $this->getWebsocket(['teams'], [ 'origin' => 'http://localhost', - 'cookie' => 'a_session_'.$projectId.'=' . $session + 'cookie' => 'a_session_' . $projectId . '=' . $session ]); $response = json_decode($client->receive(), true); @@ -1133,14 +1314,17 @@ class RealtimeCustomClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(2, $response['data']['channels']); $this->assertContains('teams', $response['data']['channels']); - $this->assertContains('teams.' . $teamId, $response['data']['channels']); - $this->assertEquals('teams.create', $response['data']['event']); + $this->assertContains("teams.{$teamId}", $response['data']['channels']); + $this->assertContains("teams.{$teamId}.create", $response['data']['events']); + $this->assertContains("teams.{$teamId}", $response['data']['events']); + $this->assertContains("teams.*.create", $response['data']['events']); + $this->assertContains("teams.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); /** * Test Team Update */ - $team = $this->client->call(Client::METHOD_PUT, '/teams/'.$teamId, array_merge([ + $team = $this->client->call(Client::METHOD_PUT, '/teams/' . $teamId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, ], $this->getHeaders()), [ @@ -1159,8 +1343,11 @@ class RealtimeCustomClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(2, $response['data']['channels']); $this->assertContains('teams', $response['data']['channels']); - $this->assertContains('teams.' . $teamId, $response['data']['channels']); - $this->assertEquals('teams.update', $response['data']['event']); + $this->assertContains("teams.{$teamId}", $response['data']['channels']); + $this->assertContains("teams.{$teamId}.update", $response['data']['events']); + $this->assertContains("teams.{$teamId}", $response['data']['events']); + $this->assertContains("teams.*.update", $response['data']['events']); + $this->assertContains("teams.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $client->close(); @@ -1181,7 +1368,7 @@ class RealtimeCustomClientTest extends Scope $client = $this->getWebsocket(['memberships'], [ 'origin' => 'http://localhost', - 'cookie' => 'a_session_'.$projectId.'='.$session + 'cookie' => 'a_session_' . $projectId . '=' . $session ]); $response = json_decode($client->receive(), true); @@ -1195,7 +1382,7 @@ class RealtimeCustomClientTest extends Scope $this->assertNotEmpty($response['data']['user']); $this->assertEquals($user['$id'], $response['data']['user']['$id']); - $response = $this->client->call(Client::METHOD_GET, '/teams/'.$teamId.'/memberships', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/teams/' . $teamId . '/memberships', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -1206,7 +1393,7 @@ class RealtimeCustomClientTest extends Scope * Test Update Membership */ $roles = ['admin', 'editor', 'uncle']; - $this->client->call(Client::METHOD_PATCH, '/teams/'.$teamId.'/memberships/'.$membershipId, array_merge([ + $this->client->call(Client::METHOD_PATCH, '/teams/' . $teamId . '/memberships/' . $membershipId, array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -1223,10 +1410,19 @@ class RealtimeCustomClientTest extends Scope $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(2, $response['data']['channels']); $this->assertContains('memberships', $response['data']['channels']); - $this->assertContains('memberships.' . $membershipId, $response['data']['channels']); - $this->assertEquals('teams.memberships.update', $response['data']['event']); + $this->assertContains("memberships.{$membershipId}", $response['data']['channels']); + $this->assertContains("teams.{$teamId}.memberships.{$membershipId}.update", $response['data']['events']); + $this->assertContains("teams.{$teamId}.memberships.{$membershipId}", $response['data']['events']); + $this->assertContains("teams.{$teamId}.memberships.*.update", $response['data']['events']); + $this->assertContains("teams.{$teamId}.memberships.*", $response['data']['events']); + $this->assertContains("teams.{$teamId}", $response['data']['events']); + $this->assertContains("teams.*.memberships.{$membershipId}.update", $response['data']['events']); + $this->assertContains("teams.*.memberships.{$membershipId}", $response['data']['events']); + $this->assertContains("teams.*.memberships.*.update", $response['data']['events']); + $this->assertContains("teams.*.memberships.*", $response['data']['events']); + $this->assertContains("teams.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $client->close(); } -} \ No newline at end of file +} diff --git a/tests/e2e/Services/Storage/StorageBase.php b/tests/e2e/Services/Storage/StorageBase.php index 4796270d68..525c4144db 100644 --- a/tests/e2e/Services/Storage/StorageBase.php +++ b/tests/e2e/Services/Storage/StorageBase.php @@ -188,6 +188,24 @@ trait StorageBase $this->assertEquals('File extension not allowed', $res['body']['message']); return ['bucketId' => $bucketId, 'fileId' => $file['body']['$id'], 'largeFileId' => $largeFile['body']['$id'], 'largeBucketId' => $bucket2['body']['$id']]; + + /** + * Test for FAILURE create bucket with too high limit (bigger then _APP_STORAGE_LIMIT) + */ + $failedBucket = $this->client->call(Client::METHOD_POST, '/storage/buckets', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], [ + 'bucketId' => 'unique()', + 'name' => 'Test Bucket 2', + 'permission' => 'file', + 'maximumFileSize' => 200000000, //200MB + 'allowedFileExtensions' => ["jpg", "png"], + 'read' => ['role:all'], + 'write' => ['role:all'], + ]); + $this->assertEquals(400, $failedBucket['headers']['status-code']); } /** diff --git a/tests/e2e/Services/Teams/TeamsBaseClient.php b/tests/e2e/Services/Teams/TeamsBaseClient.php index 31be119ca9..f298532947 100644 --- a/tests/e2e/Services/Teams/TeamsBaseClient.php +++ b/tests/e2e/Services/Teams/TeamsBaseClient.php @@ -12,6 +12,7 @@ trait TeamsBaseClient public function testGetTeamMemberships($data):array { $teamUid = $data['teamUid'] ?? ''; + $teamName = $data['teamName'] ?? ''; /** * Test for SUCCESS @@ -24,8 +25,9 @@ trait TeamsBaseClient $this->assertEquals(200, $response['headers']['status-code']); $this->assertIsInt($response['body']['total']); $this->assertNotEmpty($response['body']['memberships'][0]['$id']); - $this->assertEquals($this->getUser()['name'], $response['body']['memberships'][0]['name']); - $this->assertEquals($this->getUser()['email'], $response['body']['memberships'][0]['email']); + $this->assertEquals($this->getUser()['name'], $response['body']['memberships'][0]['userName']); + $this->assertEquals($this->getUser()['email'], $response['body']['memberships'][0]['userEmail']); + $this->assertEquals($teamName, $response['body']['memberships'][0]['teamName']); $this->assertEquals('owner', $response['body']['memberships'][0]['roles'][0]); $membershipId = $response['body']['memberships'][0]['$id']; @@ -40,8 +42,9 @@ trait TeamsBaseClient $this->assertEquals(200, $response['headers']['status-code']); $this->assertIsInt($response['body']['total']); $this->assertNotEmpty($response['body']['memberships'][0]); - $this->assertEquals($this->getUser()['name'], $response['body']['memberships'][0]['name']); - $this->assertEquals($this->getUser()['email'], $response['body']['memberships'][0]['email']); + $this->assertEquals($this->getUser()['name'], $response['body']['memberships'][0]['userName']); + $this->assertEquals($this->getUser()['email'], $response['body']['memberships'][0]['userEmail']); + $this->assertEquals($teamName, $response['body']['memberships'][0]['teamName']); $this->assertEquals('owner', $response['body']['memberships'][0]['roles'][0]); $response = $this->client->call(Client::METHOD_GET, '/teams/'.$teamUid.'/memberships', array_merge([ @@ -54,8 +57,9 @@ trait TeamsBaseClient $this->assertEquals(200, $response['headers']['status-code']); $this->assertIsInt($response['body']['total']); $this->assertNotEmpty($response['body']['memberships'][0]); - $this->assertEquals($this->getUser()['name'], $response['body']['memberships'][0]['name']); - $this->assertEquals($this->getUser()['email'], $response['body']['memberships'][0]['email']); + $this->assertEquals($this->getUser()['name'], $response['body']['memberships'][0]['userName']); + $this->assertEquals($this->getUser()['email'], $response['body']['memberships'][0]['userEmail']); + $this->assertEquals($teamName, $response['body']['memberships'][0]['teamName']); $this->assertEquals('owner', $response['body']['memberships'][0]['roles'][0]); $response = $this->client->call(Client::METHOD_GET, '/teams/'.$teamUid.'/memberships', array_merge([ @@ -104,6 +108,7 @@ trait TeamsBaseClient $this->assertNotEmpty($response['body']['$id']); $this->assertNotEmpty($response['body']['userId']); $this->assertNotEmpty($response['body']['teamId']); + $this->assertNotEmpty($response['body']['teamName']); $this->assertCount(2, $response['body']['roles']); $this->assertIsInt($response['body']['joined']); $this->assertEquals(false, $response['body']['confirm']); @@ -172,6 +177,7 @@ trait TeamsBaseClient return [ 'teamUid' => $teamUid, + 'teamName' => $teamName, 'secret' => $secret, 'membershipUid' => $membershipUid, 'userUid' => $userUid, diff --git a/tests/e2e/Services/Teams/TeamsBaseServer.php b/tests/e2e/Services/Teams/TeamsBaseServer.php index 41dcc6c84c..5db4b628f6 100644 --- a/tests/e2e/Services/Teams/TeamsBaseServer.php +++ b/tests/e2e/Services/Teams/TeamsBaseServer.php @@ -204,7 +204,7 @@ trait TeamsBaseServer $this->assertEquals(1, $response['body']['total']); $this->assertIsInt($response['body']['total']); $this->assertIsInt($response['body']['dateCreated']); - + /** Delete User */ $user = $this->client->call(Client::METHOD_DELETE, '/users/' . $userUid, array_merge([ diff --git a/tests/e2e/Services/Users/UsersBase.php b/tests/e2e/Services/Users/UsersBase.php index 2e61917d2d..c2a96a87da 100644 --- a/tests/e2e/Services/Users/UsersBase.php +++ b/tests/e2e/Services/Users/UsersBase.php @@ -26,7 +26,7 @@ trait UsersBase $bodyString = $user['body']; $prefs = substr($bodyString, strpos($bodyString, '"prefs":')+8,2); $this->assertEquals('{}', $prefs); - + $body = json_decode($bodyString, true); $this->assertEquals($user['headers']['status-code'], 201); @@ -281,6 +281,44 @@ trait UsersBase return $data; } + /** + * @depends testUpdateUserName + */ + public function testUpdateUserNameSearch($data): void + { + $id = $data['userId'] ?? ''; + $newName = 'Updated name'; + + /** + * Test for SUCCESS + */ + $response = $this->client->call(Client::METHOD_GET, '/users', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'search' => $newName + ]); + + $this->assertEquals($response['headers']['status-code'], 200); + $this->assertNotEmpty($response['body']); + $this->assertNotEmpty($response['body']['users']); + $this->assertCount(1, $response['body']['users']); + $this->assertEquals($response['body']['users'][0]['$id'], $id); + + $response = $this->client->call(Client::METHOD_GET, '/users', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'search' => $id + ]); + + $this->assertEquals($response['headers']['status-code'], 200); + $this->assertNotEmpty($response['body']); + $this->assertNotEmpty($response['body']['users']); + $this->assertCount(1, $response['body']['users']); + $this->assertEquals($response['body']['users'][0]['$id'], $id); + } + /** * @depends testGetUser */ @@ -310,6 +348,44 @@ trait UsersBase return $data; } + /** + * @depends testUpdateUserEmail + */ + public function testUpdateUserEmailSearch($data): void + { + $id = $data['userId'] ?? ''; + $newEmail = '"users.service@updated.com"'; + + /** + * Test for SUCCESS + */ + $response = $this->client->call(Client::METHOD_GET, '/users', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'search' => $newEmail + ]); + + $this->assertEquals($response['headers']['status-code'], 200); + $this->assertNotEmpty($response['body']); + $this->assertNotEmpty($response['body']['users']); + $this->assertCount(1, $response['body']['users']); + $this->assertEquals($response['body']['users'][0]['$id'], $id); + + $response = $this->client->call(Client::METHOD_GET, '/users', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'search' => $id + ]); + + $this->assertEquals($response['headers']['status-code'], 200); + $this->assertNotEmpty($response['body']); + $this->assertNotEmpty($response['body']['users']); + $this->assertCount(1, $response['body']['users']); + $this->assertEquals($response['body']['users'][0]['$id'], $id); + } + /** * @depends testUpdateUserEmail */ diff --git a/tests/e2e/Services/Users/UsersCustomServerTest.php b/tests/e2e/Services/Users/UsersCustomServerTest.php index cee654e6c3..aae114f97d 100644 --- a/tests/e2e/Services/Users/UsersCustomServerTest.php +++ b/tests/e2e/Services/Users/UsersCustomServerTest.php @@ -12,49 +12,4 @@ class UsersCustomServerTest extends Scope use UsersBase; use ProjectCustom; use SideServer; - - public function testDeprecatedUsers():array - { - /** - * Test for FAILURE (don't allow recreating account with same custom ID) - */ - - // Create user with custom ID 'meldiron' - $response = $this->client->call(Client::METHOD_POST, '/users', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'userId' => 'meldiron', - 'email' => 'matej@appwrite.io', - 'password' => 'my-superstr0ng-password', - 'name' => 'Matej Bačo' - ]); - - $this->assertEquals(201, $response['headers']['status-code']); - - // Delete user with custom ID 'meldiron' - $response = $this->client->call(Client::METHOD_DELETE, '/users/meldiron', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); - - $this->assertEquals(204, $response['headers']['status-code']); - - // Try to create user with custom ID 'meldiron' again, but now it should fail - $response1 = $this->client->call(Client::METHOD_POST, '/users', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'userId' => 'meldiron', - 'email' => 'matej2@appwrite.io', - 'password' => 'someones-superstr0ng-password', - 'name' => 'Matej Bačo Second' - ]); - - $this->assertEquals(409, $response1['headers']['status-code']); - $this->assertEquals('Account already exists', $response1['body']['message']); - - return []; - } - } \ No newline at end of file diff --git a/tests/e2e/Services/Webhooks/WebhooksBase.php b/tests/e2e/Services/Webhooks/WebhooksBase.php index b8ed3b7707..fd65b9484c 100644 --- a/tests/e2e/Services/Webhooks/WebhooksBase.php +++ b/tests/e2e/Services/Webhooks/WebhooksBase.php @@ -23,7 +23,9 @@ trait WebhooksBase 'write' => ['role:all'], 'permission' => 'document', ]); - + + $actorsId = $actors['body']['$id']; + $this->assertEquals($actors['headers']['status-code'], 201); $this->assertNotEmpty($actors['body']['$id']); @@ -32,7 +34,10 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'database.collections.create'); + $this->assertStringContainsString('collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('collections.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -44,7 +49,7 @@ trait WebhooksBase $this->assertCount(1, $webhook['data']['$read']); $this->assertCount(1, $webhook['data']['$write']); - return array_merge(['actorsId' => $actors['body']['$id']]); + return array_merge(['actorsId' => $actorsId]); } /** @@ -52,7 +57,9 @@ trait WebhooksBase */ public function testCreateAttributes(array $data): array { - $firstName = $this->client->call(Client::METHOD_POST, '/database/collections/' . $data['actorsId'] . '/attributes/string', array_merge([ + $actorsId = $data['actorsId']; + + $firstName = $this->client->call(Client::METHOD_POST, '/database/collections/' . $actorsId . '/attributes/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -62,7 +69,7 @@ trait WebhooksBase 'required' => true, ]); - $lastName = $this->client->call(Client::METHOD_POST, '/database/collections/' . $data['actorsId'] . '/attributes/string', array_merge([ + $lastName = $this->client->call(Client::METHOD_POST, '/database/collections/' . $actorsId . '/attributes/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -72,7 +79,7 @@ trait WebhooksBase 'required' => true, ]); - $extra = $this->client->call(Client::METHOD_POST, '/database/collections/' . $data['actorsId'] . '/attributes/string', array_merge([ + $extra = $this->client->call(Client::METHOD_POST, '/database/collections/' . $actorsId . '/attributes/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -82,6 +89,8 @@ trait WebhooksBase 'required' => false, ]); + $attributeId = $extra['body']['key']; + $this->assertEquals($firstName['headers']['status-code'], 201); $this->assertEquals($firstName['body']['key'], 'firstName'); $this->assertEquals($lastName['headers']['status-code'], 201); @@ -97,13 +106,22 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'database.attributes.create'); + $this->assertStringContainsString('collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('collections.*.attributes.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('collections.*.attributes.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.*.attributes.{$actorsId}_{$attributeId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.*.attributes.{$actorsId}_{$attributeId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.attributes.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.attributes.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.attributes.{$actorsId}_{$attributeId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.attributes.{$actorsId}_{$attributeId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); $this->assertNotEmpty($webhook['data']['key']); $this->assertEquals($webhook['data']['key'], 'extra'); - + $removed = $this->client->call(Client::METHOD_DELETE, '/database/collections/' . $data['actorsId'] . '/attributes/' . $extra['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -117,7 +135,16 @@ trait WebhooksBase // $this->assertEquals($webhook['method'], 'DELETE'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'database.attributes.delete'); + $this->assertStringContainsString('collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('collections.*.attributes.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('collections.*.attributes.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.*.attributes.{$actorsId}_{$attributeId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.*.attributes.{$actorsId}_{$attributeId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.attributes.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.attributes.*.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.attributes.{$actorsId}_{$attributeId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.attributes.{$actorsId}_{$attributeId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -132,7 +159,12 @@ trait WebhooksBase */ public function testCreateDocument(array $data): array { - $document = $this->client->call(Client::METHOD_POST, '/database/collections/' . $data['actorsId'] . '/documents', array_merge([ + $actorsId = $data['actorsId']; + + /** + * Test for SUCCESS + */ + $document = $this->client->call(Client::METHOD_POST, '/database/collections/' . $actorsId . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -140,12 +172,13 @@ trait WebhooksBase 'data' => [ 'firstName' => 'Chris', 'lastName' => 'Evans', - ], 'read' => ['role:all'], 'write' => ['role:all'], ]); + $documentId = $document['body']['$id']; + $this->assertEquals($document['headers']['status-code'], 201); $this->assertNotEmpty($document['body']['$id']); @@ -154,7 +187,16 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'database.documents.create'); + $this->assertStringContainsString('collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('collections.*.documents.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('collections.*.documents.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.*.documents.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.*.documents.{$documentId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.documents.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.documents.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.documents.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.documents.{$documentId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -177,7 +219,12 @@ trait WebhooksBase */ public function testUpdateDocument(array $data): array { - $document = $this->client->call(Client::METHOD_PATCH, '/database/collections/' . $data['actorsId'] . '/documents/'.$data['documentId'], array_merge([ + $actorsId = $data['actorsId']; + + /** + * Test for SUCCESS + */ + $document = $this->client->call(Client::METHOD_PATCH, '/database/collections/' . $actorsId . '/documents/' . $data['documentId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -189,6 +236,8 @@ trait WebhooksBase 'write' => ['role:all'], ]); + $documentId = $document['body']['$id']; + $this->assertEquals($document['headers']['status-code'], 200); $this->assertNotEmpty($document['body']['$id']); @@ -197,7 +246,16 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'database.documents.update'); + $this->assertStringContainsString('collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('collections.*.documents.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('collections.*.documents.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.*.documents.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.*.documents.{$documentId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.documents.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.documents.*.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.documents.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.documents.{$documentId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -218,7 +276,12 @@ trait WebhooksBase */ public function testDeleteDocument(array $data): array { - $document = $this->client->call(Client::METHOD_POST, '/database/collections/' . $data['actorsId'] . '/documents', array_merge([ + $actorsId = $data['actorsId']; + + /** + * Test for SUCCESS + */ + $document = $this->client->call(Client::METHOD_POST, '/database/collections/' . $actorsId . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -226,16 +289,18 @@ trait WebhooksBase 'data' => [ 'firstName' => 'Bradly', 'lastName' => 'Cooper', - + ], 'read' => ['role:all'], 'write' => ['role:all'], ]); + $documentId = $document['body']['$id']; + $this->assertEquals($document['headers']['status-code'], 201); $this->assertNotEmpty($document['body']['$id']); - $document = $this->client->call(Client::METHOD_DELETE, '/database/collections/' . $data['actorsId'] . '/documents/' . $document['body']['$id'], array_merge([ + $document = $this->client->call(Client::METHOD_DELETE, '/database/collections/' . $actorsId . '/documents/' . $document['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -247,7 +312,16 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'database.documents.delete'); + $this->assertStringContainsString('collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('collections.*.documents.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('collections.*.documents.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.*.documents.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.*.documents.{$documentId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.documents.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.documents.*.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.documents.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.documents.{$documentId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -280,7 +354,9 @@ trait WebhooksBase 'read' => ['role:all'], 'write' => ['role:all'] ]); - + + $bucketId = $bucket['body']['$id']; + $this->assertEquals($bucket['headers']['status-code'], 201); $this->assertNotEmpty($bucket['body']['$id']); @@ -289,7 +365,10 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'storage.buckets.create'); + $this->assertStringContainsString('buckets.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('buckets.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.{$bucketId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.{$bucketId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -299,8 +378,8 @@ trait WebhooksBase $this->assertEquals(true, $webhook['data']['enabled']); $this->assertIsArray($webhook['data']['$read']); $this->assertIsArray($webhook['data']['$write']); - - return array_merge(['bucketId' => $bucket['body']['$id']]); + + return array_merge(['bucketId' => $bucketId]); } /** @@ -308,6 +387,8 @@ trait WebhooksBase */ public function testUpdateStorageBucket(array $data): array { + $bucketId = $data['bucketId']; + /** * Test for SUCCESS */ @@ -320,7 +401,7 @@ trait WebhooksBase 'permission' => 'file', 'enabled' => false, ]); - + $this->assertEquals($bucket['headers']['status-code'], 200); $this->assertNotEmpty($bucket['body']['$id']); @@ -329,7 +410,10 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'storage.buckets.update'); + $this->assertStringContainsString('buckets.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('buckets.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.{$bucketId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.{$bucketId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -339,7 +423,7 @@ trait WebhooksBase $this->assertEquals(false, $webhook['data']['enabled']); $this->assertIsArray($webhook['data']['$read']); $this->assertIsArray($webhook['data']['$write']); - + return array_merge(['bucketId' => $bucket['body']['$id']]); } @@ -348,6 +432,8 @@ trait WebhooksBase */ public function testCreateBucketFile(array $data): array { + $bucketId = $data['bucketId']; + //enable bucket $bucket = $this->client->call(Client::METHOD_PUT, '/storage/buckets/' . $data['bucketId'], array_merge([ 'content-type' => 'application/json', @@ -358,12 +444,12 @@ trait WebhooksBase 'permission' => 'file', 'enabled' => true, ]); - + $this->assertEquals($bucket['headers']['status-code'], 200); /** * Test for SUCCESS */ - $file = $this->client->call(Client::METHOD_POST, '/storage/buckets/'. $data['bucketId'] . '/files', array_merge([ + $file = $this->client->call(Client::METHOD_POST, '/storage/buckets/' . $data['bucketId'] . '/files', array_merge([ 'content-type' => 'multipart/form-data', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -374,6 +460,8 @@ trait WebhooksBase 'folderId' => 'xyz', ]); + $fileId = $file['body']['$id']; + $this->assertEquals($file['headers']['status-code'], 201); $this->assertNotEmpty($file['body']['$id']); @@ -382,7 +470,16 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'storage.files.create'); + $this->assertStringContainsString('buckets.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('buckets.*.files.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('buckets.*.files.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.*.files.{$fileId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.*.files.{$fileId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.{$bucketId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.{$bucketId}.files.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.{$bucketId}.files.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.{$bucketId}.files.{$fileId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.{$bucketId}.files.{$fileId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -396,22 +493,23 @@ trait WebhooksBase $this->assertEquals($webhook['data']['mimeType'], 'image/png'); $this->assertEquals($webhook['data']['sizeOriginal'], 47218); - /** - * Test for FAILURE - */ - $data ['fileId'] = $file['body']['$id']; + $data['fileId'] = $fileId; + return $data; } - + /** * @depends testCreateBucketFile */ public function testUpdateBucketFile(array $data): array { + $bucketId = $data['bucketId']; + $fileId = $data['fileId']; + /** * Test for SUCCESS */ - $file = $this->client->call(Client::METHOD_PUT, '/storage/buckets/' . $data['bucketId'] . '/files/' . $data['fileId'], array_merge([ + $file = $this->client->call(Client::METHOD_PUT, '/storage/buckets/' . $bucketId . '/files/' . $fileId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -427,7 +525,16 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'storage.files.update'); + $this->assertStringContainsString('buckets.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('buckets.*.files.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('buckets.*.files.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.*.files.{$fileId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.*.files.{$fileId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.{$bucketId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.{$bucketId}.files.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.{$bucketId}.files.*.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.{$bucketId}.files.{$fileId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.{$bucketId}.files.{$fileId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -440,15 +547,18 @@ trait WebhooksBase $this->assertNotEmpty($webhook['data']['signature']); $this->assertEquals($webhook['data']['mimeType'], 'image/png'); $this->assertEquals($webhook['data']['sizeOriginal'], 47218); - + return $data; } - + /** * @depends testUpdateBucketFile */ public function testDeleteBucketFile(array $data): array { + $bucketId = $data['bucketId']; + $fileId = $data['fileId']; + /** * Test for SUCCESS */ @@ -465,7 +575,16 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'storage.files.delete'); + $this->assertStringContainsString('buckets.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('buckets.*.files.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('buckets.*.files.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.*.files.{$fileId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.*.files.{$fileId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.{$bucketId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.{$bucketId}.files.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.{$bucketId}.files.*.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.{$bucketId}.files.{$fileId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.{$bucketId}.files.{$fileId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -478,24 +597,25 @@ trait WebhooksBase $this->assertNotEmpty($webhook['data']['signature']); $this->assertEquals($webhook['data']['mimeType'], 'image/png'); $this->assertEquals($webhook['data']['sizeOriginal'], 47218); - + return $data; } - /** + /** * @depends testDeleteBucketFile */ public function testDeleteStorageBucket(array $data) { + $bucketId = $data['bucketId']; /** * Test for SUCCESS */ - $bucket = $this->client->call(Client::METHOD_DELETE, '/storage/buckets/' . $data['bucketId'] , array_merge([ + $bucket = $this->client->call(Client::METHOD_DELETE, '/storage/buckets/' . $bucketId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - + $this->assertEquals($bucket['headers']['status-code'], 204); $this->assertEmpty($bucket['body']); @@ -504,7 +624,10 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'storage.buckets.delete'); + $this->assertStringContainsString('buckets.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('buckets.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.{$bucketId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("buckets.{$bucketId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -529,6 +652,8 @@ trait WebhooksBase 'name' => 'Arsenal' ]); + $teamId = $team['body']['$id']; + $this->assertEquals(201, $team['headers']['status-code']); $this->assertNotEmpty($team['body']['$id']); @@ -537,7 +662,10 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'teams.create'); + $this->assertStringContainsString('teams.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('teams.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.{$teamId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.{$teamId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -551,7 +679,7 @@ trait WebhooksBase /** * Test for FAILURE */ - return ['teamId' => $team['body']['$id']]; + return ['teamId' => $teamId]; } /** @@ -559,10 +687,11 @@ trait WebhooksBase */ public function testUpdateTeam($data): array { + $teamId = $data['teamId']; /** * Test for SUCCESS */ - $team = $this->client->call(Client::METHOD_PUT, '/teams/'.$data['teamId'], array_merge([ + $team = $this->client->call(Client::METHOD_PUT, '/teams/' . $teamId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -577,7 +706,10 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'teams.update'); + $this->assertStringContainsString('teams.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('teams.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.{$teamId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.{$teamId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -607,10 +739,12 @@ trait WebhooksBase 'name' => 'Chelsea' ]); + $teamId = $team['body']['$id']; + $this->assertEquals(201, $team['headers']['status-code']); $this->assertNotEmpty($team['body']['$id']); - $team = $this->client->call(Client::METHOD_DELETE, '/teams/'.$team['body']['$id'], array_merge([ + $team = $this->client->call(Client::METHOD_DELETE, '/teams/' . $team['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -620,7 +754,10 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'teams.delete'); + $this->assertStringContainsString('teams.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('teams.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.{$teamId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.{$teamId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -642,13 +779,13 @@ trait WebhooksBase */ public function testCreateTeamMembership($data): array { - $teamUid = $data['teamId'] ?? ''; - $email = uniqid().'friend@localhost.test'; + $teamId = $data['teamId'] ?? ''; + $email = uniqid() . 'friend@localhost.test'; /** * Test for SUCCESS */ - $team = $this->client->call(Client::METHOD_POST, '/teams/'.$teamUid.'/memberships', array_merge([ + $team = $this->client->call(Client::METHOD_POST, '/teams/' . $teamId . '/memberships', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -664,15 +801,23 @@ trait WebhooksBase $lastEmail = $this->getLastEmail(); $secret = substr($lastEmail['text'], strpos($lastEmail['text'], '&secret=', 0) + 8, 256); - $membershipUid = substr($lastEmail['text'], strpos($lastEmail['text'], '?membershipId=', 0) + 14, 20); - $userUid = substr($lastEmail['text'], strpos($lastEmail['text'], '&userId=', 0) + 8, 20); + $membershipId = $team['body']['$id']; $webhook = $this->getLastRequest(); $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'teams.memberships.create'); + $this->assertStringContainsString('teams.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('teams.*.memberships.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('teams.*.memberships.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.*.memberships.{$membershipId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.*.memberships.{$membershipId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.{$teamId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.{$teamId}.memberships.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.{$teamId}.memberships.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.{$teamId}.memberships.{$membershipId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.{$teamId}.memberships.{$membershipId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -688,25 +833,25 @@ trait WebhooksBase * Test for FAILURE */ return [ - 'teamId' => $teamUid, + 'teamId' => $teamId, 'secret' => $secret, - 'membershipId' => $membershipUid, + 'membershipId' => $membershipId, 'userId' => $webhook['data']['userId'], ]; } /** - * @depends testCreateTeam + * @depends testCreateTeamMembership */ - public function testDeleteTeamMembership($data): array + public function testDeleteTeamMembership($data): void { - $teamUid = $data['teamId'] ?? ''; - $email = uniqid().'friend@localhost.test'; + $teamId = $data['teamId'] ?? ''; + $email = uniqid() . 'friend@localhost.test'; /** * Test for SUCCESS */ - $team = $this->client->call(Client::METHOD_POST, '/teams/'.$teamUid.'/memberships', array_merge([ + $team = $this->client->call(Client::METHOD_POST, '/teams/' . $teamId . '/memberships', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -716,10 +861,12 @@ trait WebhooksBase 'url' => 'http://localhost:5000/join-us#title' ]); + $membershipId = $team['body']['$id'] ?? ''; + $this->assertEquals(201, $team['headers']['status-code']); $this->assertNotEmpty($team['body']['$id']); - - $team = $this->client->call(Client::METHOD_DELETE, '/teams/'.$teamUid.'/memberships/'.$team['body']['$id'], array_merge([ + + $team = $this->client->call(Client::METHOD_DELETE, '/teams/' . $teamId . '/memberships/' . $team['body']['$id'], array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -732,7 +879,16 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'teams.memberships.delete'); + $this->assertStringContainsString('teams.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('teams.*.memberships.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('teams.*.memberships.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.*.memberships.{$membershipId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.*.memberships.{$membershipId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.{$teamId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.{$teamId}.memberships.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.{$teamId}.memberships.*.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.{$teamId}.memberships.{$membershipId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.{$teamId}.memberships.{$membershipId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -743,10 +899,5 @@ trait WebhooksBase $this->assertCount(2, $webhook['data']['roles']); $this->assertIsInt($webhook['data']['joined']); $this->assertEquals(('server' === $this->getSide()), $webhook['data']['confirm']); - - /** - * Test for FAILURE - */ - return []; } -} \ No newline at end of file +} diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomClientTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomClientTest.php index 355c8f5855..6290c6e763 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomClientTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomClientTest.php @@ -13,9 +13,9 @@ class WebhooksCustomClientTest extends Scope use ProjectCustom; use SideClient; - public function testCreateAccount():array + public function testCreateAccount(): array { - $email = uniqid().'user@localhost.test'; + $email = uniqid() . 'user@localhost.test'; $password = 'password'; $name = 'User Name'; @@ -43,7 +43,10 @@ class WebhooksCustomClientTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'account.create'); + $this->assertStringContainsString('users.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events'],); + $this->assertStringContainsString("users.{$id}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -64,9 +67,9 @@ class WebhooksCustomClientTest extends Scope ]; } - public function testDeleteAccount():array + public function testDeleteAccount(): array { - $email = uniqid().'user1@localhost.test'; + $email = uniqid() . 'user1@localhost.test'; $password = 'password'; $name = 'User Name 1'; @@ -95,25 +98,27 @@ class WebhooksCustomClientTest extends Scope $this->assertEquals($accountSession['headers']['status-code'], 201); - $sessionId = $accountSession['body']['$id']; - $session = $this->client->parseCookie((string)$accountSession['headers']['set-cookie'])['a_session_'.$this->getProject()['$id']]; + $id = $account['body']['$id']; + $session = $this->client->parseCookie((string)$accountSession['headers']['set-cookie'])['a_session_' . $this->getProject()['$id']]; - $account = $this->client->call(Client::METHOD_DELETE, '/account', array_merge([ + $account = $this->client->call(Client::METHOD_PATCH, '/account/status', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ])); - $this->assertEquals($account['headers']['status-code'], 204); - $this->assertEmpty($account['body']); + $this->assertEquals($account['headers']['status-code'], 200); $webhook = $this->getLastRequest(); $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'account.delete'); + $this->assertStringContainsString('users.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.update.status', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.update.status", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -132,8 +137,9 @@ class WebhooksCustomClientTest extends Scope /** * @depends testCreateAccount */ - public function testCreateAccountSession($data):array + public function testCreateAccountSession($data): array { + $id = $data['id'] ?? ''; $email = $data['email'] ?? ''; $password = $data['password'] ?? ''; @@ -152,14 +158,23 @@ class WebhooksCustomClientTest extends Scope $this->assertEquals($accountSession['headers']['status-code'], 201); $sessionId = $accountSession['body']['$id']; - $session = $this->client->parseCookie((string)$accountSession['headers']['set-cookie'])['a_session_'.$this->getProject()['$id']]; + $session = $this->client->parseCookie((string)$accountSession['headers']['set-cookie'])['a_session_' . $this->getProject()['$id']]; $webhook = $this->getLastRequest(); $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'account.sessions.create'); + $this->assertStringContainsString('users.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.sessions.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.sessions.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.*.sessions.{$sessionId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.*.sessions.{$sessionId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.sessions.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.sessions.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.sessions.{$sessionId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.sessions.{$sessionId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -198,8 +213,9 @@ class WebhooksCustomClientTest extends Scope /** * @depends testCreateAccount */ - public function testDeleteAccountSession($data):array + public function testDeleteAccountSession($data): array { + $id = $data['id'] ?? ''; $email = $data['email'] ?? ''; $password = $data['password'] ?? ''; @@ -216,15 +232,15 @@ class WebhooksCustomClientTest extends Scope ]); $sessionId = $accountSession['body']['$id']; - $session = $this->client->parseCookie((string)$accountSession['headers']['set-cookie'])['a_session_'.$this->getProject()['$id']]; + $session = $this->client->parseCookie((string)$accountSession['headers']['set-cookie'])['a_session_' . $this->getProject()['$id']]; $this->assertEquals($accountSession['headers']['status-code'], 201); - $accountSession = $this->client->call(Client::METHOD_DELETE, '/account/sessions/'.$sessionId, array_merge([ + $accountSession = $this->client->call(Client::METHOD_DELETE, '/account/sessions/' . $sessionId, array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ])); $this->assertEquals($accountSession['headers']['status-code'], 204); @@ -234,7 +250,16 @@ class WebhooksCustomClientTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'account.sessions.delete'); + $this->assertStringContainsString('users.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.sessions.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.sessions.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.*.sessions.{$sessionId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.*.sessions.{$sessionId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.sessions.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.sessions.*.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.sessions.{$sessionId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.sessions.{$sessionId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -270,8 +295,9 @@ class WebhooksCustomClientTest extends Scope /** * @depends testCreateAccount */ - public function testDeleteAccountSessions($data):array + public function testDeleteAccountSessions($data): array { + $id = $data['id'] ?? ''; $email = $data['email'] ?? ''; $password = $data['password'] ?? ''; @@ -287,7 +313,8 @@ class WebhooksCustomClientTest extends Scope 'password' => $password, ]); - $session = $this->client->parseCookie((string)$accountSession['headers']['set-cookie'])['a_session_'.$this->getProject()['$id']]; + $sessionId = $accountSession['body']['$id']; + $session = $this->client->parseCookie((string)$accountSession['headers']['set-cookie'])['a_session_' . $this->getProject()['$id']]; $this->assertEquals($accountSession['headers']['status-code'], 201); @@ -295,7 +322,7 @@ class WebhooksCustomClientTest extends Scope 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ])); $this->assertEquals($accountSession['headers']['status-code'], 204); @@ -305,36 +332,44 @@ class WebhooksCustomClientTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'account.sessions.delete'); + $this->assertStringContainsString('users.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.sessions.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.sessions.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.*.sessions.{$sessionId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.*.sessions.{$sessionId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.sessions.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.sessions.*.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.sessions.{$sessionId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.sessions.{$sessionId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), ('server' === $this->getSide())); - $this->assertEquals($webhook['data']['total'], 2); - $this->assertNotEmpty($webhook['data']['sessions'][1]['$id']); - $this->assertNotEmpty($webhook['data']['sessions'][1]['userId']); - $this->assertIsInt($webhook['data']['sessions'][1]['expire']); - $this->assertEquals($webhook['data']['sessions'][1]['ip'], '127.0.0.1'); - $this->assertNotEmpty($webhook['data']['sessions'][1]['osCode']); - $this->assertIsString($webhook['data']['sessions'][1]['osCode']); - $this->assertNotEmpty($webhook['data']['sessions'][1]['osName']); - $this->assertIsString($webhook['data']['sessions'][1]['osName']); - $this->assertNotEmpty($webhook['data']['sessions'][1]['osVersion']); - $this->assertIsString($webhook['data']['sessions'][1]['osVersion']); - $this->assertEquals($webhook['data']['sessions'][1]['clientType'], 'browser'); - $this->assertEquals($webhook['data']['sessions'][1]['clientCode'], 'CH'); - $this->assertEquals($webhook['data']['sessions'][1]['clientName'], 'Chrome'); - $this->assertNotEmpty($webhook['data']['sessions'][1]['clientVersion']); - $this->assertIsString($webhook['data']['sessions'][1]['clientVersion']); - $this->assertNotEmpty($webhook['data']['sessions'][1]['clientEngine']); - $this->assertIsString($webhook['data']['sessions'][1]['clientEngine']); - $this->assertIsString($webhook['data']['sessions'][1]['clientEngineVersion']); - $this->assertIsString($webhook['data']['sessions'][1]['deviceName']); - $this->assertIsString($webhook['data']['sessions'][1]['deviceBrand']); - $this->assertIsString($webhook['data']['sessions'][1]['deviceModel']); - $this->assertIsString($webhook['data']['sessions'][1]['countryCode']); - $this->assertIsString($webhook['data']['sessions'][1]['countryName']); - $this->assertEquals($webhook['data']['sessions'][1]['current'], true); + $this->assertNotEmpty($webhook['data']['$id']); + $this->assertNotEmpty($webhook['data']['userId']); + $this->assertIsInt($webhook['data']['expire']); + $this->assertEquals($webhook['data']['ip'], '127.0.0.1'); + $this->assertNotEmpty($webhook['data']['osCode']); + $this->assertIsString($webhook['data']['osCode']); + $this->assertNotEmpty($webhook['data']['osName']); + $this->assertIsString($webhook['data']['osName']); + $this->assertNotEmpty($webhook['data']['osVersion']); + $this->assertIsString($webhook['data']['osVersion']); + $this->assertEquals($webhook['data']['clientType'], 'browser'); + $this->assertEquals($webhook['data']['clientCode'], 'CH'); + $this->assertEquals($webhook['data']['clientName'], 'Chrome'); + $this->assertNotEmpty($webhook['data']['clientVersion']); + $this->assertIsString($webhook['data']['clientVersion']); + $this->assertNotEmpty($webhook['data']['clientEngine']); + $this->assertIsString($webhook['data']['clientEngine']); + $this->assertIsString($webhook['data']['clientEngineVersion']); + $this->assertIsString($webhook['data']['deviceName']); + $this->assertIsString($webhook['data']['deviceBrand']); + $this->assertIsString($webhook['data']['deviceModel']); + $this->assertIsString($webhook['data']['countryCode']); + $this->assertIsString($webhook['data']['countryName']); + $this->assertEquals($webhook['data']['current'], true); $accountSession = $this->client->call(Client::METHOD_POST, '/account/sessions', array_merge([ 'origin' => 'http://localhost', @@ -348,7 +383,7 @@ class WebhooksCustomClientTest extends Scope $this->assertEquals($accountSession['headers']['status-code'], 201); $sessionId = $accountSession['body']['$id']; - $session = $this->client->parseCookie((string)$accountSession['headers']['set-cookie'])['a_session_'.$this->getProject()['$id']]; + $session = $this->client->parseCookie((string)$accountSession['headers']['set-cookie'])['a_session_' . $this->getProject()['$id']]; return array_merge($data, [ 'sessionId' => $sessionId, @@ -370,7 +405,7 @@ class WebhooksCustomClientTest extends Scope 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ]), [ 'name' => $newName ]); @@ -383,7 +418,12 @@ class WebhooksCustomClientTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'account.update.name'); + $this->assertStringContainsString('users.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.update.name', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.update.name", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -413,7 +453,7 @@ class WebhooksCustomClientTest extends Scope 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ]), [ 'password' => 'new-password', 'oldPassword' => $password, @@ -427,7 +467,12 @@ class WebhooksCustomClientTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'account.update.password'); + $this->assertStringContainsString('users.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.update.password', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.update.password", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -452,14 +497,14 @@ class WebhooksCustomClientTest extends Scope { $id = $data['id'] ?? ''; $email = $data['email'] ?? ''; - $newEmail = uniqid().'new@localhost.test'; + $newEmail = uniqid() . 'new@localhost.test'; $session = $data['session'] ?? ''; $account = $this->client->call(Client::METHOD_PATCH, '/account/email', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ]), [ 'email' => $newEmail, 'password' => 'new-password', @@ -473,7 +518,12 @@ class WebhooksCustomClientTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'account.update.email'); + $this->assertStringContainsString('users.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.update.email', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.update.email", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -504,7 +554,7 @@ class WebhooksCustomClientTest extends Scope 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ]), [ 'prefs' => [ 'prefKey1' => 'prefValue1', @@ -520,7 +570,12 @@ class WebhooksCustomClientTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'account.update.prefs'); + $this->assertStringContainsString('users.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.update.prefs', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.update.prefs", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -546,7 +601,6 @@ class WebhooksCustomClientTest extends Scope { $id = $data['id'] ?? ''; $email = $data['email'] ?? ''; - $session = $data['session'] ?? ''; $recovery = $this->client->call(Client::METHOD_POST, '/account/recovery', array_merge([ 'origin' => 'http://localhost', @@ -557,6 +611,8 @@ class WebhooksCustomClientTest extends Scope 'url' => 'http://localhost/recovery', ]); + $recoveryId = $recovery['body']['$id']; + $this->assertEquals(201, $recovery['headers']['status-code']); $this->assertIsArray($recovery['body']); @@ -565,18 +621,27 @@ class WebhooksCustomClientTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'account.recovery.create'); + $this->assertStringContainsString('users.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.recovery.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.recovery.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.*.recovery.{$recoveryId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.*.recovery.{$recoveryId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.recovery.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.recovery.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.recovery.{$recoveryId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.recovery.{$recoveryId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); - $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id']), true); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-User-Id'], $id); $this->assertNotEmpty($webhook['data']['$id']); $this->assertNotEmpty($webhook['data']['userId']); $this->assertNotEmpty($webhook['data']['secret']); $this->assertIsNumeric($webhook['data']['expire']); $data['secret'] = $webhook['data']['secret']; - + return $data; } @@ -602,6 +667,8 @@ class WebhooksCustomClientTest extends Scope 'passwordAgain' => $password, ]); + $recoveryId = $recovery['body']['$id']; + $this->assertEquals(200, $recovery['headers']['status-code']); $this->assertIsArray($recovery['body']); @@ -610,7 +677,16 @@ class WebhooksCustomClientTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'account.recovery.update'); + $this->assertStringContainsString('users.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.recovery.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.recovery.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.*.recovery.{$recoveryId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.*.recovery.{$recoveryId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.recovery.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.recovery.*.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.recovery.{$recoveryId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.recovery.{$recoveryId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -638,11 +714,13 @@ class WebhooksCustomClientTest extends Scope 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ]), [ 'url' => 'http://localhost/verification', ]); + $verificationId = $verification['body']['$id']; + $this->assertEquals(201, $verification['headers']['status-code']); $this->assertIsArray($verification['body']); @@ -651,7 +729,16 @@ class WebhooksCustomClientTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'account.verification.create'); + $this->assertStringContainsString('users.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.verification.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.verification.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.*.verification.{$verificationId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.*.verification.{$verificationId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.verification.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.verification.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.verification.{$verificationId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.verification.{$verificationId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -680,12 +767,14 @@ class WebhooksCustomClientTest extends Scope 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ]), [ 'userId' => $id, 'secret' => $secret, ]); + $verificationId = $verification['body']['$id']; + $this->assertEquals(200, $verification['headers']['status-code']); $this->assertIsArray($verification['body']); @@ -694,7 +783,16 @@ class WebhooksCustomClientTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'account.verification.update'); + $this->assertStringContainsString('users.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.verification.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.verification.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.*.verification.{$verificationId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.*.verification.{$verificationId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.verification.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.verification.*.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.verification.{$verificationId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.verification.{$verificationId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -722,7 +820,7 @@ class WebhooksCustomClientTest extends Scope /** * Test for SUCCESS */ - $team = $this->client->call(Client::METHOD_PATCH, '/teams/'.$teamUid.'/memberships/'.$membershipUid.'/status', array_merge([ + $team = $this->client->call(Client::METHOD_PATCH, '/teams/' . $teamUid . '/memberships/' . $membershipUid . '/status', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -739,7 +837,20 @@ class WebhooksCustomClientTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'teams.memberships.update.status'); + $this->assertStringContainsString('teams.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('teams.*.memberships.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('teams.*.memberships.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('teams.*.memberships.*.update.status', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.*.memberships.{$membershipUid}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.*.memberships.{$membershipUid}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.*.memberships.{$membershipUid}.update.status", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.{$teamUid}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.{$teamUid}.memberships.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.{$teamUid}.memberships.*.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.{$teamUid}.memberships.*.update.status", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.{$teamUid}.memberships.{$membershipUid}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.{$teamUid}.memberships.{$membershipUid}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("teams.{$teamUid}.memberships.{$membershipUid}.update.status", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -756,4 +867,4 @@ class WebhooksCustomClientTest extends Scope */ return []; } -} \ No newline at end of file +} diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php index b79ae37d72..7c815595fe 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php @@ -20,10 +20,12 @@ class WebhooksCustomServerTest extends Scope */ public function testUpdateCollection($data): array { + $id = $data['actorsId']; + /** * Test for SUCCESS */ - $actors = $this->client->call(Client::METHOD_PUT, '/database/collections/'.$data['actorsId'], array_merge([ + $actors = $this->client->call(Client::METHOD_PUT, '/database/collections/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -31,7 +33,7 @@ class WebhooksCustomServerTest extends Scope 'name' => 'Actors1', 'permission' => 'document', ]); - + $this->assertEquals($actors['headers']['status-code'], 200); $this->assertNotEmpty($actors['body']['$id']); @@ -40,7 +42,10 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'database.collections.update'); + $this->assertStringContainsString('collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('collections.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$id}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -60,6 +65,8 @@ class WebhooksCustomServerTest extends Scope */ public function testCreateDeleteIndexes($data): array { + $actorsId = $data['actorsId']; + $index = $this->client->call(Client::METHOD_POST, '/database/collections/' . $data['actorsId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -71,6 +78,7 @@ class WebhooksCustomServerTest extends Scope 'orders' => ['ASC', 'ASC'], ]); + $indexKey = $index['body']['key']; $this->assertEquals($index['headers']['status-code'], 201); $this->assertEquals($index['body']['key'], 'fullname'); @@ -82,7 +90,16 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'database.indexes.create'); + $this->assertStringContainsString('collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('collections.*.indexes.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('collections.*.indexes.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.*.indexes.{$actorsId}_{$indexKey}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.*.indexes.{$actorsId}_{$indexKey}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.indexes.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.indexes.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.indexes.{$actorsId}_{$indexKey}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.indexes.{$actorsId}_{$indexKey}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -101,7 +118,16 @@ class WebhooksCustomServerTest extends Scope // $this->assertEquals($webhook['method'], 'DELETE'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'database.indexes.delete'); + $this->assertStringContainsString('collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('collections.*.indexes.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('collections.*.indexes.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.*.indexes.{$actorsId}_{$indexKey}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.*.indexes.{$actorsId}_{$indexKey}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.indexes.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.indexes.*.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.indexes.{$actorsId}_{$indexKey}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$actorsId}.indexes.{$actorsId}_{$indexKey}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -127,10 +153,12 @@ class WebhooksCustomServerTest extends Scope 'permission' => 'document' ]); + $id = $actors['body']['$id']; + $this->assertEquals($actors['headers']['status-code'], 201); $this->assertNotEmpty($actors['body']['$id']); - $actors = $this->client->call(Client::METHOD_DELETE, '/database/collections/'.$actors['body']['$id'], array_merge([ + $actors = $this->client->call(Client::METHOD_DELETE, '/database/collections/' . $actors['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -143,7 +171,10 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'database.collections.delete'); + $this->assertStringContainsString('collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('collections.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("collections.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events'],); + $this->assertStringContainsString("collections.{$id}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -158,9 +189,9 @@ class WebhooksCustomServerTest extends Scope return []; } - public function testCreateUser():array + public function testCreateUser(): array { - $email = uniqid().'user@localhost.test'; + $email = uniqid() . 'user@localhost.test'; $password = 'password'; $name = 'User Name'; @@ -187,7 +218,10 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'users.create'); + $this->assertStringContainsString('users.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events'],); + $this->assertStringContainsString("users.{$id}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -206,15 +240,17 @@ class WebhooksCustomServerTest extends Scope return ['userId' => $user['body']['$id'], 'name' => $user['body']['name'], 'email' => $user['body']['email']]; } - /** + /** * @depends testCreateUser */ - public function testUpdateUserPrefs(array $data):array + public function testUpdateUserPrefs(array $data): array { + $id = $data['userId']; + /** * Test for SUCCESS */ - $user = $this->client->call(Client::METHOD_PATCH, '/users/' . $data['userId'] . '/prefs', array_merge([ + $user = $this->client->call(Client::METHOD_PATCH, '/users/' . $id . '/prefs', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -229,7 +265,12 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'users.update.prefs'); + $this->assertStringContainsString('users.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.update.prefs', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.update.prefs", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -242,8 +283,10 @@ class WebhooksCustomServerTest extends Scope /** * @depends testUpdateUserPrefs */ - public function testUpdateUserStatus(array $data):array + public function testUpdateUserStatus(array $data): array { + $id = $data['userId']; + /** * Test for SUCCESS */ @@ -262,7 +305,12 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'users.update.status'); + $this->assertStringContainsString('users.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.update.status', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.update.status", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -277,12 +325,14 @@ class WebhooksCustomServerTest extends Scope return $data; } - + /** * @depends testUpdateUserStatus */ - public function testDeleteUser(array $data):array + public function testDeleteUser(array $data): array { + $id = $data['userId']; + /** * Test for SUCCESS */ @@ -298,7 +348,10 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'users.delete'); + $this->assertStringContainsString('users.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('users.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("users.{$id}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -314,7 +367,7 @@ class WebhooksCustomServerTest extends Scope return $data; } - public function testCreateFunction():array + public function testCreateFunction(): array { /** * Test for SUCCESS @@ -330,7 +383,7 @@ class WebhooksCustomServerTest extends Scope 'timeout' => 10, ]); - $functionId = $function['body']['$id'] ?? ''; + $id = $function['body']['$id'] ?? ''; $this->assertEquals($function['headers']['status-code'], 201); $this->assertNotEmpty($function['body']['$id']); @@ -340,7 +393,10 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'functions.create'); + $this->assertStringContainsString('functions.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('functions.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -350,19 +406,21 @@ class WebhooksCustomServerTest extends Scope */ return [ - 'functionId' => $functionId, + 'functionId' => $id, ]; } /** * @depends testCreateFunction */ - public function testUpdateFunction($data):array + public function testUpdateFunction($data): array { - /** - * Test for SUCCESS - */ - $function = $this->client->call(Client::METHOD_PUT, '/functions/'.$data['functionId'], array_merge([ + $id = $data['functionId']; + + /** + * Test for SUCCESS + */ + $function = $this->client->call(Client::METHOD_PUT, '/functions/' . $data['functionId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -383,29 +441,32 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'functions.update'); + $this->assertStringContainsString('functions.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('functions.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); return $data; } - + /** * @depends testUpdateFunction */ - public function testCreateDeployment($data):array + public function testCreateDeployment($data): array { /** * Test for SUCCESS */ $stderr = ''; - $stdout= ''; + $stdout = ''; $folder = 'timeout'; - $code = realpath(__DIR__ . '/../../../resources/functions'). "/$folder/code.tar.gz"; - Console::execute('cd '.realpath(__DIR__ . "/../../../resources/functions") . "/$folder && tar --exclude code.tar.gz -czf code.tar.gz .", '', $stdout, $stderr); + $code = realpath(__DIR__ . '/../../../resources/functions') . "/{$folder}/code.tar.gz"; + Console::execute('cd ' . realpath(__DIR__ . "/../../../resources/functions") . "/{$folder} && tar --exclude code.tar.gz -czf code.tar.gz .", '', $stdout, $stderr); - $deployment = $this->client->call(Client::METHOD_POST, '/functions/'.$data['functionId'].'/deployments', array_merge([ + $deployment = $this->client->call(Client::METHOD_POST, '/functions/' . $data['functionId'] . '/deployments', array_merge([ 'content-type' => 'multipart/form-data', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -413,6 +474,7 @@ class WebhooksCustomServerTest extends Scope 'code' => new CURLFile($code, 'application/x-gzip', \basename($code)) ]); + $id = $data['functionId'] ?? ''; $deploymentId = $deployment['body']['$id'] ?? ''; $this->assertEquals($deployment['headers']['status-code'], 201); @@ -423,7 +485,12 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'functions.deployments.create'); + $this->assertStringContainsString('functions.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('functions.*.deployments.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.*.deployments.{$deploymentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}.deployments.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}.deployments.{$deploymentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -436,12 +503,15 @@ class WebhooksCustomServerTest extends Scope /** * @depends testCreateDeployment */ - public function testUpdateDeployment($data):array + public function testUpdateDeployment($data): array { + $id = $data['functionId'] ?? ''; + $deploymentId = $data['deploymentId'] ?? ''; + /** * Test for SUCCESS */ - $response = $this->client->call(Client::METHOD_PATCH, '/functions/'.$data['functionId'].'/deployments/'.$data['deploymentId'], array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/functions/' . $id . '/deployments/' . $deploymentId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); @@ -457,7 +527,16 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'functions.deployments.update'); + $this->assertStringContainsString('functions.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('functions.*.deployments.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('functions.*.deployments.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.*.deployments.{$deploymentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.*.deployments.{$deploymentId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}.deployments.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}.deployments.*.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}.deployments.{$deploymentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}.deployments.{$deploymentId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -472,17 +551,20 @@ class WebhooksCustomServerTest extends Scope /** * @depends testUpdateDeployment */ - public function testExecutions($data):array + public function testExecutions($data): array { + $id = $data['functionId'] ?? ''; + /** * Test for SUCCESS */ - - $execution = $this->client->call(Client::METHOD_POST, '/functions/'.$data['functionId'].'/executions', array_merge([ + $execution = $this->client->call(Client::METHOD_POST, '/functions/' . $id . '/executions', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); + $executionId = $execution['body']['$id'] ?? ''; + $this->assertEquals($execution['headers']['status-code'], 201); $this->assertNotEmpty($execution['body']['$id']); @@ -491,12 +573,21 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'functions.executions.create'); + $this->assertStringContainsString('functions.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('functions.*.executions.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('functions.*.executions.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.*.executions.{$executionId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.*.executions.{$executionId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}.executions.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}.executions.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}.executions.{$executionId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}.executions.{$executionId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); - // wait for timeout function to complete (sleep(5);) + // wait for timeout function to complete sleep(10); $webhook = $this->getLastRequest(); @@ -504,7 +595,16 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'functions.executions.update'); + $this->assertStringContainsString('functions.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('functions.*.executions.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('functions.*.executions.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.*.executions.{$executionId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.*.executions.{$executionId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}.executions.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}.executions.*.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}.executions.{$executionId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}.executions.{$executionId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -519,12 +619,14 @@ class WebhooksCustomServerTest extends Scope /** * @depends testExecutions */ - public function testDeleteDeployment($data):array + public function testDeleteDeployment($data): array { + $id = $data['functionId'] ?? ''; + $deploymentId = $data['deploymentId'] ?? ''; /** * Test for SUCCESS */ - $deployment = $this->client->call(Client::METHOD_DELETE, '/functions/'.$data['functionId'].'/deployments/'.$data['deploymentId'], array_merge([ + $deployment = $this->client->call(Client::METHOD_DELETE, '/functions/' . $id . '/deployments/' . $deploymentId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -537,7 +639,16 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'functions.deployments.delete'); + $this->assertStringContainsString('functions.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('functions.*.deployments.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('functions.*.deployments.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.*.deployments.{$deploymentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.*.deployments.{$deploymentId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}.deployments.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}.deployments.*.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}.deployments.{$deploymentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}.deployments.{$deploymentId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -552,12 +663,14 @@ class WebhooksCustomServerTest extends Scope /** * @depends testDeleteDeployment */ - public function testDeleteFunction($data):array + public function testDeleteFunction($data): array { + $id = $data['functionId']; + /** * Test for SUCCESS */ - $function = $this->client->call(Client::METHOD_DELETE, '/functions/'.$data['functionId'], array_merge([ + $function = $this->client->call(Client::METHOD_DELETE, '/functions/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -570,7 +683,10 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'functions.delete'); + $this->assertStringContainsString('functions.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('functions.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("functions.{$id}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); diff --git a/tests/e2e/Services/Workers/WebhooksTest.php b/tests/e2e/Services/Workers/WebhooksTest.php deleted file mode 100644 index f859f98850..0000000000 --- a/tests/e2e/Services/Workers/WebhooksTest.php +++ /dev/null @@ -1,154 +0,0 @@ -client->call(Client::METHOD_POST, '/teams', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'teamId' => 'unique()', - 'name' => 'Project Test', - ]); - - $this->assertEquals(201, $team['headers']['status-code']); - $this->assertEquals('Project Test', $team['body']['name']); - $this->assertNotEmpty($team['body']['$id']); - - $response = $this->client->call(Client::METHOD_POST, '/projects', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'projectId' => 'unique()', - 'name' => 'Project Test', - 'teamId' => $team['body']['$id'], - ]); - - $this->assertEquals(201, $response['headers']['status-code']); - $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals('Project Test', $response['body']['name']); - $this->assertEquals($team['body']['$id'], $response['body']['teamId']); - $this->assertArrayHasKey('platforms', $response['body']); - $this->assertArrayHasKey('webhooks', $response['body']); - $this->assertArrayHasKey('keys', $response['body']); - - $projectId = $response['body']['$id']; - - /** - * Test for FAILURE - */ - $response = $this->client->call(Client::METHOD_POST, '/projects', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'projectId' => 'unique()', - 'name' => '', - 'teamId' => $team['body']['$id'], - ]); - - $this->assertEquals(400, $response['headers']['status-code']); - - $response = $this->client->call(Client::METHOD_POST, '/projects', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'name' => 'Project Test', - ]); - - $this->assertEquals(400, $response['headers']['status-code']); - - return ['projectId' => $projectId]; - } - - /** - * @depends testCreateProject - */ - public function testCreateWebhook($data): array - { - $id = (isset($data['projectId'])) ? $data['projectId'] : ''; - - $response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/webhooks', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'name' => 'Webhook Worker Test', - 'events' => ['account.create', 'account.update.email'], - 'url' => 'http://request-catcher:5000/webhook', - 'security' => true, - 'httpUser' => 'username', - 'httpPass' => 'password', - ]); - - $this->assertEquals(201, $response['headers']['status-code']); - $this->assertNotEmpty($response['body']['$id']); - $this->assertContains('account.create', $response['body']['events']); - $this->assertContains('account.update.email', $response['body']['events']); - $this->assertCount(2, $response['body']['events']); - $this->assertEquals('http://request-catcher:5000/webhook', $response['body']['url']); - $this->assertIsBool($response['body']['security']); - $this->assertEquals(true, $response['body']['security']); - $this->assertEquals('username', $response['body']['httpUser']); - - $data = array_merge($data, ['webhookId' => $response['body']['$id']]); - - /** - * Test for FAILURE - */ - - return $data; - } - - /** - * @depends testCreateWebhook - */ - public function testCreateAccount($data) - { - $projectId = (isset($data['projectId'])) ? $data['projectId'] : ''; - $email = uniqid().'webhook.user@localhost.test'; - $password = 'password'; - $name = 'User Name'; - - /** - * Test for SUCCESS - */ - $response = $this->client->call(Client::METHOD_POST, '/account', array_merge([ - 'origin' => 'http://localhost', - 'content-type' => 'application/json', - 'x-appwrite-project' => $projectId, - ]), [ - 'userId' => 'unique()', - 'email' => $email, - 'password' => $password, - 'name' => $name, - ]); - - $this->assertEquals($response['headers']['status-code'], 201); - - $webhook = $this->getLastRequest(); - - $this->assertNotEmpty($webhook['data']); - $this->assertNotEmpty($webhook['data']['$id']); - $this->assertIsBool($webhook['data']['status']); - $this->assertIsNumeric($webhook['data']['registration']); - $this->assertEquals($webhook['data']['email'], $email); - $this->assertEquals($webhook['data']['name'], $name); - $this->assertIsBool($webhook['data']['emailVerification']); - $this->assertIsArray($webhook['data']['prefs']); - } -} \ No newline at end of file diff --git a/tests/unit/Event/EventTest.php b/tests/unit/Event/EventTest.php index 58d7a1c045..d653541ada 100644 --- a/tests/unit/Event/EventTest.php +++ b/tests/unit/Event/EventTest.php @@ -3,6 +3,7 @@ namespace Appwrite\Tests; use Appwrite\Event\Event; +use InvalidArgumentException; use PHPUnit\Framework\TestCase; use Utopia\App; @@ -12,7 +13,7 @@ class EventTest extends TestCase * @var Event */ protected $object = null; - + /** * @var string */ @@ -22,8 +23,8 @@ class EventTest extends TestCase { $redisHost = App::getEnv('_APP_REDIS_HOST', ''); $redisPort = App::getEnv('_APP_REDIS_PORT', ''); - \Resque::setBackend($redisHost.':'.$redisPort); - + \Resque::setBackend($redisHost . ':' . $redisPort); + $this->queue = 'v1-tests' . uniqid(); $this->object = new Event($this->queue, 'TestsV1'); } @@ -37,9 +38,9 @@ class EventTest extends TestCase $this->assertEquals($this->queue, $this->object->getQueue()); $this->object->setQueue('demo'); - + $this->assertEquals('demo', $this->object->getQueue()); - + $this->object->setQueue($this->queue); } @@ -48,9 +49,9 @@ class EventTest extends TestCase $this->assertEquals('TestsV1', $this->object->getClass()); $this->object->setClass('TestsV2'); - + $this->assertEquals('TestsV2', $this->object->getClass()); - + $this->object->setClass('TestsV1'); } @@ -58,13 +59,12 @@ class EventTest extends TestCase { $this->object ->setParam('eventKey1', 'eventValue1') - ->setParam('eventKey2', 'eventValue2') - ; + ->setParam('eventKey2', 'eventValue2'); $this->object->trigger(); - $this->assertEquals(null, $this->object->getParam('eventKey1')); - $this->assertEquals(null, $this->object->getParam('eventKey2')); + $this->assertEquals('eventValue1', $this->object->getParam('eventKey1')); + $this->assertEquals('eventValue2', $this->object->getParam('eventKey2')); $this->assertEquals(null, $this->object->getParam('eventKey3')); $this->assertEquals(\Resque::size($this->queue), 1); } @@ -73,8 +73,7 @@ class EventTest extends TestCase { $this->object ->setParam('eventKey1', 'eventValue1') - ->setParam('eventKey2', 'eventValue2') - ; + ->setParam('eventKey2', 'eventValue2'); $this->assertEquals('eventValue1', $this->object->getParam('eventKey1')); $this->assertEquals('eventValue2', $this->object->getParam('eventKey2')); @@ -85,4 +84,60 @@ class EventTest extends TestCase $this->assertEquals(null, $this->object->getParam('eventKey2')); $this->assertEquals(null, $this->object->getParam('eventKey3')); } + + public function testGenerateEvents() + { + $event = Event::generateEvents('users.[userId].create', [ + 'userId' => 'torsten' + ]); + $this->assertCount(4, $event); + $this->assertContains('users.torsten.create', $event); + $this->assertContains('users.torsten', $event); + $this->assertContains('users.*.create', $event); + $this->assertContains('users.*', $event); + + $event = Event::generateEvents('users.[userId].update.email', [ + 'userId' => 'torsten' + ]); + $this->assertCount(6, $event); + $this->assertContains('users.torsten.update.email', $event); + $this->assertContains('users.torsten.update', $event); + $this->assertContains('users.torsten', $event); + $this->assertContains('users.*.update.email', $event); + $this->assertContains('users.*.update', $event); + $this->assertContains('users.*', $event); + + $event = Event::generateEvents('collections.[collectionId].documents.[documentId].create', [ + 'collectionId' => 'chapters', + 'documentId' => 'prolog', + ]); + $this->assertCount(10, $event); + + $this->assertContains('collections.chapters.documents.prolog.create', $event); + $this->assertContains('collections.chapters.documents.prolog', $event); + $this->assertContains('collections.chapters.documents.*.create', $event); + $this->assertContains('collections.chapters.documents.*', $event); + $this->assertContains('collections.chapters', $event); + $this->assertContains('collections.*.documents.prolog.create', $event); + $this->assertContains('collections.*.documents.prolog', $event); + $this->assertContains('collections.*.documents.*.create', $event); + $this->assertContains('collections.*.documents.*', $event); + $this->assertContains('collections.*', $event); + + try { + $event = Event::generateEvents('collections.[collectionId].documents.[documentId].create', [ + 'collectionId' => 'chapters' + ]); + $this->fail(); + } catch (\Throwable $th) { + $this->assertInstanceOf(InvalidArgumentException::class, $th, 'An invalid exception was thrown'); + } + + try { + $event = Event::generateEvents('collections.[collectionId].documents.[documentId].create'); + $this->fail(); + } catch (\Throwable $th) { + $this->assertInstanceOf(InvalidArgumentException::class, $th, 'An invalid exception was thrown'); + } + } } diff --git a/tests/unit/Event/Validator/EventValidatorTest.php b/tests/unit/Event/Validator/EventValidatorTest.php new file mode 100644 index 0000000000..e523999599 --- /dev/null +++ b/tests/unit/Event/Validator/EventValidatorTest.php @@ -0,0 +1,63 @@ +object = new Event(); + } + + public function tearDown(): void + { + } + + public function testValues() + { + /** + * Test for SUCCESS + */ + $this->assertTrue($this->object->isValid('users.*.create')); + $this->assertTrue($this->object->isValid('users.torsten.update')); + $this->assertTrue($this->object->isValid('users.torsten')); + $this->assertTrue($this->object->isValid('users.*.update.email')); + $this->assertTrue($this->object->isValid('users.*.update')); + $this->assertTrue($this->object->isValid('users.*')); + $this->assertTrue($this->object->isValid('collections.chapters.documents.prolog.create')); + $this->assertTrue($this->object->isValid('collections.chapters.documents.prolog')); + $this->assertTrue($this->object->isValid('collections.chapters.documents.*.create')); + $this->assertTrue($this->object->isValid('collections.chapters.documents.*')); + $this->assertTrue($this->object->isValid('collections.*.documents.prolog.create')); + $this->assertTrue($this->object->isValid('collections.*.documents.prolog')); + $this->assertTrue($this->object->isValid('collections.*.documents.*.create')); + $this->assertTrue($this->object->isValid('collections.*.documents.*')); + $this->assertTrue($this->object->isValid('collections.*')); + $this->assertTrue($this->object->isValid('functions.*')); + $this->assertTrue($this->object->isValid('buckets.*')); + $this->assertTrue($this->object->isValid('teams.*')); + $this->assertTrue($this->object->isValid('users.*')); + $this->assertTrue($this->object->isValid('teams.*.memberships.*.update.status')); + + /** + * Test for FAILURE + */ + $this->assertFalse($this->object->isValid(false)); + $this->assertFalse($this->object->isValid(null)); + $this->assertFalse($this->object->isValid('')); + $this->assertFalse($this->object->isValid('unknown.*')); + $this->assertFalse($this->object->isValid('collections')); + $this->assertFalse($this->object->isValid('collections.*.unknown')); + $this->assertFalse($this->object->isValid('collections.*.documents.*.unknown')); + $this->assertFalse($this->object->isValid('users.torsten.unknown')); + $this->assertFalse($this->object->isValid('users.torsten.delete.email')); + $this->assertFalse($this->object->isValid('teams.*.memberships.*.update.unknown')); + } +} diff --git a/tests/unit/Messaging/MessagingTest.php b/tests/unit/Messaging/MessagingTest.php index a0cad0bae9..0d7dd2a2e6 100644 --- a/tests/unit/Messaging/MessagingTest.php +++ b/tests/unit/Messaging/MessagingTest.php @@ -202,7 +202,7 @@ class MessagingTest extends TestCase * Test Collection Level Permissions */ $result = Realtime::fromPayload( - event: 'database.documents.create', + event: 'collections.collection_id.documents.document_id.create', payload: new Document([ '$id' => 'test', '$collection' => 'collection', @@ -224,7 +224,7 @@ class MessagingTest extends TestCase * Test Document Level Permissions */ $result = Realtime::fromPayload( - event: 'database.documents.create', + event: 'collections.collection_id.documents.document_id.create', payload: new Document([ '$id' => 'test', '$collection' => 'collection', @@ -242,4 +242,51 @@ class MessagingTest extends TestCase $this->assertContains('role:all', $result['roles']); $this->assertNotContains('role:admin', $result['roles']); } + + public function testFromPayloadBucketLevelPermissions(): void + { + /** + * Test Collection Level Permissions + */ + $result = Realtime::fromPayload( + event: 'buckets.bucket_id.files.file_id.create', + payload: new Document([ + '$id' => 'test', + '$collection' => 'bucket', + '$read' => ['role:admin'], + '$write' => ['role:admin'] + ]), + bucket: new Document([ + '$id' => 'bucket', + '$read' => ['role:all'], + '$write' => ['role:all'], + 'permission' => 'bucket' + ]) + ); + + $this->assertContains('role:all', $result['roles']); + $this->assertNotContains('role:admin', $result['roles']); + + /** + * Test Document Level Permissions + */ + $result = Realtime::fromPayload( + event: 'buckets.bucket_id.files.file_id.create', + payload: new Document([ + '$id' => 'test', + '$collection' => 'bucket', + '$read' => ['role:all'], + '$write' => ['role:all'] + ]), + bucket: new Document([ + '$id' => 'bucket', + '$read' => ['role:admin'], + '$write' => ['role:admin'], + 'permission' => 'file' + ]) + ); + + $this->assertContains('role:all', $result['roles']); + $this->assertNotContains('role:admin', $result['roles']); + } } diff --git a/tests/unit/Migration/MigrationV13Test.php b/tests/unit/Migration/MigrationV13Test.php new file mode 100644 index 0000000000..3d0b0e2971 --- /dev/null +++ b/tests/unit/Migration/MigrationV13Test.php @@ -0,0 +1,51 @@ +migration = new V13(); + $reflector = new ReflectionClass('Appwrite\Migration\Version\V13'); + $this->method = $reflector->getMethod('fixDocument'); + $this->method->setAccessible(true); + } + + public function testMigrateFunctions() + { + $document = $this->fixDocument(new Document([ + '$id' => 'func', + '$collection' => 'functions', + 'events' => ['account.create', 'users.create'] + ])); + + $this->assertEquals($document->getAttribute('events'), ['users.*.create']); + } + + public function testMigrationWebhooks() + { + $document = $this->fixDocument(new Document([ + '$id' => 'webh', + '$collection' => 'webhooks', + 'events' => ['account.create', 'users.create'] + ])); + + $this->assertEquals($document->getAttribute('events'), ['users.*.create']); + } + + public function testEventsConversion() + { + $migration = new V13(); + $events = $migration->migrateEvents($migration->events); + foreach ($events as $event) { + $this->assertTrue((new Event())->isValid($event), $event); + } + $this->assertCount(44, $events); + } +}