From 02ab3c850ee660caac70959ab1b5ba87106ded39 Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Wed, 8 Jan 2025 06:40:33 +0000 Subject: [PATCH 001/101] Update SDK Generator versions --- app/config/platforms.php | 2 +- composer.json | 2 +- composer.lock | 30 +++++++++---------- .../databases/update-boolean-attribute.md | 3 +- .../databases/update-datetime-attribute.md | 3 +- .../databases/update-email-attribute.md | 3 +- .../databases/update-enum-attribute.md | 3 +- .../databases/update-float-attribute.md | 3 +- .../databases/update-integer-attribute.md | 3 +- .../examples/databases/update-ip-attribute.md | 3 +- .../update-relationship-attribute.md | 1 + .../databases/update-string-attribute.md | 4 ++- .../databases/update-url-attribute.md | 3 +- .../projects/update-memberships-privacy.md | 5 ++++ .../databases/update-string-attribute.md | 2 +- .../projects/update-memberships-privacy.md | 16 ++++++++++ .../databases/update-string-attribute.md | 2 +- .../databases/update-string-attribute.md | 2 +- .../databases/update-string-attribute.md | 2 +- .../databases/update-string-attribute.md | 2 +- .../server-graphql/examples/account/create.md | 1 + .../server-graphql/examples/account/get.md | 1 + .../examples/account/update-email.md | 1 + .../examples/account/update-m-f-a.md | 1 + .../account/update-mfa-authenticator.md | 1 + .../examples/account/update-name.md | 1 + .../examples/account/update-password.md | 1 + .../examples/account/update-phone.md | 1 + .../examples/account/update-prefs.md | 1 + .../examples/account/update-status.md | 1 + .../databases/create-boolean-attribute.md | 2 ++ .../examples/databases/create-collection.md | 2 ++ .../databases/create-datetime-attribute.md | 2 ++ .../databases/create-email-attribute.md | 2 ++ .../databases/create-enum-attribute.md | 2 ++ .../databases/create-float-attribute.md | 2 ++ .../examples/databases/create-index.md | 2 ++ .../databases/create-integer-attribute.md | 2 ++ .../examples/databases/create-ip-attribute.md | 2 ++ .../create-relationship-attribute.md | 2 ++ .../databases/create-string-attribute.md | 2 ++ .../databases/create-url-attribute.md | 2 ++ .../examples/databases/get-collection.md | 2 ++ .../examples/databases/get-index.md | 2 ++ .../examples/databases/list-collections.md | 2 ++ .../examples/databases/list-indexes.md | 2 ++ .../databases/update-boolean-attribute.md | 2 ++ .../examples/databases/update-collection.md | 2 ++ .../databases/update-datetime-attribute.md | 2 ++ .../databases/update-email-attribute.md | 2 ++ .../databases/update-enum-attribute.md | 2 ++ .../databases/update-float-attribute.md | 2 ++ .../databases/update-integer-attribute.md | 2 ++ .../examples/databases/update-ip-attribute.md | 2 ++ .../update-relationship-attribute.md | 2 ++ .../databases/update-string-attribute.md | 4 ++- .../databases/update-url-attribute.md | 2 ++ .../examples/messaging/create-subscriber.md | 1 + .../examples/messaging/get-subscriber.md | 1 + .../examples/messaging/list-subscribers.md | 1 + .../examples/messaging/list-targets.md | 1 + .../examples/users/create-argon2user.md | 1 + .../examples/users/create-bcrypt-user.md | 1 + .../examples/users/create-m-d5user.md | 1 + .../examples/users/create-p-h-pass-user.md | 1 + .../examples/users/create-s-h-a-user.md | 1 + .../users/create-scrypt-modified-user.md | 1 + .../examples/users/create-scrypt-user.md | 1 + .../examples/users/create-target.md | 1 + .../server-graphql/examples/users/create.md | 1 + .../users/delete-mfa-authenticator.md | 1 + .../examples/users/get-target.md | 1 + .../server-graphql/examples/users/get.md | 1 + .../examples/users/list-targets.md | 1 + .../server-graphql/examples/users/list.md | 1 + .../users/update-email-verification.md | 1 + .../examples/users/update-email.md | 1 + .../examples/users/update-labels.md | 1 + .../examples/users/update-mfa.md | 1 + .../examples/users/update-name.md | 1 + .../examples/users/update-password.md | 1 + .../users/update-phone-verification.md | 1 + .../examples/users/update-phone.md | 1 + .../examples/users/update-status.md | 1 + .../examples/users/update-target.md | 1 + .../java/databases/update-string-attribute.md | 2 +- .../databases/update-string-attribute.md | 2 +- .../databases/update-string-attribute.md | 2 +- .../databases/update-string-attribute.md | 2 +- .../account/create-anonymous-session.md | 1 + .../account/create-email-password-session.md | 1 + .../examples/account/create-email-token.md | 1 + .../examples/account/create-j-w-t.md | 1 + .../account/create-magic-u-r-l-token.md | 1 + .../account/create-mfa-authenticator.md | 1 + .../examples/account/create-mfa-challenge.md | 1 + .../account/create-mfa-recovery-codes.md | 1 + .../examples/account/create-o-auth2token.md | 1 + .../examples/account/create-phone-token.md | 1 + .../account/create-phone-verification.md | 1 + .../examples/account/create-recovery.md | 1 + .../examples/account/create-session.md | 1 + .../examples/account/create-verification.md | 1 + .../server-python/examples/account/create.md | 1 + .../examples/account/delete-identity.md | 1 + .../account/delete-mfa-authenticator.md | 1 + .../examples/account/delete-session.md | 1 + .../examples/account/delete-sessions.md | 1 + .../account/get-mfa-recovery-codes.md | 1 + .../examples/account/get-prefs.md | 1 + .../examples/account/get-session.md | 1 + .../server-python/examples/account/get.md | 1 + .../examples/account/list-identities.md | 1 + .../examples/account/list-logs.md | 1 + .../examples/account/list-mfa-factors.md | 1 + .../examples/account/list-sessions.md | 1 + .../examples/account/update-email.md | 1 + .../examples/account/update-m-f-a.md | 1 + .../account/update-magic-u-r-l-session.md | 1 + .../account/update-mfa-authenticator.md | 1 + .../examples/account/update-mfa-challenge.md | 1 + .../account/update-mfa-recovery-codes.md | 1 + .../examples/account/update-name.md | 1 + .../examples/account/update-password.md | 1 + .../examples/account/update-phone-session.md | 1 + .../account/update-phone-verification.md | 1 + .../examples/account/update-phone.md | 1 + .../examples/account/update-prefs.md | 1 + .../examples/account/update-recovery.md | 1 + .../examples/account/update-session.md | 1 + .../examples/account/update-status.md | 1 + .../examples/account/update-verification.md | 1 + .../examples/avatars/get-browser.md | 1 + .../examples/avatars/get-credit-card.md | 1 + .../examples/avatars/get-favicon.md | 1 + .../examples/avatars/get-flag.md | 1 + .../examples/avatars/get-image.md | 1 + .../examples/avatars/get-initials.md | 1 + .../server-python/examples/avatars/get-q-r.md | 1 + .../databases/create-boolean-attribute.md | 1 + .../examples/databases/create-collection.md | 1 + .../databases/create-datetime-attribute.md | 1 + .../examples/databases/create-document.md | 1 + .../databases/create-email-attribute.md | 1 + .../databases/create-enum-attribute.md | 1 + .../databases/create-float-attribute.md | 1 + .../examples/databases/create-index.md | 1 + .../databases/create-integer-attribute.md | 1 + .../examples/databases/create-ip-attribute.md | 1 + .../create-relationship-attribute.md | 1 + .../databases/create-string-attribute.md | 1 + .../databases/create-url-attribute.md | 1 + .../examples/databases/create.md | 1 + .../examples/databases/delete-attribute.md | 1 + .../examples/databases/delete-collection.md | 1 + .../examples/databases/delete-document.md | 1 + .../examples/databases/delete-index.md | 1 + .../examples/databases/delete.md | 1 + .../examples/databases/get-attribute.md | 1 + .../examples/databases/get-collection.md | 1 + .../examples/databases/get-document.md | 1 + .../examples/databases/get-index.md | 1 + .../server-python/examples/databases/get.md | 1 + .../examples/databases/list-attributes.md | 1 + .../examples/databases/list-collections.md | 1 + .../examples/databases/list-documents.md | 1 + .../examples/databases/list-indexes.md | 1 + .../server-python/examples/databases/list.md | 1 + .../databases/update-boolean-attribute.md | 1 + .../examples/databases/update-collection.md | 1 + .../databases/update-datetime-attribute.md | 1 + .../examples/databases/update-document.md | 1 + .../databases/update-email-attribute.md | 1 + .../databases/update-enum-attribute.md | 1 + .../databases/update-float-attribute.md | 1 + .../databases/update-integer-attribute.md | 1 + .../examples/databases/update-ip-attribute.md | 1 + .../update-relationship-attribute.md | 1 + .../databases/update-string-attribute.md | 3 +- .../databases/update-url-attribute.md | 1 + .../examples/databases/update.md | 1 + .../examples/functions/create-build.md | 1 + .../examples/functions/create-deployment.md | 1 + .../examples/functions/create-execution.md | 1 + .../examples/functions/create-variable.md | 1 + .../examples/functions/create.md | 1 + .../examples/functions/delete-deployment.md | 1 + .../examples/functions/delete-execution.md | 1 + .../examples/functions/delete-variable.md | 1 + .../examples/functions/delete.md | 1 + .../functions/get-deployment-download.md | 1 + .../examples/functions/get-deployment.md | 1 + .../examples/functions/get-execution.md | 1 + .../examples/functions/get-variable.md | 1 + .../server-python/examples/functions/get.md | 1 + .../examples/functions/list-deployments.md | 1 + .../examples/functions/list-executions.md | 1 + .../examples/functions/list-runtimes.md | 1 + .../examples/functions/list-specifications.md | 1 + .../examples/functions/list-variables.md | 1 + .../server-python/examples/functions/list.md | 1 + .../functions/update-deployment-build.md | 1 + .../examples/functions/update-deployment.md | 1 + .../examples/functions/update-variable.md | 1 + .../examples/functions/update.md | 1 + .../examples/graphql/mutation.md | 1 + .../server-python/examples/graphql/query.md | 1 + .../examples/health/get-antivirus.md | 1 + .../examples/health/get-cache.md | 1 + .../examples/health/get-certificate.md | 1 + .../server-python/examples/health/get-d-b.md | 1 + .../examples/health/get-failed-jobs.md | 1 + .../examples/health/get-pub-sub.md | 1 + .../examples/health/get-queue-builds.md | 1 + .../examples/health/get-queue-certificates.md | 1 + .../examples/health/get-queue-databases.md | 1 + .../examples/health/get-queue-deletes.md | 1 + .../examples/health/get-queue-functions.md | 1 + .../examples/health/get-queue-logs.md | 1 + .../examples/health/get-queue-mails.md | 1 + .../examples/health/get-queue-messaging.md | 1 + .../examples/health/get-queue-migrations.md | 1 + .../examples/health/get-queue-usage-dump.md | 1 + .../examples/health/get-queue-usage.md | 1 + .../examples/health/get-queue-webhooks.md | 1 + .../examples/health/get-queue.md | 1 + .../examples/health/get-storage-local.md | 1 + .../examples/health/get-storage.md | 1 + .../server-python/examples/health/get-time.md | 1 + .../server-python/examples/health/get.md | 1 + .../server-python/examples/locale/get.md | 1 + .../examples/locale/list-codes.md | 1 + .../examples/locale/list-continents.md | 1 + .../examples/locale/list-countries-e-u.md | 1 + .../examples/locale/list-countries-phones.md | 1 + .../examples/locale/list-countries.md | 1 + .../examples/locale/list-currencies.md | 1 + .../examples/locale/list-languages.md | 1 + .../messaging/create-apns-provider.md | 1 + .../examples/messaging/create-email.md | 1 + .../examples/messaging/create-fcm-provider.md | 1 + .../messaging/create-mailgun-provider.md | 1 + .../messaging/create-msg91provider.md | 1 + .../examples/messaging/create-push.md | 1 + .../messaging/create-sendgrid-provider.md | 1 + .../examples/messaging/create-sms.md | 1 + .../messaging/create-smtp-provider.md | 1 + .../examples/messaging/create-subscriber.md | 1 + .../messaging/create-telesign-provider.md | 1 + .../messaging/create-textmagic-provider.md | 1 + .../examples/messaging/create-topic.md | 1 + .../messaging/create-twilio-provider.md | 1 + .../messaging/create-vonage-provider.md | 1 + .../examples/messaging/delete-provider.md | 1 + .../examples/messaging/delete-subscriber.md | 1 + .../examples/messaging/delete-topic.md | 1 + .../examples/messaging/delete.md | 1 + .../examples/messaging/get-message.md | 1 + .../examples/messaging/get-provider.md | 1 + .../examples/messaging/get-subscriber.md | 1 + .../examples/messaging/get-topic.md | 1 + .../examples/messaging/list-message-logs.md | 1 + .../examples/messaging/list-messages.md | 1 + .../examples/messaging/list-provider-logs.md | 1 + .../examples/messaging/list-providers.md | 1 + .../messaging/list-subscriber-logs.md | 1 + .../examples/messaging/list-subscribers.md | 1 + .../examples/messaging/list-targets.md | 1 + .../examples/messaging/list-topic-logs.md | 1 + .../examples/messaging/list-topics.md | 1 + .../messaging/update-apns-provider.md | 1 + .../examples/messaging/update-email.md | 1 + .../examples/messaging/update-fcm-provider.md | 1 + .../messaging/update-mailgun-provider.md | 1 + .../messaging/update-msg91provider.md | 1 + .../examples/messaging/update-push.md | 1 + .../messaging/update-sendgrid-provider.md | 1 + .../examples/messaging/update-sms.md | 1 + .../messaging/update-smtp-provider.md | 1 + .../messaging/update-telesign-provider.md | 1 + .../messaging/update-textmagic-provider.md | 1 + .../examples/messaging/update-topic.md | 1 + .../messaging/update-twilio-provider.md | 1 + .../messaging/update-vonage-provider.md | 1 + .../examples/storage/create-bucket.md | 1 + .../examples/storage/create-file.md | 1 + .../examples/storage/delete-bucket.md | 1 + .../examples/storage/delete-file.md | 1 + .../examples/storage/get-bucket.md | 1 + .../examples/storage/get-file-download.md | 1 + .../examples/storage/get-file-preview.md | 1 + .../examples/storage/get-file-view.md | 1 + .../examples/storage/get-file.md | 1 + .../examples/storage/list-buckets.md | 1 + .../examples/storage/list-files.md | 1 + .../examples/storage/update-bucket.md | 1 + .../examples/storage/update-file.md | 1 + .../examples/teams/create-membership.md | 1 + .../server-python/examples/teams/create.md | 1 + .../examples/teams/delete-membership.md | 1 + .../server-python/examples/teams/delete.md | 1 + .../examples/teams/get-membership.md | 1 + .../server-python/examples/teams/get-prefs.md | 1 + .../1.6.x/server-python/examples/teams/get.md | 1 + .../examples/teams/list-memberships.md | 1 + .../server-python/examples/teams/list.md | 1 + .../teams/update-membership-status.md | 1 + .../examples/teams/update-membership.md | 1 + .../examples/teams/update-name.md | 1 + .../examples/teams/update-prefs.md | 1 + .../examples/users/create-argon2user.md | 1 + .../examples/users/create-bcrypt-user.md | 1 + .../examples/users/create-j-w-t.md | 1 + .../examples/users/create-m-d5user.md | 1 + .../users/create-mfa-recovery-codes.md | 1 + .../examples/users/create-p-h-pass-user.md | 1 + .../examples/users/create-s-h-a-user.md | 1 + .../users/create-scrypt-modified-user.md | 1 + .../examples/users/create-scrypt-user.md | 1 + .../examples/users/create-session.md | 1 + .../examples/users/create-target.md | 1 + .../examples/users/create-token.md | 1 + .../server-python/examples/users/create.md | 1 + .../examples/users/delete-identity.md | 1 + .../users/delete-mfa-authenticator.md | 1 + .../examples/users/delete-session.md | 1 + .../examples/users/delete-sessions.md | 1 + .../examples/users/delete-target.md | 1 + .../server-python/examples/users/delete.md | 1 + .../examples/users/get-mfa-recovery-codes.md | 1 + .../server-python/examples/users/get-prefs.md | 1 + .../examples/users/get-target.md | 1 + .../1.6.x/server-python/examples/users/get.md | 1 + .../examples/users/list-identities.md | 1 + .../server-python/examples/users/list-logs.md | 1 + .../examples/users/list-memberships.md | 1 + .../examples/users/list-mfa-factors.md | 1 + .../examples/users/list-sessions.md | 1 + .../examples/users/list-targets.md | 1 + .../server-python/examples/users/list.md | 1 + .../users/update-email-verification.md | 1 + .../examples/users/update-email.md | 1 + .../examples/users/update-labels.md | 1 + .../users/update-mfa-recovery-codes.md | 1 + .../examples/users/update-mfa.md | 1 + .../examples/users/update-name.md | 1 + .../examples/users/update-password.md | 1 + .../users/update-phone-verification.md | 1 + .../examples/users/update-phone.md | 1 + .../examples/users/update-prefs.md | 1 + .../examples/users/update-status.md | 1 + .../examples/users/update-target.md | 1 + .../databases/update-string-attribute.md | 2 +- .../databases/update-string-attribute.md | 2 +- .../databases/update-string-attribute.md | 2 +- 355 files changed, 427 insertions(+), 40 deletions(-) create mode 100644 docs/examples/1.6.x/console-cli/examples/projects/update-memberships-privacy.md create mode 100644 docs/examples/1.6.x/console-web/examples/projects/update-memberships-privacy.md diff --git a/app/config/platforms.php b/app/config/platforms.php index 167e55651c..849733d359 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -217,7 +217,7 @@ return [ [ 'key' => 'cli', 'name' => 'Command Line', - 'version' => '6.0.0', + 'version' => '6.2.0', 'url' => 'https://github.com/appwrite/sdk-for-cli', 'package' => 'https://www.npmjs.com/package/appwrite-cli', 'enabled' => true, diff --git a/composer.json b/composer.json index e44dd0bffc..c6c2cdb950 100644 --- a/composer.json +++ b/composer.json @@ -84,7 +84,7 @@ }, "require-dev": { "ext-fileinfo": "*", - "appwrite/sdk-generator": "0.39.28", + "appwrite/sdk-generator": "0.39.29", "phpunit/phpunit": "9.5.20", "swoole/ide-helper": "5.1.2", "textalk/websocket": "1.5.7", diff --git a/composer.lock b/composer.lock index b906af3a81..54aca6fd30 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": "6b136b5490c0d5d331eac0d70bb3e198", + "content-hash": "819d7979e0239b187e2a1875d97ed0cf", "packages": [ { "name": "adhocore/jwt", @@ -3929,16 +3929,16 @@ }, { "name": "utopia-php/migration", - "version": "0.6.13", + "version": "0.6.14", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "68d9b0a9477755afcda607e7e8109785cae17a13" + "reference": "59a19f09ded0ccab4c8cca35b1242c01e2b9cfd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/68d9b0a9477755afcda607e7e8109785cae17a13", - "reference": "68d9b0a9477755afcda607e7e8109785cae17a13", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/59a19f09ded0ccab4c8cca35b1242c01e2b9cfd2", + "reference": "59a19f09ded0ccab4c8cca35b1242c01e2b9cfd2", "shasum": "" }, "require": { @@ -3979,9 +3979,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.6.13" + "source": "https://github.com/utopia-php/migration/tree/0.6.14" }, - "time": "2024-11-26T13:57:53+00:00" + "time": "2025-01-08T01:07:25+00:00" }, { "name": "utopia-php/mongo", @@ -4807,16 +4807,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.39.28", + "version": "0.39.29", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "6ff467858fe418e364460da905139216570a5d5e" + "reference": "a9c3f6076ec162588dac7b0a741bc1a2c3d1a2b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/6ff467858fe418e364460da905139216570a5d5e", - "reference": "6ff467858fe418e364460da905139216570a5d5e", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/a9c3f6076ec162588dac7b0a741bc1a2c3d1a2b7", + "reference": "a9c3f6076ec162588dac7b0a741bc1a2c3d1a2b7", "shasum": "" }, "require": { @@ -4852,9 +4852,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.39.28" + "source": "https://github.com/appwrite/sdk-generator/tree/0.39.29" }, - "time": "2024-12-30T11:17:25+00:00" + "time": "2025-01-07T05:28:35+00:00" }, { "name": "doctrine/annotations", @@ -8556,7 +8556,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { @@ -8580,5 +8580,5 @@ "platform-overrides": { "php": "8.3" }, - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.6.0" } diff --git a/docs/examples/1.6.x/console-cli/examples/databases/update-boolean-attribute.md b/docs/examples/1.6.x/console-cli/examples/databases/update-boolean-attribute.md index d48c3470fe..f5adb497ec 100644 --- a/docs/examples/1.6.x/console-cli/examples/databases/update-boolean-attribute.md +++ b/docs/examples/1.6.x/console-cli/examples/databases/update-boolean-attribute.md @@ -3,4 +3,5 @@ appwrite databases updateBooleanAttribute \ --collectionId \ --key '' \ --required false \ - --default false + --default false \ + diff --git a/docs/examples/1.6.x/console-cli/examples/databases/update-datetime-attribute.md b/docs/examples/1.6.x/console-cli/examples/databases/update-datetime-attribute.md index 9fc56373ed..fe4a462664 100644 --- a/docs/examples/1.6.x/console-cli/examples/databases/update-datetime-attribute.md +++ b/docs/examples/1.6.x/console-cli/examples/databases/update-datetime-attribute.md @@ -3,4 +3,5 @@ appwrite databases updateDatetimeAttribute \ --collectionId \ --key '' \ --required false \ - --default '' + --default '' \ + diff --git a/docs/examples/1.6.x/console-cli/examples/databases/update-email-attribute.md b/docs/examples/1.6.x/console-cli/examples/databases/update-email-attribute.md index 9f7bffeb9c..58510a6f8e 100644 --- a/docs/examples/1.6.x/console-cli/examples/databases/update-email-attribute.md +++ b/docs/examples/1.6.x/console-cli/examples/databases/update-email-attribute.md @@ -3,4 +3,5 @@ appwrite databases updateEmailAttribute \ --collectionId \ --key '' \ --required false \ - --default email@example.com + --default email@example.com \ + diff --git a/docs/examples/1.6.x/console-cli/examples/databases/update-enum-attribute.md b/docs/examples/1.6.x/console-cli/examples/databases/update-enum-attribute.md index bf562a0a82..21d56d3e64 100644 --- a/docs/examples/1.6.x/console-cli/examples/databases/update-enum-attribute.md +++ b/docs/examples/1.6.x/console-cli/examples/databases/update-enum-attribute.md @@ -4,4 +4,5 @@ appwrite databases updateEnumAttribute \ --key '' \ --elements one two three \ --required false \ - --default + --default \ + diff --git a/docs/examples/1.6.x/console-cli/examples/databases/update-float-attribute.md b/docs/examples/1.6.x/console-cli/examples/databases/update-float-attribute.md index 097dfd310a..353320d78a 100644 --- a/docs/examples/1.6.x/console-cli/examples/databases/update-float-attribute.md +++ b/docs/examples/1.6.x/console-cli/examples/databases/update-float-attribute.md @@ -5,4 +5,5 @@ appwrite databases updateFloatAttribute \ --required false \ --min null \ --max null \ - --default null + --default null \ + diff --git a/docs/examples/1.6.x/console-cli/examples/databases/update-integer-attribute.md b/docs/examples/1.6.x/console-cli/examples/databases/update-integer-attribute.md index 6a6b0747a8..c170b7f6fa 100644 --- a/docs/examples/1.6.x/console-cli/examples/databases/update-integer-attribute.md +++ b/docs/examples/1.6.x/console-cli/examples/databases/update-integer-attribute.md @@ -5,4 +5,5 @@ appwrite databases updateIntegerAttribute \ --required false \ --min null \ --max null \ - --default null + --default null \ + diff --git a/docs/examples/1.6.x/console-cli/examples/databases/update-ip-attribute.md b/docs/examples/1.6.x/console-cli/examples/databases/update-ip-attribute.md index 2439b5a8de..a400eadc1e 100644 --- a/docs/examples/1.6.x/console-cli/examples/databases/update-ip-attribute.md +++ b/docs/examples/1.6.x/console-cli/examples/databases/update-ip-attribute.md @@ -3,4 +3,5 @@ appwrite databases updateIpAttribute \ --collectionId \ --key '' \ --required false \ - --default '' + --default '' \ + diff --git a/docs/examples/1.6.x/console-cli/examples/databases/update-relationship-attribute.md b/docs/examples/1.6.x/console-cli/examples/databases/update-relationship-attribute.md index be03a70736..6e2dbd927d 100644 --- a/docs/examples/1.6.x/console-cli/examples/databases/update-relationship-attribute.md +++ b/docs/examples/1.6.x/console-cli/examples/databases/update-relationship-attribute.md @@ -3,3 +3,4 @@ appwrite databases updateRelationshipAttribute \ --collectionId \ --key '' \ + diff --git a/docs/examples/1.6.x/console-cli/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/console-cli/examples/databases/update-string-attribute.md index ebf45253fa..526ece0b72 100644 --- a/docs/examples/1.6.x/console-cli/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/console-cli/examples/databases/update-string-attribute.md @@ -3,4 +3,6 @@ appwrite databases updateStringAttribute \ --collectionId \ --key '' \ --required false \ - --default + --default \ + + diff --git a/docs/examples/1.6.x/console-cli/examples/databases/update-url-attribute.md b/docs/examples/1.6.x/console-cli/examples/databases/update-url-attribute.md index aa11a588db..e6f401b8ca 100644 --- a/docs/examples/1.6.x/console-cli/examples/databases/update-url-attribute.md +++ b/docs/examples/1.6.x/console-cli/examples/databases/update-url-attribute.md @@ -3,4 +3,5 @@ appwrite databases updateUrlAttribute \ --collectionId \ --key '' \ --required false \ - --default https://example.com + --default https://example.com \ + diff --git a/docs/examples/1.6.x/console-cli/examples/projects/update-memberships-privacy.md b/docs/examples/1.6.x/console-cli/examples/projects/update-memberships-privacy.md new file mode 100644 index 0000000000..6c811ccfce --- /dev/null +++ b/docs/examples/1.6.x/console-cli/examples/projects/update-memberships-privacy.md @@ -0,0 +1,5 @@ +appwrite projects updateMembershipsPrivacy \ + --projectId \ + --userName false \ + --userEmail false \ + --mfa false diff --git a/docs/examples/1.6.x/console-web/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/console-web/examples/databases/update-string-attribute.md index 0ac1497d00..f652c304eb 100644 --- a/docs/examples/1.6.x/console-web/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/console-web/examples/databases/update-string-attribute.md @@ -12,7 +12,7 @@ const result = await databases.updateStringAttribute( '', // key false, // required '', // default - null, // size (optional) + 1, // size (optional) '' // newKey (optional) ); diff --git a/docs/examples/1.6.x/console-web/examples/projects/update-memberships-privacy.md b/docs/examples/1.6.x/console-web/examples/projects/update-memberships-privacy.md new file mode 100644 index 0000000000..2cde25faa5 --- /dev/null +++ b/docs/examples/1.6.x/console-web/examples/projects/update-memberships-privacy.md @@ -0,0 +1,16 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateMembershipsPrivacy( + '', // projectId + false, // userName + false, // userEmail + false // mfa +); + +console.log(result); diff --git a/docs/examples/1.6.x/server-dart/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/server-dart/examples/databases/update-string-attribute.md index c2f3804c66..f9498aa36b 100644 --- a/docs/examples/1.6.x/server-dart/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-dart/examples/databases/update-string-attribute.md @@ -13,6 +13,6 @@ AttributeString result = await databases.updateStringAttribute( key: '', xrequired: false, xdefault: '', - size: 0, // (optional) + size: 1, // (optional) newKey: '', // (optional) ); diff --git a/docs/examples/1.6.x/server-deno/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/server-deno/examples/databases/update-string-attribute.md index 6603c377cb..d57f8fd663 100644 --- a/docs/examples/1.6.x/server-deno/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-deno/examples/databases/update-string-attribute.md @@ -13,6 +13,6 @@ const response = await databases.updateStringAttribute( '', // key false, // required '', // default - null, // size (optional) + 1, // size (optional) '' // newKey (optional) ); diff --git a/docs/examples/1.6.x/server-dotnet/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/server-dotnet/examples/databases/update-string-attribute.md index e915d23f51..a180815a50 100644 --- a/docs/examples/1.6.x/server-dotnet/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-dotnet/examples/databases/update-string-attribute.md @@ -15,6 +15,6 @@ AttributeString result = await databases.UpdateStringAttribute( key: "", required: false, default: "", - size: 0, // optional + size: 1, // optional newKey: "" // optional ); \ No newline at end of file diff --git a/docs/examples/1.6.x/server-go/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/server-go/examples/databases/update-string-attribute.md index d662060f09..f3e6addb07 100644 --- a/docs/examples/1.6.x/server-go/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-go/examples/databases/update-string-attribute.md @@ -20,7 +20,7 @@ func main() { "", false, "", - databases.WithUpdateStringAttributeSize(0), + databases.WithUpdateStringAttributeSize(1), databases.WithUpdateStringAttributeNewKey(""), ) diff --git a/docs/examples/1.6.x/server-graphql/examples/account/create.md b/docs/examples/1.6.x/server-graphql/examples/account/create.md index 3f8e3c3cf7..0d39394a3d 100644 --- a/docs/examples/1.6.x/server-graphql/examples/account/create.md +++ b/docs/examples/1.6.x/server-graphql/examples/account/create.md @@ -33,6 +33,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/account/get.md b/docs/examples/1.6.x/server-graphql/examples/account/get.md index e4db8f0e41..f4f07c187f 100644 --- a/docs/examples/1.6.x/server-graphql/examples/account/get.md +++ b/docs/examples/1.6.x/server-graphql/examples/account/get.md @@ -28,6 +28,7 @@ query { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/account/update-email.md b/docs/examples/1.6.x/server-graphql/examples/account/update-email.md index b207bad4bb..c879e24a43 100644 --- a/docs/examples/1.6.x/server-graphql/examples/account/update-email.md +++ b/docs/examples/1.6.x/server-graphql/examples/account/update-email.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/account/update-m-f-a.md b/docs/examples/1.6.x/server-graphql/examples/account/update-m-f-a.md index d2cd3d6ae5..787c2e0860 100644 --- a/docs/examples/1.6.x/server-graphql/examples/account/update-m-f-a.md +++ b/docs/examples/1.6.x/server-graphql/examples/account/update-m-f-a.md @@ -30,6 +30,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/account/update-mfa-authenticator.md b/docs/examples/1.6.x/server-graphql/examples/account/update-mfa-authenticator.md index c74062c7d4..9cfe9150be 100644 --- a/docs/examples/1.6.x/server-graphql/examples/account/update-mfa-authenticator.md +++ b/docs/examples/1.6.x/server-graphql/examples/account/update-mfa-authenticator.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/account/update-name.md b/docs/examples/1.6.x/server-graphql/examples/account/update-name.md index 850b5760a0..8ba2c99d9c 100644 --- a/docs/examples/1.6.x/server-graphql/examples/account/update-name.md +++ b/docs/examples/1.6.x/server-graphql/examples/account/update-name.md @@ -30,6 +30,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/account/update-password.md b/docs/examples/1.6.x/server-graphql/examples/account/update-password.md index 5904da0842..f3619a10d2 100644 --- a/docs/examples/1.6.x/server-graphql/examples/account/update-password.md +++ b/docs/examples/1.6.x/server-graphql/examples/account/update-password.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/account/update-phone.md b/docs/examples/1.6.x/server-graphql/examples/account/update-phone.md index 408a203300..adecb71168 100644 --- a/docs/examples/1.6.x/server-graphql/examples/account/update-phone.md +++ b/docs/examples/1.6.x/server-graphql/examples/account/update-phone.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/account/update-prefs.md b/docs/examples/1.6.x/server-graphql/examples/account/update-prefs.md index 40db7b43db..57280247e4 100644 --- a/docs/examples/1.6.x/server-graphql/examples/account/update-prefs.md +++ b/docs/examples/1.6.x/server-graphql/examples/account/update-prefs.md @@ -30,6 +30,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/account/update-status.md b/docs/examples/1.6.x/server-graphql/examples/account/update-status.md index aca8c098e7..c17f556842 100644 --- a/docs/examples/1.6.x/server-graphql/examples/account/update-status.md +++ b/docs/examples/1.6.x/server-graphql/examples/account/update-status.md @@ -28,6 +28,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-boolean-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-boolean-attribute.md index 6e969a587e..aa0bfa832e 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-boolean-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-boolean-attribute.md @@ -13,6 +13,8 @@ mutation { error required array + _createdAt + _updatedAt default } } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-collection.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-collection.md index 05175cc1e7..51eb51f410 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-collection.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-collection.md @@ -23,6 +23,8 @@ mutation { error attributes orders + _createdAt + _updatedAt } } } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-datetime-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-datetime-attribute.md index fcd5cb37a2..47601df0d8 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-datetime-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-datetime-attribute.md @@ -13,6 +13,8 @@ mutation { error required array + _createdAt + _updatedAt format default } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-email-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-email-attribute.md index 1f23a23ba7..e5845ccd47 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-email-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-email-attribute.md @@ -13,6 +13,8 @@ mutation { error required array + _createdAt + _updatedAt format default } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-enum-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-enum-attribute.md index 410a7983b4..d13c080e4a 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-enum-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-enum-attribute.md @@ -14,6 +14,8 @@ mutation { error required array + _createdAt + _updatedAt elements format default diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-float-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-float-attribute.md index ae6f9f72d6..2a270c3aff 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-float-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-float-attribute.md @@ -15,6 +15,8 @@ mutation { error required array + _createdAt + _updatedAt min max default diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-index.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-index.md index efc92a798c..2875a9b4b7 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-index.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-index.md @@ -13,5 +13,7 @@ mutation { error attributes orders + _createdAt + _updatedAt } } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-integer-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-integer-attribute.md index 1dc43f6b0d..8c79706817 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-integer-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-integer-attribute.md @@ -15,6 +15,8 @@ mutation { error required array + _createdAt + _updatedAt min max default diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-ip-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-ip-attribute.md index b2fd7215a0..0f4ad9e139 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-ip-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-ip-attribute.md @@ -13,6 +13,8 @@ mutation { error required array + _createdAt + _updatedAt format default } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-relationship-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-relationship-attribute.md index ddca20b83a..f66b87d6af 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-relationship-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-relationship-attribute.md @@ -15,6 +15,8 @@ mutation { error required array + _createdAt + _updatedAt relatedCollection relationType twoWay diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-string-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-string-attribute.md index 3c290712e9..62d97d6962 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-string-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-string-attribute.md @@ -15,6 +15,8 @@ mutation { error required array + _createdAt + _updatedAt size default } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-url-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-url-attribute.md index d2a39756c9..89ad873e52 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-url-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-url-attribute.md @@ -13,6 +13,8 @@ mutation { error required array + _createdAt + _updatedAt format default } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/get-collection.md b/docs/examples/1.6.x/server-graphql/examples/databases/get-collection.md index f76b71b6ba..ed27286b0d 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/get-collection.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/get-collection.md @@ -19,6 +19,8 @@ query { error attributes orders + _createdAt + _updatedAt } } } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/get-index.md b/docs/examples/1.6.x/server-graphql/examples/databases/get-index.md index de3c44ebe0..29de7a76f8 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/get-index.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/get-index.md @@ -10,5 +10,7 @@ query { error attributes orders + _createdAt + _updatedAt } } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/list-collections.md b/docs/examples/1.6.x/server-graphql/examples/databases/list-collections.md index b821b6c4cf..8dafbf7042 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/list-collections.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/list-collections.md @@ -22,6 +22,8 @@ query { error attributes orders + _createdAt + _updatedAt } } } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/list-indexes.md b/docs/examples/1.6.x/server-graphql/examples/databases/list-indexes.md index e1c11b6c03..3cb67c6451 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/list-indexes.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/list-indexes.md @@ -12,6 +12,8 @@ query { error attributes orders + _createdAt + _updatedAt } } } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/update-boolean-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/update-boolean-attribute.md index e92b41a14e..d508e62139 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/update-boolean-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/update-boolean-attribute.md @@ -13,6 +13,8 @@ mutation { error required array + _createdAt + _updatedAt default } } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/update-collection.md b/docs/examples/1.6.x/server-graphql/examples/databases/update-collection.md index fc78bb8efc..e918c058b8 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/update-collection.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/update-collection.md @@ -23,6 +23,8 @@ mutation { error attributes orders + _createdAt + _updatedAt } } } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/update-datetime-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/update-datetime-attribute.md index 46d9bbb728..a21b910edc 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/update-datetime-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/update-datetime-attribute.md @@ -13,6 +13,8 @@ mutation { error required array + _createdAt + _updatedAt format default } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/update-email-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/update-email-attribute.md index e05d365162..6c83d80e16 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/update-email-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/update-email-attribute.md @@ -13,6 +13,8 @@ mutation { error required array + _createdAt + _updatedAt format default } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/update-enum-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/update-enum-attribute.md index 619cbf817c..378e32f9b8 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/update-enum-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/update-enum-attribute.md @@ -14,6 +14,8 @@ mutation { error required array + _createdAt + _updatedAt elements format default diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/update-float-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/update-float-attribute.md index 7641745a35..c5c7afca44 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/update-float-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/update-float-attribute.md @@ -15,6 +15,8 @@ mutation { error required array + _createdAt + _updatedAt min max default diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/update-integer-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/update-integer-attribute.md index 11b7a66014..e38ccaa88c 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/update-integer-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/update-integer-attribute.md @@ -15,6 +15,8 @@ mutation { error required array + _createdAt + _updatedAt min max default diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/update-ip-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/update-ip-attribute.md index 649fa881b5..7a26224200 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/update-ip-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/update-ip-attribute.md @@ -13,6 +13,8 @@ mutation { error required array + _createdAt + _updatedAt format default } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/update-relationship-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/update-relationship-attribute.md index 88ba2f9636..6694540d93 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/update-relationship-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/update-relationship-attribute.md @@ -12,6 +12,8 @@ mutation { error required array + _createdAt + _updatedAt relatedCollection relationType twoWay diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/update-string-attribute.md index 4d88462efb..afafb307f5 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/update-string-attribute.md @@ -5,7 +5,7 @@ mutation { key: "", required: false, default: "", - size: 0, + size: 1, newKey: "" ) { key @@ -14,6 +14,8 @@ mutation { error required array + _createdAt + _updatedAt size default } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/update-url-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/update-url-attribute.md index 06838a9ed4..f9f14a04f6 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/update-url-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/update-url-attribute.md @@ -13,6 +13,8 @@ mutation { error required array + _createdAt + _updatedAt format default } diff --git a/docs/examples/1.6.x/server-graphql/examples/messaging/create-subscriber.md b/docs/examples/1.6.x/server-graphql/examples/messaging/create-subscriber.md index b2712ebb48..bab53612b7 100644 --- a/docs/examples/1.6.x/server-graphql/examples/messaging/create-subscriber.md +++ b/docs/examples/1.6.x/server-graphql/examples/messaging/create-subscriber.md @@ -17,6 +17,7 @@ mutation { providerId providerType identifier + expired } userId userName diff --git a/docs/examples/1.6.x/server-graphql/examples/messaging/get-subscriber.md b/docs/examples/1.6.x/server-graphql/examples/messaging/get-subscriber.md index 54096dd70a..2e1672d010 100644 --- a/docs/examples/1.6.x/server-graphql/examples/messaging/get-subscriber.md +++ b/docs/examples/1.6.x/server-graphql/examples/messaging/get-subscriber.md @@ -16,6 +16,7 @@ query { providerId providerType identifier + expired } userId userName diff --git a/docs/examples/1.6.x/server-graphql/examples/messaging/list-subscribers.md b/docs/examples/1.6.x/server-graphql/examples/messaging/list-subscribers.md index 5c48ae34bb..a5a4f91e56 100644 --- a/docs/examples/1.6.x/server-graphql/examples/messaging/list-subscribers.md +++ b/docs/examples/1.6.x/server-graphql/examples/messaging/list-subscribers.md @@ -19,6 +19,7 @@ query { providerId providerType identifier + expired } userId userName diff --git a/docs/examples/1.6.x/server-graphql/examples/messaging/list-targets.md b/docs/examples/1.6.x/server-graphql/examples/messaging/list-targets.md index 8e356dce5f..aa82276de2 100644 --- a/docs/examples/1.6.x/server-graphql/examples/messaging/list-targets.md +++ b/docs/examples/1.6.x/server-graphql/examples/messaging/list-targets.md @@ -13,6 +13,7 @@ query { providerId providerType identifier + expired } } } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/create-argon2user.md b/docs/examples/1.6.x/server-graphql/examples/users/create-argon2user.md index 464dc754c9..7f99622e52 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/create-argon2user.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/create-argon2user.md @@ -33,6 +33,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/create-bcrypt-user.md b/docs/examples/1.6.x/server-graphql/examples/users/create-bcrypt-user.md index 4d4bb09194..26659176eb 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/create-bcrypt-user.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/create-bcrypt-user.md @@ -33,6 +33,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/create-m-d5user.md b/docs/examples/1.6.x/server-graphql/examples/users/create-m-d5user.md index e8e833e6de..7e642b8233 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/create-m-d5user.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/create-m-d5user.md @@ -33,6 +33,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/create-p-h-pass-user.md b/docs/examples/1.6.x/server-graphql/examples/users/create-p-h-pass-user.md index 53960e7890..4c06b007a2 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/create-p-h-pass-user.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/create-p-h-pass-user.md @@ -33,6 +33,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/create-s-h-a-user.md b/docs/examples/1.6.x/server-graphql/examples/users/create-s-h-a-user.md index 17e287f8b3..f99da2752d 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/create-s-h-a-user.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/create-s-h-a-user.md @@ -34,6 +34,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/create-scrypt-modified-user.md b/docs/examples/1.6.x/server-graphql/examples/users/create-scrypt-modified-user.md index 6d51fb29ba..624ffcdd38 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/create-scrypt-modified-user.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/create-scrypt-modified-user.md @@ -36,6 +36,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/create-scrypt-user.md b/docs/examples/1.6.x/server-graphql/examples/users/create-scrypt-user.md index 0d4bac1db8..68a5f4c75f 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/create-scrypt-user.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/create-scrypt-user.md @@ -38,6 +38,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/create-target.md b/docs/examples/1.6.x/server-graphql/examples/users/create-target.md index a3a0696dec..7068c21aba 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/create-target.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/create-target.md @@ -15,5 +15,6 @@ mutation { providerId providerType identifier + expired } } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/create.md b/docs/examples/1.6.x/server-graphql/examples/users/create.md index 826a5168ef..465da80432 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/create.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/create.md @@ -34,6 +34,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/delete-mfa-authenticator.md b/docs/examples/1.6.x/server-graphql/examples/users/delete-mfa-authenticator.md index 227c340c68..26c9594a53 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/delete-mfa-authenticator.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/delete-mfa-authenticator.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/get-target.md b/docs/examples/1.6.x/server-graphql/examples/users/get-target.md index e4ba1a04a1..c84f947898 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/get-target.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/get-target.md @@ -11,5 +11,6 @@ query { providerId providerType identifier + expired } } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/get.md b/docs/examples/1.6.x/server-graphql/examples/users/get.md index f94a5818ed..9d0be685d9 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/get.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/get.md @@ -30,6 +30,7 @@ query { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/list-targets.md b/docs/examples/1.6.x/server-graphql/examples/users/list-targets.md index 05e796f167..408fd96f80 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/list-targets.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/list-targets.md @@ -13,6 +13,7 @@ query { providerId providerType identifier + expired } } } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/list.md b/docs/examples/1.6.x/server-graphql/examples/users/list.md index e2326dd1a2..a90121adf2 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/list.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/list.md @@ -33,6 +33,7 @@ query { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/update-email-verification.md b/docs/examples/1.6.x/server-graphql/examples/users/update-email-verification.md index 6bb2781854..cda7278ac0 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/update-email-verification.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/update-email-verification.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/update-email.md b/docs/examples/1.6.x/server-graphql/examples/users/update-email.md index 046937ac04..408a74972b 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/update-email.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/update-email.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/update-labels.md b/docs/examples/1.6.x/server-graphql/examples/users/update-labels.md index 93da33d805..cb3c5b6483 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/update-labels.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/update-labels.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/update-mfa.md b/docs/examples/1.6.x/server-graphql/examples/users/update-mfa.md index 9219aa1aea..ac09ea19a4 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/update-mfa.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/update-mfa.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/update-name.md b/docs/examples/1.6.x/server-graphql/examples/users/update-name.md index 01a53ce479..ec7e3dc27c 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/update-name.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/update-name.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/update-password.md b/docs/examples/1.6.x/server-graphql/examples/users/update-password.md index c95637c4ce..95ef74c83d 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/update-password.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/update-password.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/update-phone-verification.md b/docs/examples/1.6.x/server-graphql/examples/users/update-phone-verification.md index 58343ae365..c6afa54ba4 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/update-phone-verification.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/update-phone-verification.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/update-phone.md b/docs/examples/1.6.x/server-graphql/examples/users/update-phone.md index dbcb076c65..d3fc7d5f37 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/update-phone.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/update-phone.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/update-status.md b/docs/examples/1.6.x/server-graphql/examples/users/update-status.md index ad05bc75ff..2499c1c258 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/update-status.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/update-status.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/update-target.md b/docs/examples/1.6.x/server-graphql/examples/users/update-target.md index fe3444ede7..1f7cc1147a 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/update-target.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/update-target.md @@ -14,5 +14,6 @@ mutation { providerId providerType identifier + expired } } diff --git a/docs/examples/1.6.x/server-kotlin/java/databases/update-string-attribute.md b/docs/examples/1.6.x/server-kotlin/java/databases/update-string-attribute.md index 75be9e01f8..2d69006181 100644 --- a/docs/examples/1.6.x/server-kotlin/java/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-kotlin/java/databases/update-string-attribute.md @@ -15,7 +15,7 @@ databases.updateStringAttribute( "", // key false, // required "", // default - 0, // size (optional) + 1, // size (optional) "", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/1.6.x/server-kotlin/kotlin/databases/update-string-attribute.md b/docs/examples/1.6.x/server-kotlin/kotlin/databases/update-string-attribute.md index a37d4566ee..32e17beb9c 100644 --- a/docs/examples/1.6.x/server-kotlin/kotlin/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-kotlin/kotlin/databases/update-string-attribute.md @@ -15,6 +15,6 @@ val response = databases.updateStringAttribute( key = "", required = false, default = "", - size = 0, // optional + size = 1, // optional newKey = "" // optional ) diff --git a/docs/examples/1.6.x/server-nodejs/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/server-nodejs/examples/databases/update-string-attribute.md index f379fdc0cf..6aecbb591e 100644 --- a/docs/examples/1.6.x/server-nodejs/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-nodejs/examples/databases/update-string-attribute.md @@ -13,6 +13,6 @@ const result = await databases.updateStringAttribute( '', // key false, // required '', // default - null, // size (optional) + 1, // size (optional) '' // newKey (optional) ); diff --git a/docs/examples/1.6.x/server-php/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/server-php/examples/databases/update-string-attribute.md index 9e821e4436..721ba324de 100644 --- a/docs/examples/1.6.x/server-php/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-php/examples/databases/update-string-attribute.md @@ -16,6 +16,6 @@ $result = $databases->updateStringAttribute( key: '', required: false, default: '', - size: null, // optional + size: 1, // optional newKey: '' // optional ); \ No newline at end of file diff --git a/docs/examples/1.6.x/server-python/examples/account/create-anonymous-session.md b/docs/examples/1.6.x/server-python/examples/account/create-anonymous-session.md index 36ed47de01..ce5a92ad18 100644 --- a/docs/examples/1.6.x/server-python/examples/account/create-anonymous-session.md +++ b/docs/examples/1.6.x/server-python/examples/account/create-anonymous-session.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/create-email-password-session.md b/docs/examples/1.6.x/server-python/examples/account/create-email-password-session.md index b85cc3d365..5e869fd40c 100644 --- a/docs/examples/1.6.x/server-python/examples/account/create-email-password-session.md +++ b/docs/examples/1.6.x/server-python/examples/account/create-email-password-session.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/create-email-token.md b/docs/examples/1.6.x/server-python/examples/account/create-email-token.md index 4c18324ef3..5cf2bfb085 100644 --- a/docs/examples/1.6.x/server-python/examples/account/create-email-token.md +++ b/docs/examples/1.6.x/server-python/examples/account/create-email-token.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/create-j-w-t.md b/docs/examples/1.6.x/server-python/examples/account/create-j-w-t.md index 2121514562..c737f1b8e9 100644 --- a/docs/examples/1.6.x/server-python/examples/account/create-j-w-t.md +++ b/docs/examples/1.6.x/server-python/examples/account/create-j-w-t.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.6.x/server-python/examples/account/create-magic-u-r-l-token.md index c0154182e6..00778172bb 100644 --- a/docs/examples/1.6.x/server-python/examples/account/create-magic-u-r-l-token.md +++ b/docs/examples/1.6.x/server-python/examples/account/create-magic-u-r-l-token.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/create-mfa-authenticator.md b/docs/examples/1.6.x/server-python/examples/account/create-mfa-authenticator.md index 16a8e2ebae..a6f09eb4f0 100644 --- a/docs/examples/1.6.x/server-python/examples/account/create-mfa-authenticator.md +++ b/docs/examples/1.6.x/server-python/examples/account/create-mfa-authenticator.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account from appwrite.enums import AuthenticatorType client = Client() diff --git a/docs/examples/1.6.x/server-python/examples/account/create-mfa-challenge.md b/docs/examples/1.6.x/server-python/examples/account/create-mfa-challenge.md index 017fdd28cc..deb4c9c600 100644 --- a/docs/examples/1.6.x/server-python/examples/account/create-mfa-challenge.md +++ b/docs/examples/1.6.x/server-python/examples/account/create-mfa-challenge.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account from appwrite.enums import AuthenticationFactor client = Client() diff --git a/docs/examples/1.6.x/server-python/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.6.x/server-python/examples/account/create-mfa-recovery-codes.md index 452b47f72f..a149cb95b7 100644 --- a/docs/examples/1.6.x/server-python/examples/account/create-mfa-recovery-codes.md +++ b/docs/examples/1.6.x/server-python/examples/account/create-mfa-recovery-codes.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/create-o-auth2token.md b/docs/examples/1.6.x/server-python/examples/account/create-o-auth2token.md index 0cc89df216..fa11d31c31 100644 --- a/docs/examples/1.6.x/server-python/examples/account/create-o-auth2token.md +++ b/docs/examples/1.6.x/server-python/examples/account/create-o-auth2token.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account from appwrite.enums import OAuthProvider client = Client() diff --git a/docs/examples/1.6.x/server-python/examples/account/create-phone-token.md b/docs/examples/1.6.x/server-python/examples/account/create-phone-token.md index 30c80df6be..d242d71bc1 100644 --- a/docs/examples/1.6.x/server-python/examples/account/create-phone-token.md +++ b/docs/examples/1.6.x/server-python/examples/account/create-phone-token.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/create-phone-verification.md b/docs/examples/1.6.x/server-python/examples/account/create-phone-verification.md index fd0a2620aa..bb2058eb2a 100644 --- a/docs/examples/1.6.x/server-python/examples/account/create-phone-verification.md +++ b/docs/examples/1.6.x/server-python/examples/account/create-phone-verification.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/create-recovery.md b/docs/examples/1.6.x/server-python/examples/account/create-recovery.md index e9613cd947..3d215a400e 100644 --- a/docs/examples/1.6.x/server-python/examples/account/create-recovery.md +++ b/docs/examples/1.6.x/server-python/examples/account/create-recovery.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/create-session.md b/docs/examples/1.6.x/server-python/examples/account/create-session.md index d129e1000c..d00e8cb899 100644 --- a/docs/examples/1.6.x/server-python/examples/account/create-session.md +++ b/docs/examples/1.6.x/server-python/examples/account/create-session.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/create-verification.md b/docs/examples/1.6.x/server-python/examples/account/create-verification.md index 5ff238f674..329d19e6fd 100644 --- a/docs/examples/1.6.x/server-python/examples/account/create-verification.md +++ b/docs/examples/1.6.x/server-python/examples/account/create-verification.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/create.md b/docs/examples/1.6.x/server-python/examples/account/create.md index 33b6f3fe23..39b33c62ee 100644 --- a/docs/examples/1.6.x/server-python/examples/account/create.md +++ b/docs/examples/1.6.x/server-python/examples/account/create.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/delete-identity.md b/docs/examples/1.6.x/server-python/examples/account/delete-identity.md index ef57289443..3556122de8 100644 --- a/docs/examples/1.6.x/server-python/examples/account/delete-identity.md +++ b/docs/examples/1.6.x/server-python/examples/account/delete-identity.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/delete-mfa-authenticator.md b/docs/examples/1.6.x/server-python/examples/account/delete-mfa-authenticator.md index 0fbe8c7475..939ea718c7 100644 --- a/docs/examples/1.6.x/server-python/examples/account/delete-mfa-authenticator.md +++ b/docs/examples/1.6.x/server-python/examples/account/delete-mfa-authenticator.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account from appwrite.enums import AuthenticatorType client = Client() diff --git a/docs/examples/1.6.x/server-python/examples/account/delete-session.md b/docs/examples/1.6.x/server-python/examples/account/delete-session.md index fa0049c6e4..9ddb4431d3 100644 --- a/docs/examples/1.6.x/server-python/examples/account/delete-session.md +++ b/docs/examples/1.6.x/server-python/examples/account/delete-session.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/delete-sessions.md b/docs/examples/1.6.x/server-python/examples/account/delete-sessions.md index 6ebe286c89..751ab9bb2d 100644 --- a/docs/examples/1.6.x/server-python/examples/account/delete-sessions.md +++ b/docs/examples/1.6.x/server-python/examples/account/delete-sessions.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.6.x/server-python/examples/account/get-mfa-recovery-codes.md index ec705952b2..f70b968274 100644 --- a/docs/examples/1.6.x/server-python/examples/account/get-mfa-recovery-codes.md +++ b/docs/examples/1.6.x/server-python/examples/account/get-mfa-recovery-codes.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/get-prefs.md b/docs/examples/1.6.x/server-python/examples/account/get-prefs.md index 67d0741733..52df6450dc 100644 --- a/docs/examples/1.6.x/server-python/examples/account/get-prefs.md +++ b/docs/examples/1.6.x/server-python/examples/account/get-prefs.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/get-session.md b/docs/examples/1.6.x/server-python/examples/account/get-session.md index f7ae72d69e..f38466fb34 100644 --- a/docs/examples/1.6.x/server-python/examples/account/get-session.md +++ b/docs/examples/1.6.x/server-python/examples/account/get-session.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/get.md b/docs/examples/1.6.x/server-python/examples/account/get.md index 9ded8e96cb..b414047e2d 100644 --- a/docs/examples/1.6.x/server-python/examples/account/get.md +++ b/docs/examples/1.6.x/server-python/examples/account/get.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/list-identities.md b/docs/examples/1.6.x/server-python/examples/account/list-identities.md index c51da2cb67..4bf9beb1b2 100644 --- a/docs/examples/1.6.x/server-python/examples/account/list-identities.md +++ b/docs/examples/1.6.x/server-python/examples/account/list-identities.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/list-logs.md b/docs/examples/1.6.x/server-python/examples/account/list-logs.md index 750f97716a..5d8c27aded 100644 --- a/docs/examples/1.6.x/server-python/examples/account/list-logs.md +++ b/docs/examples/1.6.x/server-python/examples/account/list-logs.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/list-mfa-factors.md b/docs/examples/1.6.x/server-python/examples/account/list-mfa-factors.md index 2220475b9f..ba3796bf65 100644 --- a/docs/examples/1.6.x/server-python/examples/account/list-mfa-factors.md +++ b/docs/examples/1.6.x/server-python/examples/account/list-mfa-factors.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/list-sessions.md b/docs/examples/1.6.x/server-python/examples/account/list-sessions.md index b3427c09ce..74733138cd 100644 --- a/docs/examples/1.6.x/server-python/examples/account/list-sessions.md +++ b/docs/examples/1.6.x/server-python/examples/account/list-sessions.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/update-email.md b/docs/examples/1.6.x/server-python/examples/account/update-email.md index b0a2a16002..004d071da1 100644 --- a/docs/examples/1.6.x/server-python/examples/account/update-email.md +++ b/docs/examples/1.6.x/server-python/examples/account/update-email.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/update-m-f-a.md b/docs/examples/1.6.x/server-python/examples/account/update-m-f-a.md index 561e7cc431..2f9321c485 100644 --- a/docs/examples/1.6.x/server-python/examples/account/update-m-f-a.md +++ b/docs/examples/1.6.x/server-python/examples/account/update-m-f-a.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.6.x/server-python/examples/account/update-magic-u-r-l-session.md index f6b69b03cc..ca8e8e51a3 100644 --- a/docs/examples/1.6.x/server-python/examples/account/update-magic-u-r-l-session.md +++ b/docs/examples/1.6.x/server-python/examples/account/update-magic-u-r-l-session.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/update-mfa-authenticator.md b/docs/examples/1.6.x/server-python/examples/account/update-mfa-authenticator.md index 42b91f1d46..a5a951906c 100644 --- a/docs/examples/1.6.x/server-python/examples/account/update-mfa-authenticator.md +++ b/docs/examples/1.6.x/server-python/examples/account/update-mfa-authenticator.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account from appwrite.enums import AuthenticatorType client = Client() diff --git a/docs/examples/1.6.x/server-python/examples/account/update-mfa-challenge.md b/docs/examples/1.6.x/server-python/examples/account/update-mfa-challenge.md index 5964df42f8..d28a2518d7 100644 --- a/docs/examples/1.6.x/server-python/examples/account/update-mfa-challenge.md +++ b/docs/examples/1.6.x/server-python/examples/account/update-mfa-challenge.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.6.x/server-python/examples/account/update-mfa-recovery-codes.md index 4f0b1362a0..38cb41ca8d 100644 --- a/docs/examples/1.6.x/server-python/examples/account/update-mfa-recovery-codes.md +++ b/docs/examples/1.6.x/server-python/examples/account/update-mfa-recovery-codes.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/update-name.md b/docs/examples/1.6.x/server-python/examples/account/update-name.md index d0027a8400..9b4bf8291d 100644 --- a/docs/examples/1.6.x/server-python/examples/account/update-name.md +++ b/docs/examples/1.6.x/server-python/examples/account/update-name.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/update-password.md b/docs/examples/1.6.x/server-python/examples/account/update-password.md index 888349e207..ecb4228df0 100644 --- a/docs/examples/1.6.x/server-python/examples/account/update-password.md +++ b/docs/examples/1.6.x/server-python/examples/account/update-password.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/update-phone-session.md b/docs/examples/1.6.x/server-python/examples/account/update-phone-session.md index 404d2b458c..d29ab28e39 100644 --- a/docs/examples/1.6.x/server-python/examples/account/update-phone-session.md +++ b/docs/examples/1.6.x/server-python/examples/account/update-phone-session.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/update-phone-verification.md b/docs/examples/1.6.x/server-python/examples/account/update-phone-verification.md index 41ceb4bc05..e64d79f6bd 100644 --- a/docs/examples/1.6.x/server-python/examples/account/update-phone-verification.md +++ b/docs/examples/1.6.x/server-python/examples/account/update-phone-verification.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/update-phone.md b/docs/examples/1.6.x/server-python/examples/account/update-phone.md index b7414e613e..65a6a387b3 100644 --- a/docs/examples/1.6.x/server-python/examples/account/update-phone.md +++ b/docs/examples/1.6.x/server-python/examples/account/update-phone.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/update-prefs.md b/docs/examples/1.6.x/server-python/examples/account/update-prefs.md index f69dc12b33..c3683007b7 100644 --- a/docs/examples/1.6.x/server-python/examples/account/update-prefs.md +++ b/docs/examples/1.6.x/server-python/examples/account/update-prefs.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/update-recovery.md b/docs/examples/1.6.x/server-python/examples/account/update-recovery.md index a3314134e6..2493dc5e53 100644 --- a/docs/examples/1.6.x/server-python/examples/account/update-recovery.md +++ b/docs/examples/1.6.x/server-python/examples/account/update-recovery.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/update-session.md b/docs/examples/1.6.x/server-python/examples/account/update-session.md index 3768326e98..ee3a2f7543 100644 --- a/docs/examples/1.6.x/server-python/examples/account/update-session.md +++ b/docs/examples/1.6.x/server-python/examples/account/update-session.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/update-status.md b/docs/examples/1.6.x/server-python/examples/account/update-status.md index 4f9add80f7..c8318a43ce 100644 --- a/docs/examples/1.6.x/server-python/examples/account/update-status.md +++ b/docs/examples/1.6.x/server-python/examples/account/update-status.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/account/update-verification.md b/docs/examples/1.6.x/server-python/examples/account/update-verification.md index 35faf53cb8..63a7f26322 100644 --- a/docs/examples/1.6.x/server-python/examples/account/update-verification.md +++ b/docs/examples/1.6.x/server-python/examples/account/update-verification.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.account import Account client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/avatars/get-browser.md b/docs/examples/1.6.x/server-python/examples/avatars/get-browser.md index 91dde3bbb8..7ed831835f 100644 --- a/docs/examples/1.6.x/server-python/examples/avatars/get-browser.md +++ b/docs/examples/1.6.x/server-python/examples/avatars/get-browser.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.avatars import Avatars from appwrite.enums import Browser client = Client() diff --git a/docs/examples/1.6.x/server-python/examples/avatars/get-credit-card.md b/docs/examples/1.6.x/server-python/examples/avatars/get-credit-card.md index cec2f61a20..aa66b86b2d 100644 --- a/docs/examples/1.6.x/server-python/examples/avatars/get-credit-card.md +++ b/docs/examples/1.6.x/server-python/examples/avatars/get-credit-card.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.avatars import Avatars from appwrite.enums import CreditCard client = Client() diff --git a/docs/examples/1.6.x/server-python/examples/avatars/get-favicon.md b/docs/examples/1.6.x/server-python/examples/avatars/get-favicon.md index 4aa0177a26..2c6a67e2f2 100644 --- a/docs/examples/1.6.x/server-python/examples/avatars/get-favicon.md +++ b/docs/examples/1.6.x/server-python/examples/avatars/get-favicon.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.avatars import Avatars client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/avatars/get-flag.md b/docs/examples/1.6.x/server-python/examples/avatars/get-flag.md index 6b12dac6be..435c8550f7 100644 --- a/docs/examples/1.6.x/server-python/examples/avatars/get-flag.md +++ b/docs/examples/1.6.x/server-python/examples/avatars/get-flag.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.avatars import Avatars from appwrite.enums import Flag client = Client() diff --git a/docs/examples/1.6.x/server-python/examples/avatars/get-image.md b/docs/examples/1.6.x/server-python/examples/avatars/get-image.md index 202955c2fc..ee9e0cb15e 100644 --- a/docs/examples/1.6.x/server-python/examples/avatars/get-image.md +++ b/docs/examples/1.6.x/server-python/examples/avatars/get-image.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.avatars import Avatars client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/avatars/get-initials.md b/docs/examples/1.6.x/server-python/examples/avatars/get-initials.md index 233da1b131..edcbbb33ec 100644 --- a/docs/examples/1.6.x/server-python/examples/avatars/get-initials.md +++ b/docs/examples/1.6.x/server-python/examples/avatars/get-initials.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.avatars import Avatars client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/avatars/get-q-r.md b/docs/examples/1.6.x/server-python/examples/avatars/get-q-r.md index 12963947d2..7f6da32ddf 100644 --- a/docs/examples/1.6.x/server-python/examples/avatars/get-q-r.md +++ b/docs/examples/1.6.x/server-python/examples/avatars/get-q-r.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.avatars import Avatars client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/create-boolean-attribute.md b/docs/examples/1.6.x/server-python/examples/databases/create-boolean-attribute.md index 183a2b6487..2b4209db9d 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/create-boolean-attribute.md +++ b/docs/examples/1.6.x/server-python/examples/databases/create-boolean-attribute.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/create-collection.md b/docs/examples/1.6.x/server-python/examples/databases/create-collection.md index fd9e3a6c0c..99c44a2f9f 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/create-collection.md +++ b/docs/examples/1.6.x/server-python/examples/databases/create-collection.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/create-datetime-attribute.md b/docs/examples/1.6.x/server-python/examples/databases/create-datetime-attribute.md index 7435742e1c..db81c021e2 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/create-datetime-attribute.md +++ b/docs/examples/1.6.x/server-python/examples/databases/create-datetime-attribute.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/create-document.md b/docs/examples/1.6.x/server-python/examples/databases/create-document.md index bd3993f162..22f2c07396 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/create-document.md +++ b/docs/examples/1.6.x/server-python/examples/databases/create-document.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/create-email-attribute.md b/docs/examples/1.6.x/server-python/examples/databases/create-email-attribute.md index f4b427e294..2e28e0bfff 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/create-email-attribute.md +++ b/docs/examples/1.6.x/server-python/examples/databases/create-email-attribute.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/create-enum-attribute.md b/docs/examples/1.6.x/server-python/examples/databases/create-enum-attribute.md index dce63558da..b1efdc7dc3 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/create-enum-attribute.md +++ b/docs/examples/1.6.x/server-python/examples/databases/create-enum-attribute.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/create-float-attribute.md b/docs/examples/1.6.x/server-python/examples/databases/create-float-attribute.md index a658bd8f4c..b36863b8ee 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/create-float-attribute.md +++ b/docs/examples/1.6.x/server-python/examples/databases/create-float-attribute.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/create-index.md b/docs/examples/1.6.x/server-python/examples/databases/create-index.md index 015b762bbc..9885c06e95 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/create-index.md +++ b/docs/examples/1.6.x/server-python/examples/databases/create-index.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases from appwrite.enums import IndexType client = Client() diff --git a/docs/examples/1.6.x/server-python/examples/databases/create-integer-attribute.md b/docs/examples/1.6.x/server-python/examples/databases/create-integer-attribute.md index 9f409e484e..8cb140a7b9 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/create-integer-attribute.md +++ b/docs/examples/1.6.x/server-python/examples/databases/create-integer-attribute.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/create-ip-attribute.md b/docs/examples/1.6.x/server-python/examples/databases/create-ip-attribute.md index ab4d357447..d4b4ab6528 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/create-ip-attribute.md +++ b/docs/examples/1.6.x/server-python/examples/databases/create-ip-attribute.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/create-relationship-attribute.md b/docs/examples/1.6.x/server-python/examples/databases/create-relationship-attribute.md index 76b5db1c45..4172c27249 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/create-relationship-attribute.md +++ b/docs/examples/1.6.x/server-python/examples/databases/create-relationship-attribute.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases from appwrite.enums import RelationshipType client = Client() diff --git a/docs/examples/1.6.x/server-python/examples/databases/create-string-attribute.md b/docs/examples/1.6.x/server-python/examples/databases/create-string-attribute.md index d6f7f94627..e69687124d 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/create-string-attribute.md +++ b/docs/examples/1.6.x/server-python/examples/databases/create-string-attribute.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/create-url-attribute.md b/docs/examples/1.6.x/server-python/examples/databases/create-url-attribute.md index 3b105d80e8..4ad03c4010 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/create-url-attribute.md +++ b/docs/examples/1.6.x/server-python/examples/databases/create-url-attribute.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/create.md b/docs/examples/1.6.x/server-python/examples/databases/create.md index a4ddc92cc6..d5cbb99eed 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/create.md +++ b/docs/examples/1.6.x/server-python/examples/databases/create.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/delete-attribute.md b/docs/examples/1.6.x/server-python/examples/databases/delete-attribute.md index 7f490b2350..b317ba9dd4 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/delete-attribute.md +++ b/docs/examples/1.6.x/server-python/examples/databases/delete-attribute.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/delete-collection.md b/docs/examples/1.6.x/server-python/examples/databases/delete-collection.md index c3083a51bc..ab274c6bdf 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/delete-collection.md +++ b/docs/examples/1.6.x/server-python/examples/databases/delete-collection.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/delete-document.md b/docs/examples/1.6.x/server-python/examples/databases/delete-document.md index c3e296aef2..69151aad9e 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/delete-document.md +++ b/docs/examples/1.6.x/server-python/examples/databases/delete-document.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/delete-index.md b/docs/examples/1.6.x/server-python/examples/databases/delete-index.md index d5a12c140e..2ed0165b36 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/delete-index.md +++ b/docs/examples/1.6.x/server-python/examples/databases/delete-index.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/delete.md b/docs/examples/1.6.x/server-python/examples/databases/delete.md index 41d5f18f8a..e7e988a9a5 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/delete.md +++ b/docs/examples/1.6.x/server-python/examples/databases/delete.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/get-attribute.md b/docs/examples/1.6.x/server-python/examples/databases/get-attribute.md index e505fe9a38..a717552659 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/get-attribute.md +++ b/docs/examples/1.6.x/server-python/examples/databases/get-attribute.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/get-collection.md b/docs/examples/1.6.x/server-python/examples/databases/get-collection.md index 7be57ea193..f63298ebed 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/get-collection.md +++ b/docs/examples/1.6.x/server-python/examples/databases/get-collection.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/get-document.md b/docs/examples/1.6.x/server-python/examples/databases/get-document.md index 83faadec38..acdc25de7e 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/get-document.md +++ b/docs/examples/1.6.x/server-python/examples/databases/get-document.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/get-index.md b/docs/examples/1.6.x/server-python/examples/databases/get-index.md index 6038868b41..ca5a9958ad 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/get-index.md +++ b/docs/examples/1.6.x/server-python/examples/databases/get-index.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/get.md b/docs/examples/1.6.x/server-python/examples/databases/get.md index 8fe2358be7..deadf6ab41 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/get.md +++ b/docs/examples/1.6.x/server-python/examples/databases/get.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/list-attributes.md b/docs/examples/1.6.x/server-python/examples/databases/list-attributes.md index a29aefa015..245ec60c19 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/list-attributes.md +++ b/docs/examples/1.6.x/server-python/examples/databases/list-attributes.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/list-collections.md b/docs/examples/1.6.x/server-python/examples/databases/list-collections.md index 0e613321c2..ca18267250 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/list-collections.md +++ b/docs/examples/1.6.x/server-python/examples/databases/list-collections.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/list-documents.md b/docs/examples/1.6.x/server-python/examples/databases/list-documents.md index dee130e65f..41f0380e15 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/list-documents.md +++ b/docs/examples/1.6.x/server-python/examples/databases/list-documents.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/list-indexes.md b/docs/examples/1.6.x/server-python/examples/databases/list-indexes.md index 40578a14de..bf18bd1c95 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/list-indexes.md +++ b/docs/examples/1.6.x/server-python/examples/databases/list-indexes.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/list.md b/docs/examples/1.6.x/server-python/examples/databases/list.md index aa934b2b12..11669b3453 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/list.md +++ b/docs/examples/1.6.x/server-python/examples/databases/list.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/update-boolean-attribute.md b/docs/examples/1.6.x/server-python/examples/databases/update-boolean-attribute.md index 553d94b109..c9300ea57d 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/update-boolean-attribute.md +++ b/docs/examples/1.6.x/server-python/examples/databases/update-boolean-attribute.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/update-collection.md b/docs/examples/1.6.x/server-python/examples/databases/update-collection.md index 3432b6bf18..d9297285ee 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/update-collection.md +++ b/docs/examples/1.6.x/server-python/examples/databases/update-collection.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/update-datetime-attribute.md b/docs/examples/1.6.x/server-python/examples/databases/update-datetime-attribute.md index f9056d2c39..96c7fb5439 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/update-datetime-attribute.md +++ b/docs/examples/1.6.x/server-python/examples/databases/update-datetime-attribute.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/update-document.md b/docs/examples/1.6.x/server-python/examples/databases/update-document.md index 07bba7678c..7b9cce9513 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/update-document.md +++ b/docs/examples/1.6.x/server-python/examples/databases/update-document.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/update-email-attribute.md b/docs/examples/1.6.x/server-python/examples/databases/update-email-attribute.md index 45a8d0d9bc..5b042d4b72 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/update-email-attribute.md +++ b/docs/examples/1.6.x/server-python/examples/databases/update-email-attribute.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/update-enum-attribute.md b/docs/examples/1.6.x/server-python/examples/databases/update-enum-attribute.md index c07f3754d8..caa1b4ecdb 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/update-enum-attribute.md +++ b/docs/examples/1.6.x/server-python/examples/databases/update-enum-attribute.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/update-float-attribute.md b/docs/examples/1.6.x/server-python/examples/databases/update-float-attribute.md index fa1767e893..8f8a35a2c8 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/update-float-attribute.md +++ b/docs/examples/1.6.x/server-python/examples/databases/update-float-attribute.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/update-integer-attribute.md b/docs/examples/1.6.x/server-python/examples/databases/update-integer-attribute.md index 0db97070ed..125cf825bf 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/update-integer-attribute.md +++ b/docs/examples/1.6.x/server-python/examples/databases/update-integer-attribute.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/update-ip-attribute.md b/docs/examples/1.6.x/server-python/examples/databases/update-ip-attribute.md index 135dbd82ea..a2b8bad201 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/update-ip-attribute.md +++ b/docs/examples/1.6.x/server-python/examples/databases/update-ip-attribute.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/update-relationship-attribute.md b/docs/examples/1.6.x/server-python/examples/databases/update-relationship-attribute.md index bc528f17dd..0aacc139a0 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/update-relationship-attribute.md +++ b/docs/examples/1.6.x/server-python/examples/databases/update-relationship-attribute.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/server-python/examples/databases/update-string-attribute.md index bbe7ddb19f..c85eb25f59 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-python/examples/databases/update-string-attribute.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint @@ -13,6 +14,6 @@ result = databases.update_string_attribute( key = '', required = False, default = '', - size = None, # optional + size = 1, # optional new_key = '' # optional ) diff --git a/docs/examples/1.6.x/server-python/examples/databases/update-url-attribute.md b/docs/examples/1.6.x/server-python/examples/databases/update-url-attribute.md index 8e3a28de1f..53da6ae45f 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/update-url-attribute.md +++ b/docs/examples/1.6.x/server-python/examples/databases/update-url-attribute.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/databases/update.md b/docs/examples/1.6.x/server-python/examples/databases/update.md index 765f28a3fc..da59776b3e 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/update.md +++ b/docs/examples/1.6.x/server-python/examples/databases/update.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/functions/create-build.md b/docs/examples/1.6.x/server-python/examples/functions/create-build.md index c4eb9d0a20..ce2ffb72f5 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/create-build.md +++ b/docs/examples/1.6.x/server-python/examples/functions/create-build.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/functions/create-deployment.md b/docs/examples/1.6.x/server-python/examples/functions/create-deployment.md index da9b559b2f..c86fdf679d 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/create-deployment.md +++ b/docs/examples/1.6.x/server-python/examples/functions/create-deployment.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions from appwrite.input_file import InputFile client = Client() diff --git a/docs/examples/1.6.x/server-python/examples/functions/create-execution.md b/docs/examples/1.6.x/server-python/examples/functions/create-execution.md index e1decb9755..cb3fddd02b 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/create-execution.md +++ b/docs/examples/1.6.x/server-python/examples/functions/create-execution.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/functions/create-variable.md b/docs/examples/1.6.x/server-python/examples/functions/create-variable.md index cd73e30c03..101ecdf315 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/create-variable.md +++ b/docs/examples/1.6.x/server-python/examples/functions/create-variable.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/functions/create.md b/docs/examples/1.6.x/server-python/examples/functions/create.md index a65b87dd4c..f10a953ca8 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/create.md +++ b/docs/examples/1.6.x/server-python/examples/functions/create.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions from appwrite.enums import client = Client() diff --git a/docs/examples/1.6.x/server-python/examples/functions/delete-deployment.md b/docs/examples/1.6.x/server-python/examples/functions/delete-deployment.md index 780ce9d7c8..f98bd60a9b 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/delete-deployment.md +++ b/docs/examples/1.6.x/server-python/examples/functions/delete-deployment.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/functions/delete-execution.md b/docs/examples/1.6.x/server-python/examples/functions/delete-execution.md index 7c3ea09a0f..b723fd6c47 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/delete-execution.md +++ b/docs/examples/1.6.x/server-python/examples/functions/delete-execution.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/functions/delete-variable.md b/docs/examples/1.6.x/server-python/examples/functions/delete-variable.md index 646a0f325b..e17afed363 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/delete-variable.md +++ b/docs/examples/1.6.x/server-python/examples/functions/delete-variable.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/functions/delete.md b/docs/examples/1.6.x/server-python/examples/functions/delete.md index 2950ed0235..a34d476744 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/delete.md +++ b/docs/examples/1.6.x/server-python/examples/functions/delete.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/functions/get-deployment-download.md b/docs/examples/1.6.x/server-python/examples/functions/get-deployment-download.md index 490d9521df..90f029aff5 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/get-deployment-download.md +++ b/docs/examples/1.6.x/server-python/examples/functions/get-deployment-download.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/functions/get-deployment.md b/docs/examples/1.6.x/server-python/examples/functions/get-deployment.md index 8846888f0f..0617b0429c 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/get-deployment.md +++ b/docs/examples/1.6.x/server-python/examples/functions/get-deployment.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/functions/get-execution.md b/docs/examples/1.6.x/server-python/examples/functions/get-execution.md index f3dfc0f4ee..0a9a347409 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/get-execution.md +++ b/docs/examples/1.6.x/server-python/examples/functions/get-execution.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/functions/get-variable.md b/docs/examples/1.6.x/server-python/examples/functions/get-variable.md index fd903f3045..174c8b27bf 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/get-variable.md +++ b/docs/examples/1.6.x/server-python/examples/functions/get-variable.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/functions/get.md b/docs/examples/1.6.x/server-python/examples/functions/get.md index cb765e42a1..a463fa6b28 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/get.md +++ b/docs/examples/1.6.x/server-python/examples/functions/get.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/functions/list-deployments.md b/docs/examples/1.6.x/server-python/examples/functions/list-deployments.md index f776345f11..4d8feea927 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/list-deployments.md +++ b/docs/examples/1.6.x/server-python/examples/functions/list-deployments.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/functions/list-executions.md b/docs/examples/1.6.x/server-python/examples/functions/list-executions.md index 0012bafc8f..293bab047a 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/list-executions.md +++ b/docs/examples/1.6.x/server-python/examples/functions/list-executions.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/functions/list-runtimes.md b/docs/examples/1.6.x/server-python/examples/functions/list-runtimes.md index edad1a9178..b6247330d0 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/list-runtimes.md +++ b/docs/examples/1.6.x/server-python/examples/functions/list-runtimes.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/functions/list-specifications.md b/docs/examples/1.6.x/server-python/examples/functions/list-specifications.md index a9c7417654..5e1ec7fd61 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/list-specifications.md +++ b/docs/examples/1.6.x/server-python/examples/functions/list-specifications.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/functions/list-variables.md b/docs/examples/1.6.x/server-python/examples/functions/list-variables.md index 188c17bb6a..ee1a516c5e 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/list-variables.md +++ b/docs/examples/1.6.x/server-python/examples/functions/list-variables.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/functions/list.md b/docs/examples/1.6.x/server-python/examples/functions/list.md index 5b315e18cc..0b5f18d70a 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/list.md +++ b/docs/examples/1.6.x/server-python/examples/functions/list.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/functions/update-deployment-build.md b/docs/examples/1.6.x/server-python/examples/functions/update-deployment-build.md index a8d93b8416..c69cd7c181 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/update-deployment-build.md +++ b/docs/examples/1.6.x/server-python/examples/functions/update-deployment-build.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/functions/update-deployment.md b/docs/examples/1.6.x/server-python/examples/functions/update-deployment.md index 9fce384715..0f4c96e85c 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/update-deployment.md +++ b/docs/examples/1.6.x/server-python/examples/functions/update-deployment.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/functions/update-variable.md b/docs/examples/1.6.x/server-python/examples/functions/update-variable.md index 238fc91eff..bcab3685a2 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/update-variable.md +++ b/docs/examples/1.6.x/server-python/examples/functions/update-variable.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/functions/update.md b/docs/examples/1.6.x/server-python/examples/functions/update.md index 5f2a70baaa..a7282412cc 100644 --- a/docs/examples/1.6.x/server-python/examples/functions/update.md +++ b/docs/examples/1.6.x/server-python/examples/functions/update.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.functions import Functions client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/graphql/mutation.md b/docs/examples/1.6.x/server-python/examples/graphql/mutation.md index 0ec3d3eefc..e05f602719 100644 --- a/docs/examples/1.6.x/server-python/examples/graphql/mutation.md +++ b/docs/examples/1.6.x/server-python/examples/graphql/mutation.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.graphql import Graphql client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/graphql/query.md b/docs/examples/1.6.x/server-python/examples/graphql/query.md index 95709fd694..c8f3c78a1a 100644 --- a/docs/examples/1.6.x/server-python/examples/graphql/query.md +++ b/docs/examples/1.6.x/server-python/examples/graphql/query.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.graphql import Graphql client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/health/get-antivirus.md b/docs/examples/1.6.x/server-python/examples/health/get-antivirus.md index ff93ceac76..7bc0475abf 100644 --- a/docs/examples/1.6.x/server-python/examples/health/get-antivirus.md +++ b/docs/examples/1.6.x/server-python/examples/health/get-antivirus.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.health import Health client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/health/get-cache.md b/docs/examples/1.6.x/server-python/examples/health/get-cache.md index fa2a6daa5c..7e69825ecf 100644 --- a/docs/examples/1.6.x/server-python/examples/health/get-cache.md +++ b/docs/examples/1.6.x/server-python/examples/health/get-cache.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.health import Health client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/health/get-certificate.md b/docs/examples/1.6.x/server-python/examples/health/get-certificate.md index 2a73583361..f6a713e2f3 100644 --- a/docs/examples/1.6.x/server-python/examples/health/get-certificate.md +++ b/docs/examples/1.6.x/server-python/examples/health/get-certificate.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.health import Health client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/health/get-d-b.md b/docs/examples/1.6.x/server-python/examples/health/get-d-b.md index 18e3968246..a23a073ac7 100644 --- a/docs/examples/1.6.x/server-python/examples/health/get-d-b.md +++ b/docs/examples/1.6.x/server-python/examples/health/get-d-b.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.health import Health client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/health/get-failed-jobs.md b/docs/examples/1.6.x/server-python/examples/health/get-failed-jobs.md index ce33c8c9bd..d0fe64f7f3 100644 --- a/docs/examples/1.6.x/server-python/examples/health/get-failed-jobs.md +++ b/docs/examples/1.6.x/server-python/examples/health/get-failed-jobs.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.health import Health from appwrite.enums import client = Client() diff --git a/docs/examples/1.6.x/server-python/examples/health/get-pub-sub.md b/docs/examples/1.6.x/server-python/examples/health/get-pub-sub.md index db66c7f676..109b2889f6 100644 --- a/docs/examples/1.6.x/server-python/examples/health/get-pub-sub.md +++ b/docs/examples/1.6.x/server-python/examples/health/get-pub-sub.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.health import Health client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/health/get-queue-builds.md b/docs/examples/1.6.x/server-python/examples/health/get-queue-builds.md index 9daed589f8..b1d4d62116 100644 --- a/docs/examples/1.6.x/server-python/examples/health/get-queue-builds.md +++ b/docs/examples/1.6.x/server-python/examples/health/get-queue-builds.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.health import Health client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/health/get-queue-certificates.md b/docs/examples/1.6.x/server-python/examples/health/get-queue-certificates.md index a7d35bc9f4..99f52b8eda 100644 --- a/docs/examples/1.6.x/server-python/examples/health/get-queue-certificates.md +++ b/docs/examples/1.6.x/server-python/examples/health/get-queue-certificates.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.health import Health client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/health/get-queue-databases.md b/docs/examples/1.6.x/server-python/examples/health/get-queue-databases.md index 50f8943fa6..7d5e5a0c58 100644 --- a/docs/examples/1.6.x/server-python/examples/health/get-queue-databases.md +++ b/docs/examples/1.6.x/server-python/examples/health/get-queue-databases.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.health import Health client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/health/get-queue-deletes.md b/docs/examples/1.6.x/server-python/examples/health/get-queue-deletes.md index b6e6a4d4a4..d677af582e 100644 --- a/docs/examples/1.6.x/server-python/examples/health/get-queue-deletes.md +++ b/docs/examples/1.6.x/server-python/examples/health/get-queue-deletes.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.health import Health client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/health/get-queue-functions.md b/docs/examples/1.6.x/server-python/examples/health/get-queue-functions.md index 5868b3cd68..3ffc4b8f52 100644 --- a/docs/examples/1.6.x/server-python/examples/health/get-queue-functions.md +++ b/docs/examples/1.6.x/server-python/examples/health/get-queue-functions.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.health import Health client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/health/get-queue-logs.md b/docs/examples/1.6.x/server-python/examples/health/get-queue-logs.md index 254fe23331..0cb6417f4f 100644 --- a/docs/examples/1.6.x/server-python/examples/health/get-queue-logs.md +++ b/docs/examples/1.6.x/server-python/examples/health/get-queue-logs.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.health import Health client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/health/get-queue-mails.md b/docs/examples/1.6.x/server-python/examples/health/get-queue-mails.md index c6ab409c9b..97a501cc1c 100644 --- a/docs/examples/1.6.x/server-python/examples/health/get-queue-mails.md +++ b/docs/examples/1.6.x/server-python/examples/health/get-queue-mails.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.health import Health client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/health/get-queue-messaging.md b/docs/examples/1.6.x/server-python/examples/health/get-queue-messaging.md index 1007913866..ea93eab6dc 100644 --- a/docs/examples/1.6.x/server-python/examples/health/get-queue-messaging.md +++ b/docs/examples/1.6.x/server-python/examples/health/get-queue-messaging.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.health import Health client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/health/get-queue-migrations.md b/docs/examples/1.6.x/server-python/examples/health/get-queue-migrations.md index db59028f37..09e35dfa9d 100644 --- a/docs/examples/1.6.x/server-python/examples/health/get-queue-migrations.md +++ b/docs/examples/1.6.x/server-python/examples/health/get-queue-migrations.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.health import Health client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/health/get-queue-usage-dump.md b/docs/examples/1.6.x/server-python/examples/health/get-queue-usage-dump.md index cc31b4f5af..dabb79ae96 100644 --- a/docs/examples/1.6.x/server-python/examples/health/get-queue-usage-dump.md +++ b/docs/examples/1.6.x/server-python/examples/health/get-queue-usage-dump.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.health import Health client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/health/get-queue-usage.md b/docs/examples/1.6.x/server-python/examples/health/get-queue-usage.md index 67d9e64c14..dbee75fce0 100644 --- a/docs/examples/1.6.x/server-python/examples/health/get-queue-usage.md +++ b/docs/examples/1.6.x/server-python/examples/health/get-queue-usage.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.health import Health client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/health/get-queue-webhooks.md b/docs/examples/1.6.x/server-python/examples/health/get-queue-webhooks.md index 918846738d..1072a20def 100644 --- a/docs/examples/1.6.x/server-python/examples/health/get-queue-webhooks.md +++ b/docs/examples/1.6.x/server-python/examples/health/get-queue-webhooks.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.health import Health client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/health/get-queue.md b/docs/examples/1.6.x/server-python/examples/health/get-queue.md index 61e5a40caa..aafe7c7dd0 100644 --- a/docs/examples/1.6.x/server-python/examples/health/get-queue.md +++ b/docs/examples/1.6.x/server-python/examples/health/get-queue.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.health import Health client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/health/get-storage-local.md b/docs/examples/1.6.x/server-python/examples/health/get-storage-local.md index 276c3058f9..d3b94b2177 100644 --- a/docs/examples/1.6.x/server-python/examples/health/get-storage-local.md +++ b/docs/examples/1.6.x/server-python/examples/health/get-storage-local.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.health import Health client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/health/get-storage.md b/docs/examples/1.6.x/server-python/examples/health/get-storage.md index b2de63b72f..65af2f959d 100644 --- a/docs/examples/1.6.x/server-python/examples/health/get-storage.md +++ b/docs/examples/1.6.x/server-python/examples/health/get-storage.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.health import Health client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/health/get-time.md b/docs/examples/1.6.x/server-python/examples/health/get-time.md index 40893057cb..d63beb988b 100644 --- a/docs/examples/1.6.x/server-python/examples/health/get-time.md +++ b/docs/examples/1.6.x/server-python/examples/health/get-time.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.health import Health client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/health/get.md b/docs/examples/1.6.x/server-python/examples/health/get.md index f41e0e3a9b..f5c494e12d 100644 --- a/docs/examples/1.6.x/server-python/examples/health/get.md +++ b/docs/examples/1.6.x/server-python/examples/health/get.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.health import Health client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/locale/get.md b/docs/examples/1.6.x/server-python/examples/locale/get.md index fc048ddcc9..a44f4974ac 100644 --- a/docs/examples/1.6.x/server-python/examples/locale/get.md +++ b/docs/examples/1.6.x/server-python/examples/locale/get.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.locale import Locale client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/locale/list-codes.md b/docs/examples/1.6.x/server-python/examples/locale/list-codes.md index d516538cb9..12cd12ee70 100644 --- a/docs/examples/1.6.x/server-python/examples/locale/list-codes.md +++ b/docs/examples/1.6.x/server-python/examples/locale/list-codes.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.locale import Locale client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/locale/list-continents.md b/docs/examples/1.6.x/server-python/examples/locale/list-continents.md index f6d8495527..ea4ac5312d 100644 --- a/docs/examples/1.6.x/server-python/examples/locale/list-continents.md +++ b/docs/examples/1.6.x/server-python/examples/locale/list-continents.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.locale import Locale client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/locale/list-countries-e-u.md b/docs/examples/1.6.x/server-python/examples/locale/list-countries-e-u.md index 8bdac2e5e3..7fb6aaa59e 100644 --- a/docs/examples/1.6.x/server-python/examples/locale/list-countries-e-u.md +++ b/docs/examples/1.6.x/server-python/examples/locale/list-countries-e-u.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.locale import Locale client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/locale/list-countries-phones.md b/docs/examples/1.6.x/server-python/examples/locale/list-countries-phones.md index 516d822b59..aafdb3d547 100644 --- a/docs/examples/1.6.x/server-python/examples/locale/list-countries-phones.md +++ b/docs/examples/1.6.x/server-python/examples/locale/list-countries-phones.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.locale import Locale client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/locale/list-countries.md b/docs/examples/1.6.x/server-python/examples/locale/list-countries.md index 8fcbe1aeb9..a2f1ec458d 100644 --- a/docs/examples/1.6.x/server-python/examples/locale/list-countries.md +++ b/docs/examples/1.6.x/server-python/examples/locale/list-countries.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.locale import Locale client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/locale/list-currencies.md b/docs/examples/1.6.x/server-python/examples/locale/list-currencies.md index 4708498efb..39267c663c 100644 --- a/docs/examples/1.6.x/server-python/examples/locale/list-currencies.md +++ b/docs/examples/1.6.x/server-python/examples/locale/list-currencies.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.locale import Locale client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/locale/list-languages.md b/docs/examples/1.6.x/server-python/examples/locale/list-languages.md index 9583cd8b3f..6dec1b9072 100644 --- a/docs/examples/1.6.x/server-python/examples/locale/list-languages.md +++ b/docs/examples/1.6.x/server-python/examples/locale/list-languages.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.locale import Locale client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/create-apns-provider.md b/docs/examples/1.6.x/server-python/examples/messaging/create-apns-provider.md index 022209d1e6..700e909c44 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/create-apns-provider.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/create-apns-provider.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/create-email.md b/docs/examples/1.6.x/server-python/examples/messaging/create-email.md index 38005a3736..92353e22c2 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/create-email.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/create-email.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/create-fcm-provider.md b/docs/examples/1.6.x/server-python/examples/messaging/create-fcm-provider.md index 84c38eae98..d13ba0213d 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/create-fcm-provider.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/create-fcm-provider.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/create-mailgun-provider.md b/docs/examples/1.6.x/server-python/examples/messaging/create-mailgun-provider.md index fa94da96c9..83899716d7 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/create-mailgun-provider.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/create-mailgun-provider.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/create-msg91provider.md b/docs/examples/1.6.x/server-python/examples/messaging/create-msg91provider.md index 0cffc4e491..117c46edca 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/create-msg91provider.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/create-msg91provider.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/create-push.md b/docs/examples/1.6.x/server-python/examples/messaging/create-push.md index ffed825a3d..ff2fb69842 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/create-push.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/create-push.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.6.x/server-python/examples/messaging/create-sendgrid-provider.md index 6e9b812736..5d20cde78d 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/create-sendgrid-provider.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/create-sendgrid-provider.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/create-sms.md b/docs/examples/1.6.x/server-python/examples/messaging/create-sms.md index c3e7fe70bf..c7e66d8c75 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/create-sms.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/create-sms.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/create-smtp-provider.md b/docs/examples/1.6.x/server-python/examples/messaging/create-smtp-provider.md index 24108d251f..85c58236c0 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/create-smtp-provider.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/create-smtp-provider.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/create-subscriber.md b/docs/examples/1.6.x/server-python/examples/messaging/create-subscriber.md index 81b0c5f468..cb8f4f748d 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/create-subscriber.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/create-subscriber.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/create-telesign-provider.md b/docs/examples/1.6.x/server-python/examples/messaging/create-telesign-provider.md index b06033c5c5..b602213b78 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/create-telesign-provider.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/create-telesign-provider.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/create-textmagic-provider.md b/docs/examples/1.6.x/server-python/examples/messaging/create-textmagic-provider.md index 6dc1030cd3..03287e8fac 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/create-textmagic-provider.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/create-textmagic-provider.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/create-topic.md b/docs/examples/1.6.x/server-python/examples/messaging/create-topic.md index b0184b53b4..4dd16da3f0 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/create-topic.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/create-topic.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/create-twilio-provider.md b/docs/examples/1.6.x/server-python/examples/messaging/create-twilio-provider.md index c73e941945..524348f085 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/create-twilio-provider.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/create-twilio-provider.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/create-vonage-provider.md b/docs/examples/1.6.x/server-python/examples/messaging/create-vonage-provider.md index cfee0ad7a4..68416bd8c3 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/create-vonage-provider.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/create-vonage-provider.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/delete-provider.md b/docs/examples/1.6.x/server-python/examples/messaging/delete-provider.md index 4d2bd6d015..2a1840d64d 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/delete-provider.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/delete-provider.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/delete-subscriber.md b/docs/examples/1.6.x/server-python/examples/messaging/delete-subscriber.md index 5d404d1875..94085ef86b 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/delete-subscriber.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/delete-subscriber.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/delete-topic.md b/docs/examples/1.6.x/server-python/examples/messaging/delete-topic.md index b270b2a708..1c2f5635da 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/delete-topic.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/delete-topic.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/delete.md b/docs/examples/1.6.x/server-python/examples/messaging/delete.md index c62c8c0d21..aee928a792 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/delete.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/delete.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/get-message.md b/docs/examples/1.6.x/server-python/examples/messaging/get-message.md index 4b4ef39203..9e32d80623 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/get-message.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/get-message.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/get-provider.md b/docs/examples/1.6.x/server-python/examples/messaging/get-provider.md index fdf94f0304..6bc85f2710 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/get-provider.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/get-provider.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/get-subscriber.md b/docs/examples/1.6.x/server-python/examples/messaging/get-subscriber.md index 7f8284f874..43185d7eb3 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/get-subscriber.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/get-subscriber.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/get-topic.md b/docs/examples/1.6.x/server-python/examples/messaging/get-topic.md index 57c465b883..dea6cbfb6b 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/get-topic.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/get-topic.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/list-message-logs.md b/docs/examples/1.6.x/server-python/examples/messaging/list-message-logs.md index 752e449806..1c2ab0b035 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/list-message-logs.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/list-message-logs.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/list-messages.md b/docs/examples/1.6.x/server-python/examples/messaging/list-messages.md index 7219f0948e..8457f99ad5 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/list-messages.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/list-messages.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/list-provider-logs.md b/docs/examples/1.6.x/server-python/examples/messaging/list-provider-logs.md index 148814c46d..c8544fac1e 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/list-provider-logs.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/list-provider-logs.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/list-providers.md b/docs/examples/1.6.x/server-python/examples/messaging/list-providers.md index 3e896954e4..258e7cd6e1 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/list-providers.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/list-providers.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/list-subscriber-logs.md b/docs/examples/1.6.x/server-python/examples/messaging/list-subscriber-logs.md index 7efaeadedf..d2049bd560 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/list-subscriber-logs.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/list-subscriber-logs.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/list-subscribers.md b/docs/examples/1.6.x/server-python/examples/messaging/list-subscribers.md index fe2442d806..ba9e09d8b9 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/list-subscribers.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/list-subscribers.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/list-targets.md b/docs/examples/1.6.x/server-python/examples/messaging/list-targets.md index 062257154c..b941ccbd31 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/list-targets.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/list-targets.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/list-topic-logs.md b/docs/examples/1.6.x/server-python/examples/messaging/list-topic-logs.md index de72a76a27..57ba7f8d31 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/list-topic-logs.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/list-topic-logs.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/list-topics.md b/docs/examples/1.6.x/server-python/examples/messaging/list-topics.md index 1379708965..cb21567d42 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/list-topics.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/list-topics.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/update-apns-provider.md b/docs/examples/1.6.x/server-python/examples/messaging/update-apns-provider.md index 2bfd3edfc1..3f0205d4ce 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/update-apns-provider.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/update-apns-provider.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/update-email.md b/docs/examples/1.6.x/server-python/examples/messaging/update-email.md index 6cff0ae6d8..b8f9d719c1 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/update-email.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/update-email.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/update-fcm-provider.md b/docs/examples/1.6.x/server-python/examples/messaging/update-fcm-provider.md index 7ca9f381e6..862e579f53 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/update-fcm-provider.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/update-fcm-provider.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/update-mailgun-provider.md b/docs/examples/1.6.x/server-python/examples/messaging/update-mailgun-provider.md index a89338df92..aa1d4e922c 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/update-mailgun-provider.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/update-mailgun-provider.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/update-msg91provider.md b/docs/examples/1.6.x/server-python/examples/messaging/update-msg91provider.md index 4c61950050..2d4efdbd78 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/update-msg91provider.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/update-msg91provider.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/update-push.md b/docs/examples/1.6.x/server-python/examples/messaging/update-push.md index 3c3965c3bd..6114cbd918 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/update-push.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/update-push.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.6.x/server-python/examples/messaging/update-sendgrid-provider.md index 8b67b7a44f..e528bd543d 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/update-sendgrid-provider.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/update-sendgrid-provider.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/update-sms.md b/docs/examples/1.6.x/server-python/examples/messaging/update-sms.md index aadbd9aee8..7cb008736f 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/update-sms.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/update-sms.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/update-smtp-provider.md b/docs/examples/1.6.x/server-python/examples/messaging/update-smtp-provider.md index 74232e983f..2d798d4e0e 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/update-smtp-provider.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/update-smtp-provider.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/update-telesign-provider.md b/docs/examples/1.6.x/server-python/examples/messaging/update-telesign-provider.md index 264928178b..91de1f155c 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/update-telesign-provider.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/update-telesign-provider.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/update-textmagic-provider.md b/docs/examples/1.6.x/server-python/examples/messaging/update-textmagic-provider.md index bbe4a93a50..c3031047c9 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/update-textmagic-provider.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/update-textmagic-provider.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/update-topic.md b/docs/examples/1.6.x/server-python/examples/messaging/update-topic.md index ee4d00411e..160ac26b6b 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/update-topic.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/update-topic.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/update-twilio-provider.md b/docs/examples/1.6.x/server-python/examples/messaging/update-twilio-provider.md index 52eed3bb7b..865fcb5c1d 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/update-twilio-provider.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/update-twilio-provider.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/messaging/update-vonage-provider.md b/docs/examples/1.6.x/server-python/examples/messaging/update-vonage-provider.md index 7cb1594a81..8e01128bf2 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/update-vonage-provider.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/update-vonage-provider.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.messaging import Messaging client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/storage/create-bucket.md b/docs/examples/1.6.x/server-python/examples/storage/create-bucket.md index c6e9e33e02..7e321f12a3 100644 --- a/docs/examples/1.6.x/server-python/examples/storage/create-bucket.md +++ b/docs/examples/1.6.x/server-python/examples/storage/create-bucket.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.storage import Storage client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/storage/create-file.md b/docs/examples/1.6.x/server-python/examples/storage/create-file.md index d275070bac..fa0b117b01 100644 --- a/docs/examples/1.6.x/server-python/examples/storage/create-file.md +++ b/docs/examples/1.6.x/server-python/examples/storage/create-file.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.storage import Storage from appwrite.input_file import InputFile client = Client() diff --git a/docs/examples/1.6.x/server-python/examples/storage/delete-bucket.md b/docs/examples/1.6.x/server-python/examples/storage/delete-bucket.md index 77d72eb915..8cddfb9202 100644 --- a/docs/examples/1.6.x/server-python/examples/storage/delete-bucket.md +++ b/docs/examples/1.6.x/server-python/examples/storage/delete-bucket.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.storage import Storage client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/storage/delete-file.md b/docs/examples/1.6.x/server-python/examples/storage/delete-file.md index 775065dc38..08bba5ca4b 100644 --- a/docs/examples/1.6.x/server-python/examples/storage/delete-file.md +++ b/docs/examples/1.6.x/server-python/examples/storage/delete-file.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.storage import Storage client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/storage/get-bucket.md b/docs/examples/1.6.x/server-python/examples/storage/get-bucket.md index adb78e8b92..79f903f244 100644 --- a/docs/examples/1.6.x/server-python/examples/storage/get-bucket.md +++ b/docs/examples/1.6.x/server-python/examples/storage/get-bucket.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.storage import Storage client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/storage/get-file-download.md b/docs/examples/1.6.x/server-python/examples/storage/get-file-download.md index b419ea0164..1a82b26c70 100644 --- a/docs/examples/1.6.x/server-python/examples/storage/get-file-download.md +++ b/docs/examples/1.6.x/server-python/examples/storage/get-file-download.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.storage import Storage client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/storage/get-file-preview.md b/docs/examples/1.6.x/server-python/examples/storage/get-file-preview.md index 2e3b2acdc6..40f32f1f10 100644 --- a/docs/examples/1.6.x/server-python/examples/storage/get-file-preview.md +++ b/docs/examples/1.6.x/server-python/examples/storage/get-file-preview.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.storage import Storage client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/storage/get-file-view.md b/docs/examples/1.6.x/server-python/examples/storage/get-file-view.md index 9ce04e2a49..3947c76761 100644 --- a/docs/examples/1.6.x/server-python/examples/storage/get-file-view.md +++ b/docs/examples/1.6.x/server-python/examples/storage/get-file-view.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.storage import Storage client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/storage/get-file.md b/docs/examples/1.6.x/server-python/examples/storage/get-file.md index 9f04ef4740..0c2d5e3b2c 100644 --- a/docs/examples/1.6.x/server-python/examples/storage/get-file.md +++ b/docs/examples/1.6.x/server-python/examples/storage/get-file.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.storage import Storage client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/storage/list-buckets.md b/docs/examples/1.6.x/server-python/examples/storage/list-buckets.md index 84eab54286..88540cd5ce 100644 --- a/docs/examples/1.6.x/server-python/examples/storage/list-buckets.md +++ b/docs/examples/1.6.x/server-python/examples/storage/list-buckets.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.storage import Storage client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/storage/list-files.md b/docs/examples/1.6.x/server-python/examples/storage/list-files.md index 8a2aa6d9a3..e26ac2e5f3 100644 --- a/docs/examples/1.6.x/server-python/examples/storage/list-files.md +++ b/docs/examples/1.6.x/server-python/examples/storage/list-files.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.storage import Storage client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/storage/update-bucket.md b/docs/examples/1.6.x/server-python/examples/storage/update-bucket.md index 4eea2a9ccb..61388b0923 100644 --- a/docs/examples/1.6.x/server-python/examples/storage/update-bucket.md +++ b/docs/examples/1.6.x/server-python/examples/storage/update-bucket.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.storage import Storage client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/storage/update-file.md b/docs/examples/1.6.x/server-python/examples/storage/update-file.md index 0137af5849..336e8a0846 100644 --- a/docs/examples/1.6.x/server-python/examples/storage/update-file.md +++ b/docs/examples/1.6.x/server-python/examples/storage/update-file.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.storage import Storage client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/teams/create-membership.md b/docs/examples/1.6.x/server-python/examples/teams/create-membership.md index 484629550d..1af9f252ab 100644 --- a/docs/examples/1.6.x/server-python/examples/teams/create-membership.md +++ b/docs/examples/1.6.x/server-python/examples/teams/create-membership.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.teams import Teams client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/teams/create.md b/docs/examples/1.6.x/server-python/examples/teams/create.md index 544ee3a706..7085d39642 100644 --- a/docs/examples/1.6.x/server-python/examples/teams/create.md +++ b/docs/examples/1.6.x/server-python/examples/teams/create.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.teams import Teams client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/teams/delete-membership.md b/docs/examples/1.6.x/server-python/examples/teams/delete-membership.md index 7f0cbd4ed6..adf065cd3c 100644 --- a/docs/examples/1.6.x/server-python/examples/teams/delete-membership.md +++ b/docs/examples/1.6.x/server-python/examples/teams/delete-membership.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.teams import Teams client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/teams/delete.md b/docs/examples/1.6.x/server-python/examples/teams/delete.md index fc8415238e..762f532dbf 100644 --- a/docs/examples/1.6.x/server-python/examples/teams/delete.md +++ b/docs/examples/1.6.x/server-python/examples/teams/delete.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.teams import Teams client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/teams/get-membership.md b/docs/examples/1.6.x/server-python/examples/teams/get-membership.md index 6075cc70d1..17bacff1d3 100644 --- a/docs/examples/1.6.x/server-python/examples/teams/get-membership.md +++ b/docs/examples/1.6.x/server-python/examples/teams/get-membership.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.teams import Teams client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/teams/get-prefs.md b/docs/examples/1.6.x/server-python/examples/teams/get-prefs.md index d740e69e3b..035777d5cd 100644 --- a/docs/examples/1.6.x/server-python/examples/teams/get-prefs.md +++ b/docs/examples/1.6.x/server-python/examples/teams/get-prefs.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.teams import Teams client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/teams/get.md b/docs/examples/1.6.x/server-python/examples/teams/get.md index 6d44b80ee3..985924e10b 100644 --- a/docs/examples/1.6.x/server-python/examples/teams/get.md +++ b/docs/examples/1.6.x/server-python/examples/teams/get.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.teams import Teams client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/teams/list-memberships.md b/docs/examples/1.6.x/server-python/examples/teams/list-memberships.md index f7a072a6d8..885a4c2822 100644 --- a/docs/examples/1.6.x/server-python/examples/teams/list-memberships.md +++ b/docs/examples/1.6.x/server-python/examples/teams/list-memberships.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.teams import Teams client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/teams/list.md b/docs/examples/1.6.x/server-python/examples/teams/list.md index afb5de1241..c92d4c9c13 100644 --- a/docs/examples/1.6.x/server-python/examples/teams/list.md +++ b/docs/examples/1.6.x/server-python/examples/teams/list.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.teams import Teams client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/teams/update-membership-status.md b/docs/examples/1.6.x/server-python/examples/teams/update-membership-status.md index ee6d211081..ae6e524da5 100644 --- a/docs/examples/1.6.x/server-python/examples/teams/update-membership-status.md +++ b/docs/examples/1.6.x/server-python/examples/teams/update-membership-status.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.teams import Teams client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/teams/update-membership.md b/docs/examples/1.6.x/server-python/examples/teams/update-membership.md index 672615026e..c50f345b88 100644 --- a/docs/examples/1.6.x/server-python/examples/teams/update-membership.md +++ b/docs/examples/1.6.x/server-python/examples/teams/update-membership.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.teams import Teams client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/teams/update-name.md b/docs/examples/1.6.x/server-python/examples/teams/update-name.md index 693654d3d7..d25c8db1f2 100644 --- a/docs/examples/1.6.x/server-python/examples/teams/update-name.md +++ b/docs/examples/1.6.x/server-python/examples/teams/update-name.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.teams import Teams client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/teams/update-prefs.md b/docs/examples/1.6.x/server-python/examples/teams/update-prefs.md index 46616011d6..9eca847a02 100644 --- a/docs/examples/1.6.x/server-python/examples/teams/update-prefs.md +++ b/docs/examples/1.6.x/server-python/examples/teams/update-prefs.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.teams import Teams client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/create-argon2user.md b/docs/examples/1.6.x/server-python/examples/users/create-argon2user.md index 575aa42b30..3d65496573 100644 --- a/docs/examples/1.6.x/server-python/examples/users/create-argon2user.md +++ b/docs/examples/1.6.x/server-python/examples/users/create-argon2user.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/create-bcrypt-user.md b/docs/examples/1.6.x/server-python/examples/users/create-bcrypt-user.md index f6cd2fe591..76532a98f0 100644 --- a/docs/examples/1.6.x/server-python/examples/users/create-bcrypt-user.md +++ b/docs/examples/1.6.x/server-python/examples/users/create-bcrypt-user.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/create-j-w-t.md b/docs/examples/1.6.x/server-python/examples/users/create-j-w-t.md index a758d4e089..2e1fdf632f 100644 --- a/docs/examples/1.6.x/server-python/examples/users/create-j-w-t.md +++ b/docs/examples/1.6.x/server-python/examples/users/create-j-w-t.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/create-m-d5user.md b/docs/examples/1.6.x/server-python/examples/users/create-m-d5user.md index cabf875938..da9d471fe2 100644 --- a/docs/examples/1.6.x/server-python/examples/users/create-m-d5user.md +++ b/docs/examples/1.6.x/server-python/examples/users/create-m-d5user.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.6.x/server-python/examples/users/create-mfa-recovery-codes.md index 606878f1e9..a4477b0406 100644 --- a/docs/examples/1.6.x/server-python/examples/users/create-mfa-recovery-codes.md +++ b/docs/examples/1.6.x/server-python/examples/users/create-mfa-recovery-codes.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/create-p-h-pass-user.md b/docs/examples/1.6.x/server-python/examples/users/create-p-h-pass-user.md index 0d8f9907ac..363be4f92f 100644 --- a/docs/examples/1.6.x/server-python/examples/users/create-p-h-pass-user.md +++ b/docs/examples/1.6.x/server-python/examples/users/create-p-h-pass-user.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/create-s-h-a-user.md b/docs/examples/1.6.x/server-python/examples/users/create-s-h-a-user.md index b0ae799b64..bb78ff7b5c 100644 --- a/docs/examples/1.6.x/server-python/examples/users/create-s-h-a-user.md +++ b/docs/examples/1.6.x/server-python/examples/users/create-s-h-a-user.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/create-scrypt-modified-user.md b/docs/examples/1.6.x/server-python/examples/users/create-scrypt-modified-user.md index d7d17c4de0..1cfbcfc4b4 100644 --- a/docs/examples/1.6.x/server-python/examples/users/create-scrypt-modified-user.md +++ b/docs/examples/1.6.x/server-python/examples/users/create-scrypt-modified-user.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/create-scrypt-user.md b/docs/examples/1.6.x/server-python/examples/users/create-scrypt-user.md index 507fb1f892..2d1e72bf77 100644 --- a/docs/examples/1.6.x/server-python/examples/users/create-scrypt-user.md +++ b/docs/examples/1.6.x/server-python/examples/users/create-scrypt-user.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/create-session.md b/docs/examples/1.6.x/server-python/examples/users/create-session.md index a2ba12a580..bebd46b022 100644 --- a/docs/examples/1.6.x/server-python/examples/users/create-session.md +++ b/docs/examples/1.6.x/server-python/examples/users/create-session.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/create-target.md b/docs/examples/1.6.x/server-python/examples/users/create-target.md index 9ad8364ea3..c11c7ca233 100644 --- a/docs/examples/1.6.x/server-python/examples/users/create-target.md +++ b/docs/examples/1.6.x/server-python/examples/users/create-target.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users from appwrite.enums import MessagingProviderType client = Client() diff --git a/docs/examples/1.6.x/server-python/examples/users/create-token.md b/docs/examples/1.6.x/server-python/examples/users/create-token.md index e2ef2f6969..00a0e78610 100644 --- a/docs/examples/1.6.x/server-python/examples/users/create-token.md +++ b/docs/examples/1.6.x/server-python/examples/users/create-token.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/create.md b/docs/examples/1.6.x/server-python/examples/users/create.md index c3e7fd5558..c8dac9feae 100644 --- a/docs/examples/1.6.x/server-python/examples/users/create.md +++ b/docs/examples/1.6.x/server-python/examples/users/create.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/delete-identity.md b/docs/examples/1.6.x/server-python/examples/users/delete-identity.md index 4c78038d11..85c5b6dee3 100644 --- a/docs/examples/1.6.x/server-python/examples/users/delete-identity.md +++ b/docs/examples/1.6.x/server-python/examples/users/delete-identity.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/delete-mfa-authenticator.md b/docs/examples/1.6.x/server-python/examples/users/delete-mfa-authenticator.md index c7101d119f..b22d391879 100644 --- a/docs/examples/1.6.x/server-python/examples/users/delete-mfa-authenticator.md +++ b/docs/examples/1.6.x/server-python/examples/users/delete-mfa-authenticator.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users from appwrite.enums import AuthenticatorType client = Client() diff --git a/docs/examples/1.6.x/server-python/examples/users/delete-session.md b/docs/examples/1.6.x/server-python/examples/users/delete-session.md index c0fabdb19c..dda5713a9e 100644 --- a/docs/examples/1.6.x/server-python/examples/users/delete-session.md +++ b/docs/examples/1.6.x/server-python/examples/users/delete-session.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/delete-sessions.md b/docs/examples/1.6.x/server-python/examples/users/delete-sessions.md index 328a9eeb2f..268c311dd9 100644 --- a/docs/examples/1.6.x/server-python/examples/users/delete-sessions.md +++ b/docs/examples/1.6.x/server-python/examples/users/delete-sessions.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/delete-target.md b/docs/examples/1.6.x/server-python/examples/users/delete-target.md index 5c2d9df8d8..38cc5a9a23 100644 --- a/docs/examples/1.6.x/server-python/examples/users/delete-target.md +++ b/docs/examples/1.6.x/server-python/examples/users/delete-target.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/delete.md b/docs/examples/1.6.x/server-python/examples/users/delete.md index de8b35b513..090c20f5a9 100644 --- a/docs/examples/1.6.x/server-python/examples/users/delete.md +++ b/docs/examples/1.6.x/server-python/examples/users/delete.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.6.x/server-python/examples/users/get-mfa-recovery-codes.md index b37739ccae..ec9986ce60 100644 --- a/docs/examples/1.6.x/server-python/examples/users/get-mfa-recovery-codes.md +++ b/docs/examples/1.6.x/server-python/examples/users/get-mfa-recovery-codes.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/get-prefs.md b/docs/examples/1.6.x/server-python/examples/users/get-prefs.md index 23109a9696..eb14d3acb9 100644 --- a/docs/examples/1.6.x/server-python/examples/users/get-prefs.md +++ b/docs/examples/1.6.x/server-python/examples/users/get-prefs.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/get-target.md b/docs/examples/1.6.x/server-python/examples/users/get-target.md index d494460c5e..f549f08450 100644 --- a/docs/examples/1.6.x/server-python/examples/users/get-target.md +++ b/docs/examples/1.6.x/server-python/examples/users/get-target.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/get.md b/docs/examples/1.6.x/server-python/examples/users/get.md index d7dda45516..6e018c2b00 100644 --- a/docs/examples/1.6.x/server-python/examples/users/get.md +++ b/docs/examples/1.6.x/server-python/examples/users/get.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/list-identities.md b/docs/examples/1.6.x/server-python/examples/users/list-identities.md index 7764d74268..b10c320cdd 100644 --- a/docs/examples/1.6.x/server-python/examples/users/list-identities.md +++ b/docs/examples/1.6.x/server-python/examples/users/list-identities.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/list-logs.md b/docs/examples/1.6.x/server-python/examples/users/list-logs.md index d1c6b0abb7..10d8ae0d03 100644 --- a/docs/examples/1.6.x/server-python/examples/users/list-logs.md +++ b/docs/examples/1.6.x/server-python/examples/users/list-logs.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/list-memberships.md b/docs/examples/1.6.x/server-python/examples/users/list-memberships.md index 27db71f0c7..fbb3b4c05e 100644 --- a/docs/examples/1.6.x/server-python/examples/users/list-memberships.md +++ b/docs/examples/1.6.x/server-python/examples/users/list-memberships.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/list-mfa-factors.md b/docs/examples/1.6.x/server-python/examples/users/list-mfa-factors.md index 39aed0c173..1f40b1f538 100644 --- a/docs/examples/1.6.x/server-python/examples/users/list-mfa-factors.md +++ b/docs/examples/1.6.x/server-python/examples/users/list-mfa-factors.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/list-sessions.md b/docs/examples/1.6.x/server-python/examples/users/list-sessions.md index fd091b9683..a9eead0d78 100644 --- a/docs/examples/1.6.x/server-python/examples/users/list-sessions.md +++ b/docs/examples/1.6.x/server-python/examples/users/list-sessions.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/list-targets.md b/docs/examples/1.6.x/server-python/examples/users/list-targets.md index b5b67b96e3..47666467ff 100644 --- a/docs/examples/1.6.x/server-python/examples/users/list-targets.md +++ b/docs/examples/1.6.x/server-python/examples/users/list-targets.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/list.md b/docs/examples/1.6.x/server-python/examples/users/list.md index b191f8ae73..4b09ca5f85 100644 --- a/docs/examples/1.6.x/server-python/examples/users/list.md +++ b/docs/examples/1.6.x/server-python/examples/users/list.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/update-email-verification.md b/docs/examples/1.6.x/server-python/examples/users/update-email-verification.md index 72ddf7a9bd..4623bc34b1 100644 --- a/docs/examples/1.6.x/server-python/examples/users/update-email-verification.md +++ b/docs/examples/1.6.x/server-python/examples/users/update-email-verification.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/update-email.md b/docs/examples/1.6.x/server-python/examples/users/update-email.md index c977d95250..083715bbfa 100644 --- a/docs/examples/1.6.x/server-python/examples/users/update-email.md +++ b/docs/examples/1.6.x/server-python/examples/users/update-email.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/update-labels.md b/docs/examples/1.6.x/server-python/examples/users/update-labels.md index 04c3999305..24c5b27034 100644 --- a/docs/examples/1.6.x/server-python/examples/users/update-labels.md +++ b/docs/examples/1.6.x/server-python/examples/users/update-labels.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.6.x/server-python/examples/users/update-mfa-recovery-codes.md index ca3b96aa8b..d0e4da4e4a 100644 --- a/docs/examples/1.6.x/server-python/examples/users/update-mfa-recovery-codes.md +++ b/docs/examples/1.6.x/server-python/examples/users/update-mfa-recovery-codes.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/update-mfa.md b/docs/examples/1.6.x/server-python/examples/users/update-mfa.md index e145f9b259..efd6730a26 100644 --- a/docs/examples/1.6.x/server-python/examples/users/update-mfa.md +++ b/docs/examples/1.6.x/server-python/examples/users/update-mfa.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/update-name.md b/docs/examples/1.6.x/server-python/examples/users/update-name.md index d546b95297..6014ef51a5 100644 --- a/docs/examples/1.6.x/server-python/examples/users/update-name.md +++ b/docs/examples/1.6.x/server-python/examples/users/update-name.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/update-password.md b/docs/examples/1.6.x/server-python/examples/users/update-password.md index 0c7e7bf030..90ac15f565 100644 --- a/docs/examples/1.6.x/server-python/examples/users/update-password.md +++ b/docs/examples/1.6.x/server-python/examples/users/update-password.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/update-phone-verification.md b/docs/examples/1.6.x/server-python/examples/users/update-phone-verification.md index b13c4fba33..a62e6a8ceb 100644 --- a/docs/examples/1.6.x/server-python/examples/users/update-phone-verification.md +++ b/docs/examples/1.6.x/server-python/examples/users/update-phone-verification.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/update-phone.md b/docs/examples/1.6.x/server-python/examples/users/update-phone.md index ecb01728e8..f522730003 100644 --- a/docs/examples/1.6.x/server-python/examples/users/update-phone.md +++ b/docs/examples/1.6.x/server-python/examples/users/update-phone.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/update-prefs.md b/docs/examples/1.6.x/server-python/examples/users/update-prefs.md index ca6999c950..64d9df39f8 100644 --- a/docs/examples/1.6.x/server-python/examples/users/update-prefs.md +++ b/docs/examples/1.6.x/server-python/examples/users/update-prefs.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/update-status.md b/docs/examples/1.6.x/server-python/examples/users/update-status.md index ebec495c33..8943ef59f5 100644 --- a/docs/examples/1.6.x/server-python/examples/users/update-status.md +++ b/docs/examples/1.6.x/server-python/examples/users/update-status.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-python/examples/users/update-target.md b/docs/examples/1.6.x/server-python/examples/users/update-target.md index f9bdfb43ef..89513850b0 100644 --- a/docs/examples/1.6.x/server-python/examples/users/update-target.md +++ b/docs/examples/1.6.x/server-python/examples/users/update-target.md @@ -1,4 +1,5 @@ from appwrite.client import Client +from appwrite.services.users import Users client = Client() client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint diff --git a/docs/examples/1.6.x/server-rest/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/server-rest/examples/databases/update-string-attribute.md index 197ea2767d..71a5302e1a 100644 --- a/docs/examples/1.6.x/server-rest/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-rest/examples/databases/update-string-attribute.md @@ -8,6 +8,6 @@ X-Appwrite-Key: { "required": false, "default": "", - "size": 0, + "size": 1, "newKey": } diff --git a/docs/examples/1.6.x/server-ruby/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/server-ruby/examples/databases/update-string-attribute.md index 3b3c5eb644..5e4ac573dc 100644 --- a/docs/examples/1.6.x/server-ruby/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-ruby/examples/databases/update-string-attribute.md @@ -15,6 +15,6 @@ result = databases.update_string_attribute( key: '', required: false, default: '', - size: null, # optional + size: 1, # optional new_key: '' # optional ) diff --git a/docs/examples/1.6.x/server-swift/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/server-swift/examples/databases/update-string-attribute.md index 5fafd5e72e..d3129dcce2 100644 --- a/docs/examples/1.6.x/server-swift/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-swift/examples/databases/update-string-attribute.md @@ -13,7 +13,7 @@ let attributeString = try await databases.updateStringAttribute( key: "", required: false, default: "", - size: 0, // optional + size: 1, // optional newKey: "" // optional ) From 1e62e26ef1673e8855d0aae7baf7d811e6a431f3 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 12 Jan 2025 12:42:52 +0530 Subject: [PATCH 002/101] add: `userType` and `keyName` to Audits. --- app/controllers/shared/api.php | 17 +++++++--- app/init.php | 40 ++++++++++++++++++++++++ src/Appwrite/Platform/Workers/Audits.php | 2 ++ 3 files changed, 54 insertions(+), 5 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 182151a6c3..33adb428cb 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -659,6 +659,7 @@ App::shutdown() ->inject('response') ->inject('project') ->inject('user') + ->inject('userType') ->inject('queueForEvents') ->inject('queueForAudits') ->inject('queueForUsage') @@ -670,7 +671,7 @@ App::shutdown() ->inject('queueForWebhooks') ->inject('queueForRealtime') ->inject('dbForProject') - ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $queueForEvents, Audit $queueForAudits, Usage $queueForUsage, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, Messaging $queueForMessaging, Func $queueForFunctions, Event $queueForWebhooks, Realtime $queueForRealtime, Database $dbForProject) use ($parseLabel) { + ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Document $userType, Event $queueForEvents, Audit $queueForAudits, Usage $queueForUsage, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, Messaging $queueForMessaging, Func $queueForFunctions, Event $queueForWebhooks, Realtime $queueForRealtime, Database $dbForProject) use ($parseLabel) { $responsePayload = $response->getPayload(); @@ -708,11 +709,17 @@ App::shutdown() } } - if (!$user->isEmpty()) { - $queueForAudits->setUser($user); - } + $localUserInstance = clone $user; + $localUserInstance->setAttributes([ + 'keyName' => $userType->getAttribute('key'), + 'userType' => $userType->getAttribute('type', 'user'), + ]); - if (!empty($queueForAudits->getResource()) && !empty($queueForAudits->getUser()->getId())) { + // even if the user is empty, + // set the available info when using API Key. + $queueForAudits->setUser($localUserInstance); + + if (!empty($queueForAudits->getResource())) { /** * audits.payload is switched to default true * in order to auto audit payload for all endpoints diff --git a/app/init.php b/app/init.php index 0a241813b5..43a5526f9e 100644 --- a/app/init.php +++ b/app/init.php @@ -1349,6 +1349,46 @@ App::setResource('project', function ($dbForPlatform, $request, $console) { return $project; }, ['dbForPlatform', 'request', 'console']); +App::setResource('userType', function ($request, $project, $user) { + /** @var Appwrite\Utopia\Request $request */ + /** @var Utopia\Database\Document $project */ + /** @var Utopia\Database\Document $user */ + + $userType = new Document(); + $apiKey = $request->getHeader('x-appwrite-key', ''); + + // Case 1: User exists, no API key + if (!$user->isEmpty() && empty($apiKey)) { + $userType + ->setAttribute('key', null) + ->setAttribute('type', 'user'); + return $userType; + } + + // Case 2: API key exists, user is empty + if (!empty($apiKey) && $user->isEmpty()) { + $userType->setAttribute('type', 'app'); + + // covers both legacy and new format. + $keyType = \str_contains($apiKey, '_') + ? \explode('_', $apiKey, 2)[0] + : API_KEY_STANDARD; + + switch ($keyType) { + case API_KEY_STANDARD: + $key = $project->find('secret', $apiKey, 'keys'); + $userType->setAttribute('key', $key ? $key->getAttribute('name', 'UNKNOWN') : 'UNKNOWN'); + break; + + case API_KEY_DYNAMIC: + $userType->setAttribute('key', 'dynamic'); + break; + } + } + + return $userType; +}, ['request', 'project', 'user']); + App::setResource('session', function (Document $user) { if ($user->isEmpty()) { return; diff --git a/src/Appwrite/Platform/Workers/Audits.php b/src/Appwrite/Platform/Workers/Audits.php index 86ca59d3fd..f2825abddf 100644 --- a/src/Appwrite/Platform/Workers/Audits.php +++ b/src/Appwrite/Platform/Workers/Audits.php @@ -76,6 +76,8 @@ class Audits extends Action 'userEmail' => $userEmail, 'mode' => $mode, 'data' => $auditPayload, + 'keyName' => $user->getAttribute('keyName'), + 'userType' => $user->getAttribute('userType'), ] ); } From e237f7c05d8994863bc06a35010628a9ed97c30b Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 12 Jan 2025 16:58:38 +0530 Subject: [PATCH 003/101] address comments: make things less complex. --- app/controllers/shared/api.php | 42 ++++++++++++++---------- app/init.php | 40 ---------------------- src/Appwrite/Auth/Auth.php | 6 ++++ src/Appwrite/Platform/Workers/Audits.php | 2 -- 4 files changed, 31 insertions(+), 59 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 33adb428cb..dfb491594d 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -185,13 +185,14 @@ App::init() ->inject('request') ->inject('dbForPlatform') ->inject('dbForProject') + ->inject('queueForAudits') ->inject('project') ->inject('user') ->inject('session') ->inject('servers') ->inject('mode') ->inject('team') - ->action(function (App $utopia, Request $request, Database $dbForPlatform, Database $dbForProject, Document $project, Document $user, ?Document $session, array $servers, string $mode, Document $team) { + ->action(function (App $utopia, Request $request, Database $dbForPlatform, Database $dbForProject, Audit $queueForAudits, Document $project, Document $user, ?Document $session, array $servers, string $mode, Document $team) { $route = $utopia->getRoute(); if ($project->isEmpty()) { @@ -243,9 +244,10 @@ App::init() $user = new Document([ '$id' => '', 'status' => true, + 'type' => Auth::AUDIT_TYPE_APP, 'email' => 'app.' . $project->getId() . '@service.' . $request->getHostname(), 'password' => '', - 'name' => $project->getAttribute('name', 'Untitled'), + 'name' => 'Dynamic Key', ]); $role = Auth::USER_ROLE_APPS; @@ -253,6 +255,9 @@ App::init() Authorization::setRole(Auth::USER_ROLE_APPS); Authorization::setDefaultStatus(false); // Cancel security segmentation for API keys. + + // dynamic api key user + $queueForAudits->setUser($user); } } elseif ($keyType === API_KEY_STANDARD) { // No underline means no prefix. Backwards compatibility. @@ -264,9 +269,10 @@ App::init() $user = new Document([ '$id' => '', 'status' => true, + 'type' => Auth::AUDIT_TYPE_APP, 'email' => 'app.' . $project->getId() . '@service.' . $request->getHostname(), 'password' => '', - 'name' => $project->getAttribute('name', 'Untitled'), + 'name' => $key->getAttribute('name', 'UNKNOWN'), ]); $role = Auth::USER_ROLE_APPS; @@ -301,6 +307,8 @@ App::init() $dbForPlatform->purgeCachedDocument('projects', $project->getId()); } } + + $queueForAudits->setUser($user); } } } @@ -508,8 +516,14 @@ App::init() ->setIP($request->getIP()) ->setHostname($request->getHostname()) ->setEvent($route->getLabel('audits.event', '')) - ->setProject($project) - ->setUser($user); + ->setProject($project); + + // check first, + // as api key user might already exists + if (!$user->isEmpty()) { + $user->setAttribute('type', Auth::AUDIT_TYPE_USER); + $queueForAudits->setUser($user); + } $queueForDeletes->setProject($project); $queueForDatabase->setProject($project); @@ -659,7 +673,6 @@ App::shutdown() ->inject('response') ->inject('project') ->inject('user') - ->inject('userType') ->inject('queueForEvents') ->inject('queueForAudits') ->inject('queueForUsage') @@ -671,7 +684,7 @@ App::shutdown() ->inject('queueForWebhooks') ->inject('queueForRealtime') ->inject('dbForProject') - ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Document $userType, Event $queueForEvents, Audit $queueForAudits, Usage $queueForUsage, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, Messaging $queueForMessaging, Func $queueForFunctions, Event $queueForWebhooks, Realtime $queueForRealtime, Database $dbForProject) use ($parseLabel) { + ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $queueForEvents, Audit $queueForAudits, Usage $queueForUsage, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, Messaging $queueForMessaging, Func $queueForFunctions, Event $queueForWebhooks, Realtime $queueForRealtime, Database $dbForProject) use ($parseLabel) { $responsePayload = $response->getPayload(); @@ -709,17 +722,12 @@ App::shutdown() } } - $localUserInstance = clone $user; - $localUserInstance->setAttributes([ - 'keyName' => $userType->getAttribute('key'), - 'userType' => $userType->getAttribute('type', 'user'), - ]); + if (!$user->isEmpty()) { + $user->setAttribute('type', Auth::AUDIT_TYPE_USER); + $queueForAudits->setUser($user); + } - // even if the user is empty, - // set the available info when using API Key. - $queueForAudits->setUser($localUserInstance); - - if (!empty($queueForAudits->getResource())) { + if (!empty($queueForAudits->getResource()) && !$queueForAudits->getUser()->isEmpty()) { /** * audits.payload is switched to default true * in order to auto audit payload for all endpoints diff --git a/app/init.php b/app/init.php index 43a5526f9e..0a241813b5 100644 --- a/app/init.php +++ b/app/init.php @@ -1349,46 +1349,6 @@ App::setResource('project', function ($dbForPlatform, $request, $console) { return $project; }, ['dbForPlatform', 'request', 'console']); -App::setResource('userType', function ($request, $project, $user) { - /** @var Appwrite\Utopia\Request $request */ - /** @var Utopia\Database\Document $project */ - /** @var Utopia\Database\Document $user */ - - $userType = new Document(); - $apiKey = $request->getHeader('x-appwrite-key', ''); - - // Case 1: User exists, no API key - if (!$user->isEmpty() && empty($apiKey)) { - $userType - ->setAttribute('key', null) - ->setAttribute('type', 'user'); - return $userType; - } - - // Case 2: API key exists, user is empty - if (!empty($apiKey) && $user->isEmpty()) { - $userType->setAttribute('type', 'app'); - - // covers both legacy and new format. - $keyType = \str_contains($apiKey, '_') - ? \explode('_', $apiKey, 2)[0] - : API_KEY_STANDARD; - - switch ($keyType) { - case API_KEY_STANDARD: - $key = $project->find('secret', $apiKey, 'keys'); - $userType->setAttribute('key', $key ? $key->getAttribute('name', 'UNKNOWN') : 'UNKNOWN'); - break; - - case API_KEY_DYNAMIC: - $userType->setAttribute('key', 'dynamic'); - break; - } - } - - return $userType; -}, ['request', 'project', 'user']); - App::setResource('session', function (Document $user) { if ($user->isEmpty()) { return; diff --git a/src/Appwrite/Auth/Auth.php b/src/Appwrite/Auth/Auth.php index 1e8109622e..a2bb2dea1c 100644 --- a/src/Appwrite/Auth/Auth.php +++ b/src/Appwrite/Auth/Auth.php @@ -43,6 +43,12 @@ class Auth public const USER_ROLE_APPS = 'apps'; public const USER_ROLE_SYSTEM = 'system'; + /** + * Audit User Types. + */ + public const AUDIT_TYPE_APP = 'app'; + public const AUDIT_TYPE_USER = 'user'; + /** * Token Types. */ diff --git a/src/Appwrite/Platform/Workers/Audits.php b/src/Appwrite/Platform/Workers/Audits.php index f2825abddf..86ca59d3fd 100644 --- a/src/Appwrite/Platform/Workers/Audits.php +++ b/src/Appwrite/Platform/Workers/Audits.php @@ -76,8 +76,6 @@ class Audits extends Action 'userEmail' => $userEmail, 'mode' => $mode, 'data' => $auditPayload, - 'keyName' => $user->getAttribute('keyName'), - 'userType' => $user->getAttribute('userType'), ] ); } From f4f0b3f0fe69f035c34381fc9d8c414212f896a9 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 12 Jan 2025 17:06:27 +0530 Subject: [PATCH 004/101] add: `userType`to audit data. --- src/Appwrite/Platform/Workers/Audits.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Appwrite/Platform/Workers/Audits.php b/src/Appwrite/Platform/Workers/Audits.php index 86ca59d3fd..2c1cb488ad 100644 --- a/src/Appwrite/Platform/Workers/Audits.php +++ b/src/Appwrite/Platform/Workers/Audits.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Workers; +use Appwrite\Auth\Auth; use Exception; use Throwable; use Utopia\Audit\Audit; @@ -60,6 +61,7 @@ class Audits extends Action $userName = $user->getAttribute('name', ''); $userEmail = $user->getAttribute('email', ''); + $userType = $user->getAttribute('type', Auth::AUDIT_TYPE_USER); $audit = new Audit($dbForProject); $audit->log( @@ -74,6 +76,7 @@ class Audits extends Action 'userId' => $user->getId(), 'userName' => $userName, 'userEmail' => $userEmail, + 'userType' => $userType, 'mode' => $mode, 'data' => $auditPayload, ] From 377627118f9fc475f8de20aa3a102559cf43062f Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 12 Jan 2025 18:27:58 +0530 Subject: [PATCH 005/101] address comments: change type names. --- app/controllers/shared/api.php | 8 ++++---- src/Appwrite/Auth/Auth.php | 6 +++--- src/Appwrite/Platform/Workers/Audits.php | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index dfb491594d..d27794d9b8 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -244,7 +244,7 @@ App::init() $user = new Document([ '$id' => '', 'status' => true, - 'type' => Auth::AUDIT_TYPE_APP, + 'type' => Auth::ACTIVITY_TYPE_APP, 'email' => 'app.' . $project->getId() . '@service.' . $request->getHostname(), 'password' => '', 'name' => 'Dynamic Key', @@ -269,7 +269,7 @@ App::init() $user = new Document([ '$id' => '', 'status' => true, - 'type' => Auth::AUDIT_TYPE_APP, + 'type' => Auth::ACTIVITY_TYPE_APP, 'email' => 'app.' . $project->getId() . '@service.' . $request->getHostname(), 'password' => '', 'name' => $key->getAttribute('name', 'UNKNOWN'), @@ -521,7 +521,7 @@ App::init() // check first, // as api key user might already exists if (!$user->isEmpty()) { - $user->setAttribute('type', Auth::AUDIT_TYPE_USER); + $user->setAttribute('type', Auth::ACTIVITY_TYPE_USER); $queueForAudits->setUser($user); } @@ -723,7 +723,7 @@ App::shutdown() } if (!$user->isEmpty()) { - $user->setAttribute('type', Auth::AUDIT_TYPE_USER); + $user->setAttribute('type', Auth::ACTIVITY_TYPE_USER); $queueForAudits->setUser($user); } diff --git a/src/Appwrite/Auth/Auth.php b/src/Appwrite/Auth/Auth.php index a2bb2dea1c..c8ce06a323 100644 --- a/src/Appwrite/Auth/Auth.php +++ b/src/Appwrite/Auth/Auth.php @@ -44,10 +44,10 @@ class Auth public const USER_ROLE_SYSTEM = 'system'; /** - * Audit User Types. + * Activity associated with user or the app. */ - public const AUDIT_TYPE_APP = 'app'; - public const AUDIT_TYPE_USER = 'user'; + public const ACTIVITY_TYPE_APP = 'app'; + public const ACTIVITY_TYPE_USER = 'user'; /** * Token Types. diff --git a/src/Appwrite/Platform/Workers/Audits.php b/src/Appwrite/Platform/Workers/Audits.php index 2c1cb488ad..c0bcab1c3a 100644 --- a/src/Appwrite/Platform/Workers/Audits.php +++ b/src/Appwrite/Platform/Workers/Audits.php @@ -61,7 +61,7 @@ class Audits extends Action $userName = $user->getAttribute('name', ''); $userEmail = $user->getAttribute('email', ''); - $userType = $user->getAttribute('type', Auth::AUDIT_TYPE_USER); + $userType = $user->getAttribute('type', Auth::ACTIVITY_TYPE_USER); $audit = new Audit($dbForProject); $audit->log( From b5449a8ca6f547054972af93178a7c41e497dd37 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 13 Jan 2025 18:25:48 +0000 Subject: [PATCH 006/101] fix: resend invitation --- app/controllers/api/teams.php | 62 ++++++++++++-------- tests/e2e/Services/Teams/TeamsBaseClient.php | 10 +++- tests/e2e/Services/Teams/TeamsBaseServer.php | 10 +++- 3 files changed, 52 insertions(+), 30 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 461e90da58..0ab166e28d 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -546,33 +546,45 @@ App::post('/v1/teams/:teamId/memberships') throw new Exception(Exception::USER_UNAUTHORIZED, 'User is not allowed to send invitations for this team'); } - $secret = Auth::tokenGenerator(); - - $membershipId = ID::unique(); - $membership = new Document([ - '$id' => $membershipId, - '$permissions' => [ - Permission::read(Role::any()), - Permission::update(Role::user($invitee->getId())), - Permission::update(Role::team($team->getId(), 'owner')), - Permission::delete(Role::user($invitee->getId())), - Permission::delete(Role::team($team->getId(), 'owner')), - ], - 'userId' => $invitee->getId(), - 'userInternalId' => $invitee->getInternalId(), - 'teamId' => $team->getId(), - 'teamInternalId' => $team->getInternalId(), - 'roles' => $roles, - 'invited' => DateTime::now(), - 'joined' => ($isPrivilegedUser || $isAppUser) ? DateTime::now() : null, - 'confirm' => ($isPrivilegedUser || $isAppUser), - 'secret' => Auth::hash($secret), - 'search' => implode(' ', [$membershipId, $invitee->getId()]) + $membership = $dbForProject->findOne('memberships', [ + Query::equal('userId', [$invitee->getId()]), + Query::equal('teamId', [$team->getId()]), ]); + $createdMembership = false; + + if ($membership->isEmpty()) { + $secret = Auth::tokenGenerator(); + + $membershipId = ID::unique(); + $membership = new Document([ + '$id' => $membershipId, + '$permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::user($invitee->getId())), + Permission::update(Role::team($team->getId(), 'owner')), + Permission::delete(Role::user($invitee->getId())), + Permission::delete(Role::team($team->getId(), 'owner')), + ], + 'userId' => $invitee->getId(), + 'userInternalId' => $invitee->getInternalId(), + 'teamId' => $team->getId(), + 'teamInternalId' => $team->getInternalId(), + 'roles' => $roles, + 'invited' => DateTime::now(), + 'joined' => ($isPrivilegedUser || $isAppUser) ? DateTime::now() : null, + 'confirm' => ($isPrivilegedUser || $isAppUser), + 'secret' => Auth::hash($secret), + 'search' => implode(' ', [$membershipId, $invitee->getId()]) + ]); + + $createdMembership = true; + } if ($isPrivilegedUser || $isAppUser) { // Allow admin to create membership try { - $membership = Authorization::skip(fn () => $dbForProject->createDocument('memberships', $membership)); + $membership = $createdMembership ? + Authorization::skip(fn () => $dbForProject->createDocument('memberships', $membership)) : + Authorization::skip(fn () => $dbForProject->updateDocument('memberships', $membership->getId(), $membership)); } catch (Duplicate $th) { throw new Exception(Exception::TEAM_INVITE_ALREADY_EXISTS); } @@ -582,7 +594,9 @@ App::post('/v1/teams/:teamId/memberships') $dbForProject->purgeCachedDocument('users', $invitee->getId()); } else { try { - $membership = $dbForProject->createDocument('memberships', $membership); + $membership = $createdMembership ? + $dbForProject->createDocument('memberships', $membership) : + $dbForProject->updateDocument('memberships', $membership->getId(), $membership); } catch (Duplicate $th) { throw new Exception(Exception::TEAM_INVITE_ALREADY_EXISTS); } diff --git a/tests/e2e/Services/Teams/TeamsBaseClient.php b/tests/e2e/Services/Teams/TeamsBaseClient.php index ca6082f6d0..cf011d2bf7 100644 --- a/tests/e2e/Services/Teams/TeamsBaseClient.php +++ b/tests/e2e/Services/Teams/TeamsBaseClient.php @@ -292,9 +292,9 @@ trait TeamsBaseClient $this->assertEquals('Invitation to ' . $teamName . ' Team at ' . $this->getProject()['name'], $lastEmail['subject']); /** - * Test for FAILURE + * Test for resend + * SUCCESS */ - $response = $this->client->call(Client::METHOD_POST, '/teams/' . $teamUid . '/memberships', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -305,7 +305,11 @@ trait TeamsBaseClient 'url' => 'http://localhost:5000/join-us#title' ]); - $this->assertEquals(409, $response['headers']['status-code']); + $this->assertEquals(201, $response['headers']['status-code']); + + /** + * Test for FAILURE + */ $response = $this->client->call(Client::METHOD_POST, '/teams/' . $teamUid . '/memberships', array_merge([ 'content-type' => 'application/json', diff --git a/tests/e2e/Services/Teams/TeamsBaseServer.php b/tests/e2e/Services/Teams/TeamsBaseServer.php index 6a1d05e9d4..226536c604 100644 --- a/tests/e2e/Services/Teams/TeamsBaseServer.php +++ b/tests/e2e/Services/Teams/TeamsBaseServer.php @@ -186,9 +186,9 @@ trait TeamsBaseServer // $this->assertContains('team:'.$teamUid.'/editor', $response['body']['roles']); /** - * Test for FAILURE + * Test for resend + * SUCCESS */ - $response = $this->client->call(Client::METHOD_POST, '/teams/' . $teamUid . '/memberships', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -199,7 +199,11 @@ trait TeamsBaseServer 'url' => 'http://localhost:5000/join-us#title' ]); - $this->assertEquals(409, $response['headers']['status-code']); + $this->assertEquals(201, $response['headers']['status-code']); + + /** + * Test for FAILURE + */ $response = $this->client->call(Client::METHOD_POST, '/teams/' . $teamUid . '/memberships', array_merge([ 'content-type' => 'application/json', From e6cb17a6cc99ad73bcc65c6e18aad944d66b6b35 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 13 Jan 2025 18:51:23 +0000 Subject: [PATCH 007/101] chore: remove TEAM_INVITE_ALREADY_EXISTS --- app/config/errors.php | 5 ----- app/controllers/api/teams.php | 26 ++++++++++++-------------- src/Appwrite/Extend/Exception.php | 1 - 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/app/config/errors.php b/app/config/errors.php index f09d1596eb..1c32accdb4 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -349,11 +349,6 @@ return [ 'description' => 'Team with the requested ID could not be found.', 'code' => 404, ], - Exception::TEAM_INVITE_ALREADY_EXISTS => [ - 'name' => Exception::TEAM_INVITE_ALREADY_EXISTS, - 'description' => 'User has already been invited or is already a member of this team', - 'code' => 409, - ], Exception::TEAM_INVITE_NOT_FOUND => [ 'name' => Exception::TEAM_INVITE_NOT_FOUND, 'description' => 'The requested team invitation could not be found.', diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 0ab166e28d..829d452cae 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -581,24 +581,22 @@ App::post('/v1/teams/:teamId/memberships') } if ($isPrivilegedUser || $isAppUser) { // Allow admin to create membership - try { - $membership = $createdMembership ? - Authorization::skip(fn () => $dbForProject->createDocument('memberships', $membership)) : - Authorization::skip(fn () => $dbForProject->updateDocument('memberships', $membership->getId(), $membership)); - } catch (Duplicate $th) { - throw new Exception(Exception::TEAM_INVITE_ALREADY_EXISTS); - } + $membership = $createdMembership ? + Authorization::skip(fn () => $dbForProject->createDocument('memberships', $membership)) : + Authorization::skip(fn () => $dbForProject->updateDocument('memberships', $membership->getId(), $membership)); - Authorization::skip(fn () => $dbForProject->increaseDocumentAttribute('teams', $team->getId(), 'total', 1)); + if ($createdMembership) { + Authorization::skip(fn () => $dbForProject->increaseDocumentAttribute('teams', $team->getId(), 'total', 1)); + } $dbForProject->purgeCachedDocument('users', $invitee->getId()); } else { - try { - $membership = $createdMembership ? - $dbForProject->createDocument('memberships', $membership) : - $dbForProject->updateDocument('memberships', $membership->getId(), $membership); - } catch (Duplicate $th) { - throw new Exception(Exception::TEAM_INVITE_ALREADY_EXISTS); + $membership = $createdMembership ? + $dbForProject->createDocument('memberships', $membership) : + $dbForProject->updateDocument('memberships', $membership->getId(), $membership); + + if ($createdMembership) { + $dbForProject->increaseDocumentAttribute('teams', $team->getId(), 'total', 1); } $url = Template::parseURL($url); diff --git a/src/Appwrite/Extend/Exception.php b/src/Appwrite/Extend/Exception.php index 54bf6d96ea..4a6959f332 100644 --- a/src/Appwrite/Extend/Exception.php +++ b/src/Appwrite/Extend/Exception.php @@ -112,7 +112,6 @@ class Exception extends \Exception /** Teams */ public const TEAM_NOT_FOUND = 'team_not_found'; - public const TEAM_INVITE_ALREADY_EXISTS = 'team_invite_already_exists'; public const TEAM_INVITE_NOT_FOUND = 'team_invite_not_found'; public const TEAM_INVALID_SECRET = 'team_invalid_secret'; public const TEAM_MEMBERSHIP_MISMATCH = 'team_membership_mismatch'; From e9479db0fa6dd717642b463d8e9aeabb01351312 Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 14 Jan 2025 13:18:11 +0530 Subject: [PATCH 008/101] add: anonymous user type to audit/activity. --- app/controllers/shared/api.php | 20 ++++++++++++++++++++ src/Appwrite/Auth/Auth.php | 1 + 2 files changed, 21 insertions(+) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index d27794d9b8..6a0e4a34fa 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -308,6 +308,7 @@ App::init() } } + // standard api key user $queueForAudits->setUser($user); } } @@ -724,6 +725,25 @@ App::shutdown() if (!$user->isEmpty()) { $user->setAttribute('type', Auth::ACTIVITY_TYPE_USER); + $queueForAudits->setUser($user); + } elseif ($queueForAudits->getUser() === null || $queueForAudits->getUser()->isEmpty()) { + /** + * User in the request is empty, and no user was set for auditing previously. + * This indicates: + * - No API Key was used. + * - No active session exists. + * + * Therefore, we consider this an anonymous request and create a relevant user. + */ + $user = new Document([ + '$id' => '', + 'status' => true, + 'type' => Auth::ACTIVITY_TYPE_ANONYMOUS, + 'email' => 'anonymous.' . $project->getId() . '@service.' . $request->getHostname(), + 'password' => '', + 'name' => 'Anonymous', + ]); + $queueForAudits->setUser($user); } diff --git a/src/Appwrite/Auth/Auth.php b/src/Appwrite/Auth/Auth.php index c8ce06a323..caa1e23478 100644 --- a/src/Appwrite/Auth/Auth.php +++ b/src/Appwrite/Auth/Auth.php @@ -48,6 +48,7 @@ class Auth */ public const ACTIVITY_TYPE_APP = 'app'; public const ACTIVITY_TYPE_USER = 'user'; + public const ACTIVITY_TYPE_ANONYMOUS = 'anonymous'; /** * Token Types. From fabf581d21e8641c8e042b20a8bf094893fc0028 Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 14 Jan 2025 13:47:01 +0530 Subject: [PATCH 009/101] fix: tests. --- app/controllers/shared/api.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 6a0e4a34fa..a88615e729 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -522,8 +522,10 @@ App::init() // check first, // as api key user might already exists if (!$user->isEmpty()) { - $user->setAttribute('type', Auth::ACTIVITY_TYPE_USER); - $queueForAudits->setUser($user); + $typedUser = clone $user; + // $user doesn't support `type` and can cause unintended effects. + $typedUser->setAttribute('type', Auth::ACTIVITY_TYPE_USER); + $queueForAudits->setUser($typedUser); } $queueForDeletes->setProject($project); @@ -724,8 +726,10 @@ App::shutdown() } if (!$user->isEmpty()) { - $user->setAttribute('type', Auth::ACTIVITY_TYPE_USER); - $queueForAudits->setUser($user); + $typedUser = clone $user; + // $user doesn't support `type` and can cause unintended effects. + $typedUser->setAttribute('type', Auth::ACTIVITY_TYPE_USER); + $queueForAudits->setUser($typedUser); } elseif ($queueForAudits->getUser() === null || $queueForAudits->getUser()->isEmpty()) { /** * User in the request is empty, and no user was set for auditing previously. From 2571f7d3fc37beea50c62efdb774aef437bde0e0 Mon Sep 17 00:00:00 2001 From: ChiragAgg5k Date: Tue, 14 Jan 2025 15:43:00 +0530 Subject: [PATCH 010/101] refactor: createdMembership --- app/controllers/api/teams.php | 266 ++++++++++++++++------------------ 1 file changed, 127 insertions(+), 139 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 829d452cae..3664afec43 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -550,7 +550,6 @@ App::post('/v1/teams/:teamId/memberships') Query::equal('userId', [$invitee->getId()]), Query::equal('teamId', [$team->getId()]), ]); - $createdMembership = false; if ($membership->isEmpty()) { $secret = Auth::tokenGenerator(); @@ -577,159 +576,148 @@ App::post('/v1/teams/:teamId/memberships') 'search' => implode(' ', [$membershipId, $invitee->getId()]) ]); - $createdMembership = true; + $membership = ($isPrivilegedUser || $isAppUser) ? + Authorization::skip(fn () => $dbForProject->createDocument('memberships', $membership)) : + $dbForProject->createDocument('memberships', $membership); + } else { + + $membership = ($isPrivilegedUser || $isAppUser) ? + Authorization::skip(fn () => $dbForProject->updateDocument('memberships', $membership->getId(), $membership)) : + $dbForProject->updateDocument('memberships', $membership->getId(), $membership); } - if ($isPrivilegedUser || $isAppUser) { // Allow admin to create membership - $membership = $createdMembership ? - Authorization::skip(fn () => $dbForProject->createDocument('memberships', $membership)) : - Authorization::skip(fn () => $dbForProject->updateDocument('memberships', $membership->getId(), $membership)); + $dbForProject->purgeCachedDocument('users', $invitee->getId()); - if ($createdMembership) { - Authorization::skip(fn () => $dbForProject->increaseDocumentAttribute('teams', $team->getId(), 'total', 1)); - } + $url = Template::parseURL($url); + $url['query'] = Template::mergeQuery(((isset($url['query'])) ? $url['query'] : ''), ['membershipId' => $membership->getId(), 'userId' => $invitee->getId(), 'secret' => $secret, 'teamId' => $teamId]); + $url = Template::unParseURL($url); + if (!empty($email)) { + $projectName = $project->isEmpty() ? 'Console' : $project->getAttribute('name', '[APP-NAME]'); - $dbForProject->purgeCachedDocument('users', $invitee->getId()); - } else { - $membership = $createdMembership ? - $dbForProject->createDocument('memberships', $membership) : - $dbForProject->updateDocument('memberships', $membership->getId(), $membership); + $body = $locale->getText("emails.invitation.body"); + $subject = \sprintf($locale->getText("emails.invitation.subject"), $team->getAttribute('name'), $projectName); + $customTemplate = $project->getAttribute('templates', [])['email.invitation-' . $locale->default] ?? []; - if ($createdMembership) { - $dbForProject->increaseDocumentAttribute('teams', $team->getId(), 'total', 1); - } + $message = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-inner-base.tpl'); + $message + ->setParam('{{body}}', $body, escapeHtml: false) + ->setParam('{{hello}}', $locale->getText("emails.invitation.hello")) + ->setParam('{{footer}}', $locale->getText("emails.invitation.footer")) + ->setParam('{{thanks}}', $locale->getText("emails.invitation.thanks")) + ->setParam('{{signature}}', $locale->getText("emails.invitation.signature")); + $body = $message->render(); - $url = Template::parseURL($url); - $url['query'] = Template::mergeQuery(((isset($url['query'])) ? $url['query'] : ''), ['membershipId' => $membership->getId(), 'userId' => $invitee->getId(), 'secret' => $secret, 'teamId' => $teamId]); - $url = Template::unParseURL($url); - if (!empty($email)) { - $projectName = $project->isEmpty() ? 'Console' : $project->getAttribute('name', '[APP-NAME]'); + $smtp = $project->getAttribute('smtp', []); + $smtpEnabled = $smtp['enabled'] ?? false; - $body = $locale->getText("emails.invitation.body"); - $subject = \sprintf($locale->getText("emails.invitation.subject"), $team->getAttribute('name'), $projectName); - $customTemplate = $project->getAttribute('templates', [])['email.invitation-' . $locale->default] ?? []; + $senderEmail = System::getEnv('_APP_SYSTEM_EMAIL_ADDRESS', APP_EMAIL_TEAM); + $senderName = System::getEnv('_APP_SYSTEM_EMAIL_NAME', APP_NAME . ' Server'); + $replyTo = ""; - $message = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-inner-base.tpl'); - $message - ->setParam('{{body}}', $body, escapeHtml: false) - ->setParam('{{hello}}', $locale->getText("emails.invitation.hello")) - ->setParam('{{footer}}', $locale->getText("emails.invitation.footer")) - ->setParam('{{thanks}}', $locale->getText("emails.invitation.thanks")) - ->setParam('{{signature}}', $locale->getText("emails.invitation.signature")); - $body = $message->render(); - - $smtp = $project->getAttribute('smtp', []); - $smtpEnabled = $smtp['enabled'] ?? false; - - $senderEmail = System::getEnv('_APP_SYSTEM_EMAIL_ADDRESS', APP_EMAIL_TEAM); - $senderName = System::getEnv('_APP_SYSTEM_EMAIL_NAME', APP_NAME . ' Server'); - $replyTo = ""; - - if ($smtpEnabled) { - if (!empty($smtp['senderEmail'])) { - $senderEmail = $smtp['senderEmail']; - } - if (!empty($smtp['senderName'])) { - $senderName = $smtp['senderName']; - } - if (!empty($smtp['replyTo'])) { - $replyTo = $smtp['replyTo']; - } - - $queueForMails - ->setSmtpHost($smtp['host'] ?? '') - ->setSmtpPort($smtp['port'] ?? '') - ->setSmtpUsername($smtp['username'] ?? '') - ->setSmtpPassword($smtp['password'] ?? '') - ->setSmtpSecure($smtp['secure'] ?? ''); - - if (!empty($customTemplate)) { - if (!empty($customTemplate['senderEmail'])) { - $senderEmail = $customTemplate['senderEmail']; - } - if (!empty($customTemplate['senderName'])) { - $senderName = $customTemplate['senderName']; - } - if (!empty($customTemplate['replyTo'])) { - $replyTo = $customTemplate['replyTo']; - } - - $body = $customTemplate['message'] ?? ''; - $subject = $customTemplate['subject'] ?? $subject; - } - - $queueForMails - ->setSmtpReplyTo($replyTo) - ->setSmtpSenderEmail($senderEmail) - ->setSmtpSenderName($senderName); + if ($smtpEnabled) { + if (!empty($smtp['senderEmail'])) { + $senderEmail = $smtp['senderEmail']; + } + if (!empty($smtp['senderName'])) { + $senderName = $smtp['senderName']; + } + if (!empty($smtp['replyTo'])) { + $replyTo = $smtp['replyTo']; } - - $emailVariables = [ - 'owner' => $user->getAttribute('name'), - 'direction' => $locale->getText('settings.direction'), - /* {{user}}, {{team}}, {{redirect}} and {{project}} are required in default and custom templates */ - 'user' => $user->getAttribute('name'), - 'team' => $team->getAttribute('name'), - 'redirect' => $url, - 'project' => $projectName - ]; $queueForMails - ->setSubject($subject) - ->setBody($body) - ->setRecipient($invitee->getAttribute('email')) - ->setName($invitee->getAttribute('name')) - ->setVariables($emailVariables) - ->trigger() - ; - } elseif (!empty($phone)) { - if (empty(System::getEnv('_APP_SMS_PROVIDER'))) { - throw new Exception(Exception::GENERAL_PHONE_DISABLED, 'Phone provider not configured'); - } + ->setSmtpHost($smtp['host'] ?? '') + ->setSmtpPort($smtp['port'] ?? '') + ->setSmtpUsername($smtp['username'] ?? '') + ->setSmtpPassword($smtp['password'] ?? '') + ->setSmtpSecure($smtp['secure'] ?? ''); - $message = Template::fromFile(__DIR__ . '/../../config/locale/templates/sms-base.tpl'); - - $customTemplate = $project->getAttribute('templates', [])['sms.invitation-' . $locale->default] ?? []; if (!empty($customTemplate)) { - $message = $customTemplate['message']; - } - - $message = $message->setParam('{{token}}', $url); - $message = $message->render(); - - $messageDoc = new Document([ - '$id' => ID::unique(), - 'data' => [ - 'content' => $message, - ], - ]); - - $queueForMessaging - ->setType(MESSAGE_SEND_TYPE_INTERNAL) - ->setMessage($messageDoc) - ->setRecipients([$phone]) - ->setProviderType('SMS'); - - if (isset($plan['authPhone'])) { - $timelimit = $timelimit('organization:{organizationId}', $plan['authPhone'], 30 * 24 * 60 * 60); // 30 days - $timelimit - ->setParam('{organizationId}', $project->getAttribute('teamId')); - - $abuse = new Abuse($timelimit); - if ($abuse->check() && System::getEnv('_APP_OPTIONS_ABUSE', 'enabled') === 'enabled') { - $helper = PhoneNumberUtil::getInstance(); - $countryCode = $helper->parse($phone)->getCountryCode(); - - if (!empty($countryCode)) { - $queueForUsage - ->addMetric(str_replace('{countryCode}', $countryCode, METRIC_AUTH_METHOD_PHONE_COUNTRY_CODE), 1); - } + if (!empty($customTemplate['senderEmail'])) { + $senderEmail = $customTemplate['senderEmail']; } - $queueForUsage - ->addMetric(METRIC_AUTH_METHOD_PHONE, 1) - ->setProject($project) - ->trigger(); + if (!empty($customTemplate['senderName'])) { + $senderName = $customTemplate['senderName']; + } + if (!empty($customTemplate['replyTo'])) { + $replyTo = $customTemplate['replyTo']; + } + + $body = $customTemplate['message'] ?? ''; + $subject = $customTemplate['subject'] ?? $subject; } + + $queueForMails + ->setSmtpReplyTo($replyTo) + ->setSmtpSenderEmail($senderEmail) + ->setSmtpSenderName($senderName); + } + + $emailVariables = [ + 'owner' => $user->getAttribute('name'), + 'direction' => $locale->getText('settings.direction'), + /* {{user}}, {{team}}, {{redirect}} and {{project}} are required in default and custom templates */ + 'user' => $user->getAttribute('name'), + 'team' => $team->getAttribute('name'), + 'redirect' => $url, + 'project' => $projectName + ]; + + $queueForMails + ->setSubject($subject) + ->setBody($body) + ->setRecipient($invitee->getAttribute('email')) + ->setName($invitee->getAttribute('name')) + ->setVariables($emailVariables) + ->trigger(); + + } elseif (!empty($phone)) { + if (empty(System::getEnv('_APP_SMS_PROVIDER'))) { + throw new Exception(Exception::GENERAL_PHONE_DISABLED, 'Phone provider not configured'); + } + + $message = Template::fromFile(__DIR__ . '/../../config/locale/templates/sms-base.tpl'); + + $customTemplate = $project->getAttribute('templates', [])['sms.invitation-' . $locale->default] ?? []; + if (!empty($customTemplate)) { + $message = $customTemplate['message']; + } + + $message = $message->setParam('{{token}}', $url); + $message = $message->render(); + + $messageDoc = new Document([ + '$id' => ID::unique(), + 'data' => [ + 'content' => $message, + ], + ]); + + $queueForMessaging + ->setType(MESSAGE_SEND_TYPE_INTERNAL) + ->setMessage($messageDoc) + ->setRecipients([$phone]) + ->setProviderType('SMS'); + + if (isset($plan['authPhone'])) { + $timelimit = $timelimit('organization:{organizationId}', $plan['authPhone'], 30 * 24 * 60 * 60); // 30 days + $timelimit + ->setParam('{organizationId}', $project->getAttribute('teamId')); + + $abuse = new Abuse($timelimit); + if ($abuse->check() && System::getEnv('_APP_OPTIONS_ABUSE', 'enabled') === 'enabled') { + $helper = PhoneNumberUtil::getInstance(); + $countryCode = $helper->parse($phone)->getCountryCode(); + + if (!empty($countryCode)) { + $queueForUsage + ->addMetric(str_replace('{countryCode}', $countryCode, METRIC_AUTH_METHOD_PHONE_COUNTRY_CODE), 1); + } + } + $queueForUsage + ->addMetric(METRIC_AUTH_METHOD_PHONE, 1) + ->setProject($project) + ->trigger(); } } From 1c7867ee039f1cb3600313614616c026cf05eba3 Mon Sep 17 00:00:00 2001 From: ChiragAgg5k Date: Tue, 14 Jan 2025 15:47:05 +0530 Subject: [PATCH 011/101] fix: not sending mail to appuser --- app/controllers/api/teams.php | 250 +++++++++++++++++----------------- 1 file changed, 127 insertions(+), 123 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 3664afec43..da6828c6bf 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -580,144 +580,148 @@ App::post('/v1/teams/:teamId/memberships') Authorization::skip(fn () => $dbForProject->createDocument('memberships', $membership)) : $dbForProject->createDocument('memberships', $membership); } else { - + $membership = ($isPrivilegedUser || $isAppUser) ? Authorization::skip(fn () => $dbForProject->updateDocument('memberships', $membership->getId(), $membership)) : $dbForProject->updateDocument('memberships', $membership->getId(), $membership); } - $dbForProject->purgeCachedDocument('users', $invitee->getId()); - $url = Template::parseURL($url); - $url['query'] = Template::mergeQuery(((isset($url['query'])) ? $url['query'] : ''), ['membershipId' => $membership->getId(), 'userId' => $invitee->getId(), 'secret' => $secret, 'teamId' => $teamId]); - $url = Template::unParseURL($url); - if (!empty($email)) { - $projectName = $project->isEmpty() ? 'Console' : $project->getAttribute('name', '[APP-NAME]'); + if (!$isPrivilegedUser && !$isAppUser) { + $dbForProject->purgeCachedDocument('users', $invitee->getId()); + } else { - $body = $locale->getText("emails.invitation.body"); - $subject = \sprintf($locale->getText("emails.invitation.subject"), $team->getAttribute('name'), $projectName); - $customTemplate = $project->getAttribute('templates', [])['email.invitation-' . $locale->default] ?? []; + $url = Template::parseURL($url); + $url['query'] = Template::mergeQuery(((isset($url['query'])) ? $url['query'] : ''), ['membershipId' => $membership->getId(), 'userId' => $invitee->getId(), 'secret' => $secret, 'teamId' => $teamId]); + $url = Template::unParseURL($url); + if (!empty($email)) { + $projectName = $project->isEmpty() ? 'Console' : $project->getAttribute('name', '[APP-NAME]'); - $message = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-inner-base.tpl'); - $message - ->setParam('{{body}}', $body, escapeHtml: false) - ->setParam('{{hello}}', $locale->getText("emails.invitation.hello")) - ->setParam('{{footer}}', $locale->getText("emails.invitation.footer")) - ->setParam('{{thanks}}', $locale->getText("emails.invitation.thanks")) - ->setParam('{{signature}}', $locale->getText("emails.invitation.signature")); - $body = $message->render(); + $body = $locale->getText("emails.invitation.body"); + $subject = \sprintf($locale->getText("emails.invitation.subject"), $team->getAttribute('name'), $projectName); + $customTemplate = $project->getAttribute('templates', [])['email.invitation-' . $locale->default] ?? []; - $smtp = $project->getAttribute('smtp', []); - $smtpEnabled = $smtp['enabled'] ?? false; + $message = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-inner-base.tpl'); + $message + ->setParam('{{body}}', $body, escapeHtml: false) + ->setParam('{{hello}}', $locale->getText("emails.invitation.hello")) + ->setParam('{{footer}}', $locale->getText("emails.invitation.footer")) + ->setParam('{{thanks}}', $locale->getText("emails.invitation.thanks")) + ->setParam('{{signature}}', $locale->getText("emails.invitation.signature")); + $body = $message->render(); - $senderEmail = System::getEnv('_APP_SYSTEM_EMAIL_ADDRESS', APP_EMAIL_TEAM); - $senderName = System::getEnv('_APP_SYSTEM_EMAIL_NAME', APP_NAME . ' Server'); - $replyTo = ""; + $smtp = $project->getAttribute('smtp', []); + $smtpEnabled = $smtp['enabled'] ?? false; - if ($smtpEnabled) { - if (!empty($smtp['senderEmail'])) { - $senderEmail = $smtp['senderEmail']; - } - if (!empty($smtp['senderName'])) { - $senderName = $smtp['senderName']; - } - if (!empty($smtp['replyTo'])) { - $replyTo = $smtp['replyTo']; + $senderEmail = System::getEnv('_APP_SYSTEM_EMAIL_ADDRESS', APP_EMAIL_TEAM); + $senderName = System::getEnv('_APP_SYSTEM_EMAIL_NAME', APP_NAME . ' Server'); + $replyTo = ""; + + if ($smtpEnabled) { + if (!empty($smtp['senderEmail'])) { + $senderEmail = $smtp['senderEmail']; + } + if (!empty($smtp['senderName'])) { + $senderName = $smtp['senderName']; + } + if (!empty($smtp['replyTo'])) { + $replyTo = $smtp['replyTo']; + } + + $queueForMails + ->setSmtpHost($smtp['host'] ?? '') + ->setSmtpPort($smtp['port'] ?? '') + ->setSmtpUsername($smtp['username'] ?? '') + ->setSmtpPassword($smtp['password'] ?? '') + ->setSmtpSecure($smtp['secure'] ?? ''); + + if (!empty($customTemplate)) { + if (!empty($customTemplate['senderEmail'])) { + $senderEmail = $customTemplate['senderEmail']; + } + if (!empty($customTemplate['senderName'])) { + $senderName = $customTemplate['senderName']; + } + if (!empty($customTemplate['replyTo'])) { + $replyTo = $customTemplate['replyTo']; + } + + $body = $customTemplate['message'] ?? ''; + $subject = $customTemplate['subject'] ?? $subject; + } + + $queueForMails + ->setSmtpReplyTo($replyTo) + ->setSmtpSenderEmail($senderEmail) + ->setSmtpSenderName($senderName); } + $emailVariables = [ + 'owner' => $user->getAttribute('name'), + 'direction' => $locale->getText('settings.direction'), + /* {{user}}, {{team}}, {{redirect}} and {{project}} are required in default and custom templates */ + 'user' => $user->getAttribute('name'), + 'team' => $team->getAttribute('name'), + 'redirect' => $url, + 'project' => $projectName + ]; + $queueForMails - ->setSmtpHost($smtp['host'] ?? '') - ->setSmtpPort($smtp['port'] ?? '') - ->setSmtpUsername($smtp['username'] ?? '') - ->setSmtpPassword($smtp['password'] ?? '') - ->setSmtpSecure($smtp['secure'] ?? ''); - - if (!empty($customTemplate)) { - if (!empty($customTemplate['senderEmail'])) { - $senderEmail = $customTemplate['senderEmail']; - } - if (!empty($customTemplate['senderName'])) { - $senderName = $customTemplate['senderName']; - } - if (!empty($customTemplate['replyTo'])) { - $replyTo = $customTemplate['replyTo']; - } - - $body = $customTemplate['message'] ?? ''; - $subject = $customTemplate['subject'] ?? $subject; - } - - $queueForMails - ->setSmtpReplyTo($replyTo) - ->setSmtpSenderEmail($senderEmail) - ->setSmtpSenderName($senderName); - } - - $emailVariables = [ - 'owner' => $user->getAttribute('name'), - 'direction' => $locale->getText('settings.direction'), - /* {{user}}, {{team}}, {{redirect}} and {{project}} are required in default and custom templates */ - 'user' => $user->getAttribute('name'), - 'team' => $team->getAttribute('name'), - 'redirect' => $url, - 'project' => $projectName - ]; - - $queueForMails - ->setSubject($subject) - ->setBody($body) - ->setRecipient($invitee->getAttribute('email')) - ->setName($invitee->getAttribute('name')) - ->setVariables($emailVariables) - ->trigger(); - - } elseif (!empty($phone)) { - if (empty(System::getEnv('_APP_SMS_PROVIDER'))) { - throw new Exception(Exception::GENERAL_PHONE_DISABLED, 'Phone provider not configured'); - } - - $message = Template::fromFile(__DIR__ . '/../../config/locale/templates/sms-base.tpl'); - - $customTemplate = $project->getAttribute('templates', [])['sms.invitation-' . $locale->default] ?? []; - if (!empty($customTemplate)) { - $message = $customTemplate['message']; - } - - $message = $message->setParam('{{token}}', $url); - $message = $message->render(); - - $messageDoc = new Document([ - '$id' => ID::unique(), - 'data' => [ - 'content' => $message, - ], - ]); - - $queueForMessaging - ->setType(MESSAGE_SEND_TYPE_INTERNAL) - ->setMessage($messageDoc) - ->setRecipients([$phone]) - ->setProviderType('SMS'); - - if (isset($plan['authPhone'])) { - $timelimit = $timelimit('organization:{organizationId}', $plan['authPhone'], 30 * 24 * 60 * 60); // 30 days - $timelimit - ->setParam('{organizationId}', $project->getAttribute('teamId')); - - $abuse = new Abuse($timelimit); - if ($abuse->check() && System::getEnv('_APP_OPTIONS_ABUSE', 'enabled') === 'enabled') { - $helper = PhoneNumberUtil::getInstance(); - $countryCode = $helper->parse($phone)->getCountryCode(); - - if (!empty($countryCode)) { - $queueForUsage - ->addMetric(str_replace('{countryCode}', $countryCode, METRIC_AUTH_METHOD_PHONE_COUNTRY_CODE), 1); - } - } - $queueForUsage - ->addMetric(METRIC_AUTH_METHOD_PHONE, 1) - ->setProject($project) + ->setSubject($subject) + ->setBody($body) + ->setRecipient($invitee->getAttribute('email')) + ->setName($invitee->getAttribute('name')) + ->setVariables($emailVariables) ->trigger(); + + } elseif (!empty($phone)) { + if (empty(System::getEnv('_APP_SMS_PROVIDER'))) { + throw new Exception(Exception::GENERAL_PHONE_DISABLED, 'Phone provider not configured'); + } + + $message = Template::fromFile(__DIR__ . '/../../config/locale/templates/sms-base.tpl'); + + $customTemplate = $project->getAttribute('templates', [])['sms.invitation-' . $locale->default] ?? []; + if (!empty($customTemplate)) { + $message = $customTemplate['message']; + } + + $message = $message->setParam('{{token}}', $url); + $message = $message->render(); + + $messageDoc = new Document([ + '$id' => ID::unique(), + 'data' => [ + 'content' => $message, + ], + ]); + + $queueForMessaging + ->setType(MESSAGE_SEND_TYPE_INTERNAL) + ->setMessage($messageDoc) + ->setRecipients([$phone]) + ->setProviderType('SMS'); + + if (isset($plan['authPhone'])) { + $timelimit = $timelimit('organization:{organizationId}', $plan['authPhone'], 30 * 24 * 60 * 60); // 30 days + $timelimit + ->setParam('{organizationId}', $project->getAttribute('teamId')); + + $abuse = new Abuse($timelimit); + if ($abuse->check() && System::getEnv('_APP_OPTIONS_ABUSE', 'enabled') === 'enabled') { + $helper = PhoneNumberUtil::getInstance(); + $countryCode = $helper->parse($phone)->getCountryCode(); + + if (!empty($countryCode)) { + $queueForUsage + ->addMetric(str_replace('{countryCode}', $countryCode, METRIC_AUTH_METHOD_PHONE_COUNTRY_CODE), 1); + } + } + $queueForUsage + ->addMetric(METRIC_AUTH_METHOD_PHONE, 1) + ->setProject($project) + ->trigger(); + } } } From 860c917cf64a8242087e0c213ef492df119293fb Mon Sep 17 00:00:00 2001 From: ChiragAgg5k Date: Tue, 14 Jan 2025 15:48:28 +0530 Subject: [PATCH 012/101] fix: increment --- app/controllers/api/teams.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index da6828c6bf..c30251a62b 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -579,8 +579,9 @@ App::post('/v1/teams/:teamId/memberships') $membership = ($isPrivilegedUser || $isAppUser) ? Authorization::skip(fn () => $dbForProject->createDocument('memberships', $membership)) : $dbForProject->createDocument('memberships', $membership); - } else { + Authorization::skip(fn () => $dbForProject->increaseDocumentAttribute('teams', $team->getId(), 'total', 1)); + } else { $membership = ($isPrivilegedUser || $isAppUser) ? Authorization::skip(fn () => $dbForProject->updateDocument('memberships', $membership->getId(), $membership)) : $dbForProject->updateDocument('memberships', $membership->getId(), $membership); @@ -590,7 +591,6 @@ App::post('/v1/teams/:teamId/memberships') if (!$isPrivilegedUser && !$isAppUser) { $dbForProject->purgeCachedDocument('users', $invitee->getId()); } else { - $url = Template::parseURL($url); $url['query'] = Template::mergeQuery(((isset($url['query'])) ? $url['query'] : ''), ['membershipId' => $membership->getId(), 'userId' => $invitee->getId(), 'secret' => $secret, 'teamId' => $teamId]); $url = Template::unParseURL($url); From d43507040c166199d0831aece6dd24c6c54903bd Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 14 Jan 2025 10:43:32 +0000 Subject: [PATCH 013/101] fix: tests --- app/controllers/api/teams.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index c30251a62b..feb1cb4acd 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -588,7 +588,7 @@ App::post('/v1/teams/:teamId/memberships') } - if (!$isPrivilegedUser && !$isAppUser) { + if ($isPrivilegedUser || $isAppUser) { $dbForProject->purgeCachedDocument('users', $invitee->getId()); } else { $url = Template::parseURL($url); From 25431adafb3229f968d6bde2fd55fbba2e072f2c Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 14 Jan 2025 17:45:49 +0530 Subject: [PATCH 014/101] address comment: anonymous > guest. --- app/controllers/shared/api.php | 6 +++--- src/Appwrite/Auth/Auth.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index a88615e729..6c90e6ed60 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -742,10 +742,10 @@ App::shutdown() $user = new Document([ '$id' => '', 'status' => true, - 'type' => Auth::ACTIVITY_TYPE_ANONYMOUS, - 'email' => 'anonymous.' . $project->getId() . '@service.' . $request->getHostname(), + 'type' => Auth::ACTIVITY_TYPE_GUEST, + 'email' => 'guest.' . $project->getId() . '@service.' . $request->getHostname(), 'password' => '', - 'name' => 'Anonymous', + 'name' => 'Guest', ]); $queueForAudits->setUser($user); diff --git a/src/Appwrite/Auth/Auth.php b/src/Appwrite/Auth/Auth.php index caa1e23478..8555d5cb00 100644 --- a/src/Appwrite/Auth/Auth.php +++ b/src/Appwrite/Auth/Auth.php @@ -48,7 +48,7 @@ class Auth */ public const ACTIVITY_TYPE_APP = 'app'; public const ACTIVITY_TYPE_USER = 'user'; - public const ACTIVITY_TYPE_ANONYMOUS = 'anonymous'; + public const ACTIVITY_TYPE_GUEST = 'guest'; /** * Token Types. From 42ef7fd2d89e4c137ef48dff80ead5caa84b69ba Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 15 Jan 2025 11:16:10 +0200 Subject: [PATCH 015/101] INDEX_DEPENDENCY --- app/config/errors.php | 5 +++++ app/controllers/general.php | 4 ++++ src/Appwrite/Extend/Exception.php | 1 + 3 files changed, 10 insertions(+) diff --git a/app/config/errors.php b/app/config/errors.php index f09d1596eb..ae1aae01c4 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -731,6 +731,11 @@ return [ 'description' => 'Index invalid.', 'code' => 400, ], + Exception::INDEX_DEPENDENCY => [ + 'name' => Exception::INDEX_DEPENDENCY, + 'description' => 'Attribute cannot be renamed or deleted. Please remove the associated index first.', + 'code' => 400, + ], /** Project Errors */ Exception::PROJECT_NOT_FOUND => [ diff --git a/app/controllers/general.php b/app/controllers/general.php index 6f8566f69b..7772b91c1c 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -808,6 +808,10 @@ App::error() break; case 'Utopia\Database\Exception\NotFound': $error = new AppwriteException(AppwriteException::COLLECTION_NOT_FOUND, $error->getMessage(), previous: $error); + break; + case 'Utopia\Database\Exception\Dependency': + $error = new AppwriteException(AppwriteException::INDEX_DEPENDENCY, $error->getMessage(), previous: $error); + break; } $code = $error->getCode(); diff --git a/src/Appwrite/Extend/Exception.php b/src/Appwrite/Extend/Exception.php index 54bf6d96ea..432a5abb1b 100644 --- a/src/Appwrite/Extend/Exception.php +++ b/src/Appwrite/Extend/Exception.php @@ -211,6 +211,7 @@ class Exception extends \Exception public const INDEX_LIMIT_EXCEEDED = 'index_limit_exceeded'; public const INDEX_ALREADY_EXISTS = 'index_already_exists'; public const INDEX_INVALID = 'index_invalid'; + public const INDEX_DEPENDENCY = 'index_dependency'; /** Projects */ public const PROJECT_NOT_FOUND = 'project_not_found'; From 719c0bf4406c1912ad9e0a8c526761e1027b3116 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 15 Jan 2025 11:45:26 +0200 Subject: [PATCH 016/101] composer.lock --- composer.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index b77915f0a4..43b7b4c111 100644 --- a/composer.lock +++ b/composer.lock @@ -4095,16 +4095,16 @@ }, { "name": "utopia-php/platform", - "version": "0.7.1", + "version": "0.7.2", "source": { "type": "git", "url": "https://github.com/utopia-php/platform.git", - "reference": "3433a0f1a54988f2a59c735f507745cb2c24638a" + "reference": "6f9243848f1c6466f6509fd01c7e18306a6d8caf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/platform/zipball/3433a0f1a54988f2a59c735f507745cb2c24638a", - "reference": "3433a0f1a54988f2a59c735f507745cb2c24638a", + "url": "https://api.github.com/repos/utopia-php/platform/zipball/6f9243848f1c6466f6509fd01c7e18306a6d8caf", + "reference": "6f9243848f1c6466f6509fd01c7e18306a6d8caf", "shasum": "" }, "require": { @@ -4139,9 +4139,9 @@ ], "support": { "issues": "https://github.com/utopia-php/platform/issues", - "source": "https://github.com/utopia-php/platform/tree/0.7.1" + "source": "https://github.com/utopia-php/platform/tree/0.7.2" }, - "time": "2024-10-22T10:27:49+00:00" + "time": "2025-01-15T05:56:26+00:00" }, { "name": "utopia-php/pools", @@ -5126,16 +5126,16 @@ }, { "name": "laravel/pint", - "version": "v1.19.0", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "8169513746e1bac70c85d6ea1524d9225d4886f0" + "reference": "53072e8ea22213a7ed168a8a15b96fbb8b82d44b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/8169513746e1bac70c85d6ea1524d9225d4886f0", - "reference": "8169513746e1bac70c85d6ea1524d9225d4886f0", + "url": "https://api.github.com/repos/laravel/pint/zipball/53072e8ea22213a7ed168a8a15b96fbb8b82d44b", + "reference": "53072e8ea22213a7ed168a8a15b96fbb8b82d44b", "shasum": "" }, "require": { @@ -5188,7 +5188,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2024-12-30T16:20:10+00:00" + "time": "2025-01-14T16:20:53+00:00" }, { "name": "matthiasmullie/minify", @@ -8556,7 +8556,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { From a1566b89746695810016ace8f92adbb81bc978f5 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 15 Jan 2025 11:46:07 +0200 Subject: [PATCH 017/101] composer.lock --- composer.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index 43b7b4c111..b77915f0a4 100644 --- a/composer.lock +++ b/composer.lock @@ -4095,16 +4095,16 @@ }, { "name": "utopia-php/platform", - "version": "0.7.2", + "version": "0.7.1", "source": { "type": "git", "url": "https://github.com/utopia-php/platform.git", - "reference": "6f9243848f1c6466f6509fd01c7e18306a6d8caf" + "reference": "3433a0f1a54988f2a59c735f507745cb2c24638a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/platform/zipball/6f9243848f1c6466f6509fd01c7e18306a6d8caf", - "reference": "6f9243848f1c6466f6509fd01c7e18306a6d8caf", + "url": "https://api.github.com/repos/utopia-php/platform/zipball/3433a0f1a54988f2a59c735f507745cb2c24638a", + "reference": "3433a0f1a54988f2a59c735f507745cb2c24638a", "shasum": "" }, "require": { @@ -4139,9 +4139,9 @@ ], "support": { "issues": "https://github.com/utopia-php/platform/issues", - "source": "https://github.com/utopia-php/platform/tree/0.7.2" + "source": "https://github.com/utopia-php/platform/tree/0.7.1" }, - "time": "2025-01-15T05:56:26+00:00" + "time": "2024-10-22T10:27:49+00:00" }, { "name": "utopia-php/pools", @@ -5126,16 +5126,16 @@ }, { "name": "laravel/pint", - "version": "v1.20.0", + "version": "v1.19.0", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "53072e8ea22213a7ed168a8a15b96fbb8b82d44b" + "reference": "8169513746e1bac70c85d6ea1524d9225d4886f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/53072e8ea22213a7ed168a8a15b96fbb8b82d44b", - "reference": "53072e8ea22213a7ed168a8a15b96fbb8b82d44b", + "url": "https://api.github.com/repos/laravel/pint/zipball/8169513746e1bac70c85d6ea1524d9225d4886f0", + "reference": "8169513746e1bac70c85d6ea1524d9225d4886f0", "shasum": "" }, "require": { @@ -5188,7 +5188,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2025-01-14T16:20:53+00:00" + "time": "2024-12-30T16:20:10+00:00" }, { "name": "matthiasmullie/minify", @@ -8556,7 +8556,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { From 43db5b4552b35685cabe05596eb045c7d7861be5 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 15 Jan 2025 13:10:03 +0200 Subject: [PATCH 018/101] catch Dependency --- src/Appwrite/Platform/Workers/Databases.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Appwrite/Platform/Workers/Databases.php b/src/Appwrite/Platform/Workers/Databases.php index 5b73e6a75c..fb13de3941 100644 --- a/src/Appwrite/Platform/Workers/Databases.php +++ b/src/Appwrite/Platform/Workers/Databases.php @@ -278,6 +278,17 @@ class Databases extends Action $dbForProject->deleteDocument('attributes', $relatedAttribute->getId()); } + } catch (DatabaseException\Dependency $e) { + Console::error($e->getMessage()); + + $dbForProject->updateDocument( + 'attributes', + $attribute->getId(), + $attribute->setAttribute('error', $e->getMessage()) + ); + + return; + } catch (NotFound $e) { Console::error($e->getMessage()); From 9f82cd78fb41256d24f4fb899fcd619e68e6f4d8 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 15 Jan 2025 13:20:08 +0200 Subject: [PATCH 019/101] Update available --- src/Appwrite/Platform/Workers/Databases.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Databases.php b/src/Appwrite/Platform/Workers/Databases.php index fb13de3941..e913dfb350 100644 --- a/src/Appwrite/Platform/Workers/Databases.php +++ b/src/Appwrite/Platform/Workers/Databases.php @@ -281,11 +281,10 @@ class Databases extends Action } catch (DatabaseException\Dependency $e) { Console::error($e->getMessage()); - $dbForProject->updateDocument( - 'attributes', - $attribute->getId(), - $attribute->setAttribute('error', $e->getMessage()) - ); + $attribute->setAttribute('status', 'available'); + $attribute->setAttribute('error', $e->getMessage()); + + $dbForProject->updateDocument('attributes', $attribute->getId(), $attribute); return; From 6067fb77b704f03ea505ee8b0d283ee36dec0242 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 15 Jan 2025 13:40:41 +0200 Subject: [PATCH 020/101] Return on Dependency --- src/Appwrite/Platform/Workers/Databases.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Databases.php b/src/Appwrite/Platform/Workers/Databases.php index e913dfb350..aa2a189902 100644 --- a/src/Appwrite/Platform/Workers/Databases.php +++ b/src/Appwrite/Platform/Workers/Databases.php @@ -14,6 +14,7 @@ use Utopia\Database\Exception\Conflict; use Utopia\Database\Exception\NotFound; use Utopia\Database\Exception\Restricted; use Utopia\Database\Exception\Structure; +use Utopia\Database\Exception\Dependency; use Utopia\Database\Query; use Utopia\Logger\Log; use Utopia\Platform\Action; @@ -278,16 +279,6 @@ class Databases extends Action $dbForProject->deleteDocument('attributes', $relatedAttribute->getId()); } - } catch (DatabaseException\Dependency $e) { - Console::error($e->getMessage()); - - $attribute->setAttribute('status', 'available'); - $attribute->setAttribute('error', $e->getMessage()); - - $dbForProject->updateDocument('attributes', $attribute->getId(), $attribute); - - return; - } catch (NotFound $e) { Console::error($e->getMessage()); @@ -319,6 +310,10 @@ class Databases extends Action ); } + if ($e instanceof Dependency) { + return; + } + throw $e; } finally { $this->trigger($database, $collection, $attribute, $project, $projectId, $events); From a3bd26d7f53a10482227bfc7e899b90cb74409c2 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 15 Jan 2025 13:45:48 +0200 Subject: [PATCH 021/101] Return on Dependency --- src/Appwrite/Platform/Workers/Databases.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Databases.php b/src/Appwrite/Platform/Workers/Databases.php index aa2a189902..d26cdfcefd 100644 --- a/src/Appwrite/Platform/Workers/Databases.php +++ b/src/Appwrite/Platform/Workers/Databases.php @@ -293,16 +293,18 @@ class Databases extends Action if ($e instanceof DatabaseException) { $attribute->setAttribute('error', $e->getMessage()); - if (!$relatedAttribute->isEmpty()) { + if (! $relatedAttribute->isEmpty()) { $relatedAttribute->setAttribute('error', $e->getMessage()); } } + $dbForProject->updateDocument( 'attributes', $attribute->getId(), $attribute->setAttribute('status', 'stuck') ); - if (!$relatedAttribute->isEmpty()) { + + if (! $relatedAttribute->isEmpty()) { $dbForProject->updateDocument( 'attributes', $relatedAttribute->getId(), From cee3da2ef5c1751fe4a596910a634b1600b71d57 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 15 Jan 2025 13:55:18 +0200 Subject: [PATCH 022/101] Remove previous --- app/controllers/general.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 7772b91c1c..8c7292410d 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -810,7 +810,7 @@ App::error() $error = new AppwriteException(AppwriteException::COLLECTION_NOT_FOUND, $error->getMessage(), previous: $error); break; case 'Utopia\Database\Exception\Dependency': - $error = new AppwriteException(AppwriteException::INDEX_DEPENDENCY, $error->getMessage(), previous: $error); + $error = new AppwriteException(AppwriteException::INDEX_DEPENDENCY); break; } From 098c30cd9a4c7d64f4dc8254ceb8d6c47346d8f4 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 15 Jan 2025 14:02:30 +0200 Subject: [PATCH 023/101] Message null --- app/controllers/general.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 8c7292410d..7c30d61555 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -810,7 +810,7 @@ App::error() $error = new AppwriteException(AppwriteException::COLLECTION_NOT_FOUND, $error->getMessage(), previous: $error); break; case 'Utopia\Database\Exception\Dependency': - $error = new AppwriteException(AppwriteException::INDEX_DEPENDENCY); + $error = new AppwriteException(AppwriteException::INDEX_DEPENDENCY, null, previous: $error); break; } From c4bdd2fe1b12499c5d2970b37b2781812f4681dd Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 15 Jan 2025 16:26:57 +0200 Subject: [PATCH 024/101] Change to 409 --- app/config/errors.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/errors.php b/app/config/errors.php index ae1aae01c4..c1174509ab 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -734,7 +734,7 @@ return [ Exception::INDEX_DEPENDENCY => [ 'name' => Exception::INDEX_DEPENDENCY, 'description' => 'Attribute cannot be renamed or deleted. Please remove the associated index first.', - 'code' => 400, + 'code' => 409, ], /** Project Errors */ From 2ca690ccbdf3a76ac4e9ba339bc0e3337ea2f412 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 15 Jan 2025 16:29:17 +0200 Subject: [PATCH 025/101] formatting --- src/Appwrite/Platform/Workers/Databases.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Workers/Databases.php b/src/Appwrite/Platform/Workers/Databases.php index d26cdfcefd..ea2b6a2b73 100644 --- a/src/Appwrite/Platform/Workers/Databases.php +++ b/src/Appwrite/Platform/Workers/Databases.php @@ -11,10 +11,10 @@ use Utopia\Database\Document; use Utopia\Database\Exception as DatabaseException; use Utopia\Database\Exception\Authorization; use Utopia\Database\Exception\Conflict; +use Utopia\Database\Exception\Dependency; use Utopia\Database\Exception\NotFound; use Utopia\Database\Exception\Restricted; use Utopia\Database\Exception\Structure; -use Utopia\Database\Exception\Dependency; use Utopia\Database\Query; use Utopia\Logger\Log; use Utopia\Platform\Action; From 120ceeedadc054ea08d095e7643049881d864eb0 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Thu, 16 Jan 2025 04:27:25 +0000 Subject: [PATCH 026/101] chore: review --- app/controllers/api/teams.php | 4 ++-- tests/e2e/Services/Teams/TeamsBaseClient.php | 5 +---- tests/e2e/Services/Teams/TeamsBaseServer.php | 5 +---- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index feb1cb4acd..39dc2868de 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -547,8 +547,8 @@ App::post('/v1/teams/:teamId/memberships') } $membership = $dbForProject->findOne('memberships', [ - Query::equal('userId', [$invitee->getId()]), - Query::equal('teamId', [$team->getId()]), + Query::equal('userId', [$invitee->getInternalId()]), + Query::equal('teamId', [$team->getInternalId()]), ]); if ($membership->isEmpty()) { diff --git a/tests/e2e/Services/Teams/TeamsBaseClient.php b/tests/e2e/Services/Teams/TeamsBaseClient.php index cf011d2bf7..3381b80120 100644 --- a/tests/e2e/Services/Teams/TeamsBaseClient.php +++ b/tests/e2e/Services/Teams/TeamsBaseClient.php @@ -291,10 +291,7 @@ trait TeamsBaseClient $this->assertEquals($secondName, $lastEmail['to'][0]['name']); $this->assertEquals('Invitation to ' . $teamName . ' Team at ' . $this->getProject()['name'], $lastEmail['subject']); - /** - * Test for resend - * SUCCESS - */ + // test for resending invitation $response = $this->client->call(Client::METHOD_POST, '/teams/' . $teamUid . '/memberships', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], diff --git a/tests/e2e/Services/Teams/TeamsBaseServer.php b/tests/e2e/Services/Teams/TeamsBaseServer.php index 226536c604..bade16cf2f 100644 --- a/tests/e2e/Services/Teams/TeamsBaseServer.php +++ b/tests/e2e/Services/Teams/TeamsBaseServer.php @@ -185,10 +185,7 @@ trait TeamsBaseServer // $this->assertContains('team:'.$teamUid.'/admin', $response['body']['roles']); // $this->assertContains('team:'.$teamUid.'/editor', $response['body']['roles']); - /** - * Test for resend - * SUCCESS - */ + // test for resending invitation $response = $this->client->call(Client::METHOD_POST, '/teams/' . $teamUid . '/memberships', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], From 23d20b7d02be0fa492d476d6cb90b57912391b98 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Thu, 16 Jan 2025 04:29:11 +0000 Subject: [PATCH 027/101] fix: invited user's name --- app/controllers/api/teams.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 39dc2868de..12b36b1e1b 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -660,7 +660,7 @@ App::post('/v1/teams/:teamId/memberships') 'owner' => $user->getAttribute('name'), 'direction' => $locale->getText('settings.direction'), /* {{user}}, {{team}}, {{redirect}} and {{project}} are required in default and custom templates */ - 'user' => $user->getAttribute('name'), + 'user' => $name, 'team' => $team->getAttribute('name'), 'redirect' => $url, 'project' => $projectName From 8dc3b4ca6032c337e7f0e9a0f6b078d90a38e83f Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Thu, 16 Jan 2025 06:15:41 +0000 Subject: [PATCH 028/101] fix: tests: --- app/controllers/api/teams.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 12b36b1e1b..827ca58964 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -547,8 +547,8 @@ App::post('/v1/teams/:teamId/memberships') } $membership = $dbForProject->findOne('memberships', [ - Query::equal('userId', [$invitee->getInternalId()]), - Query::equal('teamId', [$team->getInternalId()]), + Query::equal('userInternalId', [$invitee->getInternalId()]), + Query::equal('teamInternalId', [$team->getInternalId()]), ]); if ($membership->isEmpty()) { From 8e474676d3a9f5080d3b080cd7b477578c555238 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Thu, 16 Jan 2025 06:36:31 +0000 Subject: [PATCH 029/101] chore: explicitly added token --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fc03891b35..7fcd83ce57 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -243,6 +243,7 @@ jobs: issue-number: ${{ github.event.pull_request.number }} comment-author: 'github-actions[bot]' body-includes: Benchmark results + token: ${{ secrets.GITHUB_TOKEN }} - name: Comment on PR uses: peter-evans/create-or-update-comment@v4 with: @@ -250,3 +251,4 @@ jobs: issue-number: ${{ github.event.pull_request.number }} body-path: benchmark.txt edit-mode: replace + token: ${{ secrets.GITHUB_TOKEN }} From e278b8a5a2e6ee04938ab400819dd7923fe31866 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Thu, 16 Jan 2025 07:35:43 +0000 Subject: [PATCH 030/101] chore: added if check --- .github/workflows/tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7fcd83ce57..5b7438de42 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -237,18 +237,18 @@ jobs: path: benchmark.json retention-days: 7 - name: Find Comment + if: github.event.pull_request.head.repo.full_name == github.repository uses: peter-evans/find-comment@v3 id: fc with: issue-number: ${{ github.event.pull_request.number }} comment-author: 'github-actions[bot]' body-includes: Benchmark results - token: ${{ secrets.GITHUB_TOKEN }} - name: Comment on PR + if: github.event.pull_request.head.repo.full_name == github.repository uses: peter-evans/create-or-update-comment@v4 with: comment-id: ${{ steps.fc.outputs.comment-id }} issue-number: ${{ github.event.pull_request.number }} body-path: benchmark.txt - edit-mode: replace - token: ${{ secrets.GITHUB_TOKEN }} + edit-mode: replace \ No newline at end of file From 4e1494d16db0ecfaead58fb5fea6f8b12c70713a Mon Sep 17 00:00:00 2001 From: Ebenezer Don Date: Thu, 16 Jan 2025 13:36:21 +0000 Subject: [PATCH 031/101] docs: clarify update endpoints only work on draft messages --- .gitignore | 1 + docs/references/messaging/update-email.md | 2 +- docs/references/messaging/update-push.md | 2 +- docs/references/messaging/update-sms.md | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index a68af84071..1d03c6a7e4 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ dev/yasd_init.php Makefile appwrite.json /.zed/ +.history \ No newline at end of file diff --git a/docs/references/messaging/update-email.md b/docs/references/messaging/update-email.md index 89f01d7a11..1f0d4b61a4 100644 --- a/docs/references/messaging/update-email.md +++ b/docs/references/messaging/update-email.md @@ -1 +1 @@ -Update an email message by its unique ID. +Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. diff --git a/docs/references/messaging/update-push.md b/docs/references/messaging/update-push.md index dd200a9729..e84187116d 100644 --- a/docs/references/messaging/update-push.md +++ b/docs/references/messaging/update-push.md @@ -1 +1 @@ -Update a push notification by its unique ID. +Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. diff --git a/docs/references/messaging/update-sms.md b/docs/references/messaging/update-sms.md index 2f9b57a7a7..5a1cb3d67f 100644 --- a/docs/references/messaging/update-sms.md +++ b/docs/references/messaging/update-sms.md @@ -1 +1 @@ -Update an SMS message by its unique ID. +Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. From 0afbfe2f84bb7d0ffec49b853592874ea1e567f1 Mon Sep 17 00:00:00 2001 From: fogelito Date: Thu, 16 Jan 2025 17:20:30 +0200 Subject: [PATCH 032/101] INDEX_DEPENDENCY --- app/controllers/api/databases.php | 13 ++++++ composer.json | 2 +- composer.lock | 71 +++++++++++++++++-------------- 3 files changed, 54 insertions(+), 32 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 347b4ebbef..22282a8799 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -36,6 +36,7 @@ use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Datetime as DatetimeValidator; use Utopia\Database\Validator\Index as IndexValidator; +use Utopia\Database\Validator\IndexDependency as IndexDependencyValidator; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\Queries; @@ -2421,6 +2422,18 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/attributes/:key throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); } + /** + * Check index dependency + */ + $validator = new IndexDependencyValidator( + $collection->getAttribute('indexes'), + $dbForProject->getAdapter()->getSupportForCastIndexArray(), + ); + + if (! $validator->isValid($attribute)) { + throw new Exception(Exception::INDEX_DEPENDENCY, $validator->getDescription()); + } + // Only update status if removing available attribute if ($attribute->getAttribute('status') === 'available') { $attribute = $dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('status', 'deleting')); diff --git a/composer.json b/composer.json index 882be5b94e..aecb6e0b7e 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,7 @@ "utopia-php/cache": "0.11.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.53.32", + "utopia-php/database": "dev-calculate-row-size as 0.53.32", "utopia-php/domains": "0.5.*", "utopia-php/dsn": "0.2.1", "utopia-php/framework": "0.33.*", diff --git a/composer.lock b/composer.lock index b77915f0a4..18470a2f10 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": "c88950f1d3119d0764a469e1d804ce71", + "content-hash": "2660c24c56f07ac34e51d6128fa67557", "packages": [ { "name": "adhocore/jwt", @@ -1430,16 +1430,16 @@ }, { "name": "open-telemetry/gen-otlp-protobuf", - "version": "1.2.1", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/gen-otlp-protobuf.git", - "reference": "66c3b98e998a726691c92e6405a82e6e7b8b169d" + "reference": "585bafddd4ae6565de154610b10a787a455c9ba0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/gen-otlp-protobuf/zipball/66c3b98e998a726691c92e6405a82e6e7b8b169d", - "reference": "66c3b98e998a726691c92e6405a82e6e7b8b169d", + "url": "https://api.github.com/repos/opentelemetry-php/gen-otlp-protobuf/zipball/585bafddd4ae6565de154610b10a787a455c9ba0", + "reference": "585bafddd4ae6565de154610b10a787a455c9ba0", "shasum": "" }, "require": { @@ -1489,7 +1489,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2024-10-30T11:49:49+00:00" + "time": "2025-01-15T23:07:07+00:00" }, { "name": "open-telemetry/sdk", @@ -3379,16 +3379,16 @@ }, { "name": "utopia-php/compression", - "version": "0.1.2", + "version": "0.1.3", "source": { "type": "git", "url": "https://github.com/utopia-php/compression.git", - "reference": "6062f70596415f8d5de40a589367b0eb2a435f98" + "reference": "66f093557ba66d98245e562036182016c7dcfe8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/compression/zipball/6062f70596415f8d5de40a589367b0eb2a435f98", - "reference": "6062f70596415f8d5de40a589367b0eb2a435f98", + "url": "https://api.github.com/repos/utopia-php/compression/zipball/66f093557ba66d98245e562036182016c7dcfe8a", + "reference": "66f093557ba66d98245e562036182016c7dcfe8a", "shasum": "" }, "require": { @@ -3419,9 +3419,9 @@ ], "support": { "issues": "https://github.com/utopia-php/compression/issues", - "source": "https://github.com/utopia-php/compression/tree/0.1.2" + "source": "https://github.com/utopia-php/compression/tree/0.1.3" }, - "time": "2024-11-08T14:59:54+00:00" + "time": "2025-01-15T15:15:51+00:00" }, { "name": "utopia-php/config", @@ -3476,16 +3476,16 @@ }, { "name": "utopia-php/database", - "version": "0.53.32", + "version": "dev-calculate-row-size", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "981a1241139b42dccd531511130b79137740b205" + "reference": "7f433be4596ae3fce0af98e5a02c446aeaff19f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/981a1241139b42dccd531511130b79137740b205", - "reference": "981a1241139b42dccd531511130b79137740b205", + "url": "https://api.github.com/repos/utopia-php/database/zipball/7f433be4596ae3fce0af98e5a02c446aeaff19f2", + "reference": "7f433be4596ae3fce0af98e5a02c446aeaff19f2", "shasum": "" }, "require": { @@ -3526,9 +3526,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.53.32" + "source": "https://github.com/utopia-php/database/tree/calculate-row-size" }, - "time": "2025-01-10T08:53:47+00:00" + "time": "2025-01-16T14:43:10+00:00" }, { "name": "utopia-php/domains", @@ -4095,16 +4095,16 @@ }, { "name": "utopia-php/platform", - "version": "0.7.1", + "version": "0.7.2", "source": { "type": "git", "url": "https://github.com/utopia-php/platform.git", - "reference": "3433a0f1a54988f2a59c735f507745cb2c24638a" + "reference": "6f9243848f1c6466f6509fd01c7e18306a6d8caf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/platform/zipball/3433a0f1a54988f2a59c735f507745cb2c24638a", - "reference": "3433a0f1a54988f2a59c735f507745cb2c24638a", + "url": "https://api.github.com/repos/utopia-php/platform/zipball/6f9243848f1c6466f6509fd01c7e18306a6d8caf", + "reference": "6f9243848f1c6466f6509fd01c7e18306a6d8caf", "shasum": "" }, "require": { @@ -4139,9 +4139,9 @@ ], "support": { "issues": "https://github.com/utopia-php/platform/issues", - "source": "https://github.com/utopia-php/platform/tree/0.7.1" + "source": "https://github.com/utopia-php/platform/tree/0.7.2" }, - "time": "2024-10-22T10:27:49+00:00" + "time": "2025-01-15T05:56:26+00:00" }, { "name": "utopia-php/pools", @@ -5126,16 +5126,16 @@ }, { "name": "laravel/pint", - "version": "v1.19.0", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "8169513746e1bac70c85d6ea1524d9225d4886f0" + "reference": "53072e8ea22213a7ed168a8a15b96fbb8b82d44b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/8169513746e1bac70c85d6ea1524d9225d4886f0", - "reference": "8169513746e1bac70c85d6ea1524d9225d4886f0", + "url": "https://api.github.com/repos/laravel/pint/zipball/53072e8ea22213a7ed168a8a15b96fbb8b82d44b", + "reference": "53072e8ea22213a7ed168a8a15b96fbb8b82d44b", "shasum": "" }, "require": { @@ -5188,7 +5188,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2024-12-30T16:20:10+00:00" + "time": "2025-01-14T16:20:53+00:00" }, { "name": "matthiasmullie/minify", @@ -8554,9 +8554,18 @@ "time": "2024-03-07T20:33:40+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "utopia-php/database", + "version": "dev-calculate-row-size", + "alias": "0.53.32", + "alias_normalized": "0.53.32.0" + } + ], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": { + "utopia-php/database": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { From 1b4a96b1fbe99d96640755caf64903b484ae009a Mon Sep 17 00:00:00 2001 From: fogelito Date: Thu, 16 Jan 2025 17:22:53 +0200 Subject: [PATCH 033/101] Remove code from worker --- src/Appwrite/Platform/Workers/Databases.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Databases.php b/src/Appwrite/Platform/Workers/Databases.php index ea2b6a2b73..5b73e6a75c 100644 --- a/src/Appwrite/Platform/Workers/Databases.php +++ b/src/Appwrite/Platform/Workers/Databases.php @@ -11,7 +11,6 @@ use Utopia\Database\Document; use Utopia\Database\Exception as DatabaseException; use Utopia\Database\Exception\Authorization; use Utopia\Database\Exception\Conflict; -use Utopia\Database\Exception\Dependency; use Utopia\Database\Exception\NotFound; use Utopia\Database\Exception\Restricted; use Utopia\Database\Exception\Structure; @@ -293,18 +292,16 @@ class Databases extends Action if ($e instanceof DatabaseException) { $attribute->setAttribute('error', $e->getMessage()); - if (! $relatedAttribute->isEmpty()) { + if (!$relatedAttribute->isEmpty()) { $relatedAttribute->setAttribute('error', $e->getMessage()); } } - $dbForProject->updateDocument( 'attributes', $attribute->getId(), $attribute->setAttribute('status', 'stuck') ); - - if (! $relatedAttribute->isEmpty()) { + if (!$relatedAttribute->isEmpty()) { $dbForProject->updateDocument( 'attributes', $relatedAttribute->getId(), @@ -312,10 +309,6 @@ class Databases extends Action ); } - if ($e instanceof Dependency) { - return; - } - throw $e; } finally { $this->trigger($database, $collection, $attribute, $project, $projectId, $events); From 13687f7fc3437795f74222b8872389fb864a8005 Mon Sep 17 00:00:00 2001 From: fogelito Date: Thu, 16 Jan 2025 17:33:51 +0200 Subject: [PATCH 034/101] Use 1.6.x --- app/controllers/api/databases.php | 2 +- composer.json | 2 +- composer.lock | 71 ++++++++++++++----------------- 3 files changed, 33 insertions(+), 42 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 22282a8799..6798d71502 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -2431,7 +2431,7 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/attributes/:key ); if (! $validator->isValid($attribute)) { - throw new Exception(Exception::INDEX_DEPENDENCY, $validator->getDescription()); + throw new Exception(Exception::INDEX_DEPENDENCY); } // Only update status if removing available attribute diff --git a/composer.json b/composer.json index aecb6e0b7e..882be5b94e 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,7 @@ "utopia-php/cache": "0.11.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "dev-calculate-row-size as 0.53.32", + "utopia-php/database": "0.53.32", "utopia-php/domains": "0.5.*", "utopia-php/dsn": "0.2.1", "utopia-php/framework": "0.33.*", diff --git a/composer.lock b/composer.lock index 18470a2f10..b77915f0a4 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": "2660c24c56f07ac34e51d6128fa67557", + "content-hash": "c88950f1d3119d0764a469e1d804ce71", "packages": [ { "name": "adhocore/jwt", @@ -1430,16 +1430,16 @@ }, { "name": "open-telemetry/gen-otlp-protobuf", - "version": "1.5.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/gen-otlp-protobuf.git", - "reference": "585bafddd4ae6565de154610b10a787a455c9ba0" + "reference": "66c3b98e998a726691c92e6405a82e6e7b8b169d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/gen-otlp-protobuf/zipball/585bafddd4ae6565de154610b10a787a455c9ba0", - "reference": "585bafddd4ae6565de154610b10a787a455c9ba0", + "url": "https://api.github.com/repos/opentelemetry-php/gen-otlp-protobuf/zipball/66c3b98e998a726691c92e6405a82e6e7b8b169d", + "reference": "66c3b98e998a726691c92e6405a82e6e7b8b169d", "shasum": "" }, "require": { @@ -1489,7 +1489,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-01-15T23:07:07+00:00" + "time": "2024-10-30T11:49:49+00:00" }, { "name": "open-telemetry/sdk", @@ -3379,16 +3379,16 @@ }, { "name": "utopia-php/compression", - "version": "0.1.3", + "version": "0.1.2", "source": { "type": "git", "url": "https://github.com/utopia-php/compression.git", - "reference": "66f093557ba66d98245e562036182016c7dcfe8a" + "reference": "6062f70596415f8d5de40a589367b0eb2a435f98" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/compression/zipball/66f093557ba66d98245e562036182016c7dcfe8a", - "reference": "66f093557ba66d98245e562036182016c7dcfe8a", + "url": "https://api.github.com/repos/utopia-php/compression/zipball/6062f70596415f8d5de40a589367b0eb2a435f98", + "reference": "6062f70596415f8d5de40a589367b0eb2a435f98", "shasum": "" }, "require": { @@ -3419,9 +3419,9 @@ ], "support": { "issues": "https://github.com/utopia-php/compression/issues", - "source": "https://github.com/utopia-php/compression/tree/0.1.3" + "source": "https://github.com/utopia-php/compression/tree/0.1.2" }, - "time": "2025-01-15T15:15:51+00:00" + "time": "2024-11-08T14:59:54+00:00" }, { "name": "utopia-php/config", @@ -3476,16 +3476,16 @@ }, { "name": "utopia-php/database", - "version": "dev-calculate-row-size", + "version": "0.53.32", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "7f433be4596ae3fce0af98e5a02c446aeaff19f2" + "reference": "981a1241139b42dccd531511130b79137740b205" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/7f433be4596ae3fce0af98e5a02c446aeaff19f2", - "reference": "7f433be4596ae3fce0af98e5a02c446aeaff19f2", + "url": "https://api.github.com/repos/utopia-php/database/zipball/981a1241139b42dccd531511130b79137740b205", + "reference": "981a1241139b42dccd531511130b79137740b205", "shasum": "" }, "require": { @@ -3526,9 +3526,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/calculate-row-size" + "source": "https://github.com/utopia-php/database/tree/0.53.32" }, - "time": "2025-01-16T14:43:10+00:00" + "time": "2025-01-10T08:53:47+00:00" }, { "name": "utopia-php/domains", @@ -4095,16 +4095,16 @@ }, { "name": "utopia-php/platform", - "version": "0.7.2", + "version": "0.7.1", "source": { "type": "git", "url": "https://github.com/utopia-php/platform.git", - "reference": "6f9243848f1c6466f6509fd01c7e18306a6d8caf" + "reference": "3433a0f1a54988f2a59c735f507745cb2c24638a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/platform/zipball/6f9243848f1c6466f6509fd01c7e18306a6d8caf", - "reference": "6f9243848f1c6466f6509fd01c7e18306a6d8caf", + "url": "https://api.github.com/repos/utopia-php/platform/zipball/3433a0f1a54988f2a59c735f507745cb2c24638a", + "reference": "3433a0f1a54988f2a59c735f507745cb2c24638a", "shasum": "" }, "require": { @@ -4139,9 +4139,9 @@ ], "support": { "issues": "https://github.com/utopia-php/platform/issues", - "source": "https://github.com/utopia-php/platform/tree/0.7.2" + "source": "https://github.com/utopia-php/platform/tree/0.7.1" }, - "time": "2025-01-15T05:56:26+00:00" + "time": "2024-10-22T10:27:49+00:00" }, { "name": "utopia-php/pools", @@ -5126,16 +5126,16 @@ }, { "name": "laravel/pint", - "version": "v1.20.0", + "version": "v1.19.0", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "53072e8ea22213a7ed168a8a15b96fbb8b82d44b" + "reference": "8169513746e1bac70c85d6ea1524d9225d4886f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/53072e8ea22213a7ed168a8a15b96fbb8b82d44b", - "reference": "53072e8ea22213a7ed168a8a15b96fbb8b82d44b", + "url": "https://api.github.com/repos/laravel/pint/zipball/8169513746e1bac70c85d6ea1524d9225d4886f0", + "reference": "8169513746e1bac70c85d6ea1524d9225d4886f0", "shasum": "" }, "require": { @@ -5188,7 +5188,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2025-01-14T16:20:53+00:00" + "time": "2024-12-30T16:20:10+00:00" }, { "name": "matthiasmullie/minify", @@ -8554,18 +8554,9 @@ "time": "2024-03-07T20:33:40+00:00" } ], - "aliases": [ - { - "package": "utopia-php/database", - "version": "dev-calculate-row-size", - "alias": "0.53.32", - "alias_normalized": "0.53.32.0" - } - ], + "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "utopia-php/database": 20 - }, + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { From 5cc8d7ced1babebe5f9e31eb86e0213704e0dfc0 Mon Sep 17 00:00:00 2001 From: Ebenezer Don Date: Thu, 16 Jan 2025 18:21:09 +0000 Subject: [PATCH 035/101] Update specs --- .gitignore | 4 +++- app/config/specs/open-api3-1.6.x-console.json | 6 +++--- app/config/specs/open-api3-1.6.x-server.json | 6 +++--- app/config/specs/open-api3-latest-console.json | 6 +++--- app/config/specs/open-api3-latest-server.json | 6 +++--- app/config/specs/swagger2-1.6.x-console.json | 6 +++--- app/config/specs/swagger2-1.6.x-server.json | 6 +++--- app/config/specs/swagger2-latest-console.json | 6 +++--- app/config/specs/swagger2-latest-server.json | 6 +++--- 9 files changed, 27 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index 1d03c6a7e4..a161277965 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,6 @@ dev/yasd_init.php Makefile appwrite.json /.zed/ -.history \ No newline at end of file +.history +appwrite/.env +appwrite/docker-compose.yml \ No newline at end of file diff --git a/app/config/specs/open-api3-1.6.x-console.json b/app/config/specs/open-api3-1.6.x-console.json index 28a242f6ad..825527cb29 100644 --- a/app/config/specs/open-api3-1.6.x-console.json +++ b/app/config/specs/open-api3-1.6.x-console.json @@ -13884,7 +13884,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\n", + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", @@ -14208,7 +14208,7 @@ "tags": [ "messaging" ], - "description": "Update a push notification by its unique ID.\n", + "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", @@ -14499,7 +14499,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\n", + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", diff --git a/app/config/specs/open-api3-1.6.x-server.json b/app/config/specs/open-api3-1.6.x-server.json index 94d7f2ed33..a0b39655ff 100644 --- a/app/config/specs/open-api3-1.6.x-server.json +++ b/app/config/specs/open-api3-1.6.x-server.json @@ -12740,7 +12740,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\n", + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", @@ -13066,7 +13066,7 @@ "tags": [ "messaging" ], - "description": "Update a push notification by its unique ID.\n", + "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", @@ -13359,7 +13359,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\n", + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 28a242f6ad..825527cb29 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -13884,7 +13884,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\n", + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", @@ -14208,7 +14208,7 @@ "tags": [ "messaging" ], - "description": "Update a push notification by its unique ID.\n", + "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", @@ -14499,7 +14499,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\n", + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 94d7f2ed33..a0b39655ff 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -12740,7 +12740,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\n", + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", @@ -13066,7 +13066,7 @@ "tags": [ "messaging" ], - "description": "Update a push notification by its unique ID.\n", + "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", @@ -13359,7 +13359,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\n", + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", diff --git a/app/config/specs/swagger2-1.6.x-console.json b/app/config/specs/swagger2-1.6.x-console.json index efdcca1579..aa3b69eb4f 100644 --- a/app/config/specs/swagger2-1.6.x-console.json +++ b/app/config/specs/swagger2-1.6.x-console.json @@ -14118,7 +14118,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\n", + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", @@ -14472,7 +14472,7 @@ "tags": [ "messaging" ], - "description": "Update a push notification by its unique ID.\n", + "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", @@ -14788,7 +14788,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\n", + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", diff --git a/app/config/specs/swagger2-1.6.x-server.json b/app/config/specs/swagger2-1.6.x-server.json index 5b4fbe92b7..9794373e33 100644 --- a/app/config/specs/swagger2-1.6.x-server.json +++ b/app/config/specs/swagger2-1.6.x-server.json @@ -12982,7 +12982,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\n", + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", @@ -13338,7 +13338,7 @@ "tags": [ "messaging" ], - "description": "Update a push notification by its unique ID.\n", + "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", @@ -13656,7 +13656,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\n", + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index efdcca1579..aa3b69eb4f 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -14118,7 +14118,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\n", + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", @@ -14472,7 +14472,7 @@ "tags": [ "messaging" ], - "description": "Update a push notification by its unique ID.\n", + "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", @@ -14788,7 +14788,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\n", + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 5b4fbe92b7..9794373e33 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -12982,7 +12982,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\n", + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", @@ -13338,7 +13338,7 @@ "tags": [ "messaging" ], - "description": "Update a push notification by its unique ID.\n", + "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", @@ -13656,7 +13656,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\n", + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", From a1031ab921ec2b2ceb876fc194e2adcabf43b13b Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Fri, 17 Jan 2025 03:58:23 +0000 Subject: [PATCH 036/101] fix: update membership --- app/controllers/api/teams.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 827ca58964..7efe2a5a2d 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -582,6 +582,12 @@ App::post('/v1/teams/:teamId/memberships') Authorization::skip(fn () => $dbForProject->increaseDocumentAttribute('teams', $team->getId(), 'total', 1)); } else { + $membership = new Document([ + '$id' => $membership->getId(), + 'joined' => ($isPrivilegedUser || $isAppUser) ? DateTime::now() : null, + 'confirm' => ($isPrivilegedUser || $isAppUser), + ]); + $membership = ($isPrivilegedUser || $isAppUser) ? Authorization::skip(fn () => $dbForProject->updateDocument('memberships', $membership->getId(), $membership)) : $dbForProject->updateDocument('memberships', $membership->getId(), $membership); From 95dcb67747922d3f640974c0c164308019535806 Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Fri, 17 Jan 2025 13:31:39 +0900 Subject: [PATCH 037/101] Implement new SDK Class on 1.6.x --- app/config/specs/open-api3-latest-client.json | 300 +---- .../specs/open-api3-latest-console.json | 1143 +--------------- app/config/specs/open-api3-latest-server.json | 830 +----------- app/config/specs/swagger2-latest-client.json | 304 +---- app/config/specs/swagger2-latest-console.json | 1195 +---------------- app/config/specs/swagger2-latest-server.json | 879 +----------- app/controllers/api/account.php | 998 +++++++++----- app/controllers/api/avatars.php | 154 ++- app/controllers/api/console.php | 45 +- app/controllers/api/databases.php | 971 +++++++++----- app/controllers/api/functions.php | 552 +++++--- app/controllers/api/graphql.php | 80 +- app/controllers/api/health.php | 469 ++++--- app/controllers/api/locale.php | 173 ++- app/controllers/api/messaging.php | 884 +++++++----- app/controllers/api/migrations.php | 242 ++-- app/controllers/api/project.php | 119 +- app/controllers/api/projects.php | 835 ++++++++---- app/controllers/api/proxy.php | 98 +- app/controllers/api/storage.php | 300 +++-- app/controllers/api/teams.php | 282 ++-- app/controllers/api/users.php | 824 ++++++++---- app/controllers/api/vcs.php | 216 +-- app/controllers/general.php | 34 +- app/controllers/mock.php | 4 +- app/controllers/shared/api.php | 17 +- composer.lock | 34 +- src/Appwrite/GraphQL/Schema.php | 45 +- src/Appwrite/GraphQL/Types/Mapper.php | 43 +- src/Appwrite/Platform/Tasks/Specs.php | 92 +- src/Appwrite/SDK/AuthType.php | 11 + src/Appwrite/SDK/ContentType.php | 15 + src/Appwrite/SDK/Method.php | 276 ++++ src/Appwrite/SDK/MethodType.php | 11 + src/Appwrite/SDK/Response.php | 27 + .../Specification/Format/OpenAPI3.php | 216 +-- .../Specification/Format/Swagger2.php | 214 +-- src/Appwrite/Utopia/Request.php | 26 +- tests/unit/Utopia/RequestTest.php | 10 +- 39 files changed, 5671 insertions(+), 7297 deletions(-) create mode 100644 src/Appwrite/SDK/AuthType.php create mode 100644 src/Appwrite/SDK/ContentType.php create mode 100644 src/Appwrite/SDK/Method.php create mode 100644 src/Appwrite/SDK/MethodType.php create mode 100644 src/Appwrite/SDK/Response.php diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index af7303c985..4c82afc8a7 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -58,9 +58,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -109,9 +106,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -196,9 +190,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -274,9 +265,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/identities", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -335,9 +323,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -400,9 +385,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -451,9 +433,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -519,9 +498,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -591,9 +567,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -659,9 +632,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -739,9 +709,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -809,9 +776,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -857,10 +821,10 @@ ], "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", "responses": { - "204": { - "description": "No content", + "200": { + "description": "Session", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/session" } @@ -885,9 +849,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -963,9 +924,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1016,9 +974,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1067,9 +1022,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1118,9 +1070,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1171,9 +1120,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1243,9 +1189,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1320,9 +1263,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1398,9 +1338,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1449,9 +1386,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1524,9 +1458,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1600,9 +1531,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1684,9 +1612,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1728,9 +1653,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1781,9 +1703,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1832,9 +1751,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1908,9 +1824,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1977,9 +1890,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2120,9 +2030,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2196,9 +2103,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2272,9 +2176,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "{sessionId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2335,9 +2236,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2391,9 +2289,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2456,9 +2351,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2508,9 +2400,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2589,9 +2478,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2643,14 +2529,7 @@ "description": "", "responses": { "204": { - "description": "No content", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/target" - } - } - } + "description": "No content" } }, "x-appwrite": { @@ -2669,9 +2548,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2733,9 +2609,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2817,9 +2690,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2896,9 +2766,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3042,9 +2909,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3118,9 +2982,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3188,9 +3049,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3269,9 +3127,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3320,9 +3175,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3392,9 +3244,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3520,9 +3369,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3652,9 +3498,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3712,9 +3555,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4202,9 +4042,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4286,9 +4123,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4380,9 +4214,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4481,9 +4312,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4568,9 +4396,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4677,9 +4502,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4774,9 +4596,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4875,9 +4694,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4961,9 +4777,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5049,9 +4862,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5166,9 +4976,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5242,9 +5049,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5296,9 +5100,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5350,9 +5151,6 @@ "server" ], "packaging": false, - "offline-model": "\/localed", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5404,9 +5202,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/localeCode", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5458,9 +5253,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/continents", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -5512,9 +5304,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -5566,9 +5355,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/eu", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -5620,9 +5406,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/phones", - "offline-key": "", - "offline-response-key": "countryCode", "auth": { "Project": [] } @@ -5674,9 +5457,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/currencies", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -5728,9 +5508,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/languages", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -5783,9 +5560,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5868,9 +5642,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5944,9 +5715,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6032,9 +5800,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6132,9 +5897,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6206,9 +5968,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6297,9 +6056,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6366,9 +6122,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6435,9 +6188,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6653,9 +6403,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6729,9 +6476,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6807,9 +6551,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6894,9 +6635,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6958,9 +6696,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7034,9 +6769,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7100,9 +6832,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7188,9 +6917,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7301,9 +7027,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "{membershipId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7375,9 +7098,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7464,9 +7184,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7539,9 +7256,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7639,9 +7353,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7702,9 +7413,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 28a242f6ad..fa0455e2ee 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -58,9 +58,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -108,9 +105,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -185,9 +179,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -236,9 +227,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -313,9 +301,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/identities", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -373,9 +358,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -437,9 +419,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -488,9 +467,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -555,9 +531,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -626,9 +599,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -693,9 +663,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -772,9 +739,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -841,9 +805,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -889,10 +850,10 @@ ], "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", "responses": { - "204": { - "description": "No content", + "200": { + "description": "Session", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/session" } @@ -917,9 +878,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -994,9 +952,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1046,9 +1001,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1096,9 +1048,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1146,9 +1095,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1198,9 +1144,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1269,9 +1212,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1345,9 +1285,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1422,9 +1359,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1472,9 +1406,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1546,9 +1477,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1621,9 +1549,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1704,9 +1629,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1747,9 +1669,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1799,9 +1718,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1850,9 +1766,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1926,9 +1839,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1995,9 +1905,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2138,9 +2045,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2214,9 +2118,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2290,9 +2191,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "{sessionId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2352,9 +2250,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2407,9 +2302,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2471,9 +2363,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2522,9 +2411,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2602,9 +2488,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2655,14 +2538,7 @@ "description": "", "responses": { "204": { - "description": "No content", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/target" - } - } - } + "description": "No content" } }, "x-appwrite": { @@ -2681,9 +2557,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2744,9 +2617,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2828,9 +2698,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2907,9 +2774,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3053,9 +2917,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3129,9 +2990,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3198,9 +3056,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3278,9 +3133,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3328,9 +3180,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3399,9 +3248,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3527,9 +3373,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3659,9 +3502,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3719,9 +3559,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4209,9 +4046,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4293,9 +4127,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4387,9 +4218,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4479,9 +4307,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4548,9 +4373,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4598,9 +4420,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4673,9 +4492,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4754,9 +4570,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4828,9 +4641,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4889,9 +4699,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4967,9 +4774,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5030,9 +4834,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5115,9 +4916,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5221,9 +5019,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5292,9 +5087,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5393,9 +5185,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5466,9 +5255,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5552,9 +5338,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5636,7 +5419,7 @@ "200": { "description": "AttributeBoolean", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeBoolean" } @@ -5660,9 +5443,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5773,9 +5553,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5857,7 +5634,7 @@ "200": { "description": "AttributeDatetime", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeDatetime" } @@ -5881,9 +5658,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5994,9 +5768,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6078,7 +5849,7 @@ "200": { "description": "AttributeEmail", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeEmail" } @@ -6102,9 +5873,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6215,9 +5983,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6308,7 +6073,7 @@ "200": { "description": "AttributeEnum", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeEnum" } @@ -6332,9 +6097,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6454,9 +6216,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6548,7 +6307,7 @@ "200": { "description": "AttributeFloat", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeFloat" } @@ -6572,9 +6331,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6697,9 +6453,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6791,7 +6544,7 @@ "200": { "description": "AttributeInteger", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeInteger" } @@ -6815,9 +6568,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6940,9 +6690,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7024,7 +6771,7 @@ "200": { "description": "AttributeIP", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeIp" } @@ -7048,9 +6795,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7161,9 +6905,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7294,9 +7035,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7389,7 +7127,7 @@ "200": { "description": "AttributeString", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeString" } @@ -7413,9 +7151,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7531,9 +7266,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7615,7 +7347,7 @@ "200": { "description": "AttributeURL", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeUrl" } @@ -7639,9 +7371,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7783,9 +7512,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7856,9 +7582,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7914,7 +7637,7 @@ "200": { "description": "AttributeRelationship", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeRelationship" } @@ -7938,9 +7661,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8050,9 +7770,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8137,9 +7854,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8246,9 +7960,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8343,9 +8054,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8444,9 +8152,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8528,9 +8233,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8623,9 +8325,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8707,9 +8406,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8829,9 +8525,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8902,9 +8595,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8984,9 +8674,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9069,9 +8756,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9163,9 +8847,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9238,9 +8919,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9322,9 +9000,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9397,9 +9072,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9646,9 +9318,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9698,9 +9367,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9749,9 +9415,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9851,9 +9514,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9913,9 +9573,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9987,9 +9644,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10048,9 +9702,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10274,9 +9925,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10337,9 +9985,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10422,9 +10067,6 @@ "server" ], "packaging": true, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10520,9 +10162,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10591,9 +10230,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10655,9 +10291,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10721,9 +10354,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10808,9 +10438,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10875,9 +10502,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10951,9 +10575,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11039,9 +10660,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11156,9 +10774,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11221,9 +10836,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11294,9 +10906,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11378,9 +10987,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11439,9 +11045,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11527,9 +11130,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11598,9 +11198,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11686,9 +11283,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11761,9 +11355,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11815,9 +11406,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11867,9 +11455,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11918,9 +11503,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11969,9 +11551,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12020,9 +11599,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12082,9 +11658,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12133,9 +11706,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12184,9 +11754,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12235,9 +11802,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12299,9 +11863,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12363,9 +11924,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12438,9 +11996,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12502,9 +12057,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12592,9 +12144,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12656,9 +12205,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12720,9 +12266,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12784,9 +12327,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12848,9 +12388,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12912,9 +12449,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12976,9 +12510,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13040,9 +12571,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13104,9 +12632,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13155,9 +12680,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13206,9 +12728,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13259,9 +12778,6 @@ "server" ], "packaging": false, - "offline-model": "\/localed", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13313,9 +12829,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/localeCode", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13367,9 +12880,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/continents", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -13421,9 +12931,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -13475,9 +12982,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/eu", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -13529,9 +13033,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/phones", - "offline-key": "", - "offline-response-key": "countryCode", "auth": { "Project": [] } @@ -13583,9 +13084,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/currencies", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -13637,9 +13135,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/languages", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -13690,9 +13185,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13768,9 +13260,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13914,9 +13403,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14062,9 +13548,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14238,9 +13721,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14418,9 +13898,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14499,7 +13976,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\n", + "description": "Update an SMS message by its unique ID.\n", "responses": { "200": { "description": "Message", @@ -14519,7 +13996,7 @@ "type": "", "deprecated": false, "demo": "messaging\/update-sms.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -14529,9 +14006,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14643,9 +14117,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14698,9 +14169,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14762,9 +14230,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14839,9 +14304,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14916,9 +14378,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14994,9 +14453,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15101,9 +14557,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15211,9 +14664,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15298,9 +14748,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15388,9 +14835,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15505,9 +14949,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15625,9 +15066,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15722,9 +15160,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15822,9 +15257,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15929,9 +15361,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16039,9 +15468,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16184,9 +15610,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16331,9 +15754,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16428,9 +15848,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16528,9 +15945,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16625,9 +16039,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16725,9 +16136,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16822,9 +16230,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16922,9 +16327,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17019,9 +16421,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17119,9 +16518,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17174,9 +16570,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17238,9 +16631,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17315,9 +16705,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17392,9 +16779,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17468,9 +16852,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17553,9 +16934,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17615,9 +16993,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17694,9 +17069,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17758,9 +17130,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17835,9 +17204,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17923,9 +17289,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18013,9 +17376,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18080,9 +17440,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18154,9 +17511,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18230,9 +17584,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18320,9 +17671,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18415,9 +17763,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18493,9 +17838,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18567,9 +17909,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18680,9 +18019,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18815,9 +18151,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18922,9 +18255,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19048,9 +18378,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19108,9 +18435,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19161,9 +18485,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19223,9 +18544,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19313,9 +18631,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19361,9 +18676,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19436,9 +18748,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19496,9 +18805,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19573,9 +18879,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19635,9 +18938,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19709,9 +19009,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19846,9 +19143,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19906,9 +19200,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20023,9 +19314,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20085,9 +19373,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20179,9 +19464,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20260,9 +19542,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20341,9 +19620,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20422,9 +19698,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20503,9 +19776,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20596,9 +19866,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20680,9 +19947,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20761,9 +20025,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20842,9 +20103,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20923,9 +20181,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21004,9 +20259,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21106,9 +20358,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21195,9 +20444,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21255,9 +20501,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21350,9 +20593,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21420,9 +20660,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21516,9 +20753,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21588,9 +20822,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21727,9 +20958,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21787,9 +21015,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21908,9 +21133,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21978,9 +21200,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22075,9 +21294,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22147,9 +21363,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22249,9 +21462,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22330,9 +21540,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22450,9 +21657,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22583,9 +21787,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22664,9 +21865,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22864,11 +22062,11 @@ "description": "", "responses": { "200": { - "description": "Project", + "description": "EmailTemplate", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/emailTemplate" } } } @@ -22890,9 +22088,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -23156,9 +22351,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -23384,9 +22576,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -23607,9 +22796,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -23849,9 +23035,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24074,9 +23257,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24134,9 +23314,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24251,9 +23428,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24321,9 +23495,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24439,9 +23610,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24511,9 +23679,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24583,9 +23748,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24657,9 +23819,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24743,9 +23902,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24796,9 +23952,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24858,9 +24011,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24920,9 +24070,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24995,9 +24142,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25124,9 +24268,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25185,9 +24326,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25311,9 +24449,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25376,9 +24511,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25464,9 +24596,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25564,9 +24693,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25638,9 +24764,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25729,9 +24852,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25798,9 +24918,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25867,9 +24984,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26085,9 +25199,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26159,9 +25270,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26233,9 +25341,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26319,9 +25424,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26397,9 +25499,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26484,9 +25583,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26548,9 +25644,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26624,9 +25717,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26688,9 +25778,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26765,9 +25852,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26853,9 +25937,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26966,9 +26047,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "{membershipId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27040,9 +26118,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27129,9 +26204,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27204,9 +26276,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27303,9 +26372,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27365,9 +26431,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27447,9 +26510,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27522,9 +26582,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27612,9 +26669,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27699,9 +26753,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27786,9 +26837,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27856,9 +26904,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27919,9 +26964,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28006,9 +27048,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28093,9 +27132,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28210,9 +27246,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28315,9 +27348,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28422,9 +27452,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28496,9 +27523,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28550,9 +27574,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28613,9 +27634,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28695,9 +27713,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28779,9 +27794,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28864,9 +27876,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28940,9 +27949,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29003,9 +28009,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29058,15 +28061,8 @@ ], "description": "Delete an authenticator app.", "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } + "204": { + "description": "No content" } }, "x-appwrite": { @@ -29085,9 +28081,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29163,9 +28156,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29226,9 +28216,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29287,9 +28274,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29348,9 +28332,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29411,9 +28392,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29493,9 +28471,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29575,9 +28550,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29657,9 +28629,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29718,9 +28687,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29800,9 +28766,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29861,9 +28824,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29915,9 +28875,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29971,9 +28928,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30044,9 +28998,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30127,9 +29078,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30202,9 +29150,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30314,9 +29259,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30386,9 +29328,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30477,9 +29416,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30550,9 +29486,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30634,9 +29567,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30716,9 +29646,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30798,9 +29725,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30869,9 +29793,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30956,9 +29877,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31028,9 +29946,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31100,9 +30015,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31183,9 +30095,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31264,9 +30173,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31355,9 +30261,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31431,9 +30334,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31484,9 +30384,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 94d7f2ed33..d0630d8ac1 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -58,9 +58,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -110,9 +107,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -197,9 +191,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -276,9 +267,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/identities", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -338,9 +326,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -404,9 +389,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -455,9 +437,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -524,9 +503,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -597,9 +573,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -666,9 +639,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -747,9 +717,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -818,9 +785,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -866,10 +830,10 @@ ], "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", "responses": { - "204": { - "description": "No content", + "200": { + "description": "Session", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/session" } @@ -894,9 +858,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -973,9 +934,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1027,9 +985,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1079,9 +1034,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1131,9 +1083,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1185,9 +1134,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1258,9 +1204,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1336,9 +1279,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1415,9 +1355,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1467,9 +1404,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1543,9 +1477,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1620,9 +1551,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1705,9 +1633,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1750,9 +1675,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1804,9 +1726,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1855,9 +1774,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1931,9 +1847,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2007,9 +1920,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2083,9 +1993,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2159,9 +2066,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "{sessionId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -2223,9 +2127,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -2280,9 +2181,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -2346,9 +2244,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -2400,9 +2295,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2484,9 +2376,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2563,9 +2452,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2709,9 +2595,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2785,9 +2668,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -2856,9 +2736,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -2938,9 +2815,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -2990,9 +2864,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3063,9 +2934,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3193,9 +3061,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3327,9 +3192,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3389,9 +3251,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3881,9 +3740,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3967,9 +3823,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -4063,9 +3916,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -4164,9 +4014,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4240,9 +4087,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4322,9 +4166,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4384,9 +4225,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4463,9 +4301,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4527,9 +4362,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4613,9 +4445,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4720,9 +4549,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4792,9 +4618,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4894,9 +4717,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4968,9 +4788,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5055,9 +4872,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5140,7 +4954,7 @@ "200": { "description": "AttributeBoolean", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeBoolean" } @@ -5164,9 +4978,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5278,9 +5089,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5363,7 +5171,7 @@ "200": { "description": "AttributeDatetime", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeDatetime" } @@ -5387,9 +5195,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5501,9 +5306,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5586,7 +5388,7 @@ "200": { "description": "AttributeEmail", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeEmail" } @@ -5610,9 +5412,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5724,9 +5523,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5818,7 +5614,7 @@ "200": { "description": "AttributeEnum", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeEnum" } @@ -5842,9 +5638,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5965,9 +5758,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6060,7 +5850,7 @@ "200": { "description": "AttributeFloat", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeFloat" } @@ -6084,9 +5874,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6210,9 +5997,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6305,7 +6089,7 @@ "200": { "description": "AttributeInteger", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeInteger" } @@ -6329,9 +6113,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6455,9 +6236,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6540,7 +6318,7 @@ "200": { "description": "AttributeIP", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeIp" } @@ -6564,9 +6342,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6678,9 +6453,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6812,9 +6584,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6908,7 +6677,7 @@ "200": { "description": "AttributeString", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeString" } @@ -6932,9 +6701,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7051,9 +6817,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7136,7 +6899,7 @@ "200": { "description": "AttributeURL", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeUrl" } @@ -7160,9 +6923,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7305,9 +7065,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7379,9 +7136,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7438,7 +7192,7 @@ "200": { "description": "AttributeRelationship", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeRelationship" } @@ -7462,9 +7216,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7575,9 +7326,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -7664,9 +7412,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -7775,9 +7520,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -7874,9 +7616,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -7977,9 +7716,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -8063,9 +7799,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8148,9 +7881,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8271,9 +8001,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8345,9 +8072,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8428,9 +8152,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8504,9 +8225,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8754,9 +8472,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8807,9 +8522,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8859,9 +8571,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8921,9 +8630,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9148,9 +8854,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9212,9 +8915,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9298,9 +8998,6 @@ "server" ], "packaging": true, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9397,9 +9094,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9469,9 +9163,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9534,9 +9225,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9601,9 +9289,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9689,9 +9374,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9757,9 +9439,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9834,9 +9513,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -9924,9 +9600,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -10043,9 +9716,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -10110,9 +9780,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10184,9 +9851,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10246,9 +9910,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10335,9 +9996,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10407,9 +10065,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10496,9 +10151,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10572,9 +10224,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10628,9 +10277,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10682,9 +10328,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10734,9 +10377,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10786,9 +10426,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10838,9 +10475,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10901,9 +10535,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10953,9 +10584,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11005,9 +10633,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11057,9 +10682,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11122,9 +10744,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11187,9 +10806,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11263,9 +10879,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11328,9 +10941,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11419,9 +11029,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11484,9 +11091,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11549,9 +11153,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11614,9 +11215,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11679,9 +11277,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11744,9 +11339,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11809,9 +11401,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11874,9 +11463,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11939,9 +11525,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11991,9 +11574,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12043,9 +11623,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12097,9 +11674,6 @@ "server" ], "packaging": false, - "offline-model": "\/localed", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -12153,9 +11727,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/localeCode", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -12209,9 +11780,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/continents", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [], "Session": [] @@ -12265,9 +11833,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [], "Session": [] @@ -12321,9 +11886,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/eu", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [], "Session": [] @@ -12377,9 +11939,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/phones", - "offline-key": "", - "offline-response-key": "countryCode", "auth": { "Project": [], "Session": [] @@ -12433,9 +11992,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/currencies", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [], "Session": [] @@ -12489,9 +12045,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/languages", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [], "Session": [] @@ -12544,9 +12097,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12623,9 +12173,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12770,9 +12317,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12919,9 +12463,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13096,9 +12637,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13277,9 +12815,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13359,7 +12894,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\n", + "description": "Update an SMS message by its unique ID.\n", "responses": { "200": { "description": "Message", @@ -13379,7 +12914,7 @@ "type": "", "deprecated": false, "demo": "messaging\/update-sms.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13389,9 +12924,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13504,9 +13036,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13560,9 +13089,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13625,9 +13151,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13703,9 +13226,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13781,9 +13301,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13860,9 +13377,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13968,9 +13482,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14079,9 +13590,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14167,9 +13675,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14258,9 +13763,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14376,9 +13878,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14497,9 +13996,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14595,9 +14091,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14696,9 +14189,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14804,9 +14294,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14915,9 +14402,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15061,9 +14545,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15209,9 +14690,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15307,9 +14785,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15408,9 +14883,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15506,9 +14978,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15607,9 +15076,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15705,9 +15171,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15806,9 +15269,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15904,9 +15364,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16005,9 +15462,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16061,9 +15515,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16126,9 +15577,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16204,9 +15652,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16282,9 +15727,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16359,9 +15801,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16445,9 +15884,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16508,9 +15944,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16588,9 +16021,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16653,9 +16083,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16731,9 +16158,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16820,9 +16244,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "JWT": [] @@ -16912,9 +16333,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16980,9 +16398,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "JWT": [] @@ -17056,9 +16471,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17132,9 +16544,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17262,9 +16671,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17324,9 +16730,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17451,9 +16854,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17517,9 +16917,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -17607,9 +17004,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -17709,9 +17103,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -17785,9 +17176,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -17878,9 +17266,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -17949,9 +17334,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18020,9 +17402,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18240,9 +17619,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18318,9 +17694,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18398,9 +17771,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18487,9 +17857,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18553,9 +17920,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18631,9 +17995,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18699,9 +18060,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18789,9 +18147,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18904,9 +18259,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "{membershipId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18980,9 +18332,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19071,9 +18420,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19148,9 +18494,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19249,9 +18592,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19313,9 +18653,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19397,9 +18734,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -19473,9 +18807,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -19564,9 +18895,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -19652,9 +18980,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -19740,9 +19065,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -19811,9 +19133,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -19875,9 +19194,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -19963,9 +19279,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20051,9 +19364,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20169,9 +19479,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20275,9 +19582,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20383,9 +19687,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20438,9 +19739,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20502,9 +19800,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20585,9 +19880,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20670,9 +19962,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20756,9 +20045,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20833,9 +20119,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20897,9 +20180,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20953,15 +20233,8 @@ ], "description": "Delete an authenticator app.", "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } + "204": { + "description": "No content" } }, "x-appwrite": { @@ -20980,9 +20253,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21059,9 +20329,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21123,9 +20390,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21185,9 +20449,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21247,9 +20508,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21311,9 +20569,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21394,9 +20649,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21477,9 +20729,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21560,9 +20809,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21622,9 +20868,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21705,9 +20948,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21767,9 +21007,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21822,9 +21059,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21879,9 +21113,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21953,9 +21184,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22037,9 +21265,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22113,9 +21338,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22226,9 +21448,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22299,9 +21518,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22391,9 +21607,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22465,9 +21678,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22550,9 +21760,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22633,9 +21840,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 77025ec042..17eef07fdc 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -102,9 +102,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -155,9 +152,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -248,9 +242,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -330,9 +321,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/identities", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -394,9 +382,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -459,9 +444,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -512,9 +494,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -581,9 +560,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -656,9 +632,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -724,9 +697,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -805,9 +775,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -875,9 +842,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -922,14 +886,19 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "account" ], "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } } }, "x-appwrite": { @@ -949,9 +918,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1031,9 +997,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1086,9 +1049,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1139,9 +1099,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1192,9 +1149,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1247,9 +1201,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1322,9 +1273,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1403,9 +1351,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1485,9 +1430,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1538,9 +1480,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1616,9 +1555,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1696,9 +1632,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1785,9 +1718,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1833,9 +1763,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1888,9 +1815,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1941,9 +1865,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2021,9 +1942,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2098,9 +2016,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2236,9 +2151,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2316,9 +2228,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2396,9 +2305,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "{sessionId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2459,9 +2365,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2517,9 +2420,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2582,9 +2482,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2636,9 +2533,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2722,9 +2616,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2770,9 +2661,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "account" ], @@ -2798,9 +2687,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2862,9 +2748,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2951,9 +2834,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3040,9 +2920,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3181,9 +3058,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3261,9 +3135,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3334,9 +3205,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3419,9 +3287,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3472,9 +3337,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3555,9 +3417,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3684,9 +3543,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3817,9 +3673,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3884,9 +3737,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4375,9 +4225,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4462,9 +4309,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4557,9 +4401,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4652,9 +4493,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4736,9 +4574,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4844,9 +4679,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4936,9 +4768,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5035,9 +4864,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5117,9 +4943,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5202,9 +5025,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5323,9 +5143,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5397,9 +5214,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5473,9 +5287,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5549,9 +5360,6 @@ "server" ], "packaging": false, - "offline-model": "\/localed", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5605,9 +5413,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/localeCode", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5661,9 +5466,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/continents", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -5717,9 +5519,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -5773,9 +5572,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/eu", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -5829,9 +5625,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/phones", - "offline-key": "", - "offline-response-key": "countryCode", "auth": { "Project": [] } @@ -5885,9 +5678,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/currencies", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -5941,9 +5731,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/languages", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -5998,9 +5785,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6056,9 +5840,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "messaging" ], @@ -6087,9 +5869,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6161,9 +5940,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6246,9 +6022,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6340,9 +6113,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6412,9 +6182,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6503,9 +6270,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6577,9 +6341,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6651,9 +6412,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6852,9 +6610,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6926,9 +6681,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7003,9 +6755,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7097,9 +6846,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7161,9 +6907,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7238,9 +6981,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7304,9 +7044,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7389,9 +7126,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7506,9 +7240,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "{membershipId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7578,9 +7309,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7666,9 +7394,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7739,9 +7464,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7837,9 +7559,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7900,9 +7619,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index efdcca1579..b2f4797690 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -114,9 +114,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -166,9 +163,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -251,9 +245,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -304,9 +295,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -385,9 +373,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/identities", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -448,9 +433,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -512,9 +494,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -565,9 +544,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -633,9 +609,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -707,9 +680,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -774,9 +744,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -854,9 +821,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -923,9 +887,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -970,14 +931,19 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "account" ], "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } } }, "x-appwrite": { @@ -997,9 +963,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1078,9 +1041,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1132,9 +1092,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1184,9 +1141,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1236,9 +1190,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1290,9 +1241,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1364,9 +1312,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1444,9 +1389,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1525,9 +1467,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1577,9 +1516,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1654,9 +1590,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1733,9 +1666,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1821,9 +1751,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1868,9 +1795,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1922,9 +1846,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1975,9 +1896,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2055,9 +1973,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2132,9 +2047,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2270,9 +2182,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2350,9 +2259,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2430,9 +2336,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "{sessionId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2492,9 +2395,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2549,9 +2449,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2613,9 +2510,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2666,9 +2560,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2751,9 +2642,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2798,9 +2686,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "account" ], @@ -2826,9 +2712,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2889,9 +2772,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2978,9 +2858,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3067,9 +2944,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3208,9 +3082,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3288,9 +3159,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3360,9 +3228,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3444,9 +3309,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3496,9 +3358,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3578,9 +3437,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3707,9 +3563,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3840,9 +3693,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3907,9 +3757,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4398,9 +4245,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4485,9 +4329,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4580,9 +4421,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4673,9 +4511,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4745,9 +4580,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4797,9 +4629,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4871,9 +4700,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4957,9 +4783,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5031,9 +4854,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5092,9 +4912,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5172,9 +4989,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5235,9 +5049,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5317,9 +5128,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5426,9 +5234,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5495,9 +5300,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5598,9 +5400,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5669,9 +5468,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5752,9 +5548,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5829,7 +5622,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -5858,9 +5653,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5968,9 +5760,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6045,7 +5834,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -6074,9 +5865,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6184,9 +5972,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6261,7 +6046,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -6290,9 +6077,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6400,9 +6184,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6487,7 +6268,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -6516,9 +6299,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6636,9 +6416,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6725,7 +6502,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -6754,9 +6533,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6878,9 +6654,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6967,7 +6740,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -6996,9 +6771,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7120,9 +6892,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7197,7 +6966,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -7226,9 +6997,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7336,9 +7104,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7471,9 +7236,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7561,7 +7323,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -7590,9 +7354,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7706,9 +7467,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7783,7 +7541,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -7812,9 +7572,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7953,9 +7710,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8024,9 +7778,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8071,7 +7822,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -8100,9 +7853,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8208,9 +7958,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8292,9 +8039,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8400,9 +8144,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8492,9 +8233,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8591,9 +8329,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8671,9 +8406,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8761,9 +8493,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8842,9 +8571,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8964,9 +8690,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9035,9 +8758,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9113,9 +8833,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9195,9 +8912,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9285,9 +8999,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9359,9 +9070,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9441,9 +9149,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9515,9 +9220,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9788,9 +9490,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9842,9 +9541,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9895,9 +9591,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9993,9 +9686,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10055,9 +9745,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10129,9 +9816,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10190,9 +9874,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10433,9 +10114,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10496,9 +10174,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10578,9 +10253,6 @@ "server" ], "packaging": true, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10672,9 +10344,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10741,9 +10410,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10805,9 +10471,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10845,7 +10508,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "functions" ], @@ -10871,9 +10536,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10955,9 +10617,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11027,9 +10686,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11101,9 +10757,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11186,9 +10839,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11307,9 +10957,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11372,9 +11019,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11443,9 +11087,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11525,9 +11166,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11586,9 +11224,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11674,9 +11309,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11743,9 +11375,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11831,9 +11460,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11904,9 +11530,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11980,9 +11603,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12054,9 +11674,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12107,9 +11724,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12160,9 +11774,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12213,9 +11824,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12275,9 +11883,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12328,9 +11933,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12381,9 +11983,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12434,9 +12033,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12498,9 +12094,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12562,9 +12155,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12635,9 +12225,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12699,9 +12286,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12787,9 +12371,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12851,9 +12432,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12915,9 +12493,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12979,9 +12554,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13043,9 +12615,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13107,9 +12676,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13171,9 +12737,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13235,9 +12798,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13299,9 +12859,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13352,9 +12909,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13405,9 +12959,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13460,9 +13011,6 @@ "server" ], "packaging": false, - "offline-model": "\/localed", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13516,9 +13064,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/localeCode", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13572,9 +13117,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/continents", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -13628,9 +13170,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -13684,9 +13223,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/eu", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -13740,9 +13276,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/phones", - "offline-key": "", - "offline-response-key": "countryCode", "auth": { "Project": [] } @@ -13796,9 +13329,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/currencies", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -13852,9 +13382,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/languages", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -13907,9 +13434,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13984,9 +13508,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14144,9 +13665,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14301,9 +13819,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14498,9 +14013,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14694,9 +14206,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14788,7 +14297,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\n", + "description": "Update an SMS message by its unique ID.\n", "responses": { "200": { "description": "Message", @@ -14804,7 +14313,7 @@ "type": "", "deprecated": false, "demo": "messaging\/update-sms.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -14814,9 +14323,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14932,9 +14438,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14962,9 +14465,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "messaging" ], @@ -14991,9 +14492,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15055,9 +14553,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15131,9 +14626,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15207,9 +14699,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15284,9 +14773,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15401,9 +14887,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15516,9 +14999,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15609,9 +15089,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15700,9 +15177,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15829,9 +15303,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15956,9 +15427,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16061,9 +15529,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16164,9 +15629,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16281,9 +15743,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16396,9 +15855,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16557,9 +16013,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16715,9 +16168,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16820,9 +16270,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16923,9 +16370,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17028,9 +16472,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17131,9 +16572,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17236,9 +16674,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17339,9 +16774,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17444,9 +16876,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17547,9 +16976,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17577,9 +17003,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "messaging" ], @@ -17606,9 +17030,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17670,9 +17091,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17746,9 +17164,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17822,9 +17237,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17897,9 +17309,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17989,9 +17398,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18051,9 +17457,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18105,9 +17508,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "messaging" ], @@ -18134,9 +17535,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18198,9 +17596,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18274,9 +17669,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18359,9 +17751,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18449,9 +17838,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18487,9 +17873,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "messaging" ], @@ -18518,9 +17902,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18590,9 +17971,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18665,9 +18043,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18761,9 +18136,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18851,9 +18223,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18933,9 +18302,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19006,9 +18372,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19129,9 +18492,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19251,9 +18611,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19367,9 +18724,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19482,9 +18836,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19542,9 +18893,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19597,9 +18945,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19659,9 +19004,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19745,9 +19087,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19795,9 +19134,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19874,9 +19210,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19934,9 +19267,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20013,9 +19343,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20075,9 +19402,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20148,9 +19472,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20300,9 +19621,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20360,9 +19678,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20487,9 +19802,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20549,9 +19861,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20643,9 +19952,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20723,9 +20029,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20803,9 +20106,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20883,9 +20183,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20963,9 +20260,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21057,9 +20351,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21140,9 +20431,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21220,9 +20508,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21300,9 +20585,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21380,9 +20662,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21460,9 +20739,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21559,9 +20835,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21648,9 +20921,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21708,9 +20978,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21804,9 +21071,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21872,9 +21136,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21969,9 +21230,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22039,9 +21297,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22180,9 +21435,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22240,9 +21492,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22364,9 +21613,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22432,9 +21678,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22531,9 +21774,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22601,9 +21841,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22703,9 +21940,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22783,9 +22017,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22886,7 +22117,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "projects" ], @@ -22912,9 +22145,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -23052,9 +22282,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -23132,9 +22359,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -23332,9 +22556,9 @@ "description": "", "responses": { "200": { - "description": "Project", + "description": "EmailTemplate", "schema": { - "$ref": "#\/definitions\/project" + "$ref": "#\/definitions\/emailTemplate" } } }, @@ -23354,9 +22578,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -23619,9 +22840,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -23843,9 +23061,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24062,9 +23277,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24299,9 +23511,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24520,9 +23729,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24580,9 +23786,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24702,9 +23905,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24770,9 +23970,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24893,9 +24090,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24963,9 +24157,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25033,9 +24224,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25106,9 +24294,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25197,9 +24382,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25252,9 +24434,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25314,9 +24493,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25376,9 +24552,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25450,9 +24623,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25591,9 +24761,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25652,9 +24819,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25787,9 +24951,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25852,9 +25013,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25937,9 +25095,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26031,9 +25186,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26103,9 +25255,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26194,9 +25343,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26268,9 +25414,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26342,9 +25485,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26543,9 +25683,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26615,9 +25752,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26689,9 +25823,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26773,9 +25904,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26850,9 +25978,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26944,9 +26069,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27008,9 +26130,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27085,9 +26204,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27149,9 +26265,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27225,9 +26338,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27310,9 +26420,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27427,9 +26534,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "{membershipId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27499,9 +26603,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27587,9 +26688,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27660,9 +26758,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27757,9 +26852,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27819,9 +26911,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27900,9 +26989,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27974,9 +27060,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28071,9 +27154,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28164,9 +27244,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28257,9 +27334,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28328,9 +27402,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28391,9 +27462,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28484,9 +27552,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28577,9 +27642,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28705,9 +27767,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28819,9 +27878,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28933,9 +27989,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29007,9 +28060,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29063,9 +28113,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29126,9 +28173,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29207,9 +28251,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29291,9 +28332,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29375,9 +28413,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29450,9 +28485,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29513,9 +28545,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29563,19 +28592,14 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "users" ], "description": "Delete an authenticator app.", "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } + "204": { + "description": "No content" } }, "x-appwrite": { @@ -29594,9 +28618,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29670,9 +28691,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29733,9 +28751,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29794,9 +28809,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29855,9 +28867,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29918,9 +28927,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29999,9 +29005,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30080,9 +29083,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30161,9 +29161,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30222,9 +29219,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30303,9 +29297,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30364,9 +29355,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30420,9 +29408,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30478,9 +29463,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30549,9 +29531,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30631,9 +29610,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30705,9 +29681,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30820,9 +29793,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30890,9 +29860,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30955,9 +29922,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "users" ], @@ -30984,9 +29949,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31055,9 +30017,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31139,9 +30098,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31220,9 +30176,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31301,9 +30254,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31370,9 +30320,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31457,9 +30404,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31527,9 +30471,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31597,9 +30538,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31676,9 +30614,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31730,7 +30665,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "vcs" ], @@ -31756,9 +30693,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31844,9 +30778,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31919,9 +30850,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31974,9 +30902,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 5b4fbe92b7..3d787172a9 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -117,9 +117,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -171,9 +168,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -264,9 +258,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -347,9 +338,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/identities", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -412,9 +400,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -478,9 +463,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -531,9 +513,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -601,9 +580,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -677,9 +653,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -746,9 +719,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -828,9 +798,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -899,9 +866,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -946,14 +910,19 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "account" ], "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } } }, "x-appwrite": { @@ -973,9 +942,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1056,9 +1022,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1112,9 +1075,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1166,9 +1126,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1220,9 +1177,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1276,9 +1230,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1352,9 +1303,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1434,9 +1382,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1517,9 +1462,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1571,9 +1513,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1650,9 +1589,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1731,9 +1667,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1821,9 +1754,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1870,9 +1800,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1926,9 +1853,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1979,9 +1903,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2059,9 +1980,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2139,9 +2057,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2219,9 +2134,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2299,9 +2211,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "{sessionId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -2363,9 +2272,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -2422,9 +2328,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -2488,9 +2391,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -2544,9 +2444,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2633,9 +2530,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2722,9 +2616,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2863,9 +2754,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2943,9 +2831,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3017,9 +2902,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3103,9 +2985,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3157,9 +3036,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3241,9 +3117,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3372,9 +3245,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3507,9 +3377,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3576,9 +3443,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -4069,9 +3933,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -4158,9 +4019,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -4255,9 +4113,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -4350,9 +4205,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4425,9 +4277,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4512,9 +4361,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4574,9 +4420,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4655,9 +4498,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4719,9 +4559,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4802,9 +4639,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4912,9 +4746,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4982,9 +4813,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5086,9 +4914,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5158,9 +4983,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5242,9 +5064,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5320,7 +5139,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -5349,9 +5170,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5460,9 +5278,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5538,7 +5353,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -5567,9 +5384,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5678,9 +5492,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5756,7 +5567,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -5785,9 +5598,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5896,9 +5706,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5984,7 +5791,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -6013,9 +5822,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6134,9 +5940,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6224,7 +6027,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -6253,9 +6058,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6378,9 +6180,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6468,7 +6267,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -6497,9 +6298,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6622,9 +6420,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6700,7 +6495,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -6729,9 +6526,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6840,9 +6634,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6976,9 +6767,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7067,7 +6855,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -7096,9 +6886,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7213,9 +7000,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7291,7 +7075,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -7320,9 +7106,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7462,9 +7245,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7534,9 +7314,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7582,7 +7359,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -7611,9 +7390,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7720,9 +7496,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -7806,9 +7579,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -7916,9 +7686,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -8010,9 +7777,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -8111,9 +7875,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -8193,9 +7954,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8275,9 +8033,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8398,9 +8153,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8470,9 +8222,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8549,9 +8298,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8624,9 +8370,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8898,9 +8641,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8953,9 +8693,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9007,9 +8744,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9069,9 +8803,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9313,9 +9044,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9377,9 +9105,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9460,9 +9185,6 @@ "server" ], "packaging": true, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9555,9 +9277,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9625,9 +9344,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9690,9 +9406,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9731,7 +9444,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "functions" ], @@ -9757,9 +9472,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9842,9 +9554,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9915,9 +9624,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9990,9 +9696,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -10077,9 +9780,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -10200,9 +9900,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -10267,9 +9964,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10339,9 +10033,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10401,9 +10092,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10490,9 +10178,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10560,9 +10245,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10649,9 +10331,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10723,9 +10402,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10801,9 +10477,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10877,9 +10550,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10931,9 +10601,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10985,9 +10652,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11039,9 +10703,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11102,9 +10763,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11156,9 +10814,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11210,9 +10865,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11264,9 +10916,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11329,9 +10978,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11394,9 +11040,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11468,9 +11111,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11533,9 +11173,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11622,9 +11259,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11687,9 +11321,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11752,9 +11383,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11817,9 +11445,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11882,9 +11507,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11947,9 +11569,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12012,9 +11631,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12077,9 +11693,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12142,9 +11755,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12196,9 +11806,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12250,9 +11857,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12306,9 +11910,6 @@ "server" ], "packaging": false, - "offline-model": "\/localed", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -12364,9 +11965,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/localeCode", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -12422,9 +12020,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/continents", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [], "Session": [] @@ -12480,9 +12075,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [], "Session": [] @@ -12538,9 +12130,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/eu", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [], "Session": [] @@ -12596,9 +12185,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/phones", - "offline-key": "", - "offline-response-key": "countryCode", "auth": { "Project": [], "Session": [] @@ -12654,9 +12240,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/currencies", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [], "Session": [] @@ -12712,9 +12295,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/languages", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [], "Session": [] @@ -12769,9 +12349,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12847,9 +12424,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13008,9 +12582,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13166,9 +12737,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13364,9 +12932,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13561,9 +13126,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13656,7 +13218,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\n", + "description": "Update an SMS message by its unique ID.\n", "responses": { "200": { "description": "Message", @@ -13672,7 +13234,7 @@ "type": "", "deprecated": false, "demo": "messaging\/update-sms.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13682,9 +13244,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13801,9 +13360,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13832,9 +13388,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "messaging" ], @@ -13861,9 +13415,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13926,9 +13477,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14003,9 +13551,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14080,9 +13625,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14158,9 +13700,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14276,9 +13815,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14392,9 +13928,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14486,9 +14019,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14578,9 +14108,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14708,9 +14235,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14836,9 +14360,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14942,9 +14463,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15046,9 +14564,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15164,9 +14679,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15280,9 +14792,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15442,9 +14951,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15601,9 +15107,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15707,9 +15210,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15811,9 +15311,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15917,9 +15414,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16021,9 +15515,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16127,9 +15618,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16231,9 +15719,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16337,9 +15822,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16441,9 +15923,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16472,9 +15951,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "messaging" ], @@ -16501,9 +15978,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16566,9 +16040,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16643,9 +16114,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16720,9 +16188,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16796,9 +16261,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16889,9 +16351,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16952,9 +16411,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17007,9 +16463,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "messaging" ], @@ -17036,9 +16490,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17101,9 +16552,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17178,9 +16626,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17264,9 +16709,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "JWT": [] @@ -17356,9 +16798,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17395,9 +16834,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "messaging" ], @@ -17426,9 +16863,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "JWT": [] @@ -17500,9 +16934,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17575,9 +17006,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17717,9 +17145,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17779,9 +17204,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17915,9 +17337,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17981,9 +17400,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18068,9 +17484,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18164,9 +17577,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18238,9 +17648,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18331,9 +17738,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18407,9 +17811,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18483,9 +17884,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18686,9 +18084,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18762,9 +18157,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18841,9 +18233,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18937,9 +18326,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19003,9 +18389,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19082,9 +18465,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19150,9 +18530,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19237,9 +18614,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19356,9 +18730,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "{membershipId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19430,9 +18801,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19520,9 +18888,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19595,9 +18960,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19694,9 +19056,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19758,9 +19117,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19841,9 +19197,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -19916,9 +19269,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20014,9 +19364,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20108,9 +19455,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20202,9 +19546,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20274,9 +19615,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20338,9 +19676,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20432,9 +19767,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20526,9 +19858,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20655,9 +19984,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20770,9 +20096,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20885,9 +20208,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20942,9 +20262,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21006,9 +20323,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21088,9 +20402,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21173,9 +20484,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21258,9 +20566,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21334,9 +20639,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21398,9 +20700,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21449,19 +20748,14 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "users" ], "description": "Delete an authenticator app.", "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } + "204": { + "description": "No content" } }, "x-appwrite": { @@ -21480,9 +20774,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21557,9 +20848,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21621,9 +20909,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21683,9 +20968,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21745,9 +21027,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21809,9 +21088,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21891,9 +21167,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21973,9 +21246,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22055,9 +21325,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22117,9 +21384,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22199,9 +21463,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22261,9 +21522,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22318,9 +21576,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22377,9 +21632,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22449,9 +21701,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22532,9 +21781,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22607,9 +21853,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22723,9 +21966,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22794,9 +22034,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22860,9 +22097,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "users" ], @@ -22889,9 +22124,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22961,9 +22193,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -23046,9 +22275,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -23128,9 +22354,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 6935029450..727ed746a4 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -22,6 +22,11 @@ use Appwrite\Extend\Exception; use Appwrite\Hooks\Hooks; use Appwrite\Network\Validator\Email; use Appwrite\OpenSSL\OpenSSL; +use Appwrite\SDK\AuthType; +use Appwrite\SDK\ContentType; +use Appwrite\SDK\Method; +use Appwrite\SDK\MethodType; +use Appwrite\SDK\Response as SDKResponse; use Appwrite\Template\Template; use Appwrite\URL\URL as URLParser; use Appwrite\Utopia\Database\Validator\CustomId; @@ -282,13 +287,19 @@ App::post('/v1/account') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('sdk.auth', []) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'create') - ->label('sdk.description', '/docs/references/account/create.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) + ->label('sdk', new Method( + namespace: 'account', + name: 'create', + description: '/docs/references/account/create.md', + auth: [], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_USER, + ) + ], + contentType: ContentType::JSON + )) ->label('abuse-limit', 10) ->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('email', '', new Email(), 'User email.') @@ -419,15 +430,19 @@ App::get('/v1/account') ->desc('Get account') ->groups(['api', 'account']) ->label('scope', 'account') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'get') - ->label('sdk.description', '/docs/references/account/get.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) - ->label('sdk.offline.model', '/account') - ->label('sdk.offline.key', 'current') + ->label('sdk', new Method( + namespace: 'account', + name: 'get', + description: '/docs/references/account/get.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ], + contentType: ContentType::JSON + )) ->inject('response') ->inject('user') ->action(function (Response $response, Document $user) { @@ -444,12 +459,19 @@ App::delete('/v1/account') ->label('scope', 'account') ->label('audits.event', 'user.delete') ->label('audits.resource', 'user/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->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', new Method( + namespace: 'account', + name: 'delete', + description: '/docs/references/account/delete.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->inject('user') ->inject('project') ->inject('response') @@ -489,14 +511,19 @@ App::get('/v1/account/sessions') ->desc('List sessions') ->groups(['api', 'account']) ->label('scope', 'account') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'listSessions') - ->label('sdk.description', '/docs/references/account/list-sessions.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_SESSION_LIST) - ->label('sdk.offline.model', '/account/sessions') + ->label('sdk', new Method( + namespace: 'account', + name: 'listSessions', + description: '/docs/references/account/list-sessions.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_SESSION_LIST, + ) + ], + contentType: ContentType::JSON, + )) ->inject('response') ->inject('user') ->inject('locale') @@ -533,12 +560,19 @@ App::delete('/v1/account/sessions') ->label('event', 'users.[userId].sessions.[sessionId].delete') ->label('audits.event', 'session.delete') ->label('audits.resource', 'user/{user.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'deleteSessions') - ->label('sdk.description', '/docs/references/account/delete-sessions.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'account', + name: 'deleteSessions', + description: '/docs/references/account/delete-sessions.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->label('abuse-limit', 100) ->inject('request') ->inject('response') @@ -595,15 +629,19 @@ App::get('/v1/account/sessions/:sessionId') ->desc('Get session') ->groups(['api', 'account']) ->label('scope', 'account') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'getSession') - ->label('sdk.description', '/docs/references/account/get-session.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_SESSION) - ->label('sdk.offline.model', '/account/sessions') - ->label('sdk.offline.key', '{sessionId}') + ->label('sdk', new Method( + namespace: 'account', + name: 'getSession', + description: '/docs/references/account/get-session.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_SESSION, + ) + ], + contentType: ContentType::JSON + )) ->param('sessionId', '', new UID(), 'Session ID. Use the string \'current\' to get the current device session.') ->inject('response') ->inject('user') @@ -644,12 +682,19 @@ App::delete('/v1/account/sessions/:sessionId') ->label('event', 'users.[userId].sessions.[sessionId].delete') ->label('audits.event', 'session.delete') ->label('audits.resource', 'user/{user.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'deleteSession') - ->label('sdk.description', '/docs/references/account/delete-session.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'account', + name: 'deleteSession', + description: '/docs/references/account/delete-session.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->label('abuse-limit', 100) ->param('sessionId', '', new UID(), 'Session ID. Use the string \'current\' to delete the current device session.') ->inject('requestTimestamp') @@ -725,13 +770,19 @@ App::patch('/v1/account/sessions/:sessionId') ->label('audits.event', 'session.update') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'updateSession') - ->label('sdk.description', '/docs/references/account/update-session.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_SESSION) + ->label('sdk', new Method( + namespace: 'account', + name: 'updateSession', + description: '/docs/references/account/update-session.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_SESSION, + ) + ], + contentType: ContentType::JSON + )) ->label('abuse-limit', 10) ->param('sessionId', '', new UID(), 'Session ID. Use the string \'current\' to update the current device session.') ->inject('response') @@ -803,13 +854,19 @@ App::post('/v1/account/sessions/email') ->label('audits.event', 'session.create') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') - ->label('sdk.auth', []) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'createEmailPasswordSession') - ->label('sdk.description', '/docs/references/account/create-session-email-password.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_SESSION) + ->label('sdk', new Method( + namespace: 'account', + name: 'createEmailPasswordSession', + description: '/docs/references/account/create-session-email-password.md', + auth: [], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_SESSION, + ) + ], + contentType: ContentType::JSON + )) ->label('abuse-limit', 10) ->label('abuse-key', 'url:{url},email:{param-email}') ->param('email', '', new Email(), 'User email.') @@ -937,13 +994,19 @@ App::post('/v1/account/sessions/anonymous') ->label('audits.event', 'session.create') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') - ->label('sdk.auth', []) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'createAnonymousSession') - ->label('sdk.description', '/docs/references/account/create-session-anonymous.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_SESSION) + ->label('sdk', new Method( + namespace: 'account', + name: 'createAnonymousSession', + description: '/docs/references/account/create-session-anonymous.md', + auth: [], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_SESSION, + ) + ], + contentType: ContentType::JSON + )) ->label('abuse-limit', 50) ->label('abuse-key', 'ip:{ip}') ->inject('request') @@ -1074,13 +1137,19 @@ App::post('/v1/account/sessions/token') ->label('audits.event', 'session.create') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') - ->label('sdk.auth', []) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'createSession') - ->label('sdk.description', '/docs/references/account/create-session.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_SESSION) + ->label('sdk', new Method( + namespace: 'account', + name: 'createSession', + description: '/docs/references/account/create-session.md', + auth: [], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_SESSION, + ) + ], + contentType: ContentType::JSON + )) ->label('abuse-limit', 10) ->label('abuse-key', 'ip:{ip},userId:{param-userId}') ->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') @@ -1101,14 +1170,21 @@ App::get('/v1/account/sessions/oauth2/:provider') ->groups(['api', 'account']) ->label('error', __DIR__ . '/../../views/general/error.phtml') ->label('scope', 'sessions.write') - ->label('sdk.auth', []) - ->label('sdk.hide', [APP_PLATFORM_SERVER]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'createOAuth2Session') - ->label('sdk.description', '/docs/references/account/create-session-oauth2.md') - ->label('sdk.response.code', Response::STATUS_CODE_MOVED_PERMANENTLY) - ->label('sdk.response.type', Response::CONTENT_TYPE_HTML) - ->label('sdk.methodType', 'webAuth') + ->label('sdk', new Method( + namespace: 'account', + name: 'createOAuth2Session', + description: '/docs/references/account/create-session-oauth2.md', + type: MethodType::WEBAUTH, + auth: [], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_MOVED_PERMANENTLY, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::HTML, + hide: [APP_PLATFORM_SERVER], + )) ->label('abuse-limit', 50) ->label('abuse-key', 'ip:{ip}') ->param('provider', '', new WhiteList(\array_keys(Config::getParam('oAuthProviders')), true), 'OAuth2 Provider. Currently, supported providers are: ' . \implode(', ', \array_keys(\array_filter(Config::getParam('oAuthProviders'), fn ($node) => (!$node['mock'])))) . '.') @@ -1691,13 +1767,20 @@ App::get('/v1/account/tokens/oauth2/:provider') ->groups(['api', 'account']) ->label('error', __DIR__ . '/../../views/general/error.phtml') ->label('scope', 'sessions.write') - ->label('sdk.auth', []) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'createOAuth2Token') - ->label('sdk.description', '/docs/references/account/create-token-oauth2.md') - ->label('sdk.response.code', Response::STATUS_CODE_MOVED_PERMANENTLY) - ->label('sdk.response.type', Response::CONTENT_TYPE_HTML) - ->label('sdk.methodType', 'webAuth') + ->label('sdk', new Method( + namespace: 'account', + name: 'createOAuth2Token', + description: '/docs/references/account/create-token-oauth2.md', + auth: [], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_MOVED_PERMANENTLY, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::HTML, + type: MethodType::WEBAUTH, + )) ->label('abuse-limit', 50) ->label('abuse-key', 'ip:{ip}') ->param('provider', '', new WhiteList(\array_keys(Config::getParam('oAuthProviders')), true), 'OAuth2 Provider. Currently, supported providers are: ' . \implode(', ', \array_keys(\array_filter(Config::getParam('oAuthProviders'), fn ($node) => (!$node['mock'])))) . '.') @@ -1764,13 +1847,19 @@ App::post('/v1/account/tokens/magic-url') ->label('audits.event', 'session.create') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') - ->label('sdk.auth', []) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'createMagicURLToken') - ->label('sdk.description', '/docs/references/account/create-token-magic-url.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TOKEN) + ->label('sdk', new Method( + namespace: 'account', + name: 'createMagicURLToken', + description: '/docs/references/account/create-token-magic-url.md', + auth: [], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_TOKEN, + ) + ], + contentType: ContentType::JSON, + )) ->label('abuse-limit', 60) ->label('abuse-key', ['url:{url},email:{param-email}', 'url:{url},ip:{ip}']) ->param('userId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') @@ -2007,13 +2096,19 @@ App::post('/v1/account/tokens/email') ->label('audits.event', 'session.create') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') - ->label('sdk.auth', []) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'createEmailToken') - ->label('sdk.description', '/docs/references/account/create-token-email.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TOKEN) + ->label('sdk', new Method( + namespace: 'account', + name: 'createEmailToken', + description: '/docs/references/account/create-token-email.md', + auth: [], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_TOKEN, + ) + ], + contentType: ContentType::JSON, + )) ->label('abuse-limit', 10) ->label('abuse-key', 'url:{url},email:{param-email}') ->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') @@ -2236,14 +2331,20 @@ App::put('/v1/account/sessions/magic-url') ->label('audits.event', 'session.create') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') - ->label('sdk.auth', []) - ->label('sdk.deprecated', true) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'updateMagicURLSession') - ->label('sdk.description', '/docs/references/account/create-session.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_SESSION) + ->label('sdk', new Method( + namespace: 'account', + name: 'updateMagicURLSession', + description: '/docs/references/account/create-session.md', + auth: [], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_SESSION, + ) + ], + contentType: ContentType::JSON, + deprecated: true, + )) ->label('abuse-limit', 10) ->label('abuse-key', 'ip:{ip},userId:{param-userId}') ->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') @@ -2267,14 +2368,20 @@ App::put('/v1/account/sessions/phone') ->label('audits.event', 'session.create') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') - ->label('sdk.auth', []) - ->label('sdk.deprecated', true) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'updatePhoneSession') - ->label('sdk.description', '/docs/references/account/create-session.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_SESSION) + ->label('sdk', new Method( + namespace: 'account', + name: 'updatePhoneSession', + description: '/docs/references/account/create-session.md', + auth: [], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_SESSION, + ) + ], + contentType: ContentType::JSON, + deprecated: true, + )) ->label('abuse-limit', 10) ->label('abuse-key', 'ip:{ip},userId:{param-userId}') ->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') @@ -2299,13 +2406,19 @@ App::post('/v1/account/tokens/phone') ->label('audits.event', 'session.create') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') - ->label('sdk.auth', []) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'createPhoneToken') - ->label('sdk.description', '/docs/references/account/create-token-phone.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TOKEN) + ->label('sdk', new Method( + namespace: 'account', + name: 'createPhoneToken', + description: '/docs/references/account/create-token-phone.md', + auth: [], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_TOKEN, + ) + ], + contentType: ContentType::JSON, + )) ->label('abuse-limit', 10) ->label('abuse-key', ['url:{url},phone:{param-phone}', 'url:{url},ip:{ip}']) ->param('userId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') @@ -2501,13 +2614,19 @@ App::post('/v1/account/jwts') ->groups(['api', 'account', 'auth']) ->label('scope', 'account') ->label('auth.type', 'jwt') - ->label('sdk.auth', []) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'createJWT') - ->label('sdk.description', '/docs/references/account/create-jwt.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_JWT) + ->label('sdk', new Method( + namespace: 'account', + name: 'createJWT', + description: '/docs/references/account/create-jwt.md', + auth: [], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_JWT, + ) + ], + contentType: ContentType::JSON, + )) ->label('abuse-limit', 100) ->label('abuse-key', 'url:{url},userId:{userId}') ->inject('response') @@ -2543,15 +2662,19 @@ App::get('/v1/account/prefs') ->desc('Get account preferences') ->groups(['api', 'account']) ->label('scope', 'account') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'getPrefs') - ->label('sdk.description', '/docs/references/account/get-prefs.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PREFERENCES) - ->label('sdk.offline.model', '/account/prefs') - ->label('sdk.offline.key', 'current') + ->label('sdk', new Method( + namespace: 'account', + name: 'getPrefs', + description: '/docs/references/account/get-prefs.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PREFERENCES, + ) + ], + contentType: ContentType::JSON + )) ->inject('response') ->inject('user') ->action(function (Response $response, Document $user) { @@ -2565,13 +2688,19 @@ App::get('/v1/account/logs') ->desc('List logs') ->groups(['api', 'account']) ->label('scope', 'account') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'listLogs') - ->label('sdk.description', '/docs/references/account/list-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) + ->label('sdk', new Method( + namespace: 'account', + name: 'listLogs', + description: '/docs/references/account/list-logs.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_LOG_LIST, + ) + ], + contentType: ContentType::JSON, + )) ->param('queries', [], new Queries([new Limit(), new Offset()]), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset', true) ->inject('response') ->inject('user') @@ -2633,15 +2762,19 @@ App::patch('/v1/account/name') ->label('scope', 'account') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'updateName') - ->label('sdk.description', '/docs/references/account/update-name.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) - ->label('sdk.offline.model', '/account') - ->label('sdk.offline.key', 'current') + ->label('sdk', new Method( + namespace: 'account', + name: 'updateName', + description: '/docs/references/account/update-name.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ], + contentType: ContentType::JSON + )) ->param('name', '', new Text(128), 'User name. Max length: 128 chars.') ->inject('requestTimestamp') ->inject('response') @@ -2667,15 +2800,19 @@ App::patch('/v1/account/password') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'updatePassword') - ->label('sdk.description', '/docs/references/account/update-password.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) - ->label('sdk.offline.model', '/account') - ->label('sdk.offline.key', 'current') + ->label('sdk', new Method( + namespace: 'account', + name: 'updatePassword', + description: '/docs/references/account/update-password.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ], + contentType: ContentType::JSON + )) ->label('abuse-limit', 10) ->param('password', '', fn ($project, $passwordsDictionary) => new PasswordDictionary($passwordsDictionary, $project->getAttribute('auths', [])['passwordDictionary'] ?? false), 'New user password. Must be at least 8 chars.', false, ['project', 'passwordsDictionary']) ->param('oldPassword', '', new Password(), 'Current user password. Must be at least 8 chars.', true) @@ -2736,15 +2873,19 @@ App::patch('/v1/account/email') ->label('scope', 'account') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'updateEmail') - ->label('sdk.description', '/docs/references/account/update-email.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) - ->label('sdk.offline.model', '/account') - ->label('sdk.offline.key', 'current') + ->label('sdk', new Method( + namespace: 'account', + name: 'updateEmail', + description: '/docs/references/account/update-email.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ], + contentType: ContentType::JSON + )) ->param('email', '', new Email(), 'User email.') ->param('password', '', new Password(), 'User password. Must be at least 8 chars.') ->inject('requestTimestamp') @@ -2828,15 +2969,19 @@ App::patch('/v1/account/phone') ->label('scope', 'account') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'updatePhone') - ->label('sdk.description', '/docs/references/account/update-phone.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) - ->label('sdk.offline.model', '/account') - ->label('sdk.offline.key', 'current') + ->label('sdk', new Method( + namespace: 'account', + name: 'updatePhone', + description: '/docs/references/account/update-phone.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ], + contentType: ContentType::JSON + )) ->param('phone', '', new Phone(), 'Phone number. Format this number with a leading \'+\' and a country code, e.g., +16175551212.') ->param('password', '', new Password(), 'User password. Must be at least 8 chars.') ->inject('requestTimestamp') @@ -2909,15 +3054,19 @@ App::patch('/v1/account/prefs') ->label('scope', 'account') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'updatePrefs') - ->label('sdk.description', '/docs/references/account/update-prefs.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) - ->label('sdk.offline.model', '/account/prefs') - ->label('sdk.offline.key', 'current') + ->label('sdk', new Method( + namespace: 'account', + name: 'updatePrefs', + description: '/docs/references/account/update-prefs.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ], + contentType: ContentType::JSON + )) ->param('prefs', [], new Assoc(), 'Prefs key-value JSON object.') ->inject('requestTimestamp') ->inject('response') @@ -2942,13 +3091,19 @@ App::patch('/v1/account/status') ->label('scope', 'account') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->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) + ->label('sdk', new Method( + namespace: 'account', + name: 'updateStatus', + description: '/docs/references/account/update-status.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ], + contentType: ContentType::JSON, + )) ->inject('requestTimestamp') ->inject('request') ->inject('response') @@ -2986,13 +3141,19 @@ App::post('/v1/account/recovery') ->label('audits.event', 'recovery.create') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'createRecovery') - ->label('sdk.description', '/docs/references/account/create-recovery.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TOKEN) + ->label('sdk', new Method( + namespace: 'account', + name: 'createRecovery', + description: '/docs/references/account/create-recovery.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_TOKEN, + ) + ], + contentType: ContentType::JSON, + )) ->label('abuse-limit', 10) ->label('abuse-key', ['url:{url},email:{param-email}', 'url:{url},ip:{ip}']) ->param('email', '', new Email(), 'User email.') @@ -3166,13 +3327,19 @@ App::put('/v1/account/recovery') ->label('audits.event', 'recovery.update') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'updateRecovery') - ->label('sdk.description', '/docs/references/account/update-recovery.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TOKEN) + ->label('sdk', new Method( + namespace: 'account', + name: 'updateRecovery', + description: '/docs/references/account/update-recovery.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_TOKEN, + ) + ], + contentType: ContentType::JSON + )) ->label('abuse-limit', 10) ->label('abuse-key', 'url:{url},userId:{param-userId}') ->param('userId', '', new UID(), 'User ID.') @@ -3250,13 +3417,19 @@ App::post('/v1/account/verification') ->label('event', 'users.[userId].verification.[tokenId].create') ->label('audits.event', 'verification.create') ->label('audits.resource', 'user/{response.userId}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'createVerification') - ->label('sdk.description', '/docs/references/account/create-email-verification.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TOKEN) + ->label('sdk', new Method( + namespace: 'account', + name: 'createVerification', + description: '/docs/references/account/create-email-verification.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_TOKEN, + ) + ], + contentType: ContentType::JSON, + )) ->label('abuse-limit', 10) ->label('abuse-key', 'url:{url},userId:{userId}') ->param('url', '', fn ($clients) => new Host($clients), '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.', false, ['clients']) // TODO add built-in confirm page @@ -3415,13 +3588,19 @@ App::put('/v1/account/verification') ->label('event', 'users.[userId].verification.[tokenId].update') ->label('audits.event', 'verification.update') ->label('audits.resource', 'user/{response.userId}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'updateVerification') - ->label('sdk.description', '/docs/references/account/update-email-verification.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TOKEN) + ->label('sdk', new Method( + namespace: 'account', + name: 'updateVerification', + description: '/docs/references/account/update-email-verification.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_TOKEN, + ) + ], + contentType: ContentType::JSON + )) ->label('abuse-limit', 10) ->label('abuse-key', 'url:{url},userId:{param-userId}') ->param('userId', '', new UID(), 'User ID.') @@ -3475,13 +3654,19 @@ App::post('/v1/account/verification/phone') ->label('event', 'users.[userId].verification.[tokenId].create') ->label('audits.event', 'verification.create') ->label('audits.resource', 'user/{response.userId}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'createPhoneVerification') - ->label('sdk.description', '/docs/references/account/create-phone-verification.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TOKEN) + ->label('sdk', new Method( + namespace: 'account', + name: 'createPhoneVerification', + description: '/docs/references/account/create-phone-verification.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_TOKEN, + ) + ], + contentType: ContentType::JSON, + )) ->label('abuse-limit', 10) ->label('abuse-key', ['url:{url},userId:{userId}', 'url:{url},ip:{ip}']) ->inject('request') @@ -3626,13 +3811,19 @@ App::put('/v1/account/verification/phone') ->label('event', 'users.[userId].verification.[tokenId].update') ->label('audits.event', 'verification.update') ->label('audits.resource', 'user/{response.userId}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'updatePhoneVerification') - ->label('sdk.description', '/docs/references/account/update-phone-verification.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TOKEN) + ->label('sdk', new Method( + namespace: 'account', + name: 'updatePhoneVerification', + description: '/docs/references/account/update-phone-verification.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_TOKEN, + ) + ], + contentType: ContentType::JSON + )) ->label('abuse-limit', 10) ->label('abuse-key', 'userId:{param-userId}') ->param('userId', '', new UID(), 'User ID.') @@ -3685,15 +3876,19 @@ App::patch('/v1/account/mfa') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'updateMFA') - ->label('sdk.description', '/docs/references/account/update-mfa.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) - ->label('sdk.offline.model', '/account') - ->label('sdk.offline.key', 'current') + ->label('sdk', new Method( + namespace: 'account', + name: 'updateMFA', + description: '/docs/references/account/update-mfa.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ], + contentType: ContentType::JSON + )) ->param('mfa', null, new Boolean(), 'Enable or disable MFA.') ->inject('requestTimestamp') ->inject('response') @@ -3734,15 +3929,19 @@ App::get('/v1/account/mfa/factors') ->desc('List factors') ->groups(['api', 'account', 'mfa']) ->label('scope', 'account') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'listMfaFactors') - ->label('sdk.description', '/docs/references/account/list-mfa-factors.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MFA_FACTORS) - ->label('sdk.offline.model', '/account') - ->label('sdk.offline.key', 'current') + ->label('sdk', new Method( + namespace: 'account', + name: 'listMfaFactors', + description: '/docs/references/account/list-mfa-factors.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MFA_FACTORS, + ) + ], + contentType: ContentType::JSON + )) ->inject('response') ->inject('user') ->action(function (Response $response, Document $user) { @@ -3770,15 +3969,19 @@ App::post('/v1/account/mfa/authenticators/:type') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'createMfaAuthenticator') - ->label('sdk.description', '/docs/references/account/create-mfa-authenticator.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MFA_TYPE) - ->label('sdk.offline.model', '/account') - ->label('sdk.offline.key', 'current') + ->label('sdk', new Method( + namespace: 'account', + name: 'createMfaAuthenticator', + description: '/docs/references/account/create-mfa-authenticator.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MFA_TYPE, + ) + ], + contentType: ContentType::JSON + )) ->param('type', null, new WhiteList([Type::TOTP]), 'Type of authenticator. Must be `' . Type::TOTP . '`') ->inject('requestTimestamp') ->inject('response') @@ -3842,15 +4045,19 @@ App::put('/v1/account/mfa/authenticators/:type') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'updateMfaAuthenticator') - ->label('sdk.description', '/docs/references/account/update-mfa-authenticator.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) - ->label('sdk.offline.model', '/account') - ->label('sdk.offline.key', 'current') + ->label('sdk', new Method( + namespace: 'account', + name: 'updateMfaAuthenticator', + description: '/docs/references/account/update-mfa-authenticator.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ], + contentType: ContentType::JSON + )) ->param('type', null, new WhiteList([Type::TOTP]), 'Type of authenticator.') ->param('otp', '', new Text(256), 'Valid verification token.') ->inject('response') @@ -3907,15 +4114,19 @@ App::post('/v1/account/mfa/recovery-codes') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'createMfaRecoveryCodes') - ->label('sdk.description', '/docs/references/account/create-mfa-recovery-codes.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MFA_RECOVERY_CODES) - ->label('sdk.offline.model', '/account') - ->label('sdk.offline.key', 'current') + ->label('sdk', new Method( + namespace: 'account', + name: 'createMfaRecoveryCodes', + description: '/docs/references/account/create-mfa-recovery-codes.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_MFA_RECOVERY_CODES, + ) + ], + contentType: ContentType::JSON + )) ->inject('response') ->inject('user') ->inject('dbForProject') @@ -3949,15 +4160,19 @@ App::patch('/v1/account/mfa/recovery-codes') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'updateMfaRecoveryCodes') - ->label('sdk.description', '/docs/references/account/update-mfa-recovery-codes.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MFA_RECOVERY_CODES) - ->label('sdk.offline.model', '/account') - ->label('sdk.offline.key', 'current') + ->label('sdk', new Method( + namespace: 'account', + name: 'updateMfaRecoveryCodes', + description: '/docs/references/account/update-mfa-recovery-codes.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MFA_RECOVERY_CODES, + ) + ], + contentType: ContentType::JSON + )) ->inject('dbForProject') ->inject('response') ->inject('user') @@ -3986,15 +4201,19 @@ App::get('/v1/account/mfa/recovery-codes') ->desc('Get MFA recovery codes') ->groups(['api', 'account', 'mfaProtected']) ->label('scope', 'account') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'getMfaRecoveryCodes') - ->label('sdk.description', '/docs/references/account/get-mfa-recovery-codes.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MFA_RECOVERY_CODES) - ->label('sdk.offline.model', '/account') - ->label('sdk.offline.key', 'current') + ->label('sdk', new Method( + namespace: 'account', + name: 'getMfaRecoveryCodes', + description: '/docs/references/account/get-mfa-recovery-codes.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MFA_RECOVERY_CODES, + ) + ], + contentType: ContentType::JSON + )) ->inject('response') ->inject('user') ->action(function (Response $response, Document $user) { @@ -4020,12 +4239,19 @@ App::delete('/v1/account/mfa/authenticators/:type') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'deleteMfaAuthenticator') - ->label('sdk.description', '/docs/references/account/delete-mfa-authenticator.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'account', + name: 'deleteMfaAuthenticator', + description: '/docs/references/account/delete-mfa-authenticator.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('type', null, new WhiteList([Type::TOTP]), 'Type of authenticator.') ->inject('response') ->inject('user') @@ -4058,13 +4284,19 @@ App::post('/v1/account/mfa/challenge') ->label('audits.event', 'challenge.create') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') - ->label('sdk.auth', []) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'createMfaChallenge') - ->label('sdk.description', '/docs/references/account/create-mfa-challenge.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MFA_CHALLENGE) + ->label('sdk', new Method( + namespace: 'account', + name: 'createMfaChallenge', + description: '/docs/references/account/create-mfa-challenge.md', + auth: [], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_MFA_CHALLENGE, + ) + ], + contentType: ContentType::JSON, + )) ->label('abuse-limit', 10) ->label('abuse-key', 'url:{url},userId:{userId}') ->param('factor', '', new WhiteList([Type::EMAIL, Type::PHONE, Type::TOTP, Type::RECOVERY_CODE]), 'Factor used for verification. Must be one of following: `' . Type::EMAIL . '`, `' . Type::PHONE . '`, `' . Type::TOTP . '`, `' . Type::RECOVERY_CODE . '`.') @@ -4271,12 +4503,19 @@ App::put('/v1/account/mfa/challenge') ->label('audits.event', 'challenges.update') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'updateMfaChallenge') - ->label('sdk.description', '/docs/references/account/update-mfa-challenge.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_SESSION) + ->label('sdk', new Method( + namespace: 'account', + name: 'updateMfaChallenge', + description: '/docs/references/account/update-mfa-challenge.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_SESSION, + ) + ], + contentType: ContentType::JSON + )) ->label('abuse-limit', 10) ->label('abuse-key', 'url:{url},challengeId:{param-challengeId}') ->param('challengeId', '', new Text(256), 'ID of the challenge.') @@ -4357,12 +4596,19 @@ App::post('/v1/account/targets/push') ->label('audits.event', 'target.create') ->label('audits.resource', 'target/response.$id') ->label('event', 'users.[userId].targets.[targetId].create') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'createPushTarget') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TARGET) + ->label('sdk', new Method( + namespace: 'account', + name: 'createPushTarget', + description: '', + auth: [AuthType::SESSION], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_TARGET, + ) + ], + contentType: ContentType::JSON + )) ->param('targetId', '', new CustomId(), 'Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('identifier', '', new Text(Database::LENGTH_KEY), 'The target identifier (token, email, phone etc.)') ->param('providerId', '', new UID(), 'Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.', true) @@ -4430,12 +4676,19 @@ App::put('/v1/account/targets/:targetId/push') ->label('audits.event', 'target.update') ->label('audits.resource', 'target/response.$id') ->label('event', 'users.[userId].targets.[targetId].update') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'updatePushTarget') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TARGET) + ->label('sdk', new Method( + namespace: 'account', + name: 'updatePushTarget', + description: '', + auth: [AuthType::SESSION], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_TARGET, + ) + ], + contentType: ContentType::JSON + )) ->param('targetId', '', new UID(), 'Target ID.') ->param('identifier', '', new Text(Database::LENGTH_KEY), 'The target identifier (token, email, phone etc.)') ->inject('queueForEvents') @@ -4487,12 +4740,19 @@ App::delete('/v1/account/targets/:targetId/push') ->label('audits.event', 'target.delete') ->label('audits.resource', 'target/response.$id') ->label('event', 'users.[userId].targets.[targetId].delete') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'deletePushTarget') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TARGET) + ->label('sdk', new Method( + namespace: 'account', + name: 'deletePushTarget', + description: '', + auth: [AuthType::SESSION], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('targetId', '', new UID(), 'Target ID.') ->inject('queueForEvents') ->inject('queueForDeletes') @@ -4530,14 +4790,19 @@ App::get('/v1/account/identities') ->desc('List identities') ->groups(['api', 'account']) ->label('scope', 'account') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'listIdentities') - ->label('sdk.description', '/docs/references/account/list-identities.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_IDENTITY_LIST) - ->label('sdk.offline.model', '/account/identities') + ->label('sdk', new Method( + namespace: 'account', + name: 'listIdentities', + description: '/docs/references/account/list-identities.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_IDENTITY_LIST, + ) + ], + contentType: ContentType::JSON + )) ->param('queries', [], new Identities(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Identities::ALLOWED_ATTRIBUTES), true) ->inject('response') ->inject('user') @@ -4596,12 +4861,19 @@ App::delete('/v1/account/identities/:identityId') ->label('audits.event', 'identity.delete') ->label('audits.resource', 'identity/{request.$identityId}') ->label('audits.userId', '{user.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'deleteIdentity') - ->label('sdk.description', '/docs/references/account/delete-identity.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'account', + name: 'deleteIdentity', + description: '/docs/references/account/delete-identity.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('identityId', '', new UID(), 'Identity ID.') ->inject('response') ->inject('dbForProject') @@ -4622,4 +4894,4 @@ App::delete('/v1/account/identities/:identityId') ->setPayload($response->output($identity, Response::MODEL_IDENTITY)); return $response->noContent(); - }); + }); \ No newline at end of file diff --git a/app/controllers/api/avatars.php b/app/controllers/api/avatars.php index f73f8a148a..2b0f7d9e06 100644 --- a/app/controllers/api/avatars.php +++ b/app/controllers/api/avatars.php @@ -1,6 +1,11 @@ label('scope', 'avatars.read') ->label('cache', true) ->label('cache.resource', 'avatar/credit-card') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'avatars') - ->label('sdk.method', 'getCreditCard') - ->label('sdk.methodType', 'location') - ->label('sdk.description', '/docs/references/avatars/get-credit-card.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_IMAGE_PNG) + ->label('sdk', new Method( + namespace: 'avatars', + name: 'getCreditCard', + description: '/docs/references/avatars/get-credit-card.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + type: MethodType::LOCATION, + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::IMAGE_PNG + )) ->param('code', '', new WhiteList(\array_keys(Config::getParam('avatar-credit-cards'))), 'Credit Card Code. Possible values: ' . \implode(', ', \array_keys(Config::getParam('avatar-credit-cards'))) . '.') ->param('width', 100, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true) ->param('height', 100, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true) @@ -184,13 +196,20 @@ App::get('/v1/avatars/browsers/:code') ->label('scope', 'avatars.read') ->label('cache', true) ->label('cache.resource', 'avatar/browser') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'avatars') - ->label('sdk.method', 'getBrowser') - ->label('sdk.methodType', 'location') - ->label('sdk.description', '/docs/references/avatars/get-browser.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_IMAGE_PNG) + ->label('sdk', new Method( + namespace: 'avatars', + name: 'getBrowser', + description: '/docs/references/avatars/get-browser.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + type: MethodType::LOCATION, + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::IMAGE_PNG + )) ->param('code', '', new WhiteList(\array_keys(Config::getParam('avatar-browsers'))), 'Browser Code.') ->param('width', 100, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true) ->param('height', 100, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true) @@ -204,13 +223,20 @@ App::get('/v1/avatars/flags/:code') ->label('scope', 'avatars.read') ->label('cache', true) ->label('cache.resource', 'avatar/flag') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'avatars') - ->label('sdk.method', 'getFlag') - ->label('sdk.methodType', 'location') - ->label('sdk.description', '/docs/references/avatars/get-flag.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_IMAGE_PNG) + ->label('sdk', new Method( + namespace: 'avatars', + name: 'getFlag', + description: '/docs/references/avatars/get-flag.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + type: MethodType::LOCATION, + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::IMAGE_PNG + )) ->param('code', '', new WhiteList(\array_keys(Config::getParam('avatar-flags'))), 'Country Code. ISO Alpha-2 country code format.') ->param('width', 100, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true) ->param('height', 100, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true) @@ -224,13 +250,20 @@ App::get('/v1/avatars/image') ->label('scope', 'avatars.read') ->label('cache', true) ->label('cache.resource', 'avatar/image') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'avatars') - ->label('sdk.method', 'getImage') - ->label('sdk.methodType', 'location') - ->label('sdk.description', '/docs/references/avatars/get-image.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_IMAGE) + ->label('sdk', new Method( + namespace: 'avatars', + name: 'getImage', + description: '/docs/references/avatars/get-image.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + type: MethodType::LOCATION, + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::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. 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) @@ -287,13 +320,20 @@ App::get('/v1/avatars/favicon') ->label('scope', 'avatars.read') ->label('cache', true) ->label('cache.resource', 'avatar/favicon') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'avatars') - ->label('sdk.method', 'getFavicon') - ->label('sdk.methodType', 'location') - ->label('sdk.description', '/docs/references/avatars/get-favicon.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_IMAGE) + ->label('sdk', new Method( + namespace: 'avatars', + name: 'getFavicon', + description: '/docs/references/avatars/get-favicon.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + type: MethodType::LOCATION, + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::IMAGE + )) ->param('url', '', new URL(['http', 'https']), 'Website URL which you want to fetch the favicon from.') ->inject('response') ->action(function (string $url, Response $response) { @@ -430,13 +470,20 @@ App::get('/v1/avatars/qr') ->desc('Get QR code') ->groups(['api', 'avatars']) ->label('scope', 'avatars.read') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'avatars') - ->label('sdk.method', 'getQR') - ->label('sdk.methodType', 'location') - ->label('sdk.description', '/docs/references/avatars/get-qr.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_IMAGE_PNG) + ->label('sdk', new Method( + namespace: 'avatars', + name: 'getQR', + description: '/docs/references/avatars/get-qr.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + type: MethodType::LOCATION, + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::IMAGE_PNG + )) ->param('text', '', new Text(512), 'Plain text to be converted to QR code image.') ->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) @@ -471,13 +518,20 @@ App::get('/v1/avatars/initials') ->groups(['api', 'avatars']) ->label('scope', 'avatars.read') ->label('cache.resource', 'avatar/initials') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'avatars') - ->label('sdk.method', 'getInitials') - ->label('sdk.methodType', 'location') - ->label('sdk.description', '/docs/references/avatars/get-initials.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_IMAGE_PNG) + ->label('sdk', new Method( + namespace: 'avatars', + name: 'getInitials', + description: '/docs/references/avatars/get-initials.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + type: MethodType::LOCATION, + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::IMAGE_PNG + )) ->param('name', '', new Text(128), 'Full Name. When empty, current user name or email will be used. Max length: 128 chars.', true) ->param('width', 500, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true) ->param('height', 500, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true) @@ -1222,4 +1276,4 @@ App::get('/v1/cards/cloud-og') ->addHeader('Cache-Control', 'private, max-age=3888000') // 45 days ->setContentType('image/png') ->file($baseImage->getImageBlob()); - }); + }); \ No newline at end of file diff --git a/app/controllers/api/console.php b/app/controllers/api/console.php index 1b307b1d14..77ba67e6e1 100644 --- a/app/controllers/api/console.php +++ b/app/controllers/api/console.php @@ -1,6 +1,10 @@ desc('Get variables') ->groups(['api', 'projects']) ->label('scope', 'projects.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'console') - ->label('sdk.method', 'variables') - ->label('sdk.description', '/docs/references/console/variables.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_CONSOLE_VARIABLES) + ->label('sdk', new Method( + namespace: 'console', + name: 'variables', + description: '/docs/references/console/variables.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_CONSOLE_VARIABLES, + ) + ], + contentType: ContentType::JSON + )) ->inject('response') ->action(function (Response $response) { $isDomainEnabled = !empty(System::getEnv('_APP_DOMAIN', '')) @@ -60,12 +70,19 @@ App::post('/v1/console/assistant') ->desc('Ask query') ->groups(['api', 'assistant']) ->label('scope', 'assistant.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'assistant') - ->label('sdk.method', 'chat') - ->label('sdk.description', '/docs/references/assistant/chat.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_TEXT) + ->label('sdk', new Method( + namespace: 'assistant', + name: 'chat', + description: '/docs/references/assistant/chat.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::TEXT + )) ->label('abuse-limit', 15) ->label('abuse-key', 'userId:{userId}') ->param('prompt', '', new Text(2000), 'Prompt. A string containing questions asked to the AI assistant.') @@ -108,4 +125,4 @@ App::post('/v1/console/assistant') curl_close($ch); $response->chunk('', true); - }); + }); \ No newline at end of file diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 347b4ebbef..b4635128c3 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -7,6 +7,10 @@ use Appwrite\Event\Event; use Appwrite\Event\Usage; use Appwrite\Extend\Exception; use Appwrite\Network\Validator\Email; +use Appwrite\SDK\AuthType; +use Appwrite\SDK\ContentType; +use Appwrite\SDK\Method; +use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\CustomId; use Appwrite\Utopia\Database\Validator\Queries\Attributes; use Appwrite\Utopia\Database\Validator\Queries\Collections; @@ -452,13 +456,19 @@ App::post('/v1/databases') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'database.create') ->label('audits.resource', 'database/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'create') - ->label('sdk.description', '/docs/references/databases/create.md') // create this file later - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_DATABASE) // Model for database needs to be created + ->label('sdk', new Method( + namespace: 'databases', + name: 'create', + description: '/docs/references/databases/create.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_DATABASE, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Database name. Max length: 128 chars.') ->param('enabled', true, new Boolean(), 'Is the database enabled? When set to \'disabled\', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.', true) @@ -528,13 +538,19 @@ App::get('/v1/databases') ->groups(['api', 'database']) ->label('scope', 'databases.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'list') - ->label('sdk.description', '/docs/references/databases/list.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_DATABASE_LIST) + ->label('sdk', new Method( + namespace: 'databases', + name: 'list', + description: '/docs/references/databases/list.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_DATABASE_LIST, + ) + ], + contentType: ContentType::JSON + )) ->param('queries', [], new Databases(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Databases::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') @@ -584,13 +600,19 @@ App::get('/v1/databases/:databaseId') ->groups(['api', 'database']) ->label('scope', 'databases.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'get') - ->label('sdk.description', '/docs/references/databases/get.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_DATABASE) + ->label('sdk', new Method( + namespace: 'databases', + name: 'get', + description: '/docs/references/databases/get.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_DATABASE, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->inject('response') ->inject('dbForProject') @@ -610,13 +632,19 @@ App::get('/v1/databases/:databaseId/logs') ->groups(['api', 'database']) ->label('scope', 'databases.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'listLogs') - ->label('sdk.description', '/docs/references/databases/get-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) + ->label('sdk', new Method( + namespace: 'databases', + name: 'listLogs', + description: '/docs/references/databases/get-logs.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_LOG_LIST, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('queries', [], new Queries([new Limit(), new Offset()]), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset', true) ->inject('response') @@ -705,13 +733,19 @@ App::put('/v1/databases/:databaseId') ->label('event', 'databases.[databaseId].update') ->label('audits.event', 'database.update') ->label('audits.resource', 'database/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'update') - ->label('sdk.description', '/docs/references/databases/update.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_DATABASE) + ->label('sdk', new Method( + namespace: 'databases', + name: 'update', + description: '/docs/references/databases/update.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_DATABASE, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('name', null, new Text(128), 'Database name. Max length: 128 chars.') ->param('enabled', true, new Boolean(), 'Is database enabled? When set to \'disabled\', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.', true) @@ -744,12 +778,19 @@ App::delete('/v1/databases/:databaseId') ->label('event', 'databases.[databaseId].delete') ->label('audits.event', 'database.delete') ->label('audits.resource', 'database/{request.databaseId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'delete') - ->label('sdk.description', '/docs/references/databases/delete.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'databases', + name: 'delete', + description: '/docs/references/databases/delete.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('databaseId', '', new UID(), 'Database ID.') ->inject('response') ->inject('dbForProject') @@ -793,13 +834,19 @@ App::post('/v1/databases/:databaseId/collections') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'collection.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'createCollection') - ->label('sdk.description', '/docs/references/databases/create-collection.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_COLLECTION) + ->label('sdk', new Method( + namespace: 'databases', + name: 'createCollection', + description: '/docs/references/databases/create-collection.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_COLLECTION, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Collection name. Max length: 128 chars.') @@ -858,13 +905,19 @@ App::get('/v1/databases/:databaseId/collections') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'listCollections') - ->label('sdk.description', '/docs/references/databases/list-collections.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_COLLECTION_LIST) + ->label('sdk', new Method( + namespace: 'databases', + name: 'listCollections', + description: '/docs/references/databases/list-collections.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_COLLECTION_LIST, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('queries', [], new Collections(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Collections::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) @@ -924,13 +977,19 @@ App::get('/v1/databases/:databaseId/collections/:collectionId') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'getCollection') - ->label('sdk.description', '/docs/references/databases/get-collection.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_COLLECTION) + ->label('sdk', new Method( + namespace: 'databases', + name: 'getCollection', + description: '/docs/references/databases/get-collection.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_COLLECTION, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') ->inject('response') @@ -959,13 +1018,19 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/logs') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'listCollectionLogs') - ->label('sdk.description', '/docs/references/databases/get-collection-logs.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_LOG_LIST) + ->label('sdk', new Method( + namespace: 'databases', + name: 'listCollectionLogs', + description: '/docs/references/databases/get-collection-logs.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_LOG_LIST, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') ->param('queries', [], new Queries([new Limit(), new Offset()]), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset', true) @@ -1058,13 +1123,19 @@ App::put('/v1/databases/:databaseId/collections/:collectionId') ->label('event', 'databases.[databaseId].collections.[collectionId].update') ->label('audits.event', 'collection.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'updateCollection') - ->label('sdk.description', '/docs/references/databases/update-collection.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_COLLECTION) + ->label('sdk', new Method( + namespace: 'databases', + name: 'updateCollection', + description: '/docs/references/databases/update-collection.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_COLLECTION, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') ->param('name', null, new Text(128), 'Collection name. Max length: 128 chars.') @@ -1126,12 +1197,19 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId') ->label('event', 'databases.[databaseId].collections.[collectionId].delete') ->label('audits.event', 'collection.delete') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'deleteCollection') - ->label('sdk.description', '/docs/references/databases/delete-collection.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'databases', + name: 'deleteCollection', + description: '/docs/references/databases/delete-collection.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') ->inject('response') @@ -1182,13 +1260,18 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'createStringAttribute') - ->label('sdk.description', '/docs/references/databases/create-string-attribute.md') - ->label('sdk.response.code', Response::STATUS_CODE_ACCEPTED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_STRING) + ->label('sdk', new Method( + namespace: 'databases', + name: 'createStringAttribute', + description: '/docs/references/databases/create-string-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_ACCEPTED, + model: Response::MODEL_ATTRIBUTE_STRING + ) + ] + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') @@ -1239,13 +1322,18 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/email' ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.namespace', 'databases') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.method', 'createEmailAttribute') - ->label('sdk.description', '/docs/references/databases/create-email-attribute.md') - ->label('sdk.response.code', Response::STATUS_CODE_ACCEPTED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_EMAIL) + ->label('sdk', new Method( + namespace: 'databases', + name: 'createEmailAttribute', + description: '/docs/references/databases/create-email-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_ACCEPTED, + model: Response::MODEL_ATTRIBUTE_EMAIL, + ) + ] + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') @@ -1282,13 +1370,18 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/enum') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.namespace', 'databases') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.method', 'createEnumAttribute') - ->label('sdk.description', '/docs/references/databases/create-attribute-enum.md') - ->label('sdk.response.code', Response::STATUS_CODE_ACCEPTED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_ENUM) + ->label('sdk', new Method( + namespace: 'databases', + name: 'createEnumAttribute', + description: '/docs/references/databases/create-attribute-enum.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_ACCEPTED, + model: Response::MODEL_ATTRIBUTE_ENUM, + ) + ] + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') @@ -1330,13 +1423,18 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/ip') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.namespace', 'databases') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.method', 'createIpAttribute') - ->label('sdk.description', '/docs/references/databases/create-ip-attribute.md') - ->label('sdk.response.code', Response::STATUS_CODE_ACCEPTED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_IP) + ->label('sdk', new Method( + namespace: 'databases', + name: 'createIpAttribute', + description: '/docs/references/databases/create-ip-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_ACCEPTED, + model: Response::MODEL_ATTRIBUTE_IP, + ) + ] + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') @@ -1373,13 +1471,18 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/url') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.namespace', 'databases') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.method', 'createUrlAttribute') - ->label('sdk.description', '/docs/references/databases/create-url-attribute.md') - ->label('sdk.response.code', Response::STATUS_CODE_ACCEPTED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_URL) + ->label('sdk', new Method( + namespace: 'databases', + name: 'createUrlAttribute', + description: '/docs/references/databases/create-url-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_ACCEPTED, + model: Response::MODEL_ATTRIBUTE_URL, + ) + ] + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') @@ -1416,13 +1519,18 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/intege ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.namespace', 'databases') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.method', 'createIntegerAttribute') - ->label('sdk.description', '/docs/references/databases/create-integer-attribute.md') - ->label('sdk.response.code', Response::STATUS_CODE_ACCEPTED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_INTEGER) + ->label('sdk', new Method( + namespace: 'databases', + name: 'createIntegerAttribute', + description: '/docs/references/databases/create-integer-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_ACCEPTED, + model: Response::MODEL_ATTRIBUTE_INTEGER, + ) + ] + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') @@ -1488,13 +1596,18 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/float' ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.namespace', 'databases') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.method', 'createFloatAttribute') - ->label('sdk.description', '/docs/references/databases/create-float-attribute.md') - ->label('sdk.response.code', Response::STATUS_CODE_ACCEPTED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_FLOAT) + ->label('sdk', new Method( + namespace: 'databases', + name: 'createFloatAttribute', + description: '/docs/references/databases/create-float-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_ACCEPTED, + model: Response::MODEL_ATTRIBUTE_FLOAT, + ) + ] + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') @@ -1558,13 +1671,18 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/boolea ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.namespace', 'databases') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.method', 'createBooleanAttribute') - ->label('sdk.description', '/docs/references/databases/create-boolean-attribute.md') - ->label('sdk.response.code', Response::STATUS_CODE_ACCEPTED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_BOOLEAN) + ->label('sdk', new Method( + namespace: 'databases', + name: 'createBooleanAttribute', + description: '/docs/references/databases/create-boolean-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_ACCEPTED, + model: Response::MODEL_ATTRIBUTE_BOOLEAN, + ) + ] + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') @@ -1600,13 +1718,18 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/dateti ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.namespace', 'databases') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.method', 'createDatetimeAttribute') - ->label('sdk.description', '/docs/references/databases/create-datetime-attribute.md') - ->label('sdk.response.code', Response::STATUS_CODE_ACCEPTED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_DATETIME) + ->label('sdk', new Method( + namespace: 'databases', + name: 'createDatetimeAttribute', + description: '/docs/references/databases/create-datetime-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_ACCEPTED, + model: Response::MODEL_ATTRIBUTE_DATETIME, + ) + ] + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') @@ -1645,13 +1768,18 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/relati ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.namespace', 'databases') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.method', 'createRelationshipAttribute') - ->label('sdk.description', '/docs/references/databases/create-relationship-attribute.md') - ->label('sdk.response.code', Response::STATUS_CODE_ACCEPTED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_RELATIONSHIP) + ->label('sdk', new Method( + namespace: 'databases', + name: 'createRelationshipAttribute', + description: '/docs/references/databases/create-relationship-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_ACCEPTED, + model: Response::MODEL_ATTRIBUTE_RELATIONSHIP, + ) + ] + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('relatedCollectionId', '', new UID(), 'Related Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') @@ -1771,13 +1899,18 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'listAttributes') - ->label('sdk.description', '/docs/references/databases/list-attributes.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_LIST) + ->label('sdk', new Method( + namespace: 'databases', + name: 'listAttributes', + description: '/docs/references/databases/list-attributes.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_ATTRIBUTE_LIST + ) + ] + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('queries', [], new Attributes(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Attributes::ALLOWED_ATTRIBUTES), true) @@ -1852,23 +1985,29 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes/:key') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'getAttribute') - ->label('sdk.description', '/docs/references/databases/get-attribute.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', [ - Response::MODEL_ATTRIBUTE_BOOLEAN, - Response::MODEL_ATTRIBUTE_INTEGER, - Response::MODEL_ATTRIBUTE_FLOAT, - Response::MODEL_ATTRIBUTE_EMAIL, - Response::MODEL_ATTRIBUTE_ENUM, - Response::MODEL_ATTRIBUTE_URL, - Response::MODEL_ATTRIBUTE_IP, - Response::MODEL_ATTRIBUTE_DATETIME, - Response::MODEL_ATTRIBUTE_RELATIONSHIP, - Response::MODEL_ATTRIBUTE_STRING])// needs to be last, since its condition would dominate any other string attribute + ->label('sdk', new Method( + namespace: 'databases', + name: 'getAttribute', + description: '/docs/references/databases/get-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: [ + Response::MODEL_ATTRIBUTE_BOOLEAN, + Response::MODEL_ATTRIBUTE_INTEGER, + Response::MODEL_ATTRIBUTE_FLOAT, + Response::MODEL_ATTRIBUTE_EMAIL, + Response::MODEL_ATTRIBUTE_ENUM, + Response::MODEL_ATTRIBUTE_URL, + Response::MODEL_ATTRIBUTE_IP, + Response::MODEL_ATTRIBUTE_DATETIME, + Response::MODEL_ATTRIBUTE_RELATIONSHIP, + Response::MODEL_ATTRIBUTE_STRING + ] + ), + ] + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') @@ -1930,12 +2069,19 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/strin ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') ->label('audits.event', 'attribute.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'updateStringAttribute') - ->label('sdk.description', '/docs/references/databases/update-string-attribute.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_STRING) + ->label('sdk', new Method( + namespace: 'databases', + name: 'updateStringAttribute', + description: '/docs/references/databases/update-string-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_ATTRIBUTE_STRING, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') @@ -1974,12 +2120,19 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/email ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') ->label('audits.event', 'attribute.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'updateEmailAttribute') - ->label('sdk.description', '/docs/references/databases/update-email-attribute.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_EMAIL) + ->label('sdk', new Method( + namespace: 'databases', + name: 'updateEmailAttribute', + description: '/docs/references/databases/update-email-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_ATTRIBUTE_EMAIL, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') @@ -2016,12 +2169,19 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/enum/ ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') ->label('audits.event', 'attribute.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'updateEnumAttribute') - ->label('sdk.description', '/docs/references/databases/update-enum-attribute.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_ENUM) + ->label('sdk', new Method( + namespace: 'databases', + name: 'updateEnumAttribute', + description: '/docs/references/databases/update-enum-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_ATTRIBUTE_ENUM, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') @@ -2060,12 +2220,19 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/ip/:k ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') ->label('audits.event', 'attribute.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'updateIpAttribute') - ->label('sdk.description', '/docs/references/databases/update-ip-attribute.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_IP) + ->label('sdk', new Method( + namespace: 'databases', + name: 'updateIpAttribute', + description: '/docs/references/databases/update-ip-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_ATTRIBUTE_IP, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') @@ -2102,12 +2269,19 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/url/: ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') ->label('audits.event', 'attribute.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'updateUrlAttribute') - ->label('sdk.description', '/docs/references/databases/update-url-attribute.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_URL) + ->label('sdk', new Method( + namespace: 'databases', + name: 'updateUrlAttribute', + description: '/docs/references/databases/update-url-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_ATTRIBUTE_URL, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') @@ -2144,12 +2318,19 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/integ ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') ->label('audits.event', 'attribute.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'updateIntegerAttribute') - ->label('sdk.description', '/docs/references/databases/update-integer-attribute.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_INTEGER) + ->label('sdk', new Method( + namespace: 'databases', + name: 'updateIntegerAttribute', + description: '/docs/references/databases/update-integer-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_ATTRIBUTE_INTEGER, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') @@ -2196,12 +2377,19 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/float ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') ->label('audits.event', 'attribute.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'updateFloatAttribute') - ->label('sdk.description', '/docs/references/databases/update-float-attribute.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_FLOAT) + ->label('sdk', new Method( + namespace: 'databases', + name: 'updateFloatAttribute', + description: '/docs/references/databases/update-float-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_ATTRIBUTE_FLOAT, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') @@ -2248,12 +2436,19 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/boole ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') ->label('audits.event', 'attribute.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'updateBooleanAttribute') - ->label('sdk.description', '/docs/references/databases/update-boolean-attribute.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_BOOLEAN) + ->label('sdk', new Method( + namespace: 'databases', + name: 'updateBooleanAttribute', + description: '/docs/references/databases/update-boolean-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_ATTRIBUTE_BOOLEAN, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') @@ -2289,12 +2484,19 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/datet ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') ->label('audits.event', 'attribute.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'updateDatetimeAttribute') - ->label('sdk.description', '/docs/references/databases/update-datetime-attribute.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_DATETIME) + ->label('sdk', new Method( + namespace: 'databases', + name: 'updateDatetimeAttribute', + description: '/docs/references/databases/update-datetime-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_ATTRIBUTE_DATETIME, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') @@ -2330,12 +2532,19 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/:key/ ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') ->label('audits.event', 'attribute.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'updateRelationshipAttribute') - ->label('sdk.description', '/docs/references/databases/update-relationship-attribute.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_RELATIONSHIP) + ->label('sdk', new Method( + namespace: 'databases', + name: 'updateRelationshipAttribute', + description: '/docs/references/databases/update-relationship-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_ATTRIBUTE_RELATIONSHIP, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') @@ -2388,12 +2597,19 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/attributes/:key ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') ->label('audits.event', 'attribute.delete') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'deleteAttribute') - ->label('sdk.description', '/docs/references/databases/delete-attribute.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'databases', + name: 'deleteAttribute', + description: '/docs/references/databases/delete-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') @@ -2502,13 +2718,19 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/indexes') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'index.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'createIndex') - ->label('sdk.description', '/docs/references/databases/create-index.md') - ->label('sdk.response.code', Response::STATUS_CODE_ACCEPTED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_INDEX) + ->label('sdk', new Method( + namespace: 'databases', + name: 'createIndex', + description: '/docs/references/databases/create-index.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_ACCEPTED, + model: Response::MODEL_INDEX, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', null, new Key(), 'Index Key.') @@ -2666,13 +2888,19 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/indexes') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'listIndexes') - ->label('sdk.description', '/docs/references/databases/list-indexes.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_INDEX_LIST) + ->label('sdk', new Method( + namespace: 'databases', + name: 'listIndexes', + description: '/docs/references/databases/list-indexes.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_INDEX_LIST, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('queries', [], new Indexes(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Indexes::ALLOWED_ATTRIBUTES), true) @@ -2742,13 +2970,19 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/indexes/:key') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'getIndex') - ->label('sdk.description', '/docs/references/databases/get-index.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_INDEX) + ->label('sdk', new Method( + namespace: 'databases', + name: 'getIndex', + description: '/docs/references/databases/get-index.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_INDEX, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', null, new Key(), 'Index Key.') @@ -2785,12 +3019,19 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/indexes/:key') ->label('event', 'databases.[databaseId].collections.[collectionId].indexes.[indexId].update') ->label('audits.event', 'index.delete') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'deleteIndex') - ->label('sdk.description', '/docs/references/databases/delete-index.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'databases', + name: 'deleteIndex', + description: '/docs/references/databases/delete-index.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Index Key.') @@ -2853,15 +3094,24 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'createDocument') - ->label('sdk.description', '/docs/references/databases/create-document.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_DOCUMENT) - ->label('sdk.offline.model', '/databases/{databaseId}/collections/{collectionId}/documents') - ->label('sdk.offline.key', '{documentId}') + ->label( + 'sdk', + [ + new Method( + namespace: 'databases', + name: 'createDocument', + description: '/docs/references/databases/create-document.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_DOCUMENT, + ) + ], + contentType: ContentType::JSON + ) + ] + ) ->param('databaseId', '', new UID(), 'Database ID.') ->param('documentId', '', new CustomId(), 'Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.') @@ -3110,14 +3360,19 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents') ->groups(['api', 'database']) ->label('scope', 'documents.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'listDocuments') - ->label('sdk.description', '/docs/references/databases/list-documents.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_DOCUMENT_LIST) - ->label('sdk.offline.model', '/databases/{databaseId}/collections/{collectionId}/documents') + ->label('sdk', new Method( + namespace: 'databases', + name: 'listDocuments', + description: '/docs/references/databases/list-documents.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_DOCUMENT_LIST, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('queries', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.', true) @@ -3283,15 +3538,19 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documen ->groups(['api', 'database']) ->label('scope', 'documents.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'getDocument') - ->label('sdk.description', '/docs/references/databases/get-document.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_DOCUMENT) - ->label('sdk.offline.model', '/databases/{databaseId}/collections/{collectionId}/documents') - ->label('sdk.offline.key', '{documentId}') + ->label('sdk', new Method( + namespace: 'databases', + name: 'getDocument', + description: '/docs/references/databases/get-document.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_DOCUMENT, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('documentId', '', new UID(), 'Document ID.') @@ -3392,13 +3651,19 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documen ->groups(['api', 'database']) ->label('scope', 'documents.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'listDocumentLogs') - ->label('sdk.description', '/docs/references/databases/get-document-logs.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_LOG_LIST) + ->label('sdk', new Method( + namespace: 'databases', + name: 'listDocumentLogs', + description: '/docs/references/databases/get-document-logs.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_LOG_LIST, + ) + ], + contentType: ContentType::JSON, + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') ->param('documentId', '', new UID(), 'Document ID.') @@ -3504,15 +3769,19 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'updateDocument') - ->label('sdk.description', '/docs/references/databases/update-document.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_DOCUMENT) - ->label('sdk.offline.model', '/databases/{databaseId}/collections/{collectionId}/documents') - ->label('sdk.offline.key', '{documentId}') + ->label('sdk', new Method( + namespace: 'databases', + name: 'updateDocument', + description: '/docs/references/databases/update-document.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_DOCUMENT, + ) + ], + contentType: ContentType::JSON + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') ->param('documentId', '', new UID(), 'Document ID.') @@ -3756,14 +4025,19 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'deleteDocument') - ->label('sdk.description', '/docs/references/databases/delete-document.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) - ->label('sdk.offline.model', '/databases/{databaseId}/collections/{collectionId}/documents') - ->label('sdk.offline.key', '{documentId}') + ->label('sdk', new Method( + namespace: 'databases', + name: 'deleteDocument', + description: '/docs/references/databases/delete-document.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('documentId', '', new UID(), 'Document ID.') @@ -3873,12 +4147,19 @@ App::get('/v1/databases/usage') ->groups(['api', 'database', 'usage']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'getUsage') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USAGE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + name: 'getUsage', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USAGE_DATABASES, + ) + ], + contentType: ContentType::JSON + )) ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), '`Date range.', true) ->inject('response') ->inject('dbForProject') @@ -3955,12 +4236,19 @@ App::get('/v1/databases/:databaseId/usage') ->groups(['api', 'database', 'usage']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'getDatabaseUsage') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USAGE_DATABASE) + ->label('sdk', new Method( + namespace: 'databases', + name: 'getDatabaseUsage', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USAGE_DATABASE, + ) + ], + contentType: ContentType::JSON, + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), '`Date range.', true) ->inject('response') @@ -4043,12 +4331,19 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/usage') ->groups(['api', 'database', 'usage']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'getCollectionUsage') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USAGE_COLLECTION) + ->label('sdk', new Method( + namespace: 'databases', + name: 'getCollectionUsage', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USAGE_COLLECTION, + ) + ], + contentType: ContentType::JSON, + )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true) ->param('collectionId', '', new UID(), 'Collection ID.') @@ -4120,4 +4415,4 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/usage') 'documentsTotal' => $usage[$metrics[0]]['total'], 'documents' => $usage[$metrics[0]]['data'], ]), Response::MODEL_USAGE_COLLECTION); - }); + }); \ No newline at end of file diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index d4d5fc64cf..9b6f92ed5b 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -14,6 +14,11 @@ use Appwrite\Functions\Validator\Headers; use Appwrite\Functions\Validator\RuntimeSpecification; use Appwrite\Messaging\Adapter\Realtime; use Appwrite\Platform\Tasks\ScheduleExecutions; +use Appwrite\SDK\AuthType; +use Appwrite\SDK\ContentType; +use Appwrite\SDK\Method; +use Appwrite\SDK\MethodType; +use Appwrite\SDK\Response as SDKResponse; use Appwrite\Task\Validator\Cron; use Appwrite\Utopia\Database\Validator\CustomId; use Appwrite\Utopia\Database\Validator\Queries\Deployments; @@ -142,13 +147,18 @@ App::post('/v1/functions') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) ->label('audits.event', 'function.create') ->label('audits.resource', 'function/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'create') - ->label('sdk.description', '/docs/references/functions/create-function.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_FUNCTION) + ->label('sdk', new Method( + namespace: 'functions', + name: 'create', + description: '/docs/references/functions/create-function.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_FUNCTION, + ) + ], + )) ->param('functionId', '', new CustomId(), 'Function ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Function name. Max length: 128 chars.') ->param('runtime', '', new WhiteList(array_keys(Config::getParam('runtimes')), true), 'Execution runtime.') @@ -434,13 +444,18 @@ App::get('/v1/functions') ->desc('List functions') ->label('scope', 'functions.read') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'list') - ->label('sdk.description', '/docs/references/functions/list-functions.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_FUNCTION_LIST) + ->label('sdk', new Method( + namespace: 'functions', + name: 'list', + description: '/docs/references/functions/list-functions.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_FUNCTION_LIST, + ) + ] + )) ->param('queries', [], new Functions(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Functions::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') @@ -495,13 +510,18 @@ App::get('/v1/functions/runtimes') ->desc('List runtimes') ->label('scope', 'functions.read') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'listRuntimes') - ->label('sdk.description', '/docs/references/functions/list-runtimes.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_RUNTIME_LIST) + ->label('sdk', new Method( + namespace: 'functions', + name: 'listRuntimes', + description: '/docs/references/functions/list-runtimes.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_RUNTIME_LIST, + ) + ] + )) ->inject('response') ->action(function (Response $response) { $runtimes = Config::getParam('runtimes'); @@ -529,13 +549,18 @@ App::get('/v1/functions/specifications') ->desc('List available function runtime specifications') ->label('scope', 'functions.read') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) - ->label('sdk.auth', [APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'listSpecifications') - ->label('sdk.description', '/docs/references/functions/list-specifications.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_SPECIFICATION_LIST) + ->label('sdk', new Method( + namespace: 'functions', + name: 'listSpecifications', + description: '/docs/references/functions/list-specifications.md', + auth: [AuthType::KEY, AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_SPECIFICATION_LIST, + ) + ] + )) ->inject('response') ->inject('plan') ->action(function (Response $response, array $plan) { @@ -566,13 +591,18 @@ App::get('/v1/functions/:functionId') ->desc('Get function') ->label('scope', 'functions.read') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'get') - ->label('sdk.description', '/docs/references/functions/get-function.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_FUNCTION) + ->label('sdk', new Method( + namespace: 'functions', + name: 'get', + description: '/docs/references/functions/get-function.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_FUNCTION, + ) + ] + )) ->param('functionId', '', new UID(), 'Function ID.') ->inject('response') ->inject('dbForProject') @@ -591,12 +621,18 @@ App::get('/v1/functions/:functionId/usage') ->groups(['api', 'functions', 'usage']) ->label('scope', 'functions.read') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'getFunctionUsage') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USAGE_FUNCTION) + ->label('sdk', new Method( + namespace: 'functions', + name: 'getFunctionUsage', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USAGE_FUNCTION, + ) + ] + )) ->param('functionId', '', new UID(), 'Function ID.') ->param('range', '30d', new WhiteList(['24h', '30d', '90d']), 'Date range.', true) ->inject('response') @@ -696,12 +732,18 @@ App::get('/v1/functions/usage') ->groups(['api', 'functions']) ->label('scope', 'functions.read') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'getUsage') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USAGE_FUNCTIONS) + ->label('sdk', new Method( + namespace: 'functions', + name: 'getUsage', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USAGE_FUNCTIONS, + ) + ] + )) ->param('range', '30d', new WhiteList(['24h', '30d', '90d']), 'Date range.', true) ->inject('response') ->inject('dbForProject') @@ -799,13 +841,18 @@ App::put('/v1/functions/:functionId') ->label('event', 'functions.[functionId].update') ->label('audits.event', 'function.update') ->label('audits.resource', 'function/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'update') - ->label('sdk.description', '/docs/references/functions/update-function.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_FUNCTION) + ->label('sdk', new Method( + namespace: 'functions', + name: 'update', + description: '/docs/references/functions/update-function.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_FUNCTION, + ) + ] + )) ->param('functionId', '', new UID(), 'Function ID.') ->param('name', '', new Text(128), 'Function name. Max length: 128 chars.') ->param('runtime', '', new WhiteList(array_keys(Config::getParam('runtimes')), true), 'Execution runtime.', true) @@ -999,13 +1046,20 @@ App::get('/v1/functions/:functionId/deployments/:deploymentId/download') ->desc('Download deployment') ->label('scope', 'functions.read') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) - ->label('sdk.auth', [APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'getDeploymentDownload') - ->label('sdk.description', '/docs/references/functions/get-deployment-download.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', '*/*') - ->label('sdk.methodType', 'location') + ->label('sdk', new Method( + namespace: 'functions', + name: 'getDeploymentDownload', + description: '/docs/references/functions/get-deployment-download.md', + auth: [AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::ANY, + type: MethodType::LOCATION + )) ->param('functionId', '', new UID(), 'Function ID.') ->param('deploymentId', '', new UID(), 'Deployment ID.') ->inject('response') @@ -1088,13 +1142,18 @@ App::patch('/v1/functions/:functionId/deployments/:deploymentId') ->label('event', 'functions.[functionId].deployments.[deploymentId].update') ->label('audits.event', 'deployment.update') ->label('audits.resource', 'function/{request.functionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'updateDeployment') - ->label('sdk.description', '/docs/references/functions/update-function-deployment.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_FUNCTION) + ->label('sdk', new Method( + namespace: 'functions', + name: 'updateDeployment', + description: '/docs/references/functions/update-function-deployment.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_FUNCTION, + ) + ] + )) ->param('functionId', '', new UID(), 'Function ID.') ->param('deploymentId', '', new UID(), 'Deployment ID.') ->inject('response') @@ -1151,12 +1210,19 @@ App::delete('/v1/functions/:functionId') ->label('event', 'functions.[functionId].delete') ->label('audits.event', 'function.delete') ->label('audits.resource', 'function/{request.functionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'delete') - ->label('sdk.description', '/docs/references/functions/delete-function.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'functions', + name: 'delete', + description: '/docs/references/functions/delete-function.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('functionId', '', new UID(), 'Function ID.') ->inject('response') ->inject('dbForProject') @@ -1199,16 +1265,21 @@ App::post('/v1/functions/:functionId/deployments') ->label('event', 'functions.[functionId].deployments.[deploymentId].create') ->label('audits.event', 'deployment.create') ->label('audits.resource', 'function/{request.functionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'createDeployment') - ->label('sdk.methodType', 'upload') - ->label('sdk.description', '/docs/references/functions/create-deployment.md') - ->label('sdk.packaging', true) - ->label('sdk.request.type', 'multipart/form-data') - ->label('sdk.response.code', Response::STATUS_CODE_ACCEPTED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_DEPLOYMENT) + ->label('sdk', new Method( + namespace: 'functions', + name: 'createDeployment', + description: '/docs/references/functions/create-deployment.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_ACCEPTED, + model: Response::MODEL_DEPLOYMENT, + ) + ], + requestType: 'multipart/form-data', + type: MethodType::UPLOAD, + packaging: true, + )) ->param('functionId', '', new UID(), 'Function ID.') ->param('entrypoint', null, new Text(1028), 'Entrypoint File.', true) ->param('commands', null, new Text(8192, 0), 'Build Commands.', true) @@ -1416,13 +1487,18 @@ App::get('/v1/functions/:functionId/deployments') ->desc('List deployments') ->label('scope', 'functions.read') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'listDeployments') - ->label('sdk.description', '/docs/references/functions/list-deployments.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_DEPLOYMENT_LIST) + ->label('sdk', new Method( + namespace: 'functions', + name: 'listDeployments', + description: '/docs/references/functions/list-deployments.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_DEPLOYMENT_LIST, + ) + ] + )) ->param('functionId', '', new UID(), 'Function ID.') ->param('queries', [], new Deployments(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Deployments::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) @@ -1500,13 +1576,18 @@ App::get('/v1/functions/:functionId/deployments/:deploymentId') ->desc('Get deployment') ->label('scope', 'functions.read') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'getDeployment') - ->label('sdk.description', '/docs/references/functions/get-deployment.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_DEPLOYMENT) + ->label('sdk', new Method( + namespace: 'functions', + name: 'getDeployment', + description: '/docs/references/functions/get-deployment.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_DEPLOYMENT, + ) + ] + )) ->param('functionId', '', new UID(), 'Function ID.') ->param('deploymentId', '', new UID(), 'Deployment ID.') ->inject('response') @@ -1547,12 +1628,19 @@ App::delete('/v1/functions/:functionId/deployments/:deploymentId') ->label('event', 'functions.[functionId].deployments.[deploymentId].delete') ->label('audits.event', 'deployment.delete') ->label('audits.resource', 'function/{request.functionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'deleteDeployment') - ->label('sdk.description', '/docs/references/functions/delete-deployment.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'functions', + name: 'deleteDeployment', + description: '/docs/references/functions/delete-deployment.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('functionId', '', new UID(), 'Function ID.') ->param('deploymentId', '', new UID(), 'Deployment ID.') ->inject('response') @@ -1613,11 +1701,18 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/build') ->label('event', 'functions.[functionId].deployments.[deploymentId].update') ->label('audits.event', 'deployment.update') ->label('audits.resource', 'function/{request.functionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'createBuild') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'functions', + name: 'createBuild', + description: '', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ] + )) ->param('functionId', '', new UID(), 'Function ID.') ->param('deploymentId', '', new UID(), 'Deployment ID.') ->param('buildId', '', new UID(), 'Build unique ID.', true) // added as optional param for backward compatibility @@ -1681,12 +1776,18 @@ App::patch('/v1/functions/:functionId/deployments/:deploymentId/build') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) ->label('audits.event', 'deployment.update') ->label('audits.resource', 'function/{request.functionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'updateDeploymentBuild') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_BUILD) + ->label('sdk', new Method( + namespace: 'functions', + name: 'updateDeploymentBuild', + description: '', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_BUILD, + ) + ] + )) ->param('functionId', '', new UID(), 'Function ID.') ->param('deploymentId', '', new UID(), 'Deployment ID.') ->inject('response') @@ -1770,15 +1871,20 @@ App::post('/v1/functions/:functionId/executions') ->label('scope', 'execution.write') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) ->label('event', 'functions.[functionId].executions.[executionId].create') - ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'createExecution') - ->label('sdk.description', '/docs/references/functions/create-execution.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_MULTIPART) - ->label('sdk.response.model', Response::MODEL_EXECUTION) - ->label('sdk.request.type', Response::CONTENT_TYPE_JSON) + ->label('sdk', new Method( + namespace: 'functions', + name: 'createExecution', + description: '/docs/references/functions/create-execution.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_EXECUTION, + ) + ], + contentType: ContentType::MULTIPART, + requestType: 'application/json', + )) ->param('functionId', '', new UID(), 'Function ID.') ->param('body', '', new Text(10485760, 0), 'HTTP body of execution. Default value is empty string.', true) ->param('async', false, new Boolean(true), 'Execute code in the background. Default value is false.', true) @@ -2173,13 +2279,18 @@ App::get('/v1/functions/:functionId/executions') ->desc('List executions') ->label('scope', 'execution.read') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'listExecutions') - ->label('sdk.description', '/docs/references/functions/list-executions.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_EXECUTION_LIST) + ->label('sdk', new Method( + namespace: 'functions', + name: 'listExecutions', + description: '/docs/references/functions/list-executions.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_EXECUTION_LIST, + ) + ] + )) ->param('functionId', '', new UID(), 'Function ID.') ->param('queries', [], new Executions(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Executions::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) @@ -2261,13 +2372,18 @@ App::get('/v1/functions/:functionId/executions/:executionId') ->desc('Get execution') ->label('scope', 'execution.read') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'getExecution') - ->label('sdk.description', '/docs/references/functions/get-execution.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_EXECUTION) + ->label('sdk', new Method( + namespace: 'functions', + name: 'getExecution', + description: '/docs/references/functions/get-execution.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_EXECUTION, + ) + ] + )) ->param('functionId', '', new UID(), 'Function ID.') ->param('executionId', '', new UID(), 'Execution ID.') ->inject('response') @@ -2312,12 +2428,19 @@ App::delete('/v1/functions/:functionId/executions/:executionId') ->label('event', 'functions.[functionId].executions.[executionId].delete') ->label('audits.event', 'executions.delete') ->label('audits.resource', 'function/{request.functionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'deleteExecution') - ->label('sdk.description', '/docs/references/functions/delete-execution.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'functions', + name: 'deleteExecution', + description: '/docs/references/functions/delete-execution.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('functionId', '', new UID(), 'Function ID.') ->param('executionId', '', new UID(), 'Execution ID.') ->inject('response') @@ -2382,13 +2505,18 @@ App::post('/v1/functions/:functionId/variables') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) ->label('audits.event', 'variable.create') ->label('audits.resource', 'function/{request.functionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'createVariable') - ->label('sdk.description', '/docs/references/functions/create-variable.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_VARIABLE) + ->label('sdk', new Method( + namespace: 'functions', + name: 'createVariable', + description: '/docs/references/functions/create-variable.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_VARIABLE, + ) + ] + )) ->param('functionId', '', new UID(), 'Function unique ID.', false) ->param('key', null, new Text(Database::LENGTH_KEY), 'Variable key. Max length: ' . Database::LENGTH_KEY . ' chars.', false) ->param('value', null, new Text(8192, 0), 'Variable value. Max length: 8192 chars.', false) @@ -2445,13 +2573,21 @@ App::get('/v1/functions/:functionId/variables') ->groups(['api', 'functions']) ->label('scope', 'functions.read') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'listVariables') - ->label('sdk.description', '/docs/references/functions/list-variables.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_VARIABLE_LIST) + ->label( + 'sdk', + new Method( + namespace: 'functions', + name: 'listVariables', + description: '/docs/references/functions/list-variables.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_VARIABLE_LIST, + ) + ], + ) + ) ->param('functionId', '', new UID(), 'Function unique ID.', false) ->inject('response') ->inject('dbForProject') @@ -2473,13 +2609,21 @@ App::get('/v1/functions/:functionId/variables/:variableId') ->groups(['api', 'functions']) ->label('scope', 'functions.read') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'getVariable') - ->label('sdk.description', '/docs/references/functions/get-variable.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_VARIABLE) + ->label( + 'sdk', + new Method( + namespace: 'functions', + name: 'getVariable', + description: '/docs/references/functions/get-variable.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_VARIABLE, + ) + ], + ) + ) ->param('functionId', '', new UID(), 'Function unique ID.', false) ->param('variableId', '', new UID(), 'Variable unique ID.', false) ->inject('response') @@ -2515,13 +2659,18 @@ App::put('/v1/functions/:functionId/variables/:variableId') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) ->label('audits.event', 'variable.update') ->label('audits.resource', 'function/{request.functionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'updateVariable') - ->label('sdk.description', '/docs/references/functions/update-variable.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_VARIABLE) + ->label('sdk', new Method( + namespace: 'functions', + name: 'updateVariable', + description: '/docs/references/functions/update-variable.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_VARIABLE, + ) + ] + )) ->param('functionId', '', new UID(), 'Function unique ID.', false) ->param('variableId', '', new UID(), 'Variable unique ID.', false) ->param('key', null, new Text(255), 'Variable key. Max length: 255 chars.', false) @@ -2577,12 +2726,19 @@ App::delete('/v1/functions/:functionId/variables/:variableId') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) ->label('audits.event', 'variable.delete') ->label('audits.resource', 'function/{request.functionId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'deleteVariable') - ->label('sdk.description', '/docs/references/functions/delete-variable.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'functions', + name: 'deleteVariable', + description: '/docs/references/functions/delete-variable.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('functionId', '', new UID(), 'Function unique ID.', false) ->param('variableId', '', new UID(), 'Variable unique ID.', false) ->inject('response') @@ -2624,13 +2780,18 @@ App::get('/v1/functions/templates') ->desc('List function templates') ->label('scope', 'public') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'listTemplates') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.description', '/docs/references/functions/list-templates.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TEMPLATE_FUNCTION_LIST) + ->label('sdk', new Method( + namespace: 'functions', + name: 'listTemplates', + description: '/docs/references/functions/list-templates.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_TEMPLATE_FUNCTION_LIST, + ) + ] + )) ->param('runtimes', [], new ArrayList(new WhiteList(array_keys(Config::getParam('runtimes')), true), APP_LIMIT_ARRAY_PARAMS_SIZE), 'List of runtimes allowed for filtering function templates. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' runtimes are allowed.', true) ->param('useCases', [], new ArrayList(new WhiteList(['dev-tools','starter','databases','ai','messaging','utilities']), APP_LIMIT_ARRAY_PARAMS_SIZE), 'List of use cases allowed for filtering function templates. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' use cases are allowed.', true) ->param('limit', 25, new Range(1, 5000), 'Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.', true) @@ -2662,13 +2823,18 @@ App::get('/v1/functions/templates/:templateId') ->desc('Get function template') ->label('scope', 'public') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'getTemplate') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.description', '/docs/references/functions/get-template.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TEMPLATE_FUNCTION) + ->label('sdk', new Method( + namespace: 'functions', + name: 'getTemplate', + description: '/docs/references/functions/get-template.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_TEMPLATE_FUNCTION, + ) + ] + )) ->param('templateId', '', new Text(128), 'Template ID.') ->inject('response') ->action(function (string $templateId, Response $response) { @@ -2685,4 +2851,4 @@ App::get('/v1/functions/templates/:templateId') } $response->dynamic(new Document($template), Response::MODEL_TEMPLATE_FUNCTION); - }); + }); \ No newline at end of file diff --git a/app/controllers/api/graphql.php b/app/controllers/api/graphql.php index f79f433b5c..80a17db7cb 100644 --- a/app/controllers/api/graphql.php +++ b/app/controllers/api/graphql.php @@ -5,6 +5,10 @@ use Appwrite\Extend\Exception; use Appwrite\Extend\Exception as AppwriteException; use Appwrite\GraphQL\Promises\Adapter; use Appwrite\GraphQL\Schema; +use Appwrite\SDK\AuthType; +use Appwrite\SDK\Method; +use Appwrite\SDK\MethodType; +use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; use GraphQL\Error\DebugFlag; @@ -38,13 +42,19 @@ App::get('/v1/graphql') ->desc('GraphQL endpoint') ->groups(['graphql']) ->label('scope', 'graphql') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'graphql') - ->label('sdk.hide', true) - ->label('sdk.description', '/docs/references/graphql/get.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_ANY) + ->label('sdk', new Method( + namespace: 'graphql', + name: 'get', + auth: [AuthType::KEY, AuthType::SESSION, AuthType::JWT], + hide: true, + description: '/docs/references/graphql/get.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_ANY, + ) + ] + )) ->label('abuse-limit', 60) ->label('abuse-time', 60) ->param('query', '', new Text(0, 0), 'The query to execute.') @@ -78,17 +88,22 @@ App::post('/v1/graphql/mutation') ->desc('GraphQL endpoint') ->groups(['graphql']) ->label('scope', 'graphql') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'graphql') - ->label('sdk.method', 'mutation') - ->label('sdk.methodType', 'graphql') - ->label('sdk.description', '/docs/references/graphql/post.md') - ->label('sdk.parameters', [ - 'query' => ['default' => [], 'validator' => new JSON(), 'description' => 'The query or queries to execute.', 'optional' => false], - ]) - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_ANY) + ->label('sdk', new Method( + namespace: 'graphql', + name: 'mutation', + auth: [AuthType::KEY, AuthType::SESSION, AuthType::JWT], + description: '/docs/references/graphql/post.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_ANY, + ) + ], + type: MethodType::GRAPHQL, + additionalParameters: [ + 'query' => ['default' => [], 'validator' => new JSON(), 'description' => 'The query or queries to execute.', 'optional' => false], + ], + )) ->label('abuse-limit', 60) ->label('abuse-time', 60) ->inject('request') @@ -123,17 +138,22 @@ App::post('/v1/graphql') ->desc('GraphQL endpoint') ->groups(['graphql']) ->label('scope', 'graphql') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'graphql') - ->label('sdk.method', 'query') - ->label('sdk.methodType', 'graphql') - ->label('sdk.description', '/docs/references/graphql/post.md') - ->label('sdk.parameters', [ - 'query' => ['default' => [], 'validator' => new JSON(), 'description' => 'The query or queries to execute.', 'optional' => false], - ]) - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_ANY) + ->label('sdk', new Method( + namespace: 'graphql', + name: 'query', + auth: [AuthType::KEY, AuthType::SESSION, AuthType::JWT], + description: '/docs/references/graphql/post.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_ANY, + ) + ], + type: MethodType::GRAPHQL, + additionalParameters: [ + 'query' => ['default' => [], 'validator' => new JSON(), 'description' => 'The query or queries to execute.', 'optional' => false], + ], + )) ->label('abuse-limit', 60) ->label('abuse-time', 60) ->inject('request') @@ -311,4 +331,4 @@ App::shutdown() ->inject('project') ->action(function (Document $project) { Schema::setDirty($project->getId()); - }); + }); \ No newline at end of file diff --git a/app/controllers/api/health.php b/app/controllers/api/health.php index 60a8c0ca97..787bc71ac8 100644 --- a/app/controllers/api/health.php +++ b/app/controllers/api/health.php @@ -3,6 +3,10 @@ use Appwrite\ClamAV\Network; use Appwrite\Event\Event; use Appwrite\Extend\Exception; +use Appwrite\SDK\AuthType; +use Appwrite\SDK\ContentType; +use Appwrite\SDK\Method; +use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response; use Utopia\App; use Utopia\Config\Config; @@ -26,13 +30,19 @@ App::get('/v1/health') ->desc('Get HTTP') ->groups(['api', 'health']) ->label('scope', 'health.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'health') - ->label('sdk.method', 'get') - ->label('sdk.description', '/docs/references/health/get.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_HEALTH_STATUS) + ->label('sdk', new Method( + namespace: 'health', + name: 'get', + auth: [AuthType::KEY], + description: '/docs/references/health/get.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_HEALTH_STATUS, + ) + ], + contentType: ContentType::JSON + )) ->inject('response') ->action(function (Response $response) { @@ -49,9 +59,6 @@ App::get('/v1/health/version') ->desc('Get version') ->groups(['api', 'health']) ->label('scope', 'public') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_HEALTH_VERSION) ->inject('response') ->action(function (Response $response) { $response->dynamic(new Document([ 'version' => APP_VERSION_STABLE ]), Response::MODEL_HEALTH_VERSION); @@ -61,13 +68,19 @@ App::get('/v1/health/db') ->desc('Get DB') ->groups(['api', 'health']) ->label('scope', 'health.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'health') - ->label('sdk.method', 'getDB') - ->label('sdk.description', '/docs/references/health/get-db.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_HEALTH_STATUS) + ->label('sdk', new Method( + auth: [AuthType::KEY], + namespace: 'health', + name: 'getDB', + description: '/docs/references/health/get-db.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_HEALTH_STATUS, + ) + ], + contentType: ContentType::JSON + )) ->inject('response') ->inject('pools') ->action(function (Response $response, Group $pools) { @@ -115,13 +128,19 @@ App::get('/v1/health/cache') ->desc('Get cache') ->groups(['api', 'health']) ->label('scope', 'health.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'health') - ->label('sdk.method', 'getCache') - ->label('sdk.description', '/docs/references/health/get-cache.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_HEALTH_STATUS) + ->label('sdk', new Method( + auth: [AuthType::KEY], + namespace: 'health', + name: 'getCache', + description: '/docs/references/health/get-cache.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_HEALTH_STATUS, + ) + ], + contentType: ContentType::JSON + )) ->inject('response') ->inject('pools') ->action(function (Response $response, Group $pools) { @@ -173,13 +192,19 @@ App::get('/v1/health/queue') ->desc('Get queue') ->groups(['api', 'health']) ->label('scope', 'health.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'health') - ->label('sdk.method', 'getQueue') - ->label('sdk.description', '/docs/references/health/get-queue.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_HEALTH_STATUS) + ->label('sdk', new Method( + auth: [AuthType::KEY], + namespace: 'health', + name: 'getQueue', + description: '/docs/references/health/get-queue.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_HEALTH_STATUS, + ) + ], + contentType: ContentType::JSON + )) ->inject('response') ->inject('pools') ->action(function (Response $response, Group $pools) { @@ -230,13 +255,19 @@ App::get('/v1/health/pubsub') ->desc('Get pubsub') ->groups(['api', 'health']) ->label('scope', 'health.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'health') - ->label('sdk.method', 'getPubSub') - ->label('sdk.description', '/docs/references/health/get-pubsub.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_HEALTH_STATUS) + ->label('sdk', new Method( + auth: [AuthType::KEY], + namespace: 'health', + name: 'getPubSub', + description: '/docs/references/health/get-pubsub.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_HEALTH_STATUS, + ) + ], + contentType: ContentType::JSON + )) ->inject('response') ->inject('pools') ->action(function (Response $response, Group $pools) { @@ -288,13 +319,19 @@ App::get('/v1/health/time') ->desc('Get time') ->groups(['api', 'health']) ->label('scope', 'health.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'health') - ->label('sdk.method', 'getTime') - ->label('sdk.description', '/docs/references/health/get-time.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_HEALTH_TIME) + ->label('sdk', new Method( + auth: [AuthType::KEY], + namespace: 'health', + name: 'getTime', + description: '/docs/references/health/get-time.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_HEALTH_TIME, + ) + ], + contentType: ContentType::JSON + )) ->inject('response') ->action(function (Response $response) { @@ -345,13 +382,19 @@ App::get('/v1/health/queue/webhooks') ->desc('Get webhooks queue') ->groups(['api', 'health']) ->label('scope', 'health.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'health') - ->label('sdk.method', 'getQueueWebhooks') - ->label('sdk.description', '/docs/references/health/get-queue-webhooks.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) + ->label('sdk', new Method( + auth: [AuthType::KEY], + namespace: 'health', + name: 'getQueueWebhooks', + description: '/docs/references/health/get-queue-webhooks.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_HEALTH_QUEUE, + ) + ], + contentType: ContentType::JSON + )) ->param('threshold', 5000, new Integer(true), 'Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.', true) ->inject('queue') ->inject('response') @@ -372,13 +415,19 @@ App::get('/v1/health/queue/logs') ->desc('Get logs queue') ->groups(['api', 'health']) ->label('scope', 'health.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'health') - ->label('sdk.method', 'getQueueLogs') - ->label('sdk.description', '/docs/references/health/get-queue-logs.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) + ->label('sdk', new Method( + auth: [AuthType::KEY], + namespace: 'health', + name: 'getQueueLogs', + description: '/docs/references/health/get-queue-logs.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_HEALTH_QUEUE, + ) + ], + contentType: ContentType::JSON + )) ->param('threshold', 5000, new Integer(true), 'Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.', true) ->inject('queue') ->inject('response') @@ -399,13 +448,19 @@ App::get('/v1/health/certificate') ->desc('Get the SSL certificate for a domain') ->groups(['api', 'health']) ->label('scope', 'health.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'health') - ->label('sdk.method', 'getCertificate') - ->label('sdk.description', '/docs/references/health/get-certificate.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_HEALTH_CERTIFICATE) + ->label('sdk', new Method( + auth: [AuthType::KEY], + namespace: 'health', + name: 'getCertificate', + description: '/docs/references/health/get-certificate.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_HEALTH_CERTIFICATE, + ) + ], + contentType: ContentType::JSON + )) ->param('domain', null, new Multiple([new Domain(), new PublicDomain()]), Multiple::TYPE_STRING, 'Domain name') ->inject('response') ->action(function (string $domain, Response $response) { @@ -449,13 +504,19 @@ App::get('/v1/health/queue/certificates') ->desc('Get certificates queue') ->groups(['api', 'health']) ->label('scope', 'health.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'health') - ->label('sdk.method', 'getQueueCertificates') - ->label('sdk.description', '/docs/references/health/get-queue-certificates.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) + ->label('sdk', new Method( + auth: [AuthType::KEY], + namespace: 'health', + name: 'getQueueCertificates', + description: '/docs/references/health/get-queue-certificates.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_HEALTH_QUEUE, + ) + ], + contentType: ContentType::JSON + )) ->param('threshold', 5000, new Integer(true), 'Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.', true) ->inject('queue') ->inject('response') @@ -476,13 +537,19 @@ App::get('/v1/health/queue/builds') ->desc('Get builds queue') ->groups(['api', 'health']) ->label('scope', 'health.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'health') - ->label('sdk.method', 'getQueueBuilds') - ->label('sdk.description', '/docs/references/health/get-queue-builds.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) + ->label('sdk', new Method( + auth: [AuthType::KEY], + namespace: 'health', + name: 'getQueueBuilds', + description: '/docs/references/health/get-queue-builds.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_HEALTH_QUEUE, + ) + ], + contentType: ContentType::JSON + )) ->param('threshold', 5000, new Integer(true), 'Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.', true) ->inject('queue') ->inject('response') @@ -503,13 +570,19 @@ App::get('/v1/health/queue/databases') ->desc('Get databases queue') ->groups(['api', 'health']) ->label('scope', 'health.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'health') - ->label('sdk.method', 'getQueueDatabases') - ->label('sdk.description', '/docs/references/health/get-queue-databases.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) + ->label('sdk', new Method( + auth: [AuthType::KEY], + namespace: 'health', + name: 'getQueueDatabases', + description: '/docs/references/health/get-queue-databases.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_HEALTH_QUEUE, + ) + ], + contentType: ContentType::JSON + )) ->param('name', 'database_db_main', new Text(256), 'Queue name for which to check the queue size', true) ->param('threshold', 5000, new Integer(true), 'Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.', true) ->inject('queue') @@ -531,13 +604,19 @@ App::get('/v1/health/queue/deletes') ->desc('Get deletes queue') ->groups(['api', 'health']) ->label('scope', 'health.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'health') - ->label('sdk.method', 'getQueueDeletes') - ->label('sdk.description', '/docs/references/health/get-queue-deletes.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) + ->label('sdk', new Method( + auth: [AuthType::KEY], + namespace: 'health', + name: 'getQueueDeletes', + description: '/docs/references/health/get-queue-deletes.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_HEALTH_QUEUE, + ) + ], + contentType: ContentType::JSON + )) ->param('threshold', 5000, new Integer(true), 'Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.', true) ->inject('queue') ->inject('response') @@ -558,13 +637,19 @@ App::get('/v1/health/queue/mails') ->desc('Get mails queue') ->groups(['api', 'health']) ->label('scope', 'health.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'health') - ->label('sdk.method', 'getQueueMails') - ->label('sdk.description', '/docs/references/health/get-queue-mails.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) + ->label('sdk', new Method( + auth: [AuthType::KEY], + namespace: 'health', + name: 'getQueueMails', + description: '/docs/references/health/get-queue-mails.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_HEALTH_QUEUE, + ) + ], + contentType: ContentType::JSON + )) ->param('threshold', 5000, new Integer(true), 'Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.', true) ->inject('queue') ->inject('response') @@ -585,13 +670,19 @@ App::get('/v1/health/queue/messaging') ->desc('Get messaging queue') ->groups(['api', 'health']) ->label('scope', 'health.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'health') - ->label('sdk.method', 'getQueueMessaging') - ->label('sdk.description', '/docs/references/health/get-queue-messaging.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) + ->label('sdk', new Method( + auth: [AuthType::KEY], + namespace: 'health', + name: 'getQueueMessaging', + description: '/docs/references/health/get-queue-messaging.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_HEALTH_QUEUE, + ) + ], + contentType: ContentType::JSON + )) ->param('threshold', 5000, new Integer(true), 'Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.', true) ->inject('queue') ->inject('response') @@ -612,13 +703,19 @@ App::get('/v1/health/queue/migrations') ->desc('Get migrations queue') ->groups(['api', 'health']) ->label('scope', 'health.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'health') - ->label('sdk.method', 'getQueueMigrations') - ->label('sdk.description', '/docs/references/health/get-queue-migrations.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) + ->label('sdk', new Method( + auth: [AuthType::KEY], + namespace: 'health', + name: 'getQueueMigrations', + description: '/docs/references/health/get-queue-migrations.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_HEALTH_QUEUE, + ) + ], + contentType: ContentType::JSON + )) ->param('threshold', 5000, new Integer(true), 'Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.', true) ->inject('queue') ->inject('response') @@ -639,13 +736,19 @@ App::get('/v1/health/queue/functions') ->desc('Get functions queue') ->groups(['api', 'health']) ->label('scope', 'health.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'health') - ->label('sdk.method', 'getQueueFunctions') - ->label('sdk.description', '/docs/references/health/get-queue-functions.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) + ->label('sdk', new Method( + auth: [AuthType::KEY], + namespace: 'health', + name: 'getQueueFunctions', + description: '/docs/references/health/get-queue-functions.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_HEALTH_QUEUE, + ) + ], + contentType: ContentType::JSON + )) ->param('threshold', 5000, new Integer(true), 'Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.', true) ->inject('queue') ->inject('response') @@ -666,13 +769,19 @@ 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) + ->label('sdk', new Method( + auth: [AuthType::KEY], + namespace: 'health', + name: 'getQueueUsage', + description: '/docs/references/health/get-queue-usage.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_HEALTH_QUEUE, + ) + ], + contentType: ContentType::JSON + )) ->param('threshold', 5000, new Integer(true), 'Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.', true) ->inject('queue') ->inject('response') @@ -693,13 +802,19 @@ App::get('/v1/health/queue/usage-dump') ->desc('Get usage dump queue') ->groups(['api', 'health']) ->label('scope', 'health.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'health') - ->label('sdk.method', 'getQueueUsageDump') - ->label('sdk.description', '/docs/references/health/get-queue-usage-dump.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) + ->label('sdk', new Method( + auth: [AuthType::KEY], + namespace: 'health', + name: 'getQueueUsageDump', + description: '/docs/references/health/get-queue-usage-dump.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_HEALTH_QUEUE, + ) + ], + contentType: ContentType::JSON + )) ->param('threshold', 5000, new Integer(true), 'Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.', true) ->inject('queue') ->inject('response') @@ -720,13 +835,19 @@ App::get('/v1/health/storage/local') ->desc('Get local storage') ->groups(['api', 'health']) ->label('scope', 'health.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'health') - ->label('sdk.method', 'getStorageLocal') - ->label('sdk.description', '/docs/references/health/get-storage-local.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_HEALTH_STATUS) + ->label('sdk', new Method( + auth: [AuthType::KEY], + namespace: 'health', + name: 'getStorageLocal', + description: '/docs/references/health/get-storage-local.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_HEALTH_STATUS, + ) + ], + contentType: ContentType::JSON + )) ->inject('response') ->action(function (Response $response) { @@ -763,13 +884,19 @@ App::get('/v1/health/storage') ->desc('Get storage') ->groups(['api', 'health']) ->label('scope', 'health.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'health') - ->label('sdk.method', 'getStorage') - ->label('sdk.description', '/docs/references/health/get-storage.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_HEALTH_STATUS) + ->label('sdk', new Method( + auth: [AuthType::KEY], + namespace: 'health', + name: 'getStorage', + description: '/docs/references/health/get-storage.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_HEALTH_STATUS, + ) + ], + contentType: ContentType::JSON + )) ->inject('response') ->inject('deviceForFiles') ->inject('deviceForFunctions') @@ -804,13 +931,19 @@ App::get('/v1/health/anti-virus') ->desc('Get antivirus') ->groups(['api', 'health']) ->label('scope', 'health.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'health') - ->label('sdk.method', 'getAntivirus') - ->label('sdk.description', '/docs/references/health/get-storage-anti-virus.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_HEALTH_ANTIVIRUS) + ->label('sdk', new Method( + auth: [AuthType::KEY], + namespace: 'health', + name: 'getAntivirus', + description: '/docs/references/health/get-storage-anti-virus.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_HEALTH_ANTIVIRUS, + ) + ], + contentType: ContentType::JSON + )) ->inject('response') ->action(function (Response $response) { @@ -843,9 +976,19 @@ App::get('/v1/health/queue/failed/:name') ->desc('Get number of failed queue jobs') ->groups(['api', 'health']) ->label('scope', 'health.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'health') - ->label('sdk.method', 'getFailedJobs') + ->label('sdk', new Method( + auth: [AuthType::KEY], + namespace: 'health', + name: 'getFailedJobs', + description: '/docs/references/health/get-failed-queue-jobs.md', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_HEALTH_QUEUE, + ) + ], + contentType: ContentType::JSON + )) ->param('name', '', new WhiteList([ Event::DATABASE_QUEUE_NAME, Event::DELETE_QUEUE_NAME, @@ -861,10 +1004,6 @@ App::get('/v1/health/queue/failed/:name') Event::MIGRATIONS_QUEUE_NAME ]), 'The name of the queue') ->param('threshold', 5000, new Integer(true), 'Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.', true) - ->label('sdk.description', '/docs/references/health/get-failed-queue-jobs.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') ->inject('queue') ->action(function (string $name, int|string $threshold, Response $response, Connection $queue) { @@ -915,4 +1054,4 @@ App::get('/v1/health/stats') // Currently only used internally 'memory_used_peak_human' => $cacheStats['used_memory_peak_human'] ?? 0, ], ]); - }); + }); \ No newline at end of file diff --git a/app/controllers/api/locale.php b/app/controllers/api/locale.php index 1f042d2239..65f719f914 100644 --- a/app/controllers/api/locale.php +++ b/app/controllers/api/locale.php @@ -1,5 +1,8 @@ desc('Get user locale') ->groups(['api', 'locale']) ->label('scope', 'locale.read') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'locale') - ->label('sdk.method', 'get') - ->label('sdk.description', '/docs/references/locale/get-locale.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_LOCALE) - ->label('sdk.offline.model', '/localed') - ->label('sdk.offline.key', 'current') + ->label('sdk', new Method( + namespace: 'locale', + name: 'get', + description: '/docs/references/locale/get-locale.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_LOCALE, + ) + ] + )) ->inject('request') ->inject('response') ->inject('locale') @@ -72,15 +78,18 @@ App::get('/v1/locale/codes') ->desc('List locale codes') ->groups(['api', 'locale']) ->label('scope', 'locale.read') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'locale') - ->label('sdk.method', 'listCodes') - ->label('sdk.description', '/docs/references/locale/list-locale-codes.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_LOCALE_CODE_LIST) - ->label('sdk.offline.model', '/locale/localeCode') - ->label('sdk.offline.key', 'current') + ->label('sdk', new Method( + namespace: 'locale', + name: 'listCodes', + description: '/docs/references/locale/list-locale-codes.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_LOCALE_CODE_LIST, + ) + ] + )) ->inject('response') ->action(function (Response $response) { $codes = Config::getParam('locale-codes'); @@ -94,15 +103,18 @@ App::get('/v1/locale/countries') ->desc('List countries') ->groups(['api', 'locale']) ->label('scope', 'locale.read') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'locale') - ->label('sdk.method', 'listCountries') - ->label('sdk.description', '/docs/references/locale/list-countries.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_COUNTRY_LIST) - ->label('sdk.offline.model', '/locale/countries') - ->label('sdk.offline.response.key', 'code') + ->label('sdk', new Method( + namespace: 'locale', + name: 'listCountries', + description: '/docs/references/locale/list-countries.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_COUNTRY_LIST, + ) + ] + )) ->inject('response') ->inject('locale') ->action(function (Response $response, Locale $locale) { @@ -127,15 +139,18 @@ App::get('/v1/locale/countries/eu') ->desc('List EU countries') ->groups(['api', 'locale']) ->label('scope', 'locale.read') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'locale') - ->label('sdk.method', 'listCountriesEU') - ->label('sdk.description', '/docs/references/locale/list-countries-eu.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_COUNTRY_LIST) - ->label('sdk.offline.model', '/locale/countries/eu') - ->label('sdk.offline.response.key', 'code') + ->label('sdk', new Method( + namespace: 'locale', + name: 'listCountriesEU', + description: '/docs/references/locale/list-countries-eu.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_COUNTRY_LIST, + ) + ] + )) ->inject('response') ->inject('locale') ->action(function (Response $response, Locale $locale) { @@ -162,15 +177,18 @@ App::get('/v1/locale/countries/phones') ->desc('List countries phone codes') ->groups(['api', 'locale']) ->label('scope', 'locale.read') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'locale') - ->label('sdk.method', 'listCountriesPhones') - ->label('sdk.description', '/docs/references/locale/list-countries-phones.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PHONE_LIST) - ->label('sdk.offline.model', '/locale/countries/phones') - ->label('sdk.offline.response.key', 'countryCode') + ->label('sdk', new Method( + namespace: 'locale', + name: 'listCountriesPhones', + description: '/docs/references/locale/list-countries-phones.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PHONE_LIST, + ) + ] + )) ->inject('response') ->inject('locale') ->action(function (Response $response, Locale $locale) { @@ -196,15 +214,18 @@ App::get('/v1/locale/continents') ->desc('List continents') ->groups(['api', 'locale']) ->label('scope', 'locale.read') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'locale') - ->label('sdk.method', 'listContinents') - ->label('sdk.description', '/docs/references/locale/list-continents.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_CONTINENT_LIST) - ->label('sdk.offline.model', '/locale/continents') - ->label('sdk.offline.response.key', 'code') + ->label('sdk', new Method( + namespace: 'locale', + name: 'listContinents', + description: '/docs/references/locale/list-continents.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_CONTINENT_LIST, + ) + ] + )) ->inject('response') ->inject('locale') ->action(function (Response $response, Locale $locale) { @@ -228,15 +249,18 @@ App::get('/v1/locale/currencies') ->desc('List currencies') ->groups(['api', 'locale']) ->label('scope', 'locale.read') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'locale') - ->label('sdk.method', 'listCurrencies') - ->label('sdk.description', '/docs/references/locale/list-currencies.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_CURRENCY_LIST) - ->label('sdk.offline.model', '/locale/currencies') - ->label('sdk.offline.response.key', 'code') + ->label('sdk', new Method( + namespace: 'locale', + name: 'listCurrencies', + description: '/docs/references/locale/list-currencies.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_CURRENCY_LIST, + ) + ] + )) ->inject('response') ->action(function (Response $response) { $list = Config::getParam('locale-currencies'); @@ -251,15 +275,18 @@ App::get('/v1/locale/languages') ->desc('List languages') ->groups(['api', 'locale']) ->label('scope', 'locale.read') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'locale') - ->label('sdk.method', 'listLanguages') - ->label('sdk.description', '/docs/references/locale/list-languages.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_LANGUAGE_LIST) - ->label('sdk.offline.model', '/locale/languages') - ->label('sdk.offline.response.key', 'code') + ->label('sdk', new Method( + namespace: 'locale', + name: 'listLanguages', + description: '/docs/references/locale/list-languages.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_LANGUAGE_LIST, + ) + ] + )) ->inject('response') ->action(function (Response $response) { $list = Config::getParam('locale-languages'); @@ -267,4 +294,4 @@ App::get('/v1/locale/languages') $list = array_map(fn ($node) => new Document($node), $list); $response->dynamic(new Document(['languages' => $list, 'total' => \count($list)]), Response::MODEL_LANGUAGE_LIST); - }); + }); \ No newline at end of file diff --git a/app/controllers/api/messaging.php b/app/controllers/api/messaging.php index e7748484ba..c80da75801 100644 --- a/app/controllers/api/messaging.php +++ b/app/controllers/api/messaging.php @@ -11,6 +11,10 @@ use Appwrite\Messaging\Status as MessageStatus; use Appwrite\Network\Validator\Email; use Appwrite\Permission; use Appwrite\Role; +use Appwrite\SDK\AuthType; +use Appwrite\SDK\ContentType; +use Appwrite\SDK\Method; +use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\CompoundUID; use Appwrite\Utopia\Database\Validator\CustomId; use Appwrite\Utopia\Database\Validator\Queries\Messages; @@ -57,13 +61,18 @@ App::post('/v1/messaging/providers/mailgun') ->label('event', 'providers.[providerId].create') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'createMailgunProvider') - ->label('sdk.description', '/docs/references/messaging/create-mailgun-provider.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'createMailgunProvider', + description: '/docs/references/messaging/create-mailgun-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_PROVIDER, + ) + ] + )) ->param('providerId', '', new CustomId(), 'Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Provider name.') ->param('apiKey', '', new Text(0), 'Mailgun API Key.', true) @@ -145,13 +154,18 @@ App::post('/v1/messaging/providers/sendgrid') ->label('event', 'providers.[providerId].create') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'createSendgridProvider') - ->label('sdk.description', '/docs/references/messaging/create-sendgrid-provider.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'createSendgridProvider', + description: '/docs/references/messaging/create-sendgrid-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_PROVIDER, + ) + ] + )) ->param('providerId', '', new CustomId(), 'Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Provider name.') ->param('apiKey', '', new Text(0), 'Sendgrid API key.', true) @@ -221,13 +235,18 @@ App::post('/v1/messaging/providers/smtp') ->label('event', 'providers.[providerId].create') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'createSmtpProvider') - ->label('sdk.description', '/docs/references/messaging/create-smtp-provider.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'createSmtpProvider', + description: '/docs/references/messaging/create-smtp-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_PROVIDER, + ) + ] + )) ->param('providerId', '', new CustomId(), 'Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Provider name.') ->param('host', '', new Text(0), 'SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465"`. Hosts will be tried in order.') @@ -310,13 +329,18 @@ App::post('/v1/messaging/providers/msg91') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) ->label('event', 'providers.[providerId].create') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'createMsg91Provider') - ->label('sdk.description', '/docs/references/messaging/create-msg91-provider.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'createMsg91Provider', + description: '/docs/references/messaging/create-msg91-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_PROVIDER, + ) + ] + )) ->param('providerId', '', new CustomId(), 'Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Provider name.') ->param('templateId', '', new Text(0), 'Msg91 template ID', true) @@ -387,13 +411,18 @@ App::post('/v1/messaging/providers/telesign') ->label('event', 'providers.[providerId].create') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'createTelesignProvider') - ->label('sdk.description', '/docs/references/messaging/create-telesign-provider.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'createTelesignProvider', + description: '/docs/references/messaging/create-telesign-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_PROVIDER, + ) + ] + )) ->param('providerId', '', new CustomId(), 'Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Provider name.') ->param('from', '', new Phone(), 'Sender Phone number. Format this number with a leading \'+\' and a country code, e.g., +16175551212.', true) @@ -465,13 +494,18 @@ App::post('/v1/messaging/providers/textmagic') ->label('event', 'providers.[providerId].create') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'createTextmagicProvider') - ->label('sdk.description', '/docs/references/messaging/create-textmagic-provider.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'createTextmagicProvider', + description: '/docs/references/messaging/create-textmagic-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_PROVIDER, + ) + ] + )) ->param('providerId', '', new CustomId(), 'Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Provider name.') ->param('from', '', new Phone(), 'Sender Phone number. Format this number with a leading \'+\' and a country code, e.g., +16175551212.', true) @@ -543,13 +577,18 @@ App::post('/v1/messaging/providers/twilio') ->label('event', 'providers.[providerId].create') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'createTwilioProvider') - ->label('sdk.description', '/docs/references/messaging/create-twilio-provider.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'createTwilioProvider', + description: '/docs/references/messaging/create-twilio-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_PROVIDER, + ) + ] + )) ->param('providerId', '', new CustomId(), 'Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Provider name.') ->param('from', '', new Phone(), 'Sender Phone number. Format this number with a leading \'+\' and a country code, e.g., +16175551212.', true) @@ -621,13 +660,18 @@ App::post('/v1/messaging/providers/vonage') ->label('event', 'providers.[providerId].create') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'createVonageProvider') - ->label('sdk.description', '/docs/references/messaging/create-vonage-provider.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'createVonageProvider', + description: '/docs/references/messaging/create-vonage-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_PROVIDER, + ) + ] + )) ->param('providerId', '', new CustomId(), 'Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Provider name.') ->param('from', '', new Phone(), 'Sender Phone number. Format this number with a leading \'+\' and a country code, e.g., +16175551212.', true) @@ -699,13 +743,18 @@ App::post('/v1/messaging/providers/fcm') ->label('event', 'providers.[providerId].create') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'createFcmProvider') - ->label('sdk.description', '/docs/references/messaging/create-fcm-provider.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'createFcmProvider', + description: '/docs/references/messaging/create-fcm-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_PROVIDER, + ) + ] + )) ->param('providerId', '', new CustomId(), 'Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Provider name.') ->param('serviceAccountJSON', null, new JSON(), 'FCM service account JSON.', true) @@ -763,13 +812,18 @@ App::post('/v1/messaging/providers/apns') ->label('event', 'providers.[providerId].create') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'createApnsProvider') - ->label('sdk.description', '/docs/references/messaging/create-apns-provider.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'createApnsProvider', + description: '/docs/references/messaging/create-apns-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_PROVIDER, + ) + ] + )) ->param('providerId', '', new CustomId(), 'Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Provider name.') ->param('authKey', '', new Text(0), 'APNS authentication key.', true) @@ -847,13 +901,18 @@ App::get('/v1/messaging/providers') ->groups(['api', 'messaging']) ->label('scope', 'providers.read') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'listProviders') - ->label('sdk.description', '/docs/references/messaging/list-providers.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER_LIST) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'listProviders', + description: '/docs/references/messaging/list-providers.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROVIDER_LIST, + ) + ] + )) ->param('queries', [], new Providers(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Providers::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('dbForProject') @@ -904,13 +963,18 @@ App::get('/v1/messaging/providers/:providerId/logs') ->groups(['api', 'messaging']) ->label('scope', 'providers.read') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'listProviderLogs') - ->label('sdk.description', '/docs/references/messaging/list-provider-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) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'listProviderLogs', + description: '/docs/references/messaging/list-provider-logs.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_LOG_LIST, + ) + ] + )) ->param('providerId', '', new UID(), 'Provider ID.') ->param('queries', [], new Queries([new Limit(), new Offset()]), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset', true) ->inject('response') @@ -993,13 +1057,18 @@ App::get('/v1/messaging/providers/:providerId') ->groups(['api', 'messaging']) ->label('scope', 'providers.read') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'getProvider') - ->label('sdk.description', '/docs/references/messaging/get-provider.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'getProvider', + description: '/docs/references/messaging/get-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROVIDER, + ) + ] + )) ->param('providerId', '', new UID(), 'Provider ID.') ->inject('dbForProject') ->inject('response') @@ -1021,13 +1090,18 @@ App::patch('/v1/messaging/providers/mailgun/:providerId') ->label('event', 'providers.[providerId].update') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'updateMailgunProvider') - ->label('sdk.description', '/docs/references/messaging/update-mailgun-provider.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'updateMailgunProvider', + description: '/docs/references/messaging/update-mailgun-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROVIDER, + ) + ] + )) ->param('providerId', '', new UID(), 'Provider ID.') ->param('name', '', new Text(128), 'Provider name.', true) ->param('apiKey', '', new Text(0), 'Mailgun API Key.', true) @@ -1128,13 +1202,18 @@ App::patch('/v1/messaging/providers/sendgrid/:providerId') ->label('event', 'providers.[providerId].update') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'updateSendgridProvider') - ->label('sdk.description', '/docs/references/messaging/update-sendgrid-provider.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'updateSendgridProvider', + description: '/docs/references/messaging/update-sendgrid-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROVIDER, + ) + ] + )) ->param('providerId', '', new UID(), 'Provider ID.') ->param('name', '', new Text(128), 'Provider name.', true) ->param('enabled', null, new Boolean(), 'Set as enabled.', true) @@ -1220,13 +1299,18 @@ App::patch('/v1/messaging/providers/smtp/:providerId') ->label('event', 'providers.[providerId].update') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'updateSmtpProvider') - ->label('sdk.description', '/docs/references/messaging/update-smtp-provider.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'updateSmtpProvider', + description: '/docs/references/messaging/update-smtp-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROVIDER, + ) + ] + )) ->param('providerId', '', new UID(), 'Provider ID.') ->param('name', '', new Text(128), 'Provider name.', true) ->param('host', '', new Text(0), 'SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465"`. Hosts will be tried in order.', true) @@ -1343,13 +1427,18 @@ App::patch('/v1/messaging/providers/msg91/:providerId') ->label('event', 'providers.[providerId].update') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'updateMsg91Provider') - ->label('sdk.description', '/docs/references/messaging/update-msg91-provider.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'updateMsg91Provider', + description: '/docs/references/messaging/update-msg91-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROVIDER, + ) + ] + )) ->param('providerId', '', new UID(), 'Provider ID.') ->param('name', '', new Text(128), 'Provider name.', true) ->param('enabled', null, new Boolean(), 'Set as enabled.', true) @@ -1424,13 +1513,18 @@ App::patch('/v1/messaging/providers/telesign/:providerId') ->label('event', 'providers.[providerId].update') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'updateTelesignProvider') - ->label('sdk.description', '/docs/references/messaging/update-telesign-provider.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'updateTelesignProvider', + description: '/docs/references/messaging/update-telesign-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROVIDER, + ) + ] + )) ->param('providerId', '', new UID(), 'Provider ID.') ->param('name', '', new Text(128), 'Provider name.', true) ->param('enabled', null, new Boolean(), 'Set as enabled.', true) @@ -1507,13 +1601,18 @@ App::patch('/v1/messaging/providers/textmagic/:providerId') ->label('event', 'providers.[providerId].update') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'updateTextmagicProvider') - ->label('sdk.description', '/docs/references/messaging/update-textmagic-provider.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'updateTextmagicProvider', + description: '/docs/references/messaging/update-textmagic-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROVIDER, + ) + ] + )) ->param('providerId', '', new UID(), 'Provider ID.') ->param('name', '', new Text(128), 'Provider name.', true) ->param('enabled', null, new Boolean(), 'Set as enabled.', true) @@ -1590,13 +1689,18 @@ App::patch('/v1/messaging/providers/twilio/:providerId') ->label('event', 'providers.[providerId].update') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'updateTwilioProvider') - ->label('sdk.description', '/docs/references/messaging/update-twilio-provider.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'updateTwilioProvider', + description: '/docs/references/messaging/update-twilio-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROVIDER, + ) + ] + )) ->param('providerId', '', new UID(), 'Provider ID.') ->param('name', '', new Text(128), 'Provider name.', true) ->param('enabled', null, new Boolean(), 'Set as enabled.', true) @@ -1673,13 +1777,18 @@ App::patch('/v1/messaging/providers/vonage/:providerId') ->label('event', 'providers.[providerId].update') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'updateVonageProvider') - ->label('sdk.description', '/docs/references/messaging/update-vonage-provider.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'updateVonageProvider', + description: '/docs/references/messaging/update-vonage-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROVIDER, + ) + ] + )) ->param('providerId', '', new UID(), 'Provider ID.') ->param('name', '', new Text(128), 'Provider name.', true) ->param('enabled', null, new Boolean(), 'Set as enabled.', true) @@ -1756,13 +1865,18 @@ App::patch('/v1/messaging/providers/fcm/:providerId') ->label('event', 'providers.[providerId].update') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'updateFcmProvider') - ->label('sdk.description', '/docs/references/messaging/update-fcm-provider.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'updateFcmProvider', + description: '/docs/references/messaging/update-fcm-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROVIDER, + ) + ] + )) ->param('providerId', '', new UID(), 'Provider ID.') ->param('name', '', new Text(128), 'Provider name.', true) ->param('enabled', null, new Boolean(), 'Set as enabled.', true) @@ -1826,13 +1940,18 @@ App::patch('/v1/messaging/providers/apns/:providerId') ->label('event', 'providers.[providerId].update') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'updateApnsProvider') - ->label('sdk.description', '/docs/references/messaging/update-apns-provider.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'updateApnsProvider', + description: '/docs/references/messaging/update-apns-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROVIDER, + ) + ] + )) ->param('providerId', '', new UID(), 'Provider ID.') ->param('name', '', new Text(128), 'Provider name.', true) ->param('enabled', null, new Boolean(), 'Set as enabled.', true) @@ -1922,13 +2041,19 @@ App::delete('/v1/messaging/providers/:providerId') ->label('event', 'providers.[providerId].delete') ->label('scope', 'providers.write') ->label('resourceType', RESOURCE_TYPE_PROVIDERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'deleteProvider') - ->label('sdk.description', '/docs/references/messaging/delete-provider.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'deleteProvider', + description: '/docs/references/messaging/delete-provider.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('providerId', '', new UID(), 'Provider ID.') ->inject('queueForEvents') ->inject('dbForProject') @@ -1958,13 +2083,18 @@ App::post('/v1/messaging/topics') ->label('event', 'topics.[topicId].create') ->label('scope', 'topics.write') ->label('resourceType', RESOURCE_TYPE_TOPICS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'createTopic') - ->label('sdk.description', '/docs/references/messaging/create-topic.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TOPIC) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'createTopic', + description: '/docs/references/messaging/create-topic.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_TOPIC, + ) + ] + )) ->param('topicId', '', new CustomId(), 'Topic ID. Choose a custom Topic ID or a new Topic ID.') ->param('name', '', new Text(128), 'Topic Name.') ->param('subscribe', [Role::users()], new Roles(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' roles are allowed, each 64 characters long.', true) @@ -1999,13 +2129,18 @@ App::get('/v1/messaging/topics') ->groups(['api', 'messaging']) ->label('scope', 'topics.read') ->label('resourceType', RESOURCE_TYPE_TOPICS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'listTopics') - ->label('sdk.description', '/docs/references/messaging/list-topics.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TOPIC_LIST) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'listTopics', + description: '/docs/references/messaging/list-topics.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_TOPIC_LIST, + ) + ] + )) ->param('queries', [], new Topics(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Topics::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('dbForProject') @@ -2056,13 +2191,18 @@ App::get('/v1/messaging/topics/:topicId/logs') ->groups(['api', 'messaging']) ->label('scope', 'topics.read') ->label('resourceType', RESOURCE_TYPE_TOPICS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'listTopicLogs') - ->label('sdk.description', '/docs/references/messaging/list-topic-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) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'listTopicLogs', + description: '/docs/references/messaging/list-topic-logs.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_LOG_LIST, + ) + ] + )) ->param('topicId', '', new UID(), 'Topic ID.') ->param('queries', [], new Queries([new Limit(), new Offset()]), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset', true) ->inject('response') @@ -2146,13 +2286,18 @@ App::get('/v1/messaging/topics/:topicId') ->groups(['api', 'messaging']) ->label('scope', 'topics.read') ->label('resourceType', RESOURCE_TYPE_TOPICS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'getTopic') - ->label('sdk.description', '/docs/references/messaging/get-topic.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TOPIC) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'getTopic', + description: '/docs/references/messaging/get-topic.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_TOPIC, + ) + ] + )) ->param('topicId', '', new UID(), 'Topic ID.') ->inject('dbForProject') ->inject('response') @@ -2175,13 +2320,18 @@ App::patch('/v1/messaging/topics/:topicId') ->label('event', 'topics.[topicId].update') ->label('scope', 'topics.write') ->label('resourceType', RESOURCE_TYPE_TOPICS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'updateTopic') - ->label('sdk.description', '/docs/references/messaging/update-topic.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TOPIC) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'updateTopic', + description: '/docs/references/messaging/update-topic.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_TOPIC, + ) + ] + )) ->param('topicId', '', new UID(), 'Topic ID.') ->param('name', null, new Text(128), 'Topic Name.', true) ->param('subscribe', null, new Roles(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' roles are allowed, each 64 characters long.', true) @@ -2220,13 +2370,19 @@ App::delete('/v1/messaging/topics/:topicId') ->label('event', 'topics.[topicId].delete') ->label('scope', 'topics.write') ->label('resourceType', RESOURCE_TYPE_TOPICS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'deleteTopic') - ->label('sdk.description', '/docs/references/messaging/delete-topic.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'deleteTopic', + description: '/docs/references/messaging/delete-topic.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('topicId', '', new UID(), 'Topic ID.') ->inject('queueForEvents') ->inject('dbForProject') @@ -2261,13 +2417,18 @@ App::post('/v1/messaging/topics/:topicId/subscribers') ->label('event', 'topics.[topicId].subscribers.[subscriberId].create') ->label('scope', 'subscribers.write') ->label('resourceType', RESOURCE_TYPE_SUBSCRIBERS) - ->label('sdk.auth', [APP_AUTH_TYPE_JWT, APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'createSubscriber') - ->label('sdk.description', '/docs/references/messaging/create-subscriber.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_SUBSCRIBER) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'createSubscriber', + description: '/docs/references/messaging/create-subscriber.md', + auth: [AuthType::JWT, AuthType::SESSION, AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_SUBSCRIBER, + ) + ] + )) ->param('subscriberId', '', new CustomId(), 'Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.') ->param('topicId', '', new UID(), 'Topic ID. The topic ID to subscribe to.') ->param('targetId', '', new UID(), 'Target ID. The target ID to link to the specified Topic ID.') @@ -2355,13 +2516,18 @@ App::get('/v1/messaging/topics/:topicId/subscribers') ->groups(['api', 'messaging']) ->label('scope', 'subscribers.read') ->label('resourceType', RESOURCE_TYPE_SUBSCRIBERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'listSubscribers') - ->label('sdk.description', '/docs/references/messaging/list-subscribers.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_SUBSCRIBER_LIST) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'listSubscribers', + description: '/docs/references/messaging/list-subscribers.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_SUBSCRIBER_LIST, + ) + ] + )) ->param('topicId', '', new UID(), 'Topic ID. The topic ID subscribed to.') ->param('queries', [], new Subscribers(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Providers::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) @@ -2435,13 +2601,18 @@ App::get('/v1/messaging/subscribers/:subscriberId/logs') ->groups(['api', 'messaging']) ->label('scope', 'subscribers.read') ->label('resourceType', RESOURCE_TYPE_SUBSCRIBERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'listSubscriberLogs') - ->label('sdk.description', '/docs/references/messaging/list-subscriber-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) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'listSubscriberLogs', + description: '/docs/references/messaging/list-subscriber-logs.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_LOG_LIST, + ) + ] + )) ->param('subscriberId', '', new UID(), 'Subscriber ID.') ->param('queries', [], new Queries([new Limit(), new Offset()]), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset', true) ->inject('response') @@ -2525,13 +2696,18 @@ App::get('/v1/messaging/topics/:topicId/subscribers/:subscriberId') ->groups(['api', 'messaging']) ->label('scope', 'subscribers.read') ->label('resourceType', RESOURCE_TYPE_SUBSCRIBERS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'getSubscriber') - ->label('sdk.description', '/docs/references/messaging/get-subscriber.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_SUBSCRIBER) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'getSubscriber', + description: '/docs/references/messaging/get-subscriber.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_SUBSCRIBER, + ) + ] + )) ->param('topicId', '', new UID(), 'Topic ID. The topic ID subscribed to.') ->param('subscriberId', '', new UID(), 'Subscriber ID.') ->inject('dbForProject') @@ -2568,13 +2744,19 @@ App::delete('/v1/messaging/topics/:topicId/subscribers/:subscriberId') ->label('event', 'topics.[topicId].subscribers.[subscriberId].delete') ->label('scope', 'subscribers.write') ->label('resourceType', RESOURCE_TYPE_SUBSCRIBERS) - ->label('sdk.auth', [APP_AUTH_TYPE_JWT, APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'deleteSubscriber') - ->label('sdk.description', '/docs/references/messaging/delete-subscriber.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'deleteSubscriber', + description: '/docs/references/messaging/delete-subscriber.md', + auth: [AuthType::JWT, AuthType::SESSION, AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('topicId', '', new UID(), 'Topic ID. The topic ID subscribed to.') ->param('subscriberId', '', new UID(), 'Subscriber ID.') ->inject('queueForEvents') @@ -2628,13 +2810,18 @@ App::post('/v1/messaging/messages/email') ->label('event', 'messages.[messageId].create') ->label('scope', 'messages.write') ->label('resourceType', RESOURCE_TYPE_MESSAGES) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'createEmail') - ->label('sdk.description', '/docs/references/messaging/create-email.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MESSAGE) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'createEmail', + description: '/docs/references/messaging/create-email.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_MESSAGE, + ) + ] + )) ->param('messageId', '', new CustomId(), 'Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('subject', '', new Text(998), 'Email Subject.') ->param('content', '', new Text(64230), 'Email Content.') @@ -2781,13 +2968,18 @@ App::post('/v1/messaging/messages/sms') ->label('event', 'messages.[messageId].create') ->label('scope', 'messages.write') ->label('resourceType', RESOURCE_TYPE_MESSAGES) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'createSms') - ->label('sdk.description', '/docs/references/messaging/create-sms.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MESSAGE) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'createSms', + description: '/docs/references/messaging/create-sms.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_MESSAGE, + ) + ] + )) ->param('messageId', '', new CustomId(), 'Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('content', '', new Text(64230), 'SMS Content.') ->param('topics', [], new ArrayList(new UID()), 'List of Topic IDs.', true) @@ -2898,13 +3090,18 @@ App::post('/v1/messaging/messages/push') ->label('event', 'messages.[messageId].create') ->label('scope', 'messages.write') ->label('resourceType', RESOURCE_TYPE_MESSAGES) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'createPush') - ->label('sdk.description', '/docs/references/messaging/create-push.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MESSAGE) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'createPush', + description: '/docs/references/messaging/create-push.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_MESSAGE, + ) + ] + )) ->param('messageId', '', new CustomId(), 'Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('title', '', new Text(256), 'Title for push notification.', true) ->param('body', '', new Text(64230), 'Body for push notification.', true) @@ -3107,13 +3304,18 @@ App::get('/v1/messaging/messages') ->groups(['api', 'messaging']) ->label('scope', 'messages.read') ->label('resourceType', RESOURCE_TYPE_MESSAGES) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'listMessages') - ->label('sdk.description', '/docs/references/messaging/list-messages.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MESSAGE_LIST) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'listMessages', + description: '/docs/references/messaging/list-messages.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MESSAGE_LIST, + ) + ], + )) ->param('queries', [], new Messages(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Messages::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('dbForProject') @@ -3164,13 +3366,18 @@ App::get('/v1/messaging/messages/:messageId/logs') ->groups(['api', 'messaging']) ->label('scope', 'messages.read') ->label('resourceType', RESOURCE_TYPE_MESSAGES) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'listMessageLogs') - ->label('sdk.description', '/docs/references/messaging/list-message-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) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'listMessageLogs', + description: '/docs/references/messaging/list-message-logs.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_LOG_LIST, + ) + ], + )) ->param('messageId', '', new UID(), 'Message ID.') ->param('queries', [], new Queries([new Limit(), new Offset()]), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset', true) ->inject('response') @@ -3254,13 +3461,18 @@ App::get('/v1/messaging/messages/:messageId/targets') ->groups(['api', 'messaging']) ->label('scope', 'messages.read') ->label('resourceType', RESOURCE_TYPE_MESSAGES) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'listTargets') - ->label('sdk.description', '/docs/references/messaging/list-message-targets.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TARGET_LIST) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'listTargets', + description: '/docs/references/messaging/list-message-targets.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_TARGET_LIST, + ) + ], + )) ->param('messageId', '', new UID(), 'Message ID.') ->param('queries', [], new Targets(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Targets::ALLOWED_ATTRIBUTES), true) ->inject('response') @@ -3325,13 +3537,18 @@ App::get('/v1/messaging/messages/:messageId') ->groups(['api', 'messaging']) ->label('scope', 'messages.read') ->label('resourceType', RESOURCE_TYPE_MESSAGES) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'getMessage') - ->label('sdk.description', '/docs/references/messaging/get-message.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MESSAGE) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'getMessage', + description: '/docs/references/messaging/get-message.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MESSAGE, + ) + ] + )) ->param('messageId', '', new UID(), 'Message ID.') ->inject('dbForProject') ->inject('response') @@ -3353,13 +3570,18 @@ App::patch('/v1/messaging/messages/email/:messageId') ->label('event', 'messages.[messageId].update') ->label('scope', 'messages.write') ->label('resourceType', RESOURCE_TYPE_MESSAGES) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'updateEmail') - ->label('sdk.description', '/docs/references/messaging/update-email.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MESSAGE) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'updateEmail', + description: '/docs/references/messaging/update-email.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MESSAGE, + ) + ] + )) ->param('messageId', '', new UID(), 'Message ID.') ->param('topics', null, new ArrayList(new UID()), 'List of Topic IDs.', true) ->param('users', null, new ArrayList(new UID()), 'List of User IDs.', true) @@ -3554,13 +3776,18 @@ App::patch('/v1/messaging/messages/sms/:messageId') ->label('event', 'messages.[messageId].update') ->label('scope', 'messages.write') ->label('resourceType', RESOURCE_TYPE_MESSAGES) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'updateSms') - ->label('sdk.description', '/docs/references/messaging/update-email.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MESSAGE) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'updateSms', + description: '/docs/references/messaging/update-sms.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MESSAGE, + ) + ] + )) ->param('messageId', '', new UID(), 'Message ID.') ->param('topics', null, new ArrayList(new UID()), 'List of Topic IDs.', true) ->param('users', null, new ArrayList(new UID()), 'List of User IDs.', true) @@ -3710,13 +3937,18 @@ App::patch('/v1/messaging/messages/push/:messageId') ->label('event', 'messages.[messageId].update') ->label('scope', 'messages.write') ->label('resourceType', RESOURCE_TYPE_MESSAGES) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'updatePush') - ->label('sdk.description', '/docs/references/messaging/update-push.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MESSAGE) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'updatePush', + description: '/docs/references/messaging/update-push.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MESSAGE, + ) + ] + )) ->param('messageId', '', new UID(), 'Message ID.') ->param('topics', null, new ArrayList(new UID()), 'List of Topic IDs.', true) ->param('users', null, new ArrayList(new UID()), 'List of User IDs.', true) @@ -3964,13 +4196,19 @@ App::delete('/v1/messaging/messages/:messageId') ->label('event', 'messages.[messageId].delete') ->label('scope', 'messages.write') ->label('resourceType', RESOURCE_TYPE_MESSAGES) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN, APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'messaging') - ->label('sdk.method', 'delete') - ->label('sdk.description', '/docs/references/messaging/delete-message.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'messaging', + name: 'delete', + description: '/docs/references/messaging/delete-message.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('messageId', '', new UID(), 'Message ID.') ->inject('dbForProject') ->inject('dbForPlatform') @@ -4016,4 +4254,4 @@ App::delete('/v1/messaging/messages/:messageId') ->setPayload($response->output($message, Response::MODEL_MESSAGE)); $response->noContent(); - }); + }); \ No newline at end of file diff --git a/app/controllers/api/migrations.php b/app/controllers/api/migrations.php index 29e46505f5..670628de62 100644 --- a/app/controllers/api/migrations.php +++ b/app/controllers/api/migrations.php @@ -3,10 +3,19 @@ use Appwrite\Event\Event; use Appwrite\Event\Migration; use Appwrite\Extend\Exception; +use Appwrite\Permission; +use Appwrite\Role; +use Appwrite\SDK\AuthType; +use Appwrite\SDK\ContentType; +use Appwrite\SDK\Method; +use Appwrite\SDK\MethodType; +use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Migrations; +use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; use Utopia\App; use Utopia\Database\Database; +use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Helpers\ID; @@ -17,7 +26,9 @@ use Utopia\Migration\Sources\Appwrite; use Utopia\Migration\Sources\Firebase; use Utopia\Migration\Sources\NHost; use Utopia\Migration\Sources\Supabase; +use Utopia\System\System; use Utopia\Validator\ArrayList; +use Utopia\Validator\Host; use Utopia\Validator\Integer; use Utopia\Validator\Text; use Utopia\Validator\URL; @@ -31,13 +42,18 @@ App::post('/v1/migrations/appwrite') ->label('scope', 'migrations.write') ->label('event', 'migrations.[migrationId].create') ->label('audits.event', 'migration.create') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'migrations') - ->label('sdk.method', 'createAppwriteMigration') - ->label('sdk.description', '/docs/references/migrations/migration-appwrite.md') - ->label('sdk.response.code', Response::STATUS_CODE_ACCEPTED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MIGRATION) + ->label('sdk', new Method( + namespace: 'migrations', + name: 'createAppwriteMigration', + description: '/docs/references/migrations/migration-appwrite.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_ACCEPTED, + model: Response::MODEL_MIGRATION, + ) + ] + )) ->param('resources', [], new ArrayList(new WhiteList(Appwrite::getSupportedResources())), 'List of resources to migrate') ->param('endpoint', '', new URL(), "Source's Appwrite Endpoint") ->param('projectId', '', new UID(), "Source's Project ID") @@ -80,19 +96,25 @@ App::post('/v1/migrations/appwrite') ->dynamic($migration, Response::MODEL_MIGRATION); }); + App::post('/v1/migrations/firebase') ->groups(['api', 'migrations']) ->desc('Migrate Firebase data') ->label('scope', 'migrations.write') ->label('event', 'migrations.[migrationId].create') ->label('audits.event', 'migration.create') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'migrations') - ->label('sdk.method', 'createFirebaseMigration') - ->label('sdk.description', '/docs/references/migrations/migration-firebase.md') - ->label('sdk.response.code', Response::STATUS_CODE_ACCEPTED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MIGRATION) + ->label('sdk', new Method( + namespace: 'migrations', + name: 'createFirebaseMigration', + description: '/docs/references/migrations/migration-firebase.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_ACCEPTED, + model: Response::MODEL_MIGRATION, + ) + ] + )) ->param('resources', [], new ArrayList(new WhiteList(Firebase::getSupportedResources())), 'List of resources to migrate') ->param('serviceAccount', '', new Text(65536), 'JSON of the Firebase service account credentials') ->inject('response') @@ -147,13 +169,18 @@ App::post('/v1/migrations/supabase') ->label('scope', 'migrations.write') ->label('event', 'migrations.[migrationId].create') ->label('audits.event', 'migration.create') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'migrations') - ->label('sdk.method', 'createSupabaseMigration') - ->label('sdk.description', '/docs/references/migrations/migration-supabase.md') - ->label('sdk.response.code', Response::STATUS_CODE_ACCEPTED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MIGRATION) + ->label('sdk', new Method( + namespace: 'migrations', + name: 'createSupabaseMigration', + description: '/docs/references/migrations/migration-supabase.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_ACCEPTED, + model: Response::MODEL_MIGRATION, + ) + ] + )) ->param('resources', [], new ArrayList(new WhiteList(Supabase::getSupportedResources(), true)), 'List of resources to migrate') ->param('endpoint', '', new URL(), 'Source\'s Supabase Endpoint') ->param('apiKey', '', new Text(512), 'Source\'s API Key') @@ -208,13 +235,18 @@ App::post('/v1/migrations/nhost') ->label('scope', 'migrations.write') ->label('event', 'migrations.[migrationId].create') ->label('audits.event', 'migration.create') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'migrations') - ->label('sdk.method', 'createNHostMigration') - ->label('sdk.description', '/docs/references/migrations/migration-nhost.md') - ->label('sdk.response.code', Response::STATUS_CODE_ACCEPTED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MIGRATION) + ->label('sdk', new Method( + namespace: 'migrations', + name: 'createNHostMigration', + description: '/docs/references/migrations/migration-nhost.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_ACCEPTED, + model: Response::MODEL_MIGRATION, + ) + ] + )) ->param('resources', [], new ArrayList(new WhiteList(NHost::getSupportedResources())), 'List of resources to migrate') ->param('subdomain', '', new Text(512), 'Source\'s Subdomain') ->param('region', '', new Text(512), 'Source\'s Region') @@ -269,13 +301,18 @@ App::get('/v1/migrations') ->groups(['api', 'migrations']) ->desc('List migrations') ->label('scope', 'migrations.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'migrations') - ->label('sdk.method', 'list') - ->label('sdk.description', '/docs/references/migrations/list-migrations.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MIGRATION_LIST) + ->label('sdk', new Method( + namespace: 'migrations', + name: 'list', + description: '/docs/references/migrations/list-migrations.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MIGRATION_LIST, + ) + ] + )) ->param('queries', [], new Migrations(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Migrations::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') @@ -328,13 +365,18 @@ App::get('/v1/migrations/:migrationId') ->groups(['api', 'migrations']) ->desc('Get migration') ->label('scope', 'migrations.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'migrations') - ->label('sdk.method', 'get') - ->label('sdk.description', '/docs/references/migrations/get-migration.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MIGRATION) + ->label('sdk', new Method( + namespace: 'migrations', + name: 'get', + description: '/docs/references/migrations/get-migration.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MIGRATION, + ) + ] + )) ->param('migrationId', '', new UID(), 'Migration unique ID.') ->inject('response') ->inject('dbForProject') @@ -352,13 +394,18 @@ App::get('/v1/migrations/appwrite/report') ->groups(['api', 'migrations']) ->desc('Generate a report on Appwrite data') ->label('scope', 'migrations.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'migrations') - ->label('sdk.method', 'getAppwriteReport') - ->label('sdk.description', '/docs/references/migrations/migration-appwrite-report.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MIGRATION_REPORT) + ->label('sdk', new Method( + namespace: 'migrations', + name: 'getAppwriteReport', + description: '/docs/references/migrations/migration-appwrite-report.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MIGRATION_REPORT, + ) + ] + )) ->param('resources', [], new ArrayList(new WhiteList(Appwrite::getSupportedResources())), 'List of resources to migrate') ->param('endpoint', '', new URL(), "Source's Appwrite Endpoint") ->param('projectID', '', new Text(512), "Source's Project ID") @@ -394,13 +441,18 @@ App::get('/v1/migrations/firebase/report') ->groups(['api', 'migrations']) ->desc('Generate a report on Firebase data') ->label('scope', 'migrations.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'migrations') - ->label('sdk.method', 'getFirebaseReport') - ->label('sdk.description', '/docs/references/migrations/migration-firebase-report.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MIGRATION_REPORT) + ->label('sdk', new Method( + namespace: 'migrations', + name: 'getFirebaseReport', + description: '/docs/references/migrations/migration-firebase-report.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MIGRATION_REPORT, + ) + ] + )) ->param('resources', [], new ArrayList(new WhiteList(Firebase::getSupportedResources())), 'List of resources to migrate') ->param('serviceAccount', '', new Text(65536), 'JSON of the Firebase service account credentials') ->inject('response') @@ -441,13 +493,18 @@ App::get('/v1/migrations/supabase/report') ->groups(['api', 'migrations']) ->desc('Generate a report on Supabase Data') ->label('scope', 'migrations.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'migrations') - ->label('sdk.method', 'getSupabaseReport') - ->label('sdk.description', '/docs/references/migrations/migration-supabase-report.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MIGRATION_REPORT) + ->label('sdk', new Method( + namespace: 'migrations', + name: 'getSupabaseReport', + description: '/docs/references/migrations/migration-supabase-report.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MIGRATION_REPORT, + ) + ] + )) ->param('resources', [], new ArrayList(new WhiteList(Supabase::getSupportedResources(), true)), 'List of resources to migrate') ->param('endpoint', '', new URL(), 'Source\'s Supabase Endpoint.') ->param('apiKey', '', new Text(512), 'Source\'s API Key.') @@ -484,13 +541,18 @@ App::get('/v1/migrations/nhost/report') ->groups(['api', 'migrations']) ->desc('Generate a report on NHost Data') ->label('scope', 'migrations.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'migrations') - ->label('sdk.method', 'getNHostReport') - ->label('sdk.description', '/docs/references/migrations/migration-nhost-report.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MIGRATION_REPORT) + ->label('sdk', new Method( + namespace: 'migrations', + name: 'getNHostReport', + description: '/docs/references/migrations/migration-nhost-report.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MIGRATION_REPORT, + ) + ] + )) ->param('resources', [], new ArrayList(new WhiteList(NHost::getSupportedResources())), 'List of resources to migrate.') ->param('subdomain', '', new Text(512), 'Source\'s Subdomain.') ->param('region', '', new Text(512), 'Source\'s Region.') @@ -530,13 +592,18 @@ App::patch('/v1/migrations/:migrationId') ->label('event', 'migrations.[migrationId].retry') ->label('audits.event', 'migration.retry') ->label('audits.resource', 'migrations/{request.migrationId}') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'migrations') - ->label('sdk.method', 'retry') - ->label('sdk.description', '/docs/references/migrations/retry-migration.md') - ->label('sdk.response.code', Response::STATUS_CODE_ACCEPTED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MIGRATION) + ->label('sdk', new Method( + namespace: 'migrations', + name: 'retry', + description: '/docs/references/migrations/retry-migration.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_ACCEPTED, + model: Response::MODEL_MIGRATION, + ) + ] + )) ->param('migrationId', '', new UID(), 'Migration unique ID.') ->inject('response') ->inject('dbForProject') @@ -575,12 +642,19 @@ App::delete('/v1/migrations/:migrationId') ->label('event', 'migrations.[migrationId].delete') ->label('audits.event', 'migrationId.delete') ->label('audits.resource', 'migrations/{request.migrationId}') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'migrations') - ->label('sdk.method', 'delete') - ->label('sdk.description', '/docs/references/migrations/delete-migration.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'migrations', + name: 'delete', + description: '/docs/references/migrations/delete-migration.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('migrationId', '', new UID(), 'Migration ID.') ->inject('response') ->inject('dbForProject') @@ -599,4 +673,4 @@ App::delete('/v1/migrations/:migrationId') $queueForEvents->setParam('migrationId', $migration->getId()); $response->noContent(); - }); + }); \ No newline at end of file diff --git a/app/controllers/api/project.php b/app/controllers/api/project.php index 5a1bf063f2..50ef982799 100644 --- a/app/controllers/api/project.php +++ b/app/controllers/api/project.php @@ -1,6 +1,10 @@ desc('Get project usage stats') ->groups(['api', 'usage']) ->label('scope', 'projects.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'project') - ->label('sdk.method', 'getUsage') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USAGE_PROJECT) + ->label('sdk', new Method( + namespace: 'project', + name: 'getUsage', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USAGE_PROJECT, + ) + ] + )) ->param('startDate', '', new DateTimeValidator(), 'Starting date for the usage') ->param('endDate', '', new DateTimeValidator(), 'End date for the usage') ->param('period', '1d', new WhiteList(['1h', '1d']), 'Period used', true) @@ -357,13 +367,18 @@ App::post('/v1/project/variables') ->groups(['api']) ->label('scope', 'projects.write') ->label('audits.event', 'variable.create') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'project') - ->label('sdk.method', 'createVariable') - ->label('sdk.description', '/docs/references/project/create-variable.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_VARIABLE) + ->label('sdk', new Method( + namespace: 'project', + name: 'createVariable', + description: '/docs/references/project/create-variable.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_VARIABLE, + ) + ] + )) ->param('key', null, new Text(Database::LENGTH_KEY), 'Variable key. Max length: ' . Database::LENGTH_KEY . ' chars.', false) ->param('value', null, new Text(8192, 0), 'Variable value. Max length: 8192 chars.', false) ->inject('project') @@ -411,13 +426,18 @@ App::get('/v1/project/variables') ->desc('List variables') ->groups(['api']) ->label('scope', 'projects.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'project') - ->label('sdk.method', 'listVariables') - ->label('sdk.description', '/docs/references/project/list-variables.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_VARIABLE_LIST) + ->label('sdk', new Method( + namespace: 'project', + name: 'listVariables', + description: '/docs/references/project/list-variables.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_VARIABLE_LIST, + ) + ] + )) ->inject('response') ->inject('dbForProject') ->action(function (Response $response, Database $dbForProject) { @@ -436,13 +456,18 @@ App::get('/v1/project/variables/:variableId') ->desc('Get variable') ->groups(['api']) ->label('scope', 'projects.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'project') - ->label('sdk.method', 'getVariable') - ->label('sdk.description', '/docs/references/project/get-variable.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_VARIABLE) + ->label('sdk', new Method( + namespace: 'project', + name: 'getVariable', + description: '/docs/references/project/get-variable.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_VARIABLE, + ) + ] + )) ->param('variableId', '', new UID(), 'Variable unique ID.', false) ->inject('response') ->inject('project') @@ -460,13 +485,18 @@ App::put('/v1/project/variables/:variableId') ->desc('Update variable') ->groups(['api']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'project') - ->label('sdk.method', 'updateVariable') - ->label('sdk.description', '/docs/references/project/update-variable.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_VARIABLE) + ->label('sdk', new Method( + namespace: 'project', + name: 'updateVariable', + description: '/docs/references/project/update-variable.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_VARIABLE, + ) + ] + )) ->param('variableId', '', new UID(), 'Variable unique ID.', false) ->param('key', null, new Text(255), 'Variable key. Max length: 255 chars.', false) ->param('value', null, new Text(8192, 0), 'Variable value. Max length: 8192 chars.', true) @@ -506,12 +536,19 @@ App::delete('/v1/project/variables/:variableId') ->desc('Delete variable') ->groups(['api']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'project') - ->label('sdk.method', 'deleteVariable') - ->label('sdk.description', '/docs/references/project/delete-variable.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'project', + name: 'deleteVariable', + description: '/docs/references/project/delete-variable.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('variableId', '', new UID(), 'Variable unique ID.', false) ->inject('project') ->inject('response') @@ -533,4 +570,4 @@ App::delete('/v1/project/variables/:variableId') } $response->noContent(); - }); + }); \ No newline at end of file diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index e0b83dcab1..896e708327 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -10,6 +10,10 @@ use Appwrite\Extend\Exception; use Appwrite\Hooks\Hooks; use Appwrite\Network\Validator\Email; use Appwrite\Network\Validator\Origin; +use Appwrite\SDK\AuthType; +use Appwrite\SDK\ContentType; +use Appwrite\SDK\Method; +use Appwrite\SDK\Response as SDKResponse; use Appwrite\Template\Template; use Appwrite\Utopia\Database\Validator\ProjectId; use Appwrite\Utopia\Database\Validator\Queries\Projects; @@ -62,12 +66,18 @@ App::post('/v1/projects') ->label('audits.event', 'projects.create') ->label('audits.resource', 'project/{response.$id}') ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'create') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROJECT) + ->label('sdk', new Method( + namespace: 'projects', + name: 'create', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_PROJECT, + ) + ] + )) ->param('projectId', '', new ProjectId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, and hyphen. Can\'t start with a special char. Max length is 36 chars.') ->param('name', null, new Text(128), 'Project name. Max length: 128 chars.') ->param('teamId', '', new UID(), 'Team unique ID.') @@ -285,12 +295,18 @@ App::get('/v1/projects') ->desc('List projects') ->groups(['api', 'projects']) ->label('scope', 'projects.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'list') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROJECT_LIST) + ->label('sdk', new Method( + namespace: 'projects', + name: 'list', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT_LIST, + ) + ] + )) ->param('queries', [], new Projects(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Projects::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') @@ -344,12 +360,18 @@ App::get('/v1/projects/:projectId') ->desc('Get project') ->groups(['api', 'projects']) ->label('scope', 'projects.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'get') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROJECT) + ->label('sdk', new Method( + namespace: 'projects', + name: 'get', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->inject('response') ->inject('dbForPlatform') @@ -370,12 +392,18 @@ App::patch('/v1/projects/:projectId') ->label('scope', 'projects.write') ->label('audits.event', 'projects.update') ->label('audits.resource', 'project/{request.projectId}') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'update') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROJECT) + ->label('sdk', new Method( + namespace: 'projects', + name: 'update', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('name', null, new Text(128), 'Project name. Max length: 128 chars.') ->param('description', '', new Text(256), 'Project description. Max length: 256 chars.', true) @@ -417,12 +445,18 @@ App::patch('/v1/projects/:projectId/team') ->desc('Update project team') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateTeam') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROJECT) + ->label('sdk', new Method( + namespace: 'projects', + name: 'updateTeam', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('teamId', '', new UID(), 'Team ID of the team to transfer project to.') ->inject('response') @@ -485,12 +519,18 @@ App::patch('/v1/projects/:projectId/service') ->desc('Update service status') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateServiceStatus') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROJECT) + ->label('sdk', new Method( + namespace: 'projects', + name: 'updateServiceStatus', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('service', '', new WhiteList(array_keys(array_filter(Config::getParam('services'), fn ($element) => $element['optional'])), true), 'Service name.') ->param('status', null, new Boolean(), 'Service status.') @@ -516,12 +556,18 @@ App::patch('/v1/projects/:projectId/service/all') ->desc('Update all service status') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateServiceStatusAll') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROJECT) + ->label('sdk', new Method( + namespace: 'projects', + name: 'updateServiceStatusAll', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('status', null, new Boolean(), 'Service status.') ->inject('response') @@ -550,12 +596,18 @@ App::patch('/v1/projects/:projectId/api') ->desc('Update API status') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateApiStatus') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROJECT) + ->label('sdk', new Method( + namespace: 'projects', + name: 'updateApiStatus', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('api', '', new WhiteList(array_keys(Config::getParam('apis')), true), 'API name.') ->param('status', null, new Boolean(), 'API status.') @@ -581,12 +633,18 @@ App::patch('/v1/projects/:projectId/api/all') ->desc('Update all API status') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateApiStatusAll') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROJECT) + ->label('sdk', new Method( + namespace: 'projects', + name: 'updateApiStatusAll', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('status', null, new Boolean(), 'API status.') ->inject('response') @@ -615,12 +673,18 @@ App::patch('/v1/projects/:projectId/oauth2') ->desc('Update project OAuth2') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateOAuth2') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROJECT) + ->label('sdk', new Method( + namespace: 'projects', + name: 'updateOAuth2', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('provider', '', new WhiteList(\array_keys(Config::getParam('oAuthProviders')), true), 'Provider Name') ->param('appId', null, new Text(256), 'Provider app ID. Max length: 256 chars.', true) @@ -659,12 +723,18 @@ App::patch('/v1/projects/:projectId/auth/session-alerts') ->desc('Update project sessions emails') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateSessionAlerts') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROJECT) + ->label('sdk', new Method( + namespace: 'projects', + name: 'updateSessionAlerts', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('alerts', false, new Boolean(true), 'Set to true to enable session emails.') ->inject('response') @@ -690,12 +760,18 @@ App::patch('/v1/projects/:projectId/auth/memberships-privacy') ->desc('Update project memberships privacy attributes') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateMembershipsPrivacy') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROJECT) + ->label('sdk', new Method( + namespace: 'projects', + name: 'updateMembershipsPrivacy', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('userName', true, new Boolean(true), 'Set to true to show userName to members of a team.') ->param('userEmail', true, new Boolean(true), 'Set to true to show email to members of a team.') @@ -725,12 +801,18 @@ App::patch('/v1/projects/:projectId/auth/limit') ->desc('Update project users limit') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateAuthLimit') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROJECT) + ->label('sdk', new Method( + namespace: 'projects', + name: 'updateAuthLimit', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('limit', false, new Range(0, APP_LIMIT_USERS), 'Set the max number of users allowed in this project. Use 0 for unlimited.') ->inject('response') @@ -756,12 +838,18 @@ App::patch('/v1/projects/:projectId/auth/duration') ->desc('Update project authentication duration') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateAuthDuration') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROJECT) + ->label('sdk', new Method( + namespace: 'projects', + name: 'updateAuthDuration', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('duration', 31536000, new Range(0, 31536000), 'Project session length in seconds. Max length: 31536000 seconds.') ->inject('response') @@ -787,12 +875,18 @@ App::patch('/v1/projects/:projectId/auth/:method') ->desc('Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateAuthStatus') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROJECT) + ->label('sdk', new Method( + namespace: 'projects', + name: 'updateAuthStatus', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('method', '', new WhiteList(\array_keys(Config::getParam('auth')), true), 'Auth Method. Possible values: ' . implode(',', \array_keys(Config::getParam('auth'))), false) ->param('status', false, new Boolean(true), 'Set the status of this auth method.') @@ -821,12 +915,18 @@ App::patch('/v1/projects/:projectId/auth/password-history') ->desc('Update authentication password history. Use this endpoint to set the number of password history to save and 0 to disable password history.') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateAuthPasswordHistory') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROJECT) + ->label('sdk', new Method( + namespace: 'projects', + name: 'updateAuthPasswordHistory', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('limit', 0, new Range(0, APP_LIMIT_USER_PASSWORD_HISTORY), 'Set the max number of passwords to store in user history. User can\'t choose a new password that is already stored in the password history list. Max number of passwords allowed in history is' . APP_LIMIT_USER_PASSWORD_HISTORY . '. Default value is 0') ->inject('response') @@ -852,12 +952,18 @@ App::patch('/v1/projects/:projectId/auth/password-dictionary') ->desc('Update authentication password dictionary status. Use this endpoint to enable or disable the dicitonary check for user password') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateAuthPasswordDictionary') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROJECT) + ->label('sdk', new Method( + namespace: 'projects', + name: 'updateAuthPasswordDictionary', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('enabled', false, new Boolean(false), 'Set whether or not to enable checking user\'s password against most commonly used passwords. Default is false.') ->inject('response') @@ -883,12 +989,18 @@ App::patch('/v1/projects/:projectId/auth/personal-data') ->desc('Enable or disable checking user passwords for similarity with their personal data.') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updatePersonalDataCheck') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROJECT) + ->label('sdk', new Method( + namespace: 'projects', + name: 'updatePersonalDataCheck', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('enabled', false, new Boolean(false), 'Set whether or not to check a password for similarity with personal data. Default is false.') ->inject('response') @@ -914,12 +1026,18 @@ App::patch('/v1/projects/:projectId/auth/max-sessions') ->desc('Update project user sessions limit') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateAuthSessionsLimit') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROJECT) + ->label('sdk', new Method( + namespace: 'projects', + name: 'updateAuthSessionsLimit', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('limit', false, new Range(1, APP_LIMIT_USER_SESSIONS_MAX), 'Set the max number of users allowed in this project. Value allowed is between 1-' . APP_LIMIT_USER_SESSIONS_MAX . '. Default is ' . APP_LIMIT_USER_SESSIONS_DEFAULT) ->inject('response') @@ -945,12 +1063,18 @@ App::patch('/v1/projects/:projectId/auth/mock-numbers') ->desc('Update the mock numbers for the project') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateMockNumbers') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROJECT) + ->label('sdk', new Method( + namespace: 'projects', + name: 'updateMockNumbers', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('numbers', '', new ArrayList(new MockNumber(), 10), 'An array of mock numbers and their corresponding verification codes (OTPs). Each number should be a valid E.164 formatted phone number. Maximum of 10 numbers are allowed.') ->inject('response') @@ -986,11 +1110,19 @@ App::delete('/v1/projects/:projectId') ->label('audits.event', 'projects.delete') ->label('audits.resource', 'project/{request.projectId}') ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'delete') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'projects', + name: 'delete', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->inject('response') ->inject('user') @@ -1021,12 +1153,18 @@ App::post('/v1/projects/:projectId/webhooks') ->desc('Create webhook') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'createWebhook') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_WEBHOOK) + ->label('sdk', new Method( + namespace: 'projects', + name: 'createWebhook', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_WEBHOOK, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('name', null, new Text(128), 'Webhook name. Max length: 128 chars.') ->param('enabled', true, new Boolean(true), 'Enable or disable a webhook.', true) @@ -1079,12 +1217,18 @@ App::get('/v1/projects/:projectId/webhooks') ->desc('List webhooks') ->groups(['api', 'projects']) ->label('scope', 'projects.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'listWebhooks') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_WEBHOOK_LIST) + ->label('sdk', new Method( + namespace: 'projects', + name: 'listWebhooks', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_WEBHOOK_LIST, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->inject('response') ->inject('dbForPlatform') @@ -1111,12 +1255,18 @@ App::get('/v1/projects/:projectId/webhooks/:webhookId') ->desc('Get webhook') ->groups(['api', 'projects']) ->label('scope', 'projects.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'getWebhook') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_WEBHOOK) + ->label('sdk', new Method( + namespace: 'projects', + name: 'getWebhook', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_WEBHOOK, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('webhookId', '', new UID(), 'Webhook unique ID.') ->inject('response') @@ -1145,12 +1295,18 @@ App::put('/v1/projects/:projectId/webhooks/:webhookId') ->desc('Update webhook') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateWebhook') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_WEBHOOK) + ->label('sdk', new Method( + namespace: 'projects', + name: 'updateWebhook', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_WEBHOOK, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('webhookId', '', new UID(), 'Webhook unique ID.') ->param('name', null, new Text(128), 'Webhook name. Max length: 128 chars.') @@ -1204,12 +1360,18 @@ App::patch('/v1/projects/:projectId/webhooks/:webhookId/signature') ->desc('Update webhook signature key') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateWebhookSignature') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_WEBHOOK) + ->label('sdk', new Method( + namespace: 'projects', + name: 'updateWebhookSignature', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_WEBHOOK, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('webhookId', '', new UID(), 'Webhook unique ID.') ->inject('response') @@ -1243,11 +1405,19 @@ App::delete('/v1/projects/:projectId/webhooks/:webhookId') ->desc('Delete webhook') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'deleteWebhook') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'projects', + name: 'deleteWebhook', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('webhookId', '', new UID(), 'Webhook unique ID.') ->inject('response') @@ -1282,12 +1452,18 @@ App::post('/v1/projects/:projectId/keys') ->desc('Create key') ->groups(['api', 'projects']) ->label('scope', 'keys.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'createKey') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_KEY) + ->label('sdk', new Method( + namespace: 'projects', + name: 'createKey', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_KEY, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('name', null, new Text(128), 'Key name. Max length: 128 chars.') ->param('scopes', null, new ArrayList(new WhiteList(array_keys(Config::getParam('scopes')), true), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Key scopes list. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' scopes are allowed.') @@ -1332,12 +1508,18 @@ App::get('/v1/projects/:projectId/keys') ->desc('List keys') ->groups(['api', 'projects']) ->label('scope', 'keys.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'listKeys') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_KEY_LIST) + ->label('sdk', new Method( + namespace: 'projects', + name: 'listKeys', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_KEY_LIST, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->inject('response') ->inject('dbForPlatform') @@ -1364,12 +1546,18 @@ App::get('/v1/projects/:projectId/keys/:keyId') ->desc('Get key') ->groups(['api', 'projects']) ->label('scope', 'keys.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'getKey') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_KEY) + ->label('sdk', new Method( + namespace: 'projects', + name: 'getKey', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_KEY, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('keyId', '', new UID(), 'Key unique ID.') ->inject('response') @@ -1398,12 +1586,18 @@ App::put('/v1/projects/:projectId/keys/:keyId') ->desc('Update key') ->groups(['api', 'projects']) ->label('scope', 'keys.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateKey') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_KEY) + ->label('sdk', new Method( + namespace: 'projects', + name: 'updateKey', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_KEY, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('keyId', '', new UID(), 'Key unique ID.') ->param('name', null, new Text(128), 'Key name. Max length: 128 chars.') @@ -1444,11 +1638,19 @@ App::delete('/v1/projects/:projectId/keys/:keyId') ->desc('Delete key') ->groups(['api', 'projects']) ->label('scope', 'keys.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'deleteKey') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'projects', + name: 'deleteKey', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('keyId', '', new UID(), 'Key unique ID.') ->inject('response') @@ -1483,12 +1685,18 @@ App::post('/v1/projects/:projectId/jwts') ->groups(['api', 'projects']) ->desc('Create JWT') ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'createJWT') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_JWT) + ->label('sdk', new Method( + namespace: 'projects', + name: 'createJWT', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_JWT, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('scopes', [], new ArrayList(new WhiteList(array_keys(Config::getParam('scopes')), true), APP_LIMIT_ARRAY_PARAMS_SIZE), 'List of scopes allowed for JWT key. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' scopes are allowed.') ->param('duration', 900, new Range(0, 3600), 'Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.', true) @@ -1520,12 +1728,18 @@ App::post('/v1/projects/:projectId/platforms') ->label('audits.event', 'platforms.create') ->label('audits.resource', 'project/{request.projectId}') ->label('scope', 'platforms.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'createPlatform') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PLATFORM) + ->label('sdk', new Method( + namespace: 'projects', + name: 'createPlatform', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_PLATFORM, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('type', null, new WhiteList([Origin::CLIENT_TYPE_WEB, Origin::CLIENT_TYPE_FLUTTER_WEB, Origin::CLIENT_TYPE_FLUTTER_IOS, Origin::CLIENT_TYPE_FLUTTER_ANDROID, Origin::CLIENT_TYPE_FLUTTER_LINUX, Origin::CLIENT_TYPE_FLUTTER_MACOS, Origin::CLIENT_TYPE_FLUTTER_WINDOWS, Origin::CLIENT_TYPE_APPLE_IOS, Origin::CLIENT_TYPE_APPLE_MACOS, Origin::CLIENT_TYPE_APPLE_WATCHOS, Origin::CLIENT_TYPE_APPLE_TVOS, Origin::CLIENT_TYPE_ANDROID, Origin::CLIENT_TYPE_UNITY, Origin::CLIENT_TYPE_REACT_NATIVE_IOS, Origin::CLIENT_TYPE_REACT_NATIVE_ANDROID], true), 'Platform type.') ->param('name', null, new Text(128), 'Platform name. Max length: 128 chars.') @@ -1570,12 +1784,18 @@ App::get('/v1/projects/:projectId/platforms') ->desc('List platforms') ->groups(['api', 'projects']) ->label('scope', 'platforms.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'listPlatforms') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PLATFORM_LIST) + ->label('sdk', new Method( + namespace: 'projects', + name: 'listPlatforms', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PLATFORM_LIST, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->inject('response') ->inject('dbForPlatform') @@ -1602,12 +1822,18 @@ App::get('/v1/projects/:projectId/platforms/:platformId') ->desc('Get platform') ->groups(['api', 'projects']) ->label('scope', 'platforms.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'getPlatform') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PLATFORM) + ->label('sdk', new Method( + namespace: 'projects', + name: 'getPlatform', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PLATFORM, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('platformId', '', new UID(), 'Platform unique ID.') ->inject('response') @@ -1636,12 +1862,18 @@ App::put('/v1/projects/:projectId/platforms/:platformId') ->desc('Update platform') ->groups(['api', 'projects']) ->label('scope', 'platforms.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updatePlatform') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PLATFORM) + ->label('sdk', new Method( + namespace: 'projects', + name: 'updatePlatform', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PLATFORM, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('platformId', '', new UID(), 'Platform unique ID.') ->param('name', null, new Text(128), 'Platform name. Max length: 128 chars.') @@ -1685,11 +1917,19 @@ App::delete('/v1/projects/:projectId/platforms/:platformId') ->label('audits.event', 'platforms.delete') ->label('audits.resource', 'project/{request.projectId}/platform/${request.platformId}') ->label('scope', 'platforms.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'deletePlatform') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'projects', + name: 'deletePlatform', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('platformId', '', new UID(), 'Platform unique ID.') ->inject('response') @@ -1724,12 +1964,18 @@ App::patch('/v1/projects/:projectId/smtp') ->desc('Update SMTP') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateSmtp') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROJECT) + ->label('sdk', new Method( + namespace: 'projects', + name: 'updateSmtp', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('enabled', false, new Boolean(), 'Enable custom SMTP service') ->param('senderName', '', new Text(255, 0), 'Name of the email sender', true) @@ -1814,11 +2060,18 @@ App::post('/v1/projects/:projectId/smtp/tests') ->desc('Create SMTP test') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'createSmtpTest') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'projects', + name: 'createSmtpTest', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('emails', [], new ArrayList(new Email(), 10), 'Array of emails to send test email to. Maximum of 10 emails are allowed.') ->param('senderName', System::getEnv('_APP_SYSTEM_EMAIL_NAME', APP_NAME . ' Server'), new Text(255, 0), 'Name of the email sender') @@ -1873,12 +2126,18 @@ App::get('/v1/projects/:projectId/templates/sms/:type/:locale') ->desc('Get custom SMS template') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'getSmsTemplate') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_SMS_TEMPLATE) + ->label('sdk', new Method( + namespace: 'projects', + name: 'getSmsTemplate', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_SMS_TEMPLATE, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('type', '', new WhiteList(Config::getParam('locale-templates')['sms'] ?? []), 'Template type') ->param('locale', '', fn ($localeCodes) => new WhiteList($localeCodes), 'Template locale', false, ['localeCodes']) @@ -1914,12 +2173,18 @@ App::get('/v1/projects/:projectId/templates/email/:type/:locale') ->desc('Get custom email template') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'getEmailTemplate') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_EMAIL_TEMPLATE) + ->label('sdk', new Method( + namespace: 'projects', + name: 'getEmailTemplate', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_EMAIL_TEMPLATE, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('type', '', new WhiteList(Config::getParam('locale-templates')['email'] ?? []), 'Template type') ->param('locale', '', fn ($localeCodes) => new WhiteList($localeCodes), 'Template locale', false, ['localeCodes']) @@ -1966,12 +2231,18 @@ App::patch('/v1/projects/:projectId/templates/sms/:type/:locale') ->desc('Update custom SMS template') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateSmsTemplate') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_SMS_TEMPLATE) + ->label('sdk', new Method( + namespace: 'projects', + name: 'updateSmsTemplate', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_SMS_TEMPLATE, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('type', '', new WhiteList(Config::getParam('locale-templates')['sms'] ?? []), 'Template type') ->param('locale', '', fn ($localeCodes) => new WhiteList($localeCodes), 'Template locale', false, ['localeCodes']) @@ -2006,12 +2277,18 @@ App::patch('/v1/projects/:projectId/templates/email/:type/:locale') ->desc('Update custom email templates') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateEmailTemplate') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROJECT) + ->label('sdk', new Method( + namespace: 'projects', + name: 'updateEmailTemplate', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_EMAIL_TEMPLATE, + ) + ] + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('type', '', new WhiteList(Config::getParam('locale-templates')['email'] ?? []), 'Template type') ->param('locale', '', fn ($localeCodes) => new WhiteList($localeCodes), 'Template locale', false, ['localeCodes']) @@ -2056,12 +2333,19 @@ App::delete('/v1/projects/:projectId/templates/sms/:type/:locale') ->desc('Reset custom SMS template') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'deleteSmsTemplate') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_SMS_TEMPLATE) + ->label('sdk', new Method( + namespace: 'projects', + name: 'deleteSmsTemplate', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_SMS_TEMPLATE, + ) + ], + contentType: ContentType::JSON + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('type', '', new WhiteList(Config::getParam('locale-templates')['sms'] ?? []), 'Template type') ->param('locale', '', fn ($localeCodes) => new WhiteList($localeCodes), 'Template locale', false, ['localeCodes']) @@ -2099,12 +2383,19 @@ App::delete('/v1/projects/:projectId/templates/email/:type/:locale') ->desc('Reset custom email template') ->groups(['api', 'projects']) ->label('scope', 'projects.write') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'deleteEmailTemplate') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_EMAIL_TEMPLATE) + ->label('sdk', new Method( + namespace: 'projects', + name: 'deleteEmailTemplate', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_EMAIL_TEMPLATE, + ) + ], + contentType: ContentType::JSON + )) ->param('projectId', '', new UID(), 'Project unique ID.') ->param('type', '', new WhiteList(Config::getParam('locale-templates')['email'] ?? []), 'Template type') ->param('locale', '', fn ($localeCodes) => new WhiteList($localeCodes), 'Template locale', false, ['localeCodes']) @@ -2138,4 +2429,4 @@ App::delete('/v1/projects/:projectId/templates/email/:type/:locale') 'replyTo' => $template['replyTo'], 'message' => $template['message'] ]), Response::MODEL_EMAIL_TEMPLATE); - }); + }); \ No newline at end of file diff --git a/app/controllers/api/proxy.php b/app/controllers/api/proxy.php index 0d2fed8e66..ef39ed0ab6 100644 --- a/app/controllers/api/proxy.php +++ b/app/controllers/api/proxy.php @@ -5,6 +5,10 @@ use Appwrite\Event\Delete; use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Network\Validator\CNAME; +use Appwrite\SDK\AuthType; +use Appwrite\SDK\ContentType; +use Appwrite\SDK\Method; +use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Rules; use Appwrite\Utopia\Response; use Utopia\App; @@ -29,13 +33,18 @@ App::post('/v1/proxy/rules') ->label('event', 'rules.[ruleId].create') ->label('audits.event', 'rule.create') ->label('audits.resource', 'rule/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'proxy') - ->label('sdk.method', 'createRule') - ->label('sdk.description', '/docs/references/proxy/create-rule.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROXY_RULE) + ->label('sdk', new Method( + namespace: 'proxy', + name: 'createRule', + description: '/docs/references/proxy/create-rule.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_PROXY_RULE, + ) + ] + )) ->param('domain', null, new ValidatorDomain(), 'Domain name.') ->param('resourceType', null, new WhiteList(['api', 'function']), 'Action definition for the rule. Possible values are "api", "function"') ->param('resourceId', '', new UID(), 'ID of resource for the action type. If resourceType is "api", leave empty. If resourceType is "function", provide ID of the function.', true) @@ -160,13 +169,18 @@ App::get('/v1/proxy/rules') ->groups(['api', 'proxy']) ->desc('List rules') ->label('scope', 'rules.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'proxy') - ->label('sdk.method', 'listRules') - ->label('sdk.description', '/docs/references/proxy/list-rules.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROXY_RULE_LIST) + ->label('sdk', new Method( + namespace: 'proxy', + name: 'listRules', + description: '/docs/references/proxy/list-rules.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROXY_RULE_LIST, + ) + ] + )) ->param('queries', [], new Rules(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Rules::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') @@ -229,13 +243,18 @@ App::get('/v1/proxy/rules/:ruleId') ->groups(['api', 'proxy']) ->desc('Get rule') ->label('scope', 'rules.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'proxy') - ->label('sdk.method', 'getRule') - ->label('sdk.description', '/docs/references/proxy/get-rule.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROXY_RULE) + ->label('sdk', new Method( + namespace: 'proxy', + name: 'getRule', + description: '/docs/references/proxy/get-rule.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROXY_RULE, + ) + ] + )) ->param('ruleId', '', new UID(), 'Rule ID.') ->inject('response') ->inject('project') @@ -261,12 +280,19 @@ App::delete('/v1/proxy/rules/:ruleId') ->label('event', 'rules.[ruleId].delete') ->label('audits.event', 'rules.delete') ->label('audits.resource', 'rule/{request.ruleId}') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'proxy') - ->label('sdk.method', 'deleteRule') - ->label('sdk.description', '/docs/references/proxy/delete-rule.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'proxy', + name: 'deleteRule', + description: '/docs/references/proxy/delete-rule.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('ruleId', '', new UID(), 'Rule ID.') ->inject('response') ->inject('project') @@ -298,12 +324,18 @@ App::patch('/v1/proxy/rules/:ruleId/verification') ->label('event', 'rules.[ruleId].update') ->label('audits.event', 'rule.update') ->label('audits.resource', 'rule/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'proxy') - ->label('sdk.method', 'updateRuleVerification') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROXY_RULE) + ->label('sdk', new Method( + namespace: 'proxy', + name: 'updateRuleVerification', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROXY_RULE, + ) + ] + )) ->param('ruleId', '', new UID(), 'Rule ID.') ->inject('response') ->inject('queueForCertificates') diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index e92b55f140..8ed7aaff22 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -9,6 +9,11 @@ use Appwrite\Event\Event; use Appwrite\Event\Usage; use Appwrite\Extend\Exception; use Appwrite\OpenSSL\OpenSSL; +use Appwrite\SDK\AuthType; +use Appwrite\SDK\ContentType; +use Appwrite\SDK\Method; +use Appwrite\SDK\MethodType; +use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\CustomId; use Appwrite\Utopia\Database\Validator\Queries\Buckets; use Appwrite\Utopia\Database\Validator\Queries\Files; @@ -55,13 +60,18 @@ App::post('/v1/storage/buckets') ->label('event', 'buckets.[bucketId].create') ->label('audits.event', 'bucket.create') ->label('audits.resource', 'bucket/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'storage') - ->label('sdk.method', 'createBucket') - ->label('sdk.description', '/docs/references/storage/create-bucket.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_BUCKET) + ->label('sdk', new Method( + namespace: 'storage', + name: 'createBucket', + description: '/docs/references/storage/create-bucket.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_BUCKET, + ) + ] + )) ->param('bucketId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Bucket name') ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) @@ -152,13 +162,18 @@ App::get('/v1/storage/buckets') ->groups(['api', 'storage']) ->label('scope', 'buckets.read') ->label('resourceType', RESOURCE_TYPE_BUCKETS) - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'storage') - ->label('sdk.method', 'listBuckets') - ->label('sdk.description', '/docs/references/storage/list-buckets.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_BUCKET_LIST) + ->label('sdk', new Method( + namespace: 'storage', + name: 'listBuckets', + description: '/docs/references/storage/list-buckets.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_BUCKET_LIST, + ) + ] + )) ->param('queries', [], new Buckets(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Buckets::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') @@ -213,13 +228,18 @@ App::get('/v1/storage/buckets/:bucketId') ->groups(['api', 'storage']) ->label('scope', 'buckets.read') ->label('resourceType', RESOURCE_TYPE_BUCKETS) - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'storage') - ->label('sdk.method', 'getBucket') - ->label('sdk.description', '/docs/references/storage/get-bucket.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_BUCKET) + ->label('sdk', new Method( + namespace: 'storage', + name: 'getBucket', + description: '/docs/references/storage/get-bucket.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_BUCKET, + ) + ] + )) ->param('bucketId', '', new UID(), 'Bucket unique ID.') ->inject('response') ->inject('dbForProject') @@ -242,13 +262,18 @@ App::put('/v1/storage/buckets/:bucketId') ->label('event', 'buckets.[bucketId].update') ->label('audits.event', 'bucket.update') ->label('audits.resource', 'bucket/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'storage') - ->label('sdk.method', 'updateBucket') - ->label('sdk.description', '/docs/references/storage/update-bucket.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_BUCKET) + ->label('sdk', new Method( + namespace: 'storage', + name: 'updateBucket', + description: '/docs/references/storage/update-bucket.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_BUCKET, + ) + ] + )) ->param('bucketId', '', new UID(), 'Bucket unique ID.') ->param('name', null, new Text(128), 'Bucket name', false) ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) @@ -307,12 +332,19 @@ App::delete('/v1/storage/buckets/:bucketId') ->label('audits.event', 'bucket.delete') ->label('event', 'buckets.[bucketId].delete') ->label('audits.resource', 'bucket/{request.bucketId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'storage') - ->label('sdk.method', 'deleteBucket') - ->label('sdk.description', '/docs/references/storage/delete-bucket.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'storage', + name: 'deleteBucket', + description: '/docs/references/storage/delete-bucket.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('bucketId', '', new UID(), 'Bucket unique ID.') ->inject('response') ->inject('dbForProject') @@ -353,15 +385,20 @@ App::post('/v1/storage/buckets/:bucketId/files') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'storage') - ->label('sdk.method', 'createFile') - ->label('sdk.description', '/docs/references/storage/create-file.md') - ->label('sdk.request.type', 'multipart/form-data') - ->label('sdk.methodType', 'upload') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_FILE) + ->label('sdk', new Method( + namespace: 'storage', + name: 'createFile', + description: '/docs/references/storage/create-file.md', + type: MethodType::UPLOAD, + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + requestType: 'multipart/form-data', + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_FILE, + ) + ] + )) ->param('bucketId', '', new UID(), 'Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).') ->param('fileId', '', new CustomId(), 'File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('file', [], new File(), 'Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).', skipValidation: true) @@ -717,13 +754,18 @@ App::get('/v1/storage/buckets/:bucketId/files') ->groups(['api', 'storage']) ->label('scope', 'files.read') ->label('resourceType', RESOURCE_TYPE_BUCKETS) - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'storage') - ->label('sdk.method', 'listFiles') - ->label('sdk.description', '/docs/references/storage/list-files.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_FILE_LIST) + ->label('sdk', new Method( + namespace: 'storage', + name: 'listFiles', + description: '/docs/references/storage/list-files.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_FILE_LIST, + ) + ] + )) ->param('bucketId', '', new UID(), 'Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).') ->param('queries', [], new Files(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Files::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) @@ -809,13 +851,18 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId') ->groups(['api', 'storage']) ->label('scope', 'files.read') ->label('resourceType', RESOURCE_TYPE_BUCKETS) - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'storage') - ->label('sdk.method', 'getFile') - ->label('sdk.description', '/docs/references/storage/get-file.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_FILE) + ->label('sdk', new Method( + namespace: 'storage', + name: 'getFile', + description: '/docs/references/storage/get-file.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_FILE, + ) + ] + )) ->param('bucketId', '', new UID(), 'Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).') ->param('fileId', '', new UID(), 'File ID.') ->inject('response') @@ -860,13 +907,20 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview') ->label('cache', true) ->label('cache.resourceType', 'bucket/{request.bucketId}') ->label('cache.resource', 'file/{request.fileId}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'storage') - ->label('sdk.method', 'getFilePreview') - ->label('sdk.description', '/docs/references/storage/get-file-preview.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_IMAGE) - ->label('sdk.methodType', 'location') + ->label('sdk', new Method( + namespace: 'storage', + name: 'getFilePreview', + description: '/docs/references/storage/get-file-preview.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_NONE + ) + ], + type: MethodType::LOCATION, + contentType: ContentType::IMAGE + )) ->param('bucketId', '', new UID(), 'Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).') ->param('fileId', '', new UID(), 'File ID') ->param('width', 0, new Range(0, 4000), 'Resize preview image width, Pass an integer between 0 to 4000.', true) @@ -1036,13 +1090,20 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/download') ->groups(['api', 'storage']) ->label('scope', 'files.read') ->label('resourceType', RESOURCE_TYPE_BUCKETS) - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'storage') - ->label('sdk.method', 'getFileDownload') - ->label('sdk.description', '/docs/references/storage/get-file-download.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', '*/*') - ->label('sdk.methodType', 'location') + ->label('sdk', new Method( + namespace: 'storage', + name: 'getFileDownload', + description: '/docs/references/storage/get-file-download.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_NONE + ) + ], + type: MethodType::LOCATION, + contentType: ContentType::ANY, + )) ->param('bucketId', '', new UID(), 'Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).') ->param('fileId', '', new UID(), 'File ID.') ->inject('request') @@ -1177,13 +1238,20 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/view') ->groups(['api', 'storage']) ->label('scope', 'files.read') ->label('resourceType', RESOURCE_TYPE_BUCKETS) - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'storage') - ->label('sdk.method', 'getFileView') - ->label('sdk.description', '/docs/references/storage/get-file-view.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', '*/*') - ->label('sdk.methodType', 'location') + ->label('sdk', new Method( + namespace: 'storage', + name: 'getFileView', + description: '/docs/references/storage/get-file-view.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_NONE, + ) + ], + type: MethodType::LOCATION, + contentType: ContentType::ANY, + )) ->param('bucketId', '', new UID(), 'Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).') ->param('fileId', '', new UID(), 'File ID.') ->inject('response') @@ -1490,13 +1558,18 @@ App::put('/v1/storage/buckets/:bucketId/files/:fileId') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'storage') - ->label('sdk.method', 'updateFile') - ->label('sdk.description', '/docs/references/storage/update-file.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_FILE) + ->label('sdk', new Method( + namespace: 'storage', + name: 'updateFile', + description: '/docs/references/storage/update-file.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_FILE, + ) + ] + )) ->param('bucketId', '', new UID(), 'Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).') ->param('fileId', '', new UID(), 'File unique ID.') ->param('name', null, new Text(255), 'Name of the file', true) @@ -1599,12 +1672,19 @@ App::delete('/v1/storage/buckets/:bucketId/files/:fileId') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'storage') - ->label('sdk.method', 'deleteFile') - ->label('sdk.description', '/docs/references/storage/delete-file.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'storage', + name: 'deleteFile', + description: '/docs/references/storage/delete-file.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('bucketId', '', new UID(), 'Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).') ->param('fileId', '', new UID(), 'File ID.') ->inject('response') @@ -1691,12 +1771,18 @@ App::get('/v1/storage/usage') ->groups(['api', 'storage']) ->label('scope', 'files.read') ->label('resourceType', RESOURCE_TYPE_BUCKETS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'storage') - ->label('sdk.method', 'getUsage') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USAGE_STORAGE) + ->label('sdk', new Method( + namespace: 'storage', + name: 'getUsage', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USAGE_STORAGE, + ) + ] + )) ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true) ->inject('response') ->inject('dbForProject') @@ -1771,12 +1857,18 @@ App::get('/v1/storage/:bucketId/usage') ->groups(['api', 'storage']) ->label('scope', 'files.read') ->label('resourceType', RESOURCE_TYPE_BUCKETS) - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'storage') - ->label('sdk.method', 'getBucketUsage') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USAGE_BUCKETS) + ->label('sdk', new Method( + namespace: 'storage', + name: 'getBucketUsage', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USAGE_BUCKETS, + ) + ] + )) ->param('bucketId', '', new UID(), 'Bucket ID.') ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true) ->inject('response') @@ -1850,4 +1942,4 @@ App::get('/v1/storage/:bucketId/usage') 'files' => $usage[$metrics[0]]['data'], 'storage' => $usage[$metrics[1]]['data'], ]), Response::MODEL_USAGE_BUCKETS); - }); + }); \ No newline at end of file diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 461e90da58..612df0d439 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -12,6 +12,10 @@ use Appwrite\Event\Usage; use Appwrite\Extend\Exception; use Appwrite\Network\Validator\Email; use Appwrite\Platform\Workers\Deletes; +use Appwrite\SDK\AuthType; +use Appwrite\SDK\ContentType; +use Appwrite\SDK\Method; +use Appwrite\SDK\Response as SDKResponse; use Appwrite\Template\Template; use Appwrite\Utopia\Database\Validator\CustomId; use Appwrite\Utopia\Database\Validator\Queries\Memberships; @@ -56,13 +60,18 @@ App::post('/v1/teams') ->label('scope', 'teams.write') ->label('audits.event', 'team.create') ->label('audits.resource', 'team/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'teams') - ->label('sdk.method', 'create') - ->label('sdk.description', '/docs/references/teams/create-team.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TEAM) + ->label('sdk', new Method( + namespace: 'teams', + name: 'create', + description: '/docs/references/teams/create-team.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_TEAM, + ) + ] + )) ->param('teamId', '', new CustomId(), 'Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', null, new Text(128), 'Team name. Max length: 128 chars.') ->param('roles', ['owner'], new ArrayList(new Key(), APP_LIMIT_ARRAY_PARAMS_SIZE), '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](https://appwrite.io/docs/permissions). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' roles are allowed, each 32 characters long.', true) @@ -141,14 +150,18 @@ App::get('/v1/teams') ->desc('List teams') ->groups(['api', 'teams']) ->label('scope', 'teams.read') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'teams') - ->label('sdk.method', 'list') - ->label('sdk.description', '/docs/references/teams/list-teams.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TEAM_LIST) - ->label('sdk.offline.model', '/teams') + ->label('sdk', new Method( + namespace: 'teams', + name: 'list', + description: '/docs/references/teams/list-teams.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_TEAM_LIST, + ) + ] + )) ->param('queries', [], new Teams(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Teams::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') @@ -205,15 +218,18 @@ App::get('/v1/teams/:teamId') ->desc('Get team') ->groups(['api', 'teams']) ->label('scope', 'teams.read') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'teams') - ->label('sdk.method', 'get') - ->label('sdk.description', '/docs/references/teams/get-team.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TEAM) - ->label('sdk.offline.model', '/teams') - ->label('sdk.offline.key', '{teamId}') + ->label('sdk', new Method( + namespace: 'teams', + name: 'get', + description: '/docs/references/teams/get-team.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_TEAM, + ) + ] + )) ->param('teamId', '', new UID(), 'Team ID.') ->inject('response') ->inject('dbForProject') @@ -232,14 +248,18 @@ App::get('/v1/teams/:teamId/prefs') ->desc('Get team preferences') ->groups(['api', 'teams']) ->label('scope', 'teams.read') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'teams') - ->label('sdk.method', 'getPrefs') - ->label('sdk.description', '/docs/references/teams/get-team-prefs.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PREFERENCES) - ->label('sdk.offline.model', '/teams/{teamId}/prefs') + ->label('sdk', new Method( + namespace: 'teams', + name: 'getPrefs', + description: '/docs/references/teams/get-team-prefs.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PREFERENCES, + ) + ] + )) ->param('teamId', '', new UID(), 'Team ID.') ->inject('response') ->inject('dbForProject') @@ -263,15 +283,18 @@ App::put('/v1/teams/:teamId') ->label('scope', 'teams.write') ->label('audits.event', 'team.update') ->label('audits.resource', 'team/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'teams') - ->label('sdk.method', 'updateName') - ->label('sdk.description', '/docs/references/teams/update-team-name.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TEAM) - ->label('sdk.offline.model', '/teams') - ->label('sdk.offline.key', '{teamId}') + ->label('sdk', new Method( + namespace: 'teams', + name: 'updateName', + description: '/docs/references/teams/update-team-name.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_TEAM, + ) + ] + )) ->param('teamId', '', new UID(), 'Team ID.') ->param('name', null, new Text(128), 'New team name. Max length: 128 chars.') ->inject('requestTimestamp') @@ -307,14 +330,18 @@ App::put('/v1/teams/:teamId/prefs') ->label('audits.event', 'team.update') ->label('audits.resource', 'team/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'teams') - ->label('sdk.method', 'updatePrefs') - ->label('sdk.description', '/docs/references/teams/update-team-prefs.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PREFERENCES) - ->label('sdk.offline.model', '/teams/{teamId}/prefs') + ->label('sdk', new Method( + namespace: 'teams', + name: 'updatePrefs', + description: '/docs/references/teams/update-team-prefs.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PREFERENCES, + ) + ] + )) ->param('teamId', '', new UID(), 'Team ID.') ->param('prefs', '', new Assoc(), 'Prefs key-value JSON object.') ->inject('response') @@ -342,12 +369,19 @@ App::delete('/v1/teams/:teamId') ->label('scope', 'teams.write') ->label('audits.event', 'team.delete') ->label('audits.resource', 'team/{request.teamId}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'teams') - ->label('sdk.method', 'delete') - ->label('sdk.description', '/docs/references/teams/delete-team.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'teams', + name: 'delete', + description: '/docs/references/teams/delete-team.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('teamId', '', new UID(), 'Team ID.') ->inject('response') ->inject('getProjectDB') @@ -393,13 +427,18 @@ App::post('/v1/teams/:teamId/memberships') ->label('audits.event', 'membership.create') ->label('audits.resource', 'team/{request.teamId}') ->label('audits.userId', '{request.userId}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'teams') - ->label('sdk.method', 'createMembership') - ->label('sdk.description', '/docs/references/teams/create-team-membership.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MEMBERSHIP) + ->label('sdk', new Method( + namespace: 'teams', + name: 'createMembership', + description: '/docs/references/teams/create-team-membership.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_MEMBERSHIP, + ) + ] + )) ->label('abuse-limit', 10) ->param('teamId', '', new UID(), 'Team ID.') ->param('email', '', new Email(), 'Email of the new team member.', true) @@ -742,14 +781,18 @@ App::get('/v1/teams/:teamId/memberships') ->desc('List team memberships') ->groups(['api', 'teams']) ->label('scope', 'teams.read') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'teams') - ->label('sdk.method', 'listMemberships') - ->label('sdk.description', '/docs/references/teams/list-team-members.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) - ->label('sdk.offline.model', '/teams/{teamId}/memberships') + ->label('sdk', new Method( + namespace: 'teams', + name: 'listMemberships', + description: '/docs/references/teams/list-team-members.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MEMBERSHIP_LIST, + ) + ] + )) ->param('teamId', '', new UID(), 'Team ID.') ->param('queries', [], new Memberships(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Memberships::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) @@ -876,15 +919,18 @@ App::get('/v1/teams/:teamId/memberships/:membershipId') ->desc('Get team membership') ->groups(['api', 'teams']) ->label('scope', 'teams.read') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'teams') - ->label('sdk.method', 'getMembership') - ->label('sdk.description', '/docs/references/teams/get-team-member.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MEMBERSHIP) - ->label('sdk.offline.model', '/teams/{teamId}/memberships') - ->label('sdk.offline.key', '{membershipId}') + ->label('sdk', new Method( + namespace: 'teams', + name: 'getMembership', + description: '/docs/references/teams/get-team-member.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MEMBERSHIP, + ) + ] + )) ->param('teamId', '', new UID(), 'Team ID.') ->param('membershipId', '', new UID(), 'Membership ID.') ->inject('response') @@ -959,13 +1005,18 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId') ->label('scope', 'teams.write') ->label('audits.event', 'membership.update') ->label('audits.resource', 'team/{request.teamId}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'teams') - ->label('sdk.method', 'updateMembership') - ->label('sdk.description', '/docs/references/teams/update-team-membership.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MEMBERSHIP) + ->label('sdk', new Method( + namespace: 'teams', + name: 'updateMembership', + description: '/docs/references/teams/update-team-membership.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MEMBERSHIP, + ) + ] + )) ->param('teamId', '', new UID(), 'Team ID.') ->param('membershipId', '', new UID(), 'Membership ID.') ->param('roles', [], function (Document $project) { @@ -1042,13 +1093,18 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId/status') ->label('audits.event', 'membership.update') ->label('audits.resource', 'team/{request.teamId}') ->label('audits.userId', '{request.userId}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'teams') - ->label('sdk.method', 'updateMembershipStatus') - ->label('sdk.description', '/docs/references/teams/update-team-membership-status.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MEMBERSHIP) + ->label('sdk', new Method( + namespace: 'teams', + name: 'updateMembershipStatus', + description: '/docs/references/teams/update-team-membership-status.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MEMBERSHIP, + ) + ] + )) ->param('teamId', '', new UID(), 'Team ID.') ->param('membershipId', '', new UID(), 'Membership ID.') ->param('userId', '', new UID(), 'User ID.') @@ -1194,12 +1250,19 @@ App::delete('/v1/teams/:teamId/memberships/:membershipId') ->label('scope', 'teams.write') ->label('audits.event', 'membership.delete') ->label('audits.resource', 'team/{request.teamId}') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'teams') - ->label('sdk.method', 'deleteMembership') - ->label('sdk.description', '/docs/references/teams/delete-team-membership.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'teams', + name: 'deleteMembership', + description: '/docs/references/teams/delete-team-membership.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('teamId', '', new UID(), 'Team ID.') ->param('membershipId', '', new UID(), 'Membership ID.') ->inject('response') @@ -1257,13 +1320,18 @@ 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) + ->label('sdk', new Method( + namespace: 'teams', + name: 'listLogs', + description: '/docs/references/teams/get-team-logs.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_LOG_LIST, + ) + ] + )) ->param('teamId', '', new UID(), 'Team ID.') ->param('queries', [], new Queries([new Limit(), new Offset()]), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset', true) ->inject('response') @@ -1340,4 +1408,4 @@ App::get('/v1/teams/:teamId/logs') 'total' => $audit->countLogsByResource($resource), 'logs' => $output, ]), Response::MODEL_LOG_LIST); - }); + }); \ No newline at end of file diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 9fe7f433c9..9c3026793b 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -15,6 +15,10 @@ use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Hooks\Hooks; use Appwrite\Network\Validator\Email; +use Appwrite\SDK\AuthType; +use Appwrite\SDK\ContentType; +use Appwrite\SDK\Method; +use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\CustomId; use Appwrite\Utopia\Database\Validator\Queries\Identities; use Appwrite\Utopia\Database\Validator\Queries\Targets; @@ -185,13 +189,18 @@ App::post('/v1/users') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'create') - ->label('sdk.description', '/docs/references/users/create-user.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) + ->label('sdk', new Method( + namespace: 'users', + name: 'create', + description: '/docs/references/users/create-user.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_USER, + ) + ] + )) ->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('email', null, new Email(), 'User email.', true) ->param('phone', null, new Phone(), 'Phone number. Format this number with a leading \'+\' and a country code, e.g., +16175551212.', true) @@ -214,13 +223,18 @@ App::post('/v1/users/bcrypt') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'createBcryptUser') - ->label('sdk.description', '/docs/references/users/create-bcrypt-user.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) + ->label('sdk', new Method( + namespace: 'users', + name: 'createBcryptUser', + description: '/docs/references/users/create-bcrypt-user.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_USER, + ) + ] + )) ->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('email', '', new Email(), 'User email.') ->param('password', '', new Password(), 'User password hashed using Bcrypt.') @@ -243,13 +257,18 @@ App::post('/v1/users/md5') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'createMD5User') - ->label('sdk.description', '/docs/references/users/create-md5-user.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) + ->label('sdk', new Method( + namespace: 'users', + name: 'createMD5User', + description: '/docs/references/users/create-md5-user.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_USER, + ) + ] + )) ->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('email', '', new Email(), 'User email.') ->param('password', '', new Password(), 'User password hashed using MD5.') @@ -272,13 +291,18 @@ App::post('/v1/users/argon2') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'createArgon2User') - ->label('sdk.description', '/docs/references/users/create-argon2-user.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) + ->label('sdk', new Method( + namespace: 'users', + name: 'createArgon2User', + description: '/docs/references/users/create-argon2-user.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_USER, + ) + ] + )) ->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('email', '', new Email(), 'User email.') ->param('password', '', new Password(), 'User password hashed using Argon2.') @@ -301,13 +325,18 @@ App::post('/v1/users/sha') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'createSHAUser') - ->label('sdk.description', '/docs/references/users/create-sha-user.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) + ->label('sdk', new Method( + namespace: 'users', + name: 'createSHAUser', + description: '/docs/references/users/create-sha-user.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_USER, + ) + ] + )) ->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('email', '', new Email(), 'User email.') ->param('password', '', new Password(), 'User password hashed using SHA.') @@ -337,13 +366,18 @@ App::post('/v1/users/phpass') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'createPHPassUser') - ->label('sdk.description', '/docs/references/users/create-phpass-user.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) + ->label('sdk', new Method( + namespace: 'users', + name: 'createPHPassUser', + description: '/docs/references/users/create-phpass-user.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_USER, + ) + ] + )) ->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or pass the string `ID.unique()`to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('email', '', new Email(), 'User email.') ->param('password', '', new Password(), 'User password hashed using PHPass.') @@ -366,13 +400,18 @@ App::post('/v1/users/scrypt') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'createScryptUser') - ->label('sdk.description', '/docs/references/users/create-scrypt-user.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) + ->label('sdk', new Method( + namespace: 'users', + name: 'createScryptUser', + description: '/docs/references/users/create-scrypt-user.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_USER, + ) + ] + )) ->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('email', '', new Email(), 'User email.') ->param('password', '', new Password(), 'User password hashed using Scrypt.') @@ -408,13 +447,18 @@ App::post('/v1/users/scrypt-modified') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'createScryptModifiedUser') - ->label('sdk.description', '/docs/references/users/create-scrypt-modified-user.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) + ->label('sdk', new Method( + namespace: 'users', + name: 'createScryptModifiedUser', + description: '/docs/references/users/create-scrypt-modified-user.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_USER, + ) + ] + )) ->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('email', '', new Email(), 'User email.') ->param('password', '', new Password(), 'User password hashed using Scrypt Modified.') @@ -441,13 +485,18 @@ App::post('/v1/users/:userId/targets') ->label('audits.resource', 'target/response.$id') ->label('event', 'users.[userId].targets.[targetId].create') ->label('scope', 'targets.write') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'createTarget') - ->label('sdk.description', '/docs/references/users/create-target.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TARGET) + ->label('sdk', new Method( + namespace: 'users', + name: 'createTarget', + description: '/docs/references/users/create-target.md', + auth: [AuthType::KEY, AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_TARGET, + ) + ] + )) ->param('targetId', '', new CustomId(), 'Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('userId', '', new UID(), 'User ID.') ->param('providerType', '', new WhiteList([MESSAGE_TYPE_EMAIL, MESSAGE_TYPE_SMS, MESSAGE_TYPE_PUSH]), 'The target provider type. Can be one of the following: `email`, `sms` or `push`.') @@ -527,13 +576,18 @@ App::get('/v1/users') ->desc('List users') ->groups(['api', 'users']) ->label('scope', 'users.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'list') - ->label('sdk.description', '/docs/references/users/list-users.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER_LIST) + ->label('sdk', new Method( + namespace: 'users', + name: 'list', + description: '/docs/references/users/list-users.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER_LIST, + ) + ] + )) ->param('queries', [], new Users(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Users::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') @@ -587,13 +641,18 @@ App::get('/v1/users/:userId') ->desc('Get user') ->groups(['api', 'users']) ->label('scope', 'users.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'get') - ->label('sdk.description', '/docs/references/users/get-user.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) + ->label('sdk', new Method( + namespace: 'users', + name: 'get', + description: '/docs/references/users/get-user.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->inject('response') ->inject('dbForProject') @@ -612,13 +671,18 @@ App::get('/v1/users/:userId/prefs') ->desc('Get user preferences') ->groups(['api', 'users']) ->label('scope', 'users.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'getPrefs') - ->label('sdk.description', '/docs/references/users/get-user-prefs.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PREFERENCES) + ->label('sdk', new Method( + namespace: 'users', + name: 'getPrefs', + description: '/docs/references/users/get-user-prefs.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PREFERENCES, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->inject('response') ->inject('dbForProject') @@ -639,13 +703,18 @@ App::get('/v1/users/:userId/targets/:targetId') ->desc('Get user target') ->groups(['api', 'users']) ->label('scope', 'targets.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'getTarget') - ->label('sdk.description', '/docs/references/users/get-user-target.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TARGET) + ->label('sdk', new Method( + namespace: 'users', + name: 'getTarget', + description: '/docs/references/users/get-user-target.md', + auth: [AuthType::KEY, AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_TARGET, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->param('targetId', '', new UID(), 'Target ID.') ->inject('response') @@ -671,13 +740,18 @@ App::get('/v1/users/:userId/sessions') ->desc('List user sessions') ->groups(['api', 'users']) ->label('scope', 'users.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'listSessions') - ->label('sdk.description', '/docs/references/users/list-user-sessions.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_SESSION_LIST) + ->label('sdk', new Method( + namespace: 'users', + name: 'listSessions', + description: '/docs/references/users/list-user-sessions.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_SESSION_LIST, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->inject('response') ->inject('dbForProject') @@ -712,13 +786,18 @@ App::get('/v1/users/:userId/memberships') ->desc('List user memberships') ->groups(['api', 'users']) ->label('scope', 'users.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'listMemberships') - ->label('sdk.description', '/docs/references/users/list-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) + ->label('sdk', new Method( + namespace: 'users', + name: 'listMemberships', + description: '/docs/references/users/list-user-memberships.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MEMBERSHIP_LIST, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->inject('response') ->inject('dbForProject') @@ -751,13 +830,18 @@ App::get('/v1/users/:userId/logs') ->desc('List user logs') ->groups(['api', 'users']) ->label('scope', 'users.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'listLogs') - ->label('sdk.description', '/docs/references/users/list-user-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) + ->label('sdk', new Method( + namespace: 'users', + name: 'listLogs', + description: '/docs/references/users/list-user-logs.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_LOG_LIST, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->param('queries', [], new Queries([new Limit(), new Offset()]), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset', true) ->inject('response') @@ -840,13 +924,18 @@ App::get('/v1/users/:userId/targets') ->desc('List user targets') ->groups(['api', 'users']) ->label('scope', 'targets.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'listTargets') - ->label('sdk.description', '/docs/references/users/list-user-targets.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TARGET_LIST) + ->label('sdk', new Method( + namespace: 'users', + name: 'listTargets', + description: '/docs/references/users/list-user-targets.md', + auth: [AuthType::KEY, AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_TARGET_LIST, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->param('queries', [], new Targets(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Users::ALLOWED_ATTRIBUTES), true) ->inject('response') @@ -900,13 +989,18 @@ App::get('/v1/users/identities') ->desc('List identities') ->groups(['api', 'users']) ->label('scope', 'users.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'listIdentities') - ->label('sdk.description', '/docs/references/users/list-identities.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_IDENTITY_LIST) + ->label('sdk', new Method( + namespace: 'users', + name: 'listIdentities', + description: '/docs/references/users/list-identities.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_IDENTITY_LIST, + ) + ] + )) ->param('queries', [], new Identities(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Identities::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') @@ -964,13 +1058,18 @@ App::patch('/v1/users/:userId/status') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'updateStatus') - ->label('sdk.description', '/docs/references/users/update-user-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) + ->label('sdk', new Method( + namespace: 'users', + name: 'updateStatus', + description: '/docs/references/users/update-user-status.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->param('status', null, new Boolean(true), 'User Status. To activate the user pass `true` and to block the user pass `false`.') ->inject('response') @@ -999,13 +1098,18 @@ App::put('/v1/users/:userId/labels') ->label('scope', 'users.write') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'updateLabels') - ->label('sdk.description', '/docs/references/users/update-user-labels.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) + ->label('sdk', new Method( + namespace: 'users', + name: 'updateLabels', + description: '/docs/references/users/update-user-labels.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->param('labels', [], new ArrayList(new Text(36, allowList: [...Text::NUMBERS, ...Text::ALPHABET_UPPER, ...Text::ALPHABET_LOWER]), APP_LIMIT_ARRAY_LABELS_SIZE), 'Array of user labels. Replaces the previous labels. Maximum of ' . APP_LIMIT_ARRAY_LABELS_SIZE . ' labels are allowed, each up to 36 alphanumeric characters long.') ->inject('response') @@ -1036,13 +1140,18 @@ App::patch('/v1/users/:userId/verification/phone') ->label('scope', 'users.write') ->label('audits.event', 'verification.update') ->label('audits.resource', 'user/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'updatePhoneVerification') - ->label('sdk.description', '/docs/references/users/update-user-phone-verification.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) + ->label('sdk', new Method( + namespace: 'users', + name: 'updatePhoneVerification', + description: '/docs/references/users/update-user-phone-verification.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->param('phoneVerification', false, new Boolean(), 'User phone verification status.') ->inject('response') @@ -1072,13 +1181,18 @@ App::patch('/v1/users/:userId/name') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'updateName') - ->label('sdk.description', '/docs/references/users/update-user-name.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) + ->label('sdk', new Method( + namespace: 'users', + name: 'updateName', + description: '/docs/references/users/update-user-name.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->param('name', '', new Text(128, 0), 'User name. Max length: 128 chars.') ->inject('response') @@ -1109,13 +1223,18 @@ App::patch('/v1/users/:userId/password') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'updatePassword') - ->label('sdk.description', '/docs/references/users/update-user-password.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) + ->label('sdk', new Method( + namespace: 'users', + name: 'updatePassword', + description: '/docs/references/users/update-user-password.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->param('password', '', fn ($project, $passwordsDictionary) => new PasswordDictionary($passwordsDictionary, enabled: $project->getAttribute('auths', [])['passwordDictionary'] ?? false, allowEmpty: true), 'New user password. Must be at least 8 chars.', false, ['project', 'passwordsDictionary']) ->inject('response') @@ -1186,13 +1305,18 @@ App::patch('/v1/users/:userId/email') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'updateEmail') - ->label('sdk.description', '/docs/references/users/update-user-email.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) + ->label('sdk', new Method( + namespace: 'users', + name: 'updateEmail', + description: '/docs/references/users/update-user-email.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->param('email', '', new Email(allowEmpty: true), 'User email.') ->inject('response') @@ -1280,13 +1404,18 @@ App::patch('/v1/users/:userId/phone') ->label('scope', 'users.write') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'updatePhone') - ->label('sdk.description', '/docs/references/users/update-user-phone.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) + ->label('sdk', new Method( + namespace: 'users', + name: 'updatePhone', + description: '/docs/references/users/update-user-phone.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->param('number', '', new Phone(allowEmpty: true), 'User phone number.') ->inject('response') @@ -1364,13 +1493,18 @@ App::patch('/v1/users/:userId/verification') ->label('audits.event', 'verification.update') ->label('audits.resource', 'user/{request.userId}') ->label('audits.userId', '{request.userId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'updateEmailVerification') - ->label('sdk.description', '/docs/references/users/update-user-email-verification.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) + ->label('sdk', new Method( + namespace: 'users', + name: 'updateEmailVerification', + description: '/docs/references/users/update-user-email-verification.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->param('emailVerification', false, new Boolean(), 'User email verification status.') ->inject('response') @@ -1396,13 +1530,18 @@ App::patch('/v1/users/:userId/prefs') ->groups(['api', 'users']) ->label('event', 'users.[userId].update.prefs') ->label('scope', 'users.write') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'updatePrefs') - ->label('sdk.description', '/docs/references/users/update-user-prefs.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PREFERENCES) + ->label('sdk', new Method( + namespace: 'users', + name: 'updatePrefs', + description: '/docs/references/users/update-user-prefs.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PREFERENCES, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->param('prefs', '', new Assoc(), 'Prefs key-value JSON object.') ->inject('response') @@ -1431,13 +1570,18 @@ App::patch('/v1/users/:userId/targets/:targetId') ->label('audits.resource', 'target/{response.$id}') ->label('event', 'users.[userId].targets.[targetId].update') ->label('scope', 'targets.write') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'updateTarget') - ->label('sdk.description', '/docs/references/users/update-target.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TARGET) + ->label('sdk', new Method( + namespace: 'users', + name: 'updateTarget', + description: '/docs/references/users/update-target.md', + auth: [AuthType::KEY, AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_TARGET, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->param('targetId', '', new UID(), 'Target ID.') ->param('identifier', '', new Text(Database::LENGTH_KEY), 'The target identifier (token, email, phone etc.)', true) @@ -1530,13 +1674,18 @@ App::patch('/v1/users/:userId/mfa') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') ->label('usage.metric', 'users.{scope}.requests.update') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'updateMfa') - ->label('sdk.description', '/docs/references/users/update-user-mfa.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) + ->label('sdk', new Method( + namespace: 'users', + name: 'updateMfa', + description: '/docs/references/users/update-user-mfa.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->param('mfa', null, new Boolean(), 'Enable or disable MFA.') ->inject('response') @@ -1564,13 +1713,18 @@ App::get('/v1/users/:userId/mfa/factors') ->groups(['api', 'users']) ->label('scope', 'users.read') ->label('usage.metric', 'users.{scope}.requests.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'listMfaFactors') - ->label('sdk.description', '/docs/references/users/list-mfa-factors.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MFA_FACTORS) + ->label('sdk', new Method( + namespace: 'users', + name: 'listMfaFactors', + description: '/docs/references/users/list-mfa-factors.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MFA_FACTORS, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->inject('response') ->inject('dbForProject') @@ -1597,13 +1751,18 @@ App::get('/v1/users/:userId/mfa/recovery-codes') ->groups(['api', 'users']) ->label('scope', 'users.read') ->label('usage.metric', 'users.{scope}.requests.read') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'getMfaRecoveryCodes') - ->label('sdk.description', '/docs/references/users/get-mfa-recovery-codes.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MFA_RECOVERY_CODES) + ->label('sdk', new Method( + namespace: 'users', + name: 'getMfaRecoveryCodes', + description: '/docs/references/users/get-mfa-recovery-codes.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MFA_RECOVERY_CODES, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->inject('response') ->inject('dbForProject') @@ -1636,13 +1795,18 @@ App::patch('/v1/users/:userId/mfa/recovery-codes') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') ->label('usage.metric', 'users.{scope}.requests.update') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'createMfaRecoveryCodes') - ->label('sdk.description', '/docs/references/users/create-mfa-recovery-codes.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MFA_RECOVERY_CODES) + ->label('sdk', new Method( + namespace: 'users', + name: 'createMfaRecoveryCodes', + description: '/docs/references/users/create-mfa-recovery-codes.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_MFA_RECOVERY_CODES, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->inject('response') ->inject('dbForProject') @@ -1682,13 +1846,18 @@ App::put('/v1/users/:userId/mfa/recovery-codes') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') ->label('usage.metric', 'users.{scope}.requests.update') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'updateMfaRecoveryCodes') - ->label('sdk.description', '/docs/references/users/update-mfa-recovery-codes.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_MFA_RECOVERY_CODES) + ->label('sdk', new Method( + namespace: 'users', + name: 'updateMfaRecoveryCodes', + description: '/docs/references/users/update-mfa-recovery-codes.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_MFA_RECOVERY_CODES, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->inject('response') ->inject('dbForProject') @@ -1727,13 +1896,19 @@ App::delete('/v1/users/:userId/mfa/authenticators/:type') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') ->label('usage.metric', 'users.{scope}.requests.update') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'deleteMfaAuthenticator') - ->label('sdk.description', '/docs/references/users/delete-mfa-authenticator.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USER) + ->label('sdk', new Method( + namespace: 'users', + name: 'deleteMfaAuthenticator', + description: '/docs/references/users/delete-mfa-authenticator.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('userId', '', new UID(), 'User ID.') ->param('type', null, new WhiteList([Type::TOTP]), 'Type of authenticator.') ->inject('response') @@ -1768,13 +1943,18 @@ App::post('/v1/users/:userId/sessions') ->label('audits.event', 'session.create') ->label('audits.resource', 'user/{request.userId}') ->label('usage.metric', 'sessions.{scope}.requests.create') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'createSession') - ->label('sdk.description', '/docs/references/users/create-session.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_SESSION) + ->label('sdk', new Method( + namespace: 'users', + name: 'createSession', + description: '/docs/references/users/create-session.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_SESSION, + ) + ] + )) ->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->inject('request') ->inject('response') @@ -1847,13 +2027,18 @@ App::post('/v1/users/:userId/tokens') ->label('scope', 'users.write') ->label('audits.event', 'tokens.create') ->label('audits.resource', 'user/{request.userId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'createToken') - ->label('sdk.description', '/docs/references/users/create-token.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_TOKEN) + ->label('sdk', new Method( + namespace: 'users', + name: 'createToken', + description: '/docs/references/users/create-token.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_TOKEN, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->param('length', 6, new Range(4, 128), 'Token length in characters. The default length is 6 characters', true) ->param('expire', Auth::TOKEN_EXPIRATION_GENERIC, new Range(60, Auth::TOKEN_EXPIRATION_LOGIN_LONG), 'Token expiration period in seconds. The default expiration is 15 minutes.', true) @@ -1904,12 +2089,19 @@ App::delete('/v1/users/:userId/sessions/:sessionId') ->label('scope', 'users.write') ->label('audits.event', 'session.delete') ->label('audits.resource', 'user/{request.userId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'deleteSession') - ->label('sdk.description', '/docs/references/users/delete-user-session.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'users', + name: 'deleteSession', + description: '/docs/references/users/delete-user-session.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('userId', '', new UID(), 'User ID.') ->param('sessionId', '', new UID(), 'Session ID.') ->inject('response') @@ -1947,12 +2139,19 @@ App::delete('/v1/users/:userId/sessions') ->label('scope', 'users.write') ->label('audits.event', 'session.delete') ->label('audits.resource', 'user/{user.$id}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'deleteSessions') - ->label('sdk.description', '/docs/references/users/delete-user-sessions.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'users', + name: 'deleteSessions', + description: '/docs/references/users/delete-user-sessions.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('userId', '', new UID(), 'User ID.') ->inject('response') ->inject('dbForProject') @@ -1989,12 +2188,19 @@ App::delete('/v1/users/:userId') ->label('scope', 'users.write') ->label('audits.event', 'user.delete') ->label('audits.resource', 'user/{request.userId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'delete') - ->label('sdk.description', '/docs/references/users/delete.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'users', + name: 'delete', + description: '/docs/references/users/delete.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('userId', '', new UID(), 'User ID.') ->inject('response') ->inject('dbForProject') @@ -2031,13 +2237,19 @@ App::delete('/v1/users/:userId/targets/:targetId') ->label('audits.resource', 'target/{request.$targetId}') ->label('event', 'users.[userId].targets.[targetId].delete') ->label('scope', 'targets.write') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'deleteTarget') - ->label('sdk.description', '/docs/references/users/delete-target.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'users', + name: 'deleteTarget', + description: '/docs/references/users/delete-target.md', + auth: [AuthType::KEY, AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('userId', '', new UID(), 'User ID.') ->param('targetId', '', new UID(), 'Target ID.') ->inject('queueForEvents') @@ -2082,12 +2294,19 @@ App::delete('/v1/users/identities/:identityId') ->label('scope', 'users.write') ->label('audits.event', 'identity.delete') ->label('audits.resource', 'identity/{request.$identityId}') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'deleteIdentity') - ->label('sdk.description', '/docs/references/users/delete-identity.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'users', + name: 'deleteIdentity', + description: '/docs/references/users/delete-identity.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE, + )) ->param('identityId', '', new UID(), 'Identity ID.') ->inject('response') ->inject('dbForProject') @@ -2114,13 +2333,18 @@ App::post('/v1/users/:userId/jwts') ->desc('Create user JWT') ->groups(['api', 'users']) ->label('scope', 'users.write') - ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'createJWT') - ->label('sdk.description', '/docs/references/users/create-user-jwt.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_JWT) + ->label('sdk', new Method( + namespace: 'users', + name: 'createJWT', + description: '/docs/references/users/create-user-jwt.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_JWT, + ) + ] + )) ->param('userId', '', new UID(), 'User ID.') ->param('sessionId', '', new UID(), 'Session ID. Use the string \'recent\' to use the most recent session. Defaults to the most recent session.', true) ->param('duration', 900, new Range(0, 3600), 'Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.', true) @@ -2164,12 +2388,18 @@ App::get('/v1/users/usage') ->desc('Get users usage stats') ->groups(['api', 'users']) ->label('scope', 'users.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'users') - ->label('sdk.method', 'getUsage') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USAGE_USERS) + ->label('sdk', new Method( + namespace: 'users', + name: 'getUsage', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USAGE_USERS, + ) + ] + )) ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true) ->inject('response') ->inject('dbForProject') @@ -2235,4 +2465,4 @@ App::get('/v1/users/usage') 'users' => $usage[$metrics[0]]['data'], 'sessions' => $usage[$metrics[1]]['data'], ]), Response::MODEL_USAGE_USERS); - }); + }); \ No newline at end of file diff --git a/app/controllers/api/vcs.php b/app/controllers/api/vcs.php index f24a0d97fe..e64a2f895b 100644 --- a/app/controllers/api/vcs.php +++ b/app/controllers/api/vcs.php @@ -4,6 +4,11 @@ use Appwrite\Auth\OAuth2\Github as OAuth2Github; use Appwrite\Event\Build; use Appwrite\Event\Delete; use Appwrite\Extend\Exception; +use Appwrite\SDK\AuthType; +use Appwrite\SDK\ContentType; +use Appwrite\SDK\Method; +use Appwrite\SDK\MethodType; +use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Installations; use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; @@ -269,13 +274,21 @@ App::get('/v1/vcs/github/authorize') ->label('scope', 'vcs.read') ->label('sdk.namespace', 'vcs') ->label('error', __DIR__ . '/../../views/general/error.phtml') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.method', 'createGitHubInstallation') - ->label('sdk.description', '') - ->label('sdk.response.code', Response::STATUS_CODE_MOVED_PERMANENTLY) - ->label('sdk.response.type', Response::CONTENT_TYPE_HTML) - ->label('sdk.methodType', 'webAuth') - ->label('sdk.hide', true) + ->label('sdk', new Method( + namespace: 'vcs', + name: 'createGitHubInstallation', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_MOVED_PERMANENTLY, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::HTML, + type: MethodType::WEBAUTH, + hide: true, + )) ->param('success', '', fn ($clients) => new Host($clients), 'URL to redirect back to console after a successful installation attempt.', true, ['clients']) ->param('failure', '', fn ($clients) => new Host($clients), 'URL to redirect back to console after a failed installation attempt.', true, ['clients']) ->inject('request') @@ -442,13 +455,18 @@ App::get('/v1/vcs/github/installations/:installationId/providerRepositories/:pro ->desc('Get files and directories of a VCS repository') ->groups(['api', 'vcs']) ->label('scope', 'vcs.read') - ->label('sdk.namespace', 'vcs') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.method', 'getRepositoryContents') - ->label('sdk.description', '') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_VCS_CONTENT_LIST) + ->label('sdk', new Method( + namespace: 'vcs', + name: 'getRepositoryContents', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_VCS_CONTENT_LIST, + ) + ] + )) ->param('installationId', '', new Text(256), 'Installation Id') ->param('providerRepositoryId', '', new Text(256), 'Repository Id') ->param('providerRootDirectory', '', new Text(256, 0), 'Path to get contents of nested directory', true) @@ -503,13 +521,18 @@ App::post('/v1/vcs/github/installations/:installationId/providerRepositories/:pr ->desc('Detect runtime settings from source code') ->groups(['api', 'vcs']) ->label('scope', 'vcs.write') - ->label('sdk.namespace', 'vcs') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.method', 'createRepositoryDetection') - ->label('sdk.description', '') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_DETECTION) + ->label('sdk', new Method( + namespace: 'vcs', + name: 'createRepositoryDetection', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_DETECTION, + ) + ] + )) ->param('installationId', '', new Text(256), 'Installation Id') ->param('providerRepositoryId', '', new Text(256), 'Repository Id') ->param('providerRootDirectory', '', new Text(256, 0), 'Path to Root Directory', true) @@ -575,13 +598,18 @@ App::get('/v1/vcs/github/installations/:installationId/providerRepositories') ->desc('List repositories') ->groups(['api', 'vcs']) ->label('scope', 'vcs.read') - ->label('sdk.namespace', 'vcs') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.method', 'listRepositories') - ->label('sdk.description', '') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER_REPOSITORY_LIST) + ->label('sdk', new Method( + namespace: 'vcs', + name: 'listRepositories', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROVIDER_REPOSITORY_LIST, + ) + ] + )) ->param('installationId', '', new Text(256), 'Installation Id') ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('gitHub') @@ -670,13 +698,18 @@ App::post('/v1/vcs/github/installations/:installationId/providerRepositories') ->desc('Create repository') ->groups(['api', 'vcs']) ->label('scope', 'vcs.write') - ->label('sdk.namespace', 'vcs') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.method', 'createRepository') - ->label('sdk.description', '') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER_REPOSITORY) + ->label('sdk', new Method( + namespace: 'vcs', + name: 'createRepository', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROVIDER_REPOSITORY, + ) + ] + )) ->param('installationId', '', new Text(256), 'Installation Id') ->param('name', '', new Text(256), 'Repository name (slug)') ->param('private', '', new Boolean(false), 'Mark repository public or private') @@ -777,13 +810,18 @@ App::get('/v1/vcs/github/installations/:installationId/providerRepositories/:pro ->desc('Get repository') ->groups(['api', 'vcs']) ->label('scope', 'vcs.read') - ->label('sdk.namespace', 'vcs') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.method', 'getRepository') - ->label('sdk.description', '') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_PROVIDER_REPOSITORY) + ->label('sdk', new Method( + namespace: 'vcs', + name: 'getRepository', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROVIDER_REPOSITORY, + ) + ] + )) ->param('installationId', '', new Text(256), 'Installation Id') ->param('providerRepositoryId', '', new Text(256), 'Repository Id') ->inject('gitHub') @@ -826,13 +864,18 @@ App::get('/v1/vcs/github/installations/:installationId/providerRepositories/:pro ->desc('List repository branches') ->groups(['api', 'vcs']) ->label('scope', 'vcs.read') - ->label('sdk.namespace', 'vcs') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.method', 'listRepositoryBranches') - ->label('sdk.description', '') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_BRANCH_LIST) + ->label('sdk', new Method( + namespace: 'vcs', + name: 'listRepositoryBranches', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_BRANCH_LIST, + ) + ] + )) ->param('installationId', '', new Text(256), 'Installation Id') ->param('providerRepositoryId', '', new Text(256), 'Repository Id') ->inject('gitHub') @@ -1014,13 +1057,18 @@ App::get('/v1/vcs/installations') ->desc('List installations') ->groups(['api', 'vcs']) ->label('scope', 'vcs.read') - ->label('sdk.namespace', 'vcs') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.method', 'listInstallations') - ->label('sdk.description', '/docs/references/vcs/list-installations.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_INSTALLATION_LIST) + ->label('sdk', new Method( + namespace: 'vcs', + name: 'listInstallations', + description: '/docs/references/vcs/list-installations.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_INSTALLATION_LIST, + ) + ] + )) ->param('queries', [], new Installations(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Installations::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') @@ -1080,13 +1128,18 @@ App::get('/v1/vcs/installations/:installationId') ->desc('Get installation') ->groups(['api', 'vcs']) ->label('scope', 'vcs.read') - ->label('sdk.namespace', 'vcs') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.method', 'getInstallation') - ->label('sdk.description', '/docs/references/vcs/get-installation.md') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_INSTALLATION) + ->label('sdk', new Method( + namespace: 'vcs', + name: 'getInstallation', + description: '/docs/references/vcs/get-installation.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_INSTALLATION, + ) + ] + )) ->param('installationId', '', new Text(256), 'Installation Id') ->inject('response') ->inject('project') @@ -1109,12 +1162,19 @@ App::delete('/v1/vcs/installations/:installationId') ->desc('Delete installation') ->groups(['api', 'vcs']) ->label('scope', 'vcs.write') - ->label('sdk.namespace', 'vcs') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.method', 'deleteInstallation') - ->label('sdk.description', '/docs/references/vcs/delete-installation.md') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'vcs', + name: 'deleteInstallation', + description: '/docs/references/vcs/delete-installation.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) ->param('installationId', '', new Text(256), 'Installation Id') ->inject('response') ->inject('project') @@ -1142,12 +1202,18 @@ App::patch('/v1/vcs/github/installations/:installationId/repositories/:repositor ->desc('Authorize external deployment') ->groups(['api', 'vcs']) ->label('scope', 'vcs.write') - ->label('sdk.namespace', 'vcs') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.method', 'updateExternalDeployments') - ->label('sdk.description', '') - ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) - ->label('sdk.response.model', Response::MODEL_NONE) + ->label('sdk', new Method( + namespace: 'vcs', + name: 'updateExternalDeployments', + description: '', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ] + )) ->param('installationId', '', new Text(256), 'Installation Id') ->param('repositoryId', '', new Text(256), 'VCS Repository Id') ->param('providerPullRequestId', '', new Text(256), 'GitHub Pull Request Id') diff --git a/app/controllers/general.php b/app/controllers/general.php index 6f8566f69b..f6a584b69e 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -10,6 +10,10 @@ use Appwrite\Event\Func; use Appwrite\Event\Usage; use Appwrite\Extend\Exception as AppwriteException; use Appwrite\Network\Validator\Origin; +use Appwrite\SDK\AuthType; +use Appwrite\SDK\ContentType; +use Appwrite\SDK\Method; +use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Request; use Appwrite\Utopia\Request\Filters\V16 as RequestV16; use Appwrite\Utopia\Request\Filters\V17 as RequestV17; @@ -116,8 +120,29 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw $type = $route->getAttribute('resourceType'); if ($type === 'function') { - $utopia->getRoute()?->label('sdk.namespace', 'functions'); - $utopia->getRoute()?->label('sdk.method', 'createExecution'); + $method = $utopia->getRoute()?->getLabel('sdk', null); + + if (empty($method)) { + $utopia->getRoute()?->label('sdk', new Method( + namespace: 'functions', + name: 'createExecution', + description: '/docs/references/functions/create-execution.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_EXECUTION, + ) + ], + contentType: ContentType::MULTIPART, + requestType: 'application/json', + )); + } else { + /** @var Method $method */ + $method->setNamespace('functions'); + $method->setMethodName('createExecution'); + $utopia->getRoute()?->label('sdk', $method); + } if (System::getEnv('_APP_OPTIONS_FUNCTIONS_FORCE_HTTPS', 'disabled') === 'enabled') { // Force HTTPS if ($request->getProtocol() !== 'https') { @@ -1146,3 +1171,8 @@ App::wildcard() foreach (Config::getParam('services', []) as $service) { include_once $service['controller']; } + +// Check for any errors found while we were initialising the SDK Methods. +if (!empty(Method::getErrors())) { + throw new \Exception('Errors found during SDK initialization:' . PHP_EOL . implode(PHP_EOL, Method::getErrors())); +} \ No newline at end of file diff --git a/app/controllers/mock.php b/app/controllers/mock.php index afbb176b7e..16d8e03841 100644 --- a/app/controllers/mock.php +++ b/app/controllers/mock.php @@ -24,7 +24,7 @@ App::get('/v1/mock/tests/general/oauth2') ->groups(['mock']) ->label('scope', 'public') ->label('docs', false) - ->label('sdk.mock', true) + ->label('mock', true) ->param('client_id', '', new Text(100), 'OAuth2 Client ID.') ->param('redirect_uri', '', new Host(['localhost']), 'OAuth2 Redirect URI.') // Important to deny an open redirect attack ->param('scope', '', new Text(100), 'OAuth2 scope list.') @@ -40,7 +40,7 @@ App::get('/v1/mock/tests/general/oauth2/token') ->groups(['mock']) ->label('scope', 'public') ->label('docs', false) - ->label('sdk.mock', true) + ->label('mock', true) ->param('client_id', '', new Text(100), 'OAuth2 Client ID.') ->param('client_secret', '', new Text(100), 'OAuth2 scope list.') ->param('grant_type', 'authorization_code', new WhiteList(['refresh_token', 'authorization_code']), 'OAuth2 Grant Type.', true) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 182151a6c3..09e49d6100 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -363,11 +363,20 @@ App::init() } /** Do not allow access to disabled services */ - $service = $route->getLabel('sdk.namespace', ''); - if (!empty($service)) { + /** + * @var ?\Appwrite\SDK\Method $method + */ + $method = $route->getLabel('sdk', false); + + if (is_array($method)) { + $method = $method[0]; + } + + if (!empty($method)) { + $namespace = $method->getNamespace(); if ( - array_key_exists($service, $project->getAttribute('services', [])) - && !$project->getAttribute('services', [])[$service] + array_key_exists($namespace, $project->getAttribute('services', [])) + && !$project->getAttribute('services', [])[$namespace] && !(Auth::isPrivilegedUser(Authorization::getRoles()) || Auth::isAppUser(Authorization::getRoles())) ) { throw new Exception(Exception::GENERAL_SERVICE_DISABLED); diff --git a/composer.lock b/composer.lock index 68dbc191bf..980dcdcd29 100644 --- a/composer.lock +++ b/composer.lock @@ -1430,16 +1430,16 @@ }, { "name": "open-telemetry/gen-otlp-protobuf", - "version": "1.2.1", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/gen-otlp-protobuf.git", - "reference": "66c3b98e998a726691c92e6405a82e6e7b8b169d" + "reference": "585bafddd4ae6565de154610b10a787a455c9ba0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/gen-otlp-protobuf/zipball/66c3b98e998a726691c92e6405a82e6e7b8b169d", - "reference": "66c3b98e998a726691c92e6405a82e6e7b8b169d", + "url": "https://api.github.com/repos/opentelemetry-php/gen-otlp-protobuf/zipball/585bafddd4ae6565de154610b10a787a455c9ba0", + "reference": "585bafddd4ae6565de154610b10a787a455c9ba0", "shasum": "" }, "require": { @@ -1489,7 +1489,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2024-10-30T11:49:49+00:00" + "time": "2025-01-15T23:07:07+00:00" }, { "name": "open-telemetry/sdk", @@ -3379,16 +3379,16 @@ }, { "name": "utopia-php/compression", - "version": "0.1.2", + "version": "0.1.3", "source": { "type": "git", "url": "https://github.com/utopia-php/compression.git", - "reference": "6062f70596415f8d5de40a589367b0eb2a435f98" + "reference": "66f093557ba66d98245e562036182016c7dcfe8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/compression/zipball/6062f70596415f8d5de40a589367b0eb2a435f98", - "reference": "6062f70596415f8d5de40a589367b0eb2a435f98", + "url": "https://api.github.com/repos/utopia-php/compression/zipball/66f093557ba66d98245e562036182016c7dcfe8a", + "reference": "66f093557ba66d98245e562036182016c7dcfe8a", "shasum": "" }, "require": { @@ -3419,9 +3419,9 @@ ], "support": { "issues": "https://github.com/utopia-php/compression/issues", - "source": "https://github.com/utopia-php/compression/tree/0.1.2" + "source": "https://github.com/utopia-php/compression/tree/0.1.3" }, - "time": "2024-11-08T14:59:54+00:00" + "time": "2025-01-15T15:15:51+00:00" }, { "name": "utopia-php/config", @@ -3678,16 +3678,16 @@ }, { "name": "utopia-php/framework", - "version": "0.33.15", + "version": "0.33.16", "source": { "type": "git", "url": "https://github.com/utopia-php/http.git", - "reference": "83b0628900c2c53e8c3efbf069f3e13050295edc" + "reference": "e91d4c560d1b809e25faa63d564fef034363b50f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/http/zipball/83b0628900c2c53e8c3efbf069f3e13050295edc", - "reference": "83b0628900c2c53e8c3efbf069f3e13050295edc", + "url": "https://api.github.com/repos/utopia-php/http/zipball/e91d4c560d1b809e25faa63d564fef034363b50f", + "reference": "e91d4c560d1b809e25faa63d564fef034363b50f", "shasum": "" }, "require": { @@ -3719,9 +3719,9 @@ ], "support": { "issues": "https://github.com/utopia-php/http/issues", - "source": "https://github.com/utopia-php/http/tree/0.33.15" + "source": "https://github.com/utopia-php/http/tree/0.33.16" }, - "time": "2024-12-10T13:07:04+00:00" + "time": "2025-01-16T15:58:50+00:00" }, { "name": "utopia-php/image", diff --git a/src/Appwrite/GraphQL/Schema.php b/src/Appwrite/GraphQL/Schema.php index 833ea9d032..5709310a6a 100644 --- a/src/Appwrite/GraphQL/Schema.php +++ b/src/Appwrite/GraphQL/Schema.php @@ -98,27 +98,36 @@ class Schema foreach ($routes as $route) { /** @var Route $route */ - $namespace = $route->getLabel('sdk.namespace', ''); - $method = $route->getLabel('sdk.method', ''); - $name = $namespace . \ucfirst($method); + /** @var \Appwrite\SDK\Method $sdk */ + $sdk = $route->getLabel('sdk', false); - if (empty($name)) { + if (empty($sdk)) { continue; } - foreach (Mapper::route($utopia, $route, $complexity) as $field) { - switch ($route->getMethod()) { - case 'GET': - $queries[$name] = $field; - break; - case 'POST': - case 'PUT': - case 'PATCH': - case 'DELETE': - $mutations[$name] = $field; - break; - default: - throw new \Exception("Unsupported method: {$route->getMethod()}"); + if (!\is_array($sdk)) { + $sdk = [$sdk]; + } + + foreach ($sdk as $method) { + $namespace = $method->getNamespace(); + $methodName = $method->getMethodName(); + $name = $namespace . \ucfirst($methodName); + + foreach (Mapper::route($utopia, $route, $method, $complexity) as $field) { + switch ($route->getMethod()) { + case 'GET': + $queries[$name] = $field; + break; + case 'POST': + case 'PUT': + case 'PATCH': + case 'DELETE': + $mutations[$name] = $field; + break; + default: + throw new \Exception("Unsupported method: {$route->getMethod()}"); + } } } } @@ -266,4 +275,4 @@ class Schema { self::$dirty[$projectId] = true; } -} +} \ No newline at end of file diff --git a/src/Appwrite/GraphQL/Types/Mapper.php b/src/Appwrite/GraphQL/Types/Mapper.php index d8f1d7da09..deae9b5270 100644 --- a/src/Appwrite/GraphQL/Types/Mapper.php +++ b/src/Appwrite/GraphQL/Types/Mapper.php @@ -4,6 +4,7 @@ namespace Appwrite\GraphQL\Types; use Appwrite\GraphQL\Resolvers; use Appwrite\GraphQL\Types; +use Appwrite\SDK\Method; use Exception; use GraphQL\Type\Definition\ObjectType; use GraphQL\Type\Definition\Type; @@ -78,6 +79,7 @@ class Mapper public static function route( App $utopia, Route $route, + Method $method, callable $complexity ): iterable { foreach (self::$blacklist as $blacklist) { @@ -86,10 +88,27 @@ class Mapper } } - $names = $route->getLabel('sdk.response.model', 'none'); - $models = \is_array($names) - ? \array_map(static fn ($m) => static::$models[$m], $names) - : [static::$models[$names]]; + $responses = $method->getResponses() ?? []; + + // If responses is an array, map each response to its model + if (\is_array($responses)) { + $models = []; + foreach ($responses as $response) { + $modelName = $response->getModel(); + + if (\is_array($modelName)) { + foreach ($modelName as $name) { + $models[] = static::$models[$name]; + } + } else { + $models[] = static::$models[$modelName]; + } + } + } else { + // If single response, get its model and wrap in array + $modelName = $responses->getModel(); + $models = [static::$models[$modelName]]; + } foreach ($models as $model) { $type = Mapper::model(\ucfirst($model->getType())); @@ -98,13 +117,25 @@ class Mapper $list = false; foreach ($route->getParams() as $name => $parameter) { + $methodParameters = $method->getParameters(); + + if (!empty($methodParameters)) { + if (!array_key_exists($name, $methodParameters)) { + continue; + } + $optional = $methodParameters[$name]['optional']; + } else { + $optional = $parameter['optional']; + } + if ($name === 'queries') { $list = true; } + $parameterType = Mapper::param( $utopia, $parameter['validator'], - !$parameter['optional'], + !$optional, $parameter['injections'] ); $params[$name] = [ @@ -442,4 +473,4 @@ class Mapper throw new Exception('Unknown hash options implementation'); } -} +} \ No newline at end of file diff --git a/src/Appwrite/Platform/Tasks/Specs.php b/src/Appwrite/Platform/Tasks/Specs.php index 0f1332d821..bfc47cb69b 100644 --- a/src/Appwrite/Platform/Tasks/Specs.php +++ b/src/Appwrite/Platform/Tasks/Specs.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Tasks; +use Appwrite\SDK\AuthType; use Appwrite\Specification\Format\OpenAPI3; use Appwrite\Specification\Format\Swagger2; use Appwrite\Specification\Specification; @@ -182,56 +183,69 @@ class Specs extends Action foreach ($appRoutes as $key => $method) { foreach ($method as $route) { - $hide = $route->getLabel('sdk.hide', false); - if ($hide === true || (\is_array($hide) && \in_array($platform, $hide))) { + $sdks = $route->getLabel('sdk', false); + + if (empty($sdks)) { continue; } - /** @var \Utopia\Route $route */ - $routeSecurity = $route->getLabel('sdk.auth', []); - $sdkPlatforms = []; + if (!\is_array($sdks)) { + $sdks = [$sdks]; + } - foreach ($routeSecurity as $value) { - switch ($value) { - case APP_AUTH_TYPE_SESSION: - $sdkPlatforms[] = APP_PLATFORM_CLIENT; - break; - case APP_AUTH_TYPE_JWT: - case APP_AUTH_TYPE_KEY: - $sdkPlatforms[] = APP_PLATFORM_SERVER; - break; - case APP_AUTH_TYPE_ADMIN: - $sdkPlatforms[] = APP_PLATFORM_CONSOLE; - break; + foreach ($sdks as $sdk) { + /** @var \Appwrite\SDK\Method $sdks */ + + $hide = $sdk->isHidden(); + if ($hide === true || (\is_array($hide) && \in_array($platform, $hide))) { + continue; } - } - if (empty($routeSecurity)) { - $sdkPlatforms[] = APP_PLATFORM_SERVER; - $sdkPlatforms[] = APP_PLATFORM_CLIENT; - } + $routeSecurity = $sdk->getAuth(); + $sdkPlatforms = []; - if (!$route->getLabel('docs', true)) { - continue; - } + foreach ($routeSecurity as $value) { + switch ($value) { + case AuthType::SESSION: + $sdkPlatforms[] = APP_PLATFORM_CLIENT; + break; + case AuthType::JWT: + case AuthType::KEY: + $sdkPlatforms[] = APP_PLATFORM_SERVER; + break; + case AuthType::ADMIN: + $sdkPlatforms[] = APP_PLATFORM_CONSOLE; + break; + } + } - if ($route->getLabel('sdk.mock', false) && !$mocks) { - continue; - } + if (empty($routeSecurity)) { + $sdkPlatforms[] = APP_PLATFORM_SERVER; + $sdkPlatforms[] = APP_PLATFORM_CLIENT; + } - if (!$route->getLabel('sdk.mock', false) && $mocks) { - continue; - } + if (!$route->getLabel('docs', true)) { + continue; + } - if (empty($route->getLabel('sdk.namespace', null))) { - continue; - } + if ($route->getLabel('mock', false) && !$mocks) { + continue; + } - if ($platform !== APP_PLATFORM_CONSOLE && !\in_array($platforms[$platform], $sdkPlatforms)) { - continue; - } + if (!$route->getLabel('mock', false) && $mocks) { + continue; + } - $routes[] = $route; + if (empty($sdk->getNamespace())) { + continue; + } + + if ($platform !== APP_PLATFORM_CONSOLE && !\in_array($platforms[$platform], $sdkPlatforms)) { + continue; + } + + $routes[] = $route; + } } } @@ -310,4 +324,4 @@ class Specs extends Action } } } -} +} \ No newline at end of file diff --git a/src/Appwrite/SDK/AuthType.php b/src/Appwrite/SDK/AuthType.php new file mode 100644 index 0000000000..e2ae5ead4d --- /dev/null +++ b/src/Appwrite/SDK/AuthType.php @@ -0,0 +1,11 @@ + $auth + * @param array $responses + * @param ContentType $responseType + * @param MethodType|null $methodType + * @param bool $deprecated + * @param array|bool $hide + * @param bool $packaging + * @param string $requestType + * @param array $parameters + * @param array $additionalParameters + * + * @throws \Exception + */ + public function __construct( + protected string $namespace, + protected string $name, + protected string $description, + protected array $auth, + protected array $responses, + protected ContentType $contentType = ContentType::JSON, + protected ?MethodType $type = null, + protected bool $deprecated = false, + protected array|bool $hide = false, + protected bool $packaging = false, + protected string $requestType = 'application/json', + protected array $parameters = [], + protected array $additionalParameters = [] + ) { + $this->validateMethod($name, $namespace); + $this->validateAuthTypes($auth); + //$this->validateDesc($description); + + foreach ($responses as $response) { + /** @var SDKResponse $response */ + $this->validateResponseModel($response->getModel()); + $this->validateNoContent($response); + } + } + + private function getRouteName(): string + { + return $this->namespace . '.' . $this->name; + } + + private function validateMethod(string $name, string $namespace): void + { + if (\in_array($this->getRouteName(), self::$processed)) { + self::$errors[] = "Error with {$this->getRouteName()} method: Method already exists in namespace {$namespace}"; + } + + self::$processed[] = $this->getRouteName(); + } + + private function validateAuthTypes(array $authTypes): void + { + foreach ($authTypes as $authType) { + if (!($authType instanceof AuthType)) { + self::$errors[] = "Error with {$this->getRouteName()} method: Invalid auth type"; + } + } + } + + private function validateDesc(string $desc): void + { + if (empty($desc)) { + self::$errors[] = "Error with {$this->getRouteName()} method: Description label is empty"; + return; + } + + $descPath = \realpath(__DIR__ . '/../../../' . $desc); + + if (!\file_exists($descPath)) { + self::$errors[] = "Error with {$this->getRouteName()} method: Description file not found at {$desc}"; + return; + } + } + + private function validateResponseModel(string|array $responseModel): void + { + $response = new Response(new HttpResponse()); + + if (!\is_array($responseModel)) { + $responseModel = [$responseModel]; + } + + foreach ($responseModel as $model) { + try { + $response->getModel($model); + } catch (\Exception $e) { + self::$errors[] = "Error with {$this->getRouteName()} method: Invalid response model, make sure the model has been defined in Response.php"; + } + } + } + + private function validateNoContent(SDKResponse $response): void + { + if ($response->getCode() === 204) { + if ($response->getModel() !== Response::MODEL_NONE) { + self::$errors[] = "Error with {$this->getRouteName()} method: Response code 204 must have response model 'none'"; + } + } + } + + public function getNamespace(): string + { + return $this->namespace; + } + + public function getMethodName(): string + { + return $this->name; + } + + public function getDescription(): string + { + return $this->description; + } + + public function getAuth(): array + { + return $this->auth; + } + + /** + * @return array + */ + public function getResponses(): array + { + return $this->responses; + } + + public function getContentType(): ContentType + { + return $this->contentType; + } + + public function getType(): ?MethodType + { + return $this->type; + } + + public function isDeprecated(): bool + { + return $this->deprecated; + } + + public function isHidden(): bool|array + { + return $this->hide ?? false; + } + + public function isPackaging(): bool + { + return $this->packaging; + } + + public function getRequestType(): string + { + return $this->requestType; + } + + public function getParameters(): array + { + return $this->parameters; + } + + public function getAdditionalParameters(): array + { + return $this->additionalParameters; + } + + public function setNamespace(string $namespace): self + { + $this->namespace = $namespace; + return $this; + } + + public function setMethodName(string $name): self + { + $this->name = $name; + return $this; + } + + public function setDescription(string $description): self + { + $this->description = $description; + return $this; + } + + public function setAuth(array $auth): self + { + $this->validateAuthTypes($auth); + $this->auth = $auth; + return $this; + } + + /** + * @param array $responses + */ + public function setResponses(array $responses): self + { + foreach ($responses as $response) { + $this->validateResponseModel($response->getModel()); + $this->validateNoContent($response); + } + $this->responses = $responses; + return $this; + } + + public function setContentType(ContentType $contentType): self + { + $this->contentType = $contentType; + return $this; + } + + public function setType(?MethodType $type): self + { + $this->type = $type; + return $this; + } + + public function setDeprecated(bool $deprecated): self + { + $this->deprecated = $deprecated; + return $this; + } + + public function setHide(bool|array $hide): self + { + $this->hide = $hide; + return $this; + } + + public function setPackaging(bool $packaging): self + { + $this->packaging = $packaging; + return $this; + } + + public function setRequestType(string $requestType): self + { + $this->requestType = $requestType; + return $this; + } + + public function setParameters(array $parameters): self + { + $this->parameters = $parameters; + return $this; + } + + public static function getErrors(): array + { + return self::$errors; + } +} \ No newline at end of file diff --git a/src/Appwrite/SDK/MethodType.php b/src/Appwrite/SDK/MethodType.php new file mode 100644 index 0000000000..b4982c847a --- /dev/null +++ b/src/Appwrite/SDK/MethodType.php @@ -0,0 +1,11 @@ +code; + } + + public function getModel(): string|array + { + return $this->model; + } +} \ No newline at end of file diff --git a/src/Appwrite/Specification/Format/OpenAPI3.php b/src/Appwrite/Specification/Format/OpenAPI3.php index 65df0cb694..8aae96f92c 100644 --- a/src/Appwrite/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/Specification/Format/OpenAPI3.php @@ -2,6 +2,8 @@ namespace Appwrite\Specification\Format; +use Appwrite\SDK\AuthType; +use Appwrite\SDK\MethodType; use Appwrite\Specification\Format; use Appwrite\Template\Template; use Appwrite\Utopia\Response\Model; @@ -120,28 +122,49 @@ class OpenAPI3 extends Format foreach ($this->routes as $route) { $url = \str_replace('/v1', '', $route->getPath()); $scope = $route->getLabel('scope', ''); - $consumes = [$route->getLabel('sdk.request.type', 'application/json')]; + $sdk = $route->getLabel('sdk', false); - $method = $route->getLabel('sdk.method', \uniqid()); - $desc = (!empty($route->getLabel('sdk.description', ''))) ? \realpath(__DIR__ . '/../../../../' . $route->getLabel('sdk.description', '')) : null; - $produces = $route->getLabel('sdk.response.type', null); - $model = $route->getLabel('sdk.response.model', 'none'); - $routeSecurity = $route->getLabel('sdk.auth', []); + if (empty($sdk)) { + continue; + } + + $additionalMethods = null; + if (is_array($sdk)) { + $mainSdk = array_shift($sdk); + $additionalMethods = $sdk; + + $sdk = $mainSdk; + } + + /** + * @var \Appwrite\SDK\Method $sdk + */ + $consumes = [$sdk->getRequestType()]; + + $method = $sdk->getMethodName() ?? \uniqid(); + + if (!empty($method) && is_array($method)) { + $method = array_keys($method)[0]; + } + + $desc = (!empty($sdk->getDescription())) ? \realpath(__DIR__ . '/../../../../' . $sdk->getDescription()) : null; + $produces = ($sdk->getContentType())->value; + $routeSecurity = $sdk->getAuth() ?? []; $sdkPlatforms = []; foreach ($routeSecurity as $value) { switch ($value) { - case APP_AUTH_TYPE_SESSION: + case AuthType::SESSION: $sdkPlatforms[] = APP_PLATFORM_CLIENT; break; - case APP_AUTH_TYPE_KEY: + case AuthType::KEY: $sdkPlatforms[] = APP_PLATFORM_SERVER; break; - case APP_AUTH_TYPE_JWT: + case AuthType::JWT: $sdkPlatforms[] = APP_PLATFORM_SERVER; break; - case APP_AUTH_TYPE_ADMIN: + case AuthType::ADMIN: $sdkPlatforms[] = APP_PLATFORM_CONSOLE; break; } @@ -152,102 +175,140 @@ class OpenAPI3 extends Format $sdkPlatforms[] = APP_PLATFORM_CLIENT; } + $namespace = $sdk->getNamespace() ?? 'default'; + $temp = [ 'summary' => $route->getDesc(), - 'operationId' => $route->getLabel('sdk.namespace', 'default') . ucfirst($method), - 'tags' => [$route->getLabel('sdk.namespace', 'default')], + 'operationId' => $namespace . ucfirst($method), + 'tags' => [$namespace], 'description' => ($desc) ? \file_get_contents($desc) : '', 'responses' => [], 'x-appwrite' => [ // Appwrite related metadata 'method' => $method, 'weight' => $route->getOrder(), 'cookies' => $route->getLabel('sdk.cookies', false), - 'type' => $route->getLabel('sdk.methodType', ''), - 'deprecated' => $route->getLabel('sdk.deprecated', false), - 'demo' => Template::fromCamelCaseToDash($route->getLabel('sdk.namespace', 'default')) . '/' . Template::fromCamelCaseToDash($method) . '.md', - 'edit' => 'https://github.com/appwrite/appwrite/edit/master' . $route->getLabel('sdk.description', ''), + 'type' => $sdk->getType()->value ?? '', + 'deprecated' => $sdk->isDeprecated(), + 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($method) . '.md', + 'edit' => 'https://github.com/appwrite/appwrite/edit/master' . $sdk->getDescription() ?? '', 'rate-limit' => $route->getLabel('abuse-limit', 0), 'rate-time' => $route->getLabel('abuse-time', 3600), 'rate-key' => $route->getLabel('abuse-key', 'url:{url},ip:{ip}'), 'scope' => $route->getLabel('scope', ''), 'platforms' => $sdkPlatforms, - 'packaging' => $route->getLabel('sdk.packaging', false), - 'offline-model' => $route->getLabel('sdk.offline.model', ''), - 'offline-key' => $route->getLabel('sdk.offline.key', ''), - 'offline-response-key' => $route->getLabel('sdk.offline.response.key', '$id'), + 'packaging' => $sdk->isPackaging() ], ]; - foreach ($this->models as $value) { - if (\is_array($model)) { - $model = \array_map(fn ($m) => $m === $value->getType() ? $value : $m, $model); - } else { - if ($value->getType() === $model) { - $model = $value; - break; + + if (!empty($additionalMethods)) { + $temp['x-appwrite']['additional-methods'] = []; + foreach ($additionalMethods as $method) { + /** @var \Appwrite\SDK\Method $method */ + $additionalMethod = [ + 'name' => $method->getMethodName(), + 'parameters' => [], + 'required' => [], + 'responses' => [] + ]; + + foreach ($method->getParameters() as $name => $param) { + $additionalMethod['parameters'][] = $name; + + if (!$param['optional']) { + $additionalMethod['required'][] = $name; + } } + + foreach ($method->getResponses() as $response) { + /** @var \Appwrite\SDK\Response $response */ + $additionalMethod['responses'][] = [ + 'code' => $response->getCode(), + 'model' => '#/components/schemas/' . $response->getModel() + ]; + } + + $temp['x-appwrite']['additional-methods'][] = $additionalMethod; } } - if (!(\is_array($model)) && $model->isNone()) { - $temp['responses'][(string)$route->getLabel('sdk.response.code', '500')] = [ - 'description' => in_array($produces, [ - 'image/*', - 'image/jpeg', - 'image/gif', - 'image/png', - 'image/webp', - 'image/svg-x', - 'image/x-icon', - 'image/bmp', - ]) ? 'Image' : 'File', - ]; - } else { - if (\is_array($model)) { - $modelDescription = \join(', or ', \array_map(fn ($m) => $m->getName(), $model)); + // Handle response models + foreach ($sdk->getResponses() as $response) { + /** @var \Appwrite\SDK\Response $response */ + $model = $response->getModel(); - // model has multiple possible responses, we will use oneOf - foreach ($model as $m) { - $usedModels[] = $m->getType(); + foreach ($this->models as $value) { + if (\is_array($model)) { + $model = \array_map(fn ($m) => $m === $value->getType() ? $value : $m, $model); + } else { + if ($value->getType() === $model) { + $model = $value; + break; + } } + } - $temp['responses'][(string)$route->getLabel('sdk.response.code', '500')] = [ - 'description' => $modelDescription, - 'content' => [ - $produces => [ - 'schema' => [ - 'oneOf' => \array_map(fn ($m) => ['$ref' => '#/components/schemas/' . $m->getType()], $model) - ], - ], - ], + if (!(\is_array($model)) && $model->isNone()) { + $temp['responses'][(string)$response->getCode() ?? '500'] = [ + 'description' => in_array($produces, [ + 'image/*', + 'image/jpeg', + 'image/gif', + 'image/png', + 'image/webp', + 'image/svg-x', + 'image/x-icon', + 'image/bmp', + ]) ? 'Image' : 'File', ]; } else { - // Response definition using one type - $usedModels[] = $model->getType(); - $temp['responses'][(string)$route->getLabel('sdk.response.code', '500')] = [ - 'description' => $model->getName(), - 'content' => [ - $produces => [ - 'schema' => [ - '$ref' => '#/components/schemas/' . $model->getType(), + if (\is_array($model)) { + $modelDescription = \join(', or ', \array_map(fn ($m) => $m->getName(), $model)); + + // model has multiple possible responses, we will use oneOf + foreach ($model as $m) { + $usedModels[] = $m->getType(); + } + + $temp['responses'][(string)$response->getCode() ?? '500'] = [ + 'description' => $modelDescription, + 'content' => [ + $produces => [ + 'schema' => [ + 'oneOf' => \array_map(fn ($m) => ['$ref' => '#/components/schemas/' . $m->getType()], $model) + ], ], ], - ], - ]; + ]; + } else { + // Response definition using one type + $usedModels[] = $model->getType(); + $temp['responses'][(string)$response->getCode() ?? '500'] = [ + 'description' => $model->getName(), + 'content' => [ + $produces => [ + 'schema' => [ + '$ref' => '#/components/schemas/' . $model->getType(), + ], + ], + ], + ]; + } } - } - if ($route->getLabel('sdk.response.code', 500) === 204) { - $temp['responses'][(string)$route->getLabel('sdk.response.code', '500')]['description'] = 'No content'; - unset($temp['responses'][(string)$route->getLabel('sdk.response.code', '500')]['schema']); + if (($response->getCode() ?? 500) === 204) { + $temp['responses'][(string)$response->getCode() ?? '500']['description'] = 'No content'; + unset($temp['responses'][(string)$response->getCode() ?? '500']['schema']); + } } if ((!empty($scope))) { // && 'public' != $scope $securities = ['Project' => []]; - foreach ($route->getLabel('sdk.auth', []) as $security) { - if (array_key_exists($security, $this->keys)) { - $securities[$security] = []; + foreach ($sdk->getAuth() as $security) { + /** @var \Appwrite\SDK\AuthType $security */ + if (array_key_exists($security->value, $this->keys)) { + $securities[$security->value] = []; } } @@ -298,7 +359,7 @@ class OpenAPI3 extends Format $node['schema']['x-example'] = false; break; case 'Appwrite\Utopia\Database\Validator\CustomId': - if ($route->getLabel('sdk.methodType', '') === 'upload') { + if ($sdk->getType() === MethodType::UPLOAD) { $node['schema']['x-upload-id'] = true; } $node['schema']['type'] = $validator->getType(); @@ -323,7 +384,6 @@ class OpenAPI3 extends Format case 'Utopia\Validator\JSON': case 'Utopia\Validator\Mock': case 'Utopia\Validator\Assoc': - case 'Appwrite\Functions\Validator\Payload': $param['default'] = (empty($param['default'])) ? new \stdClass() : $param['default']; $node['schema']['type'] = 'object'; $node['schema']['x-example'] = '{}'; @@ -423,7 +483,7 @@ class OpenAPI3 extends Format $allowed = true; foreach ($this->enumBlacklist as $blacklist) { if ( - $blacklist['namespace'] == $route->getLabel('sdk.namespace', '') + $blacklist['namespace'] == $sdk->getNamespace() && $blacklist['method'] == $method && $blacklist['parameter'] == $name ) { @@ -434,8 +494,8 @@ class OpenAPI3 extends Format if ($allowed) { $node['schema']['enum'] = $validator->getList(); - $node['schema']['x-enum-name'] = $this->getEnumName($route->getLabel('sdk.namespace', ''), $method, $name); - $node['schema']['x-enum-keys'] = $this->getEnumKeys($route->getLabel('sdk.namespace', ''), $method, $name); + $node['schema']['x-enum-name'] = $this->getEnumName($sdk->getNamespace() ?? '', $method, $name); + $node['schema']['x-enum-keys'] = $this->getEnumKeys($sdk->getNamespace() ?? '', $method, $name); } if ($validator->getType() === 'integer') { $node['format'] = 'int32'; @@ -641,4 +701,4 @@ class OpenAPI3 extends Format return $output; } -} +} \ No newline at end of file diff --git a/src/Appwrite/Specification/Format/Swagger2.php b/src/Appwrite/Specification/Format/Swagger2.php index b10188525e..4760da8b40 100644 --- a/src/Appwrite/Specification/Format/Swagger2.php +++ b/src/Appwrite/Specification/Format/Swagger2.php @@ -2,6 +2,8 @@ namespace Appwrite\Specification\Format; +use Appwrite\SDK\AuthType; +use Appwrite\SDK\MethodType; use Appwrite\Specification\Format; use Appwrite\Template\Template; use Appwrite\Utopia\Response\Model; @@ -34,6 +36,7 @@ class Swagger2 extends Format foreach ($this->models as $m) { if ($m->getType() === $ruleType) { $this->getNestedModels($m, $usedModels); + continue; } } } @@ -45,6 +48,7 @@ class Swagger2 extends Format foreach ($this->models as $m) { if ($m->getType() === $rule['type']) { $this->getNestedModels($m, $usedModels); + continue; } } } @@ -116,27 +120,47 @@ class Swagger2 extends Format /** @var \Utopia\Route $route */ $url = \str_replace('/v1', '', $route->getPath()); $scope = $route->getLabel('scope', ''); - $consumes = [$route->getLabel('sdk.request.type', 'application/json')]; - $method = $route->getLabel('sdk.method', \uniqid()); - $desc = (!empty($route->getLabel('sdk.description', ''))) ? \realpath(__DIR__ . '/../../../../' . $route->getLabel('sdk.description', '')) : null; - $produces = $route->getLabel('sdk.response.type', null); - $model = $route->getLabel('sdk.response.model', 'none'); - $routeSecurity = $route->getLabel('sdk.auth', []); + /** @var \Appwrite\SDK\Method $sdk */ + $sdk = $route->getLabel('sdk', false); + + if (empty($sdk)) { + continue; + } + + $additionalMethods = null; + if (is_array($sdk)) { + $mainSdk = array_shift($sdk); + $additionalMethods = $sdk; + + $sdk = $mainSdk; + } + + $consumes = [$sdk->getRequestType()]; + + $method = $sdk->getMethodName() ?? \uniqid(); + + if (!empty($method) && is_array($method)) { + $method = array_keys($method)[0]; + } + + $desc = (!empty($sdk->getDescription())) ? \realpath(__DIR__ . '/../../../../' . $sdk->getDescription()) : null; + $produces = ($sdk->getContentType())->value; + $routeSecurity = $sdk->getAuth() ?? []; $sdkPlatforms = []; foreach ($routeSecurity as $value) { switch ($value) { - case APP_AUTH_TYPE_SESSION: + case AuthType::SESSION: $sdkPlatforms[] = APP_PLATFORM_CLIENT; break; - case APP_AUTH_TYPE_KEY: + case AuthType::KEY: $sdkPlatforms[] = APP_PLATFORM_SERVER; break; - case APP_AUTH_TYPE_JWT: + case AuthType::JWT: $sdkPlatforms[] = APP_PLATFORM_SERVER; break; - case APP_AUTH_TYPE_ADMIN: + case AuthType::ADMIN: $sdkPlatforms[] = APP_PLATFORM_CONSOLE; break; } @@ -147,31 +171,30 @@ class Swagger2 extends Format $sdkPlatforms[] = APP_PLATFORM_CLIENT; } + $namespace = $sdk->getNamespace() ?? 'default'; + $temp = [ 'summary' => $route->getDesc(), - 'operationId' => $route->getLabel('sdk.namespace', 'default') . ucfirst($method), + 'operationId' => $namespace . ucfirst($method), 'consumes' => [], 'produces' => [], - 'tags' => [$route->getLabel('sdk.namespace', 'default')], + 'tags' => [$namespace], 'description' => ($desc) ? \file_get_contents($desc) : '', 'responses' => [], 'x-appwrite' => [ // Appwrite related metadata 'method' => $method, 'weight' => $route->getOrder(), 'cookies' => $route->getLabel('sdk.cookies', false), - 'type' => $route->getLabel('sdk.methodType', ''), - 'deprecated' => $route->getLabel('sdk.deprecated', false), - 'demo' => Template::fromCamelCaseToDash($route->getLabel('sdk.namespace', 'default')) . '/' . Template::fromCamelCaseToDash($method) . '.md', - 'edit' => 'https://github.com/appwrite/appwrite/edit/master' . $route->getLabel('sdk.description', ''), + 'type' => $sdk->getType()->value ?? '', + 'deprecated' => $sdk->isDeprecated(), + 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($method) . '.md', + 'edit' => 'https://github.com/appwrite/appwrite/edit/master' . $sdk->getDescription() ?? '', 'rate-limit' => $route->getLabel('abuse-limit', 0), 'rate-time' => $route->getLabel('abuse-time', 3600), 'rate-key' => $route->getLabel('abuse-key', 'url:{url},ip:{ip}'), 'scope' => $route->getLabel('scope', ''), 'platforms' => $sdkPlatforms, - 'packaging' => $route->getLabel('sdk.packaging', false), - 'offline-model' => $route->getLabel('sdk.offline.model', ''), - 'offline-key' => $route->getLabel('sdk.offline.key', ''), - 'offline-response-key' => $route->getLabel('sdk.offline.response.key', '$id'), + 'packaging' => $sdk->isPackaging() ], ]; @@ -179,71 +202,111 @@ class Swagger2 extends Format $temp['produces'][] = $produces; } - foreach ($this->models as $value) { - if (\is_array($model)) { - $model = \array_map(fn ($m) => $m === $value->getType() ? $value : $m, $model); - } else { - if ($value->getType() === $model) { - $model = $value; - break; + if (!empty($additionalMethods)) { + $temp['x-appwrite']['additional-methods'] = []; + foreach ($additionalMethods as $method) { + /** @var \Appwrite\SDK\Method $method */ + $additionalMethod = [ + 'name' => $method->getMethodName(), + 'parameters' => [], + 'required' => [], + 'responses' => [], + 'description' => $method->getDescription(), + ]; + + foreach ($method->getParameters() as $name => $param) { + $additionalMethod['parameters'][] = $name; + + if (!$param['optional']) { + $additionalMethod['required'][] = $name; + } } + + foreach ($method->getResponses() as $response) { + /** @var \Appwrite\SDK\Response $response */ + $additionalMethod['responses'][] = [ + 'code' => $response->getCode(), + 'model' => '#/definitions/' . $response->getModel() + ]; + } + + $temp['x-appwrite']['additional-methods'][] = $additionalMethod; } } - if (!(\is_array($model)) && $model->isNone()) { - $temp['responses'][(string)$route->getLabel('sdk.response.code', '500')] = [ - 'description' => in_array($produces, [ - 'image/*', - 'image/jpeg', - 'image/gif', - 'image/png', - 'image/webp', - 'image/svg-x', - 'image/x-icon', - 'image/bmp', - ]) ? 'Image' : 'File', - 'schema' => [ - 'type' => 'file' - ], - ]; - } else { - if (\is_array($model)) { - $modelDescription = \join(', or ', \array_map(fn ($m) => $m->getName(), $model)); - // model has multiple possible responses, we will use oneOf - foreach ($model as $m) { - $usedModels[] = $m->getType(); + // Handle Responses + + foreach ($sdk->getResponses() as $response) { + /** @var \Appwrite\SDK\Response $response */ + $model = $response->getModel(); + + foreach ($this->models as $value) { + if (\is_array($model)) { + $model = \array_map(fn ($m) => $m === $value->getType() ? $value : $m, $model); + } else { + if ($value->getType() === $model) { + $model = $value; + break; + } } - $temp['responses'][(string)$route->getLabel('sdk.response.code', '500')] = [ - 'description' => $modelDescription, + } + + if (!(\is_array($model)) && $model->isNone()) { + $temp['responses'][(string)$response->getCode() ?? '500'] = [ + 'description' => in_array($produces, [ + 'image/*', + 'image/jpeg', + 'image/gif', + 'image/png', + 'image/webp', + 'image/svg-x', + 'image/x-icon', + 'image/bmp', + ]) ? 'Image' : 'File', 'schema' => [ - 'x-oneOf' => \array_map(function ($m) { - return ['$ref' => '#/definitions/' . $m->getType()]; - }, $model) + 'type' => 'file' ], ]; } else { - // Response definition using one type - $usedModels[] = $model->getType(); - $temp['responses'][(string)$route->getLabel('sdk.response.code', '500')] = [ - 'description' => $model->getName(), - 'schema' => [ - '$ref' => '#/definitions/' . $model->getType(), - ], - ]; + if (\is_array($model)) { + $modelDescription = \join(', or ', \array_map(fn ($m) => $m->getName(), $model)); + // model has multiple possible responses, we will use oneOf + foreach ($model as $m) { + $usedModels[] = $m->getType(); + } + $temp['responses'][(string)$response->getCode() ?? '500'] = [ + 'description' => $modelDescription, + 'schema' => [ + 'x-oneOf' => \array_map(function ($m) { + return ['$ref' => '#/definitions/' . $m->getType()]; + }, $model) + ], + ]; + } else { + // Response definition using one type + $usedModels[] = $model->getType(); + $temp['responses'][(string)$response->getCode() ?? '500'] = [ + 'description' => $model->getName(), + 'schema' => [ + '$ref' => '#/definitions/' . $model->getType(), + ], + ]; + } } - } - if (in_array($route->getLabel('sdk.response.code', 500), [204, 301, 302, 308], true)) { - $temp['responses'][(string)$route->getLabel('sdk.response.code', '500')]['description'] = 'No content'; - unset($temp['responses'][(string)$route->getLabel('sdk.response.code', '500')]['schema']); + if (in_array($response->getCode() ?? 500, [204, 301, 302, 308], true)) { + $temp['responses'][(string)$response->getCode() ?? '500']['description'] = 'No content'; + unset($temp['responses'][(string)$response->getCode() ?? '500']['schema']); + } } if ((!empty($scope))) { // && 'public' != $scope $securities = ['Project' => []]; - foreach ($route->getLabel('sdk.auth', []) as $security) { - if (array_key_exists($security, $this->keys)) { - $securities[$security] = []; + foreach ($sdk->getAuth() as $security) { + /** @var \Appwrite\SDK\AuthType $security */ + if (array_key_exists($security->value, $this->keys)) { + $securities[$security->value] = []; } } @@ -264,7 +327,7 @@ class Swagger2 extends Format $parameters = \array_merge( $route->getParams(), - $route->getLabel('sdk.parameters', []), + $sdk->getAdditionalParameters() ?? [], ); foreach ($parameters as $name => $param) { // Set params @@ -314,7 +377,7 @@ class Swagger2 extends Format $node['x-example'] = false; break; case 'Appwrite\Utopia\Database\Validator\CustomId': - if ($route->getLabel('sdk.methodType', '') === 'upload') { + if ($sdk->getType() === MethodType::UPLOAD) { $node['x-upload-id'] = true; } $node['type'] = $validator->getType(); @@ -347,7 +410,6 @@ class Swagger2 extends Format case 'Utopia\Validator\JSON': case 'Utopia\Validator\Mock': case 'Utopia\Validator\Assoc': - case 'Appwrite\Functions\Validator\Payload': $node['type'] = 'object'; $node['default'] = (empty($param['default'])) ? new \stdClass() : $param['default']; $node['x-example'] = '{}'; @@ -422,7 +484,7 @@ class Swagger2 extends Format //Iterate the blackList. If it matches with the current one, then it is blackListed $allowed = true; foreach ($this->enumBlacklist as $blacklist) { - if ($blacklist['namespace'] == $route->getLabel('sdk.namespace', '') && $blacklist['method'] == $method && $blacklist['parameter'] == $name) { + if ($blacklist['namespace'] == $namespace && $blacklist['method'] == $method && $blacklist['parameter'] == $name) { $allowed = false; break; } @@ -430,8 +492,8 @@ class Swagger2 extends Format if ($allowed && $validator->getType() === 'string') { $node['enum'] = $validator->getList(); - $node['x-enum-name'] = $this->getEnumName($route->getLabel('sdk.namespace', ''), $method, $name); - $node['x-enum-keys'] = $this->getEnumKeys($route->getLabel('sdk.namespace', ''), $method, $name); + $node['x-enum-name'] = $this->getEnumName($namespace, $method, $name); + $node['x-enum-keys'] = $this->getEnumKeys($namespace, $method, $name); } if ($validator->getType() === 'integer') { @@ -649,4 +711,4 @@ class Swagger2 extends Format return $output; } -} +} \ No newline at end of file diff --git a/src/Appwrite/Utopia/Request.php b/src/Appwrite/Utopia/Request.php index 26c1baf188..f8c0439293 100644 --- a/src/Appwrite/Utopia/Request.php +++ b/src/Appwrite/Utopia/Request.php @@ -28,8 +28,30 @@ class Request extends UtopiaRequest $parameters = parent::getParams(); if ($this->hasFilters() && self::hasRoute()) { - $method = self::getRoute()->getLabel('sdk.method', 'unknown'); - $endpointIdentifier = self::getRoute()->getLabel('sdk.namespace', 'unknown') . '.' . $method; + $methods = self::getRoute()->getLabel('sdk', null); + + if (!\is_array($methods)) { + $methods = [$methods]; + } + + $params = []; + + foreach ($methods as $method) { + /** @var \Appwrite\SDK\Method $method */ + if (empty($method)) { + $endpointIdentifier = 'unknown.unknown'; + } else { + $endpointIdentifier = $method->getNamespace() . '.' . $method->getMethodName(); + } + + $params += $method->getParameters(); + } + + if (!empty($params)) { + $parameters = array_filter($parameters, function ($key) use ($params) { + return array_key_exists($key, $params); + }, \ARRAY_FILTER_USE_KEY); + } foreach ($this->getFilters() as $filter) { $parameters = $filter->parse($parameters, $endpointIdentifier); diff --git a/tests/unit/Utopia/RequestTest.php b/tests/unit/Utopia/RequestTest.php index 73daaa88bc..e19fdbe01f 100644 --- a/tests/unit/Utopia/RequestTest.php +++ b/tests/unit/Utopia/RequestTest.php @@ -2,6 +2,7 @@ namespace Tests\Unit\Utopia; +use Appwrite\SDK\Method; use Appwrite\Utopia\Request; use PHPUnit\Framework\TestCase; use Swoole\Http\Request as SwooleRequest; @@ -31,8 +32,13 @@ class RequestTest extends TestCase $this->assertCount(2, $this->request->getFilters()); $route = new Route(Request::METHOD_GET, '/test'); - $route->label('sdk.method', 'method'); - $route->label('sdk.namespace', 'namespace'); + $route->label('sdk', new Method( + namespace: 'namespace', + name: 'method', + description: 'description', + auth: [], + responses: [], + )); // set test header to prevent header populaten inside the request class $this->request->addHeader('EXAMPLE', 'VALUE'); $this->request->setRoute($route); From d5604efef8cea5bacedc542bcbf38be01735a468 Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Fri, 17 Jan 2025 13:38:38 +0900 Subject: [PATCH 038/101] Fix actions --- app/controllers/api/vcs.php | 1 - app/controllers/general.php | 7 ++++++- app/http.php | 9 ++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/vcs.php b/app/controllers/api/vcs.php index e64a2f895b..7c31d93df5 100644 --- a/app/controllers/api/vcs.php +++ b/app/controllers/api/vcs.php @@ -272,7 +272,6 @@ App::get('/v1/vcs/github/authorize') ->desc('Install GitHub app') ->groups(['api', 'vcs']) ->label('scope', 'vcs.read') - ->label('sdk.namespace', 'vcs') ->label('error', __DIR__ . '/../../views/general/error.phtml') ->label('sdk', new Method( namespace: 'vcs', diff --git a/app/controllers/general.php b/app/controllers/general.php index f6a584b69e..aedecf8a9c 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -931,7 +931,12 @@ App::error() $log->addExtra('trace', $error->getTraceAsString()); $log->addExtra('roles', Authorization::getRoles()); - $action = $route->getLabel("sdk.namespace", "UNKNOWN_NAMESPACE") . '.' . $route->getLabel("sdk.method", "UNKNOWN_METHOD"); + $action = 'UNKNOWN_NAMESPACE.UNKNOWN.METHOD'; + if (!empty($sdk)) { + /** @var Appwrite\SDK\Method $sdk */ + $action = $sdk->getNamespace() . '.' . $sdk->getMethodName(); + } + $log->setAction($action); $log->addTag('service', $action); diff --git a/app/http.php b/app/http.php index 3a7562ffd1..e85120a894 100644 --- a/app/http.php +++ b/app/http.php @@ -386,7 +386,14 @@ $http->on(Constant::EVENT_REQUEST, function (SwooleRequest $swooleRequest, Swool $log->addExtra('trace', $th->getTraceAsString()); $log->addExtra('roles', Authorization::getRoles()); - $action = $route->getLabel("sdk.namespace", "UNKNOWN_NAMESPACE") . '.' . $route->getLabel("sdk.method", "UNKNOWN_METHOD"); + $sdk = $route->getLabel("sdk", false); + + $action = 'UNKNOWN_NAMESPACE.UNKNOWN.METHOD'; + if (!empty($sdk)) { + /** @var Appwrite\SDK\Method $sdk */ + $action = $sdk->getNamespace() . '.' . $sdk->getMethodName(); + } + $log->setAction($action); $log->addTag('service', $action); From 20e87cb82f3725547b67c3d8de7604251571592e Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Fri, 17 Jan 2025 13:39:16 +0900 Subject: [PATCH 039/101] Run Linter --- app/controllers/api/account.php | 2 +- app/controllers/api/avatars.php | 2 +- app/controllers/api/console.php | 2 +- app/controllers/api/databases.php | 2 +- app/controllers/api/functions.php | 2 +- app/controllers/api/graphql.php | 2 +- app/controllers/api/health.php | 2 +- app/controllers/api/locale.php | 2 +- app/controllers/api/messaging.php | 2 +- app/controllers/api/migrations.php | 9 +-------- app/controllers/api/project.php | 2 +- app/controllers/api/projects.php | 2 +- app/controllers/api/storage.php | 2 +- app/controllers/api/teams.php | 2 +- app/controllers/api/users.php | 2 +- app/controllers/general.php | 2 +- src/Appwrite/GraphQL/Schema.php | 2 +- src/Appwrite/GraphQL/Types/Mapper.php | 2 +- src/Appwrite/Platform/Tasks/Specs.php | 2 +- src/Appwrite/SDK/AuthType.php | 2 +- src/Appwrite/SDK/ContentType.php | 2 +- src/Appwrite/SDK/Method.php | 2 +- src/Appwrite/SDK/MethodType.php | 2 +- src/Appwrite/SDK/Response.php | 2 +- src/Appwrite/Specification/Format/OpenAPI3.php | 2 +- src/Appwrite/Specification/Format/Swagger2.php | 2 +- 26 files changed, 26 insertions(+), 33 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 727ed746a4..80c2b69ba3 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -4894,4 +4894,4 @@ App::delete('/v1/account/identities/:identityId') ->setPayload($response->output($identity, Response::MODEL_IDENTITY)); return $response->noContent(); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/avatars.php b/app/controllers/api/avatars.php index 2b0f7d9e06..94a3fb374d 100644 --- a/app/controllers/api/avatars.php +++ b/app/controllers/api/avatars.php @@ -1276,4 +1276,4 @@ App::get('/v1/cards/cloud-og') ->addHeader('Cache-Control', 'private, max-age=3888000') // 45 days ->setContentType('image/png') ->file($baseImage->getImageBlob()); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/console.php b/app/controllers/api/console.php index 77ba67e6e1..9a41f67724 100644 --- a/app/controllers/api/console.php +++ b/app/controllers/api/console.php @@ -125,4 +125,4 @@ App::post('/v1/console/assistant') curl_close($ch); $response->chunk('', true); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index b4635128c3..4107614fa0 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -4415,4 +4415,4 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/usage') 'documentsTotal' => $usage[$metrics[0]]['total'], 'documents' => $usage[$metrics[0]]['data'], ]), Response::MODEL_USAGE_COLLECTION); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 9b6f92ed5b..205f96072e 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -2851,4 +2851,4 @@ App::get('/v1/functions/templates/:templateId') } $response->dynamic(new Document($template), Response::MODEL_TEMPLATE_FUNCTION); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/graphql.php b/app/controllers/api/graphql.php index 80a17db7cb..72951b608e 100644 --- a/app/controllers/api/graphql.php +++ b/app/controllers/api/graphql.php @@ -331,4 +331,4 @@ App::shutdown() ->inject('project') ->action(function (Document $project) { Schema::setDirty($project->getId()); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/health.php b/app/controllers/api/health.php index 787bc71ac8..1db4713311 100644 --- a/app/controllers/api/health.php +++ b/app/controllers/api/health.php @@ -1054,4 +1054,4 @@ App::get('/v1/health/stats') // Currently only used internally 'memory_used_peak_human' => $cacheStats['used_memory_peak_human'] ?? 0, ], ]); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/locale.php b/app/controllers/api/locale.php index 65f719f914..5b4c1ac47f 100644 --- a/app/controllers/api/locale.php +++ b/app/controllers/api/locale.php @@ -294,4 +294,4 @@ App::get('/v1/locale/languages') $list = array_map(fn ($node) => new Document($node), $list); $response->dynamic(new Document(['languages' => $list, 'total' => \count($list)]), Response::MODEL_LANGUAGE_LIST); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/messaging.php b/app/controllers/api/messaging.php index c80da75801..d7d3750ccf 100644 --- a/app/controllers/api/messaging.php +++ b/app/controllers/api/messaging.php @@ -4254,4 +4254,4 @@ App::delete('/v1/messaging/messages/:messageId') ->setPayload($response->output($message, Response::MODEL_MESSAGE)); $response->noContent(); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/migrations.php b/app/controllers/api/migrations.php index 670628de62..ac149ac8eb 100644 --- a/app/controllers/api/migrations.php +++ b/app/controllers/api/migrations.php @@ -3,19 +3,14 @@ use Appwrite\Event\Event; use Appwrite\Event\Migration; use Appwrite\Extend\Exception; -use Appwrite\Permission; -use Appwrite\Role; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; -use Appwrite\SDK\MethodType; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Migrations; -use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; use Utopia\App; use Utopia\Database\Database; -use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Helpers\ID; @@ -26,9 +21,7 @@ use Utopia\Migration\Sources\Appwrite; use Utopia\Migration\Sources\Firebase; use Utopia\Migration\Sources\NHost; use Utopia\Migration\Sources\Supabase; -use Utopia\System\System; use Utopia\Validator\ArrayList; -use Utopia\Validator\Host; use Utopia\Validator\Integer; use Utopia\Validator\Text; use Utopia\Validator\URL; @@ -673,4 +666,4 @@ App::delete('/v1/migrations/:migrationId') $queueForEvents->setParam('migrationId', $migration->getId()); $response->noContent(); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/project.php b/app/controllers/api/project.php index 50ef982799..2fc6578c2b 100644 --- a/app/controllers/api/project.php +++ b/app/controllers/api/project.php @@ -570,4 +570,4 @@ App::delete('/v1/project/variables/:variableId') } $response->noContent(); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 896e708327..c40d7601c4 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -2429,4 +2429,4 @@ App::delete('/v1/projects/:projectId/templates/email/:type/:locale') 'replyTo' => $template['replyTo'], 'message' => $template['message'] ]), Response::MODEL_EMAIL_TEMPLATE); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 8ed7aaff22..49f8897884 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -1942,4 +1942,4 @@ App::get('/v1/storage/:bucketId/usage') 'files' => $usage[$metrics[0]]['data'], 'storage' => $usage[$metrics[1]]['data'], ]), Response::MODEL_USAGE_BUCKETS); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 612df0d439..9250f0c6b1 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -1408,4 +1408,4 @@ App::get('/v1/teams/:teamId/logs') 'total' => $audit->countLogsByResource($resource), 'logs' => $output, ]), Response::MODEL_LOG_LIST); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 9c3026793b..d2c840d368 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -2465,4 +2465,4 @@ App::get('/v1/users/usage') 'users' => $usage[$metrics[0]]['data'], 'sessions' => $usage[$metrics[1]]['data'], ]), Response::MODEL_USAGE_USERS); - }); \ No newline at end of file + }); diff --git a/app/controllers/general.php b/app/controllers/general.php index aedecf8a9c..8e282cb0e4 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -1180,4 +1180,4 @@ foreach (Config::getParam('services', []) as $service) { // Check for any errors found while we were initialising the SDK Methods. if (!empty(Method::getErrors())) { throw new \Exception('Errors found during SDK initialization:' . PHP_EOL . implode(PHP_EOL, Method::getErrors())); -} \ No newline at end of file +} diff --git a/src/Appwrite/GraphQL/Schema.php b/src/Appwrite/GraphQL/Schema.php index 5709310a6a..a0d93de45c 100644 --- a/src/Appwrite/GraphQL/Schema.php +++ b/src/Appwrite/GraphQL/Schema.php @@ -275,4 +275,4 @@ class Schema { self::$dirty[$projectId] = true; } -} \ No newline at end of file +} diff --git a/src/Appwrite/GraphQL/Types/Mapper.php b/src/Appwrite/GraphQL/Types/Mapper.php index deae9b5270..e5056d0abc 100644 --- a/src/Appwrite/GraphQL/Types/Mapper.php +++ b/src/Appwrite/GraphQL/Types/Mapper.php @@ -473,4 +473,4 @@ class Mapper throw new Exception('Unknown hash options implementation'); } -} \ No newline at end of file +} diff --git a/src/Appwrite/Platform/Tasks/Specs.php b/src/Appwrite/Platform/Tasks/Specs.php index bfc47cb69b..4d7fd5d695 100644 --- a/src/Appwrite/Platform/Tasks/Specs.php +++ b/src/Appwrite/Platform/Tasks/Specs.php @@ -324,4 +324,4 @@ class Specs extends Action } } } -} \ No newline at end of file +} diff --git a/src/Appwrite/SDK/AuthType.php b/src/Appwrite/SDK/AuthType.php index e2ae5ead4d..307b3cf35e 100644 --- a/src/Appwrite/SDK/AuthType.php +++ b/src/Appwrite/SDK/AuthType.php @@ -8,4 +8,4 @@ enum AuthType: string case KEY = APP_AUTH_TYPE_KEY; case SESSION = APP_AUTH_TYPE_SESSION; case ADMIN = APP_AUTH_TYPE_ADMIN; -} \ No newline at end of file +} diff --git a/src/Appwrite/SDK/ContentType.php b/src/Appwrite/SDK/ContentType.php index 83a485bf17..174c889815 100644 --- a/src/Appwrite/SDK/ContentType.php +++ b/src/Appwrite/SDK/ContentType.php @@ -12,4 +12,4 @@ enum ContentType: string case HTML = 'text/html'; case TEXT = 'text/plain'; case ANY = '*/*'; -} \ No newline at end of file +} diff --git a/src/Appwrite/SDK/Method.php b/src/Appwrite/SDK/Method.php index fa4f6239c1..8064b75561 100644 --- a/src/Appwrite/SDK/Method.php +++ b/src/Appwrite/SDK/Method.php @@ -273,4 +273,4 @@ class Method { return self::$errors; } -} \ No newline at end of file +} diff --git a/src/Appwrite/SDK/MethodType.php b/src/Appwrite/SDK/MethodType.php index b4982c847a..2b1f786779 100644 --- a/src/Appwrite/SDK/MethodType.php +++ b/src/Appwrite/SDK/MethodType.php @@ -8,4 +8,4 @@ enum MethodType: string case LOCATION = 'location'; case GRAPHQL = 'graphql'; case UPLOAD = 'upload'; -} \ No newline at end of file +} diff --git a/src/Appwrite/SDK/Response.php b/src/Appwrite/SDK/Response.php index e2b3cab4d0..e87813024b 100644 --- a/src/Appwrite/SDK/Response.php +++ b/src/Appwrite/SDK/Response.php @@ -24,4 +24,4 @@ class Response { return $this->model; } -} \ No newline at end of file +} diff --git a/src/Appwrite/Specification/Format/OpenAPI3.php b/src/Appwrite/Specification/Format/OpenAPI3.php index 8aae96f92c..02568a8ccf 100644 --- a/src/Appwrite/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/Specification/Format/OpenAPI3.php @@ -701,4 +701,4 @@ class OpenAPI3 extends Format return $output; } -} \ No newline at end of file +} diff --git a/src/Appwrite/Specification/Format/Swagger2.php b/src/Appwrite/Specification/Format/Swagger2.php index 4760da8b40..22aac47113 100644 --- a/src/Appwrite/Specification/Format/Swagger2.php +++ b/src/Appwrite/Specification/Format/Swagger2.php @@ -711,4 +711,4 @@ class Swagger2 extends Format return $output; } -} \ No newline at end of file +} From 02e7f91e59c23725815b8c613902311a0c16b40a Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Fri, 17 Jan 2025 16:44:25 +0900 Subject: [PATCH 040/101] Address all missing descriptions apart from ones in projects.php --- app/controllers/api/account.php | 6 +++--- app/controllers/api/databases.php | 6 +++--- app/controllers/api/functions.php | 8 ++++---- app/controllers/api/project.php | 2 +- app/controllers/api/proxy.php | 2 +- app/controllers/api/storage.php | 4 ++-- app/controllers/api/users.php | 2 +- app/controllers/api/vcs.php | 16 ++++++++-------- docs/references/account/create-push-target.md | 1 + docs/references/account/delete-push-target.md | 1 + docs/references/account/update-push-target.md | 1 + .../references/databases/get-collection-usage.md | 1 + docs/references/databases/get-database-usage.md | 1 + docs/references/databases/get-usage.md | 1 + docs/references/functions/create-build.md | 1 + docs/references/functions/get-function-usage.md | 1 + docs/references/functions/get-functions-usage.md | 1 + .../functions/update-deployment-build.md | 1 + docs/references/project/get-usage.md | 1 + .../references/proxy/update-rule-verification.md | 1 + docs/references/storage/get-bucket-usage.md | 1 + docs/references/storage/get-usage.md | 1 + docs/references/users/get-usage.md | 1 + .../references/vcs/create-github-installation.md | 1 + .../vcs/create-repository-detection.md | 1 + docs/references/vcs/create-repository.md | 1 + docs/references/vcs/get-repository-contents.md | 1 + docs/references/vcs/get-repository.md | 1 + docs/references/vcs/list-repositories.md | 1 + docs/references/vcs/list-repository-branches.md | 1 + .../vcs/update-external-deployments.md | 1 + 31 files changed, 46 insertions(+), 23 deletions(-) create mode 100644 docs/references/account/create-push-target.md create mode 100644 docs/references/account/delete-push-target.md create mode 100644 docs/references/account/update-push-target.md create mode 100644 docs/references/databases/get-collection-usage.md create mode 100644 docs/references/databases/get-database-usage.md create mode 100644 docs/references/databases/get-usage.md create mode 100644 docs/references/functions/create-build.md create mode 100644 docs/references/functions/get-function-usage.md create mode 100644 docs/references/functions/get-functions-usage.md create mode 100644 docs/references/functions/update-deployment-build.md create mode 100644 docs/references/project/get-usage.md create mode 100644 docs/references/proxy/update-rule-verification.md create mode 100644 docs/references/storage/get-bucket-usage.md create mode 100644 docs/references/storage/get-usage.md create mode 100644 docs/references/users/get-usage.md create mode 100644 docs/references/vcs/create-github-installation.md create mode 100644 docs/references/vcs/create-repository-detection.md create mode 100644 docs/references/vcs/create-repository.md create mode 100644 docs/references/vcs/get-repository-contents.md create mode 100644 docs/references/vcs/get-repository.md create mode 100644 docs/references/vcs/list-repositories.md create mode 100644 docs/references/vcs/list-repository-branches.md create mode 100644 docs/references/vcs/update-external-deployments.md diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 80c2b69ba3..bd9562110f 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -4599,7 +4599,7 @@ App::post('/v1/account/targets/push') ->label('sdk', new Method( namespace: 'account', name: 'createPushTarget', - description: '', + description: '/docs/references/account/create-push-target.md', auth: [AuthType::SESSION], responses: [ new SDKResponse( @@ -4679,7 +4679,7 @@ App::put('/v1/account/targets/:targetId/push') ->label('sdk', new Method( namespace: 'account', name: 'updatePushTarget', - description: '', + description: '/docs/references/account/update-push-target.md', auth: [AuthType::SESSION], responses: [ new SDKResponse( @@ -4743,7 +4743,7 @@ App::delete('/v1/account/targets/:targetId/push') ->label('sdk', new Method( namespace: 'account', name: 'deletePushTarget', - description: '', + description: '/docs/references/account/delete-push-target.md', auth: [AuthType::SESSION], responses: [ new SDKResponse( diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 4107614fa0..65a428c011 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -4150,7 +4150,7 @@ App::get('/v1/databases/usage') ->label('sdk', new Method( namespace: 'databases', name: 'getUsage', - description: '', + description: '/docs/references/databases/get-usage.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -4239,7 +4239,7 @@ App::get('/v1/databases/:databaseId/usage') ->label('sdk', new Method( namespace: 'databases', name: 'getDatabaseUsage', - description: '', + description: '/docs/references/databases/get-database-usage.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -4334,7 +4334,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/usage') ->label('sdk', new Method( namespace: 'databases', name: 'getCollectionUsage', - description: '', + description: '/docs/references/databases/get-collection-usage.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 205f96072e..89d2444366 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -624,7 +624,7 @@ App::get('/v1/functions/:functionId/usage') ->label('sdk', new Method( namespace: 'functions', name: 'getFunctionUsage', - description: '', + description: '/docs/references/functions/get-function-usage.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -735,7 +735,7 @@ App::get('/v1/functions/usage') ->label('sdk', new Method( namespace: 'functions', name: 'getUsage', - description: '', + description: '/docs/references/functions/get-functions-usage.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1704,7 +1704,7 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/build') ->label('sdk', new Method( namespace: 'functions', name: 'createBuild', - description: '', + description: '/docs/references/functions/create-build.md', auth: [AuthType::KEY], responses: [ new SDKResponse( @@ -1779,7 +1779,7 @@ App::patch('/v1/functions/:functionId/deployments/:deploymentId/build') ->label('sdk', new Method( namespace: 'functions', name: 'updateDeploymentBuild', - description: '', + description: '/docs/references/functions/update-deployment-build.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/app/controllers/api/project.php b/app/controllers/api/project.php index 2fc6578c2b..cde2b150f7 100644 --- a/app/controllers/api/project.php +++ b/app/controllers/api/project.php @@ -27,7 +27,7 @@ App::get('/v1/project/usage') ->label('sdk', new Method( namespace: 'project', name: 'getUsage', - description: '', + description: '/docs/references/project/get-usage.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/app/controllers/api/proxy.php b/app/controllers/api/proxy.php index ef39ed0ab6..2567c23be6 100644 --- a/app/controllers/api/proxy.php +++ b/app/controllers/api/proxy.php @@ -327,7 +327,7 @@ App::patch('/v1/proxy/rules/:ruleId/verification') ->label('sdk', new Method( namespace: 'proxy', name: 'updateRuleVerification', - description: '', + description: '/docs/references/proxy/update-rule-verification.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 49f8897884..b6a07c356d 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -1774,7 +1774,7 @@ App::get('/v1/storage/usage') ->label('sdk', new Method( namespace: 'storage', name: 'getUsage', - description: '', + description: '/docs/references/storage/get-usage.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1860,7 +1860,7 @@ App::get('/v1/storage/:bucketId/usage') ->label('sdk', new Method( namespace: 'storage', name: 'getBucketUsage', - description: '', + description: '/docs/references/storage/get-bucket-usage.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index d2c840d368..962022927f 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -2391,7 +2391,7 @@ App::get('/v1/users/usage') ->label('sdk', new Method( namespace: 'users', name: 'getUsage', - description: '', + description: '/docs/references/users/get-usage.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/app/controllers/api/vcs.php b/app/controllers/api/vcs.php index 7c31d93df5..2c145febcc 100644 --- a/app/controllers/api/vcs.php +++ b/app/controllers/api/vcs.php @@ -276,7 +276,7 @@ App::get('/v1/vcs/github/authorize') ->label('sdk', new Method( namespace: 'vcs', name: 'createGitHubInstallation', - description: '', + description: '/docs/references/vcs/create-github-installation.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -457,7 +457,7 @@ App::get('/v1/vcs/github/installations/:installationId/providerRepositories/:pro ->label('sdk', new Method( namespace: 'vcs', name: 'getRepositoryContents', - description: '', + description: '/docs/references/vcs/get-repository-contents.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -523,7 +523,7 @@ App::post('/v1/vcs/github/installations/:installationId/providerRepositories/:pr ->label('sdk', new Method( namespace: 'vcs', name: 'createRepositoryDetection', - description: '', + description: '/docs/references/vcs/create-repository-detection.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -600,7 +600,7 @@ App::get('/v1/vcs/github/installations/:installationId/providerRepositories') ->label('sdk', new Method( namespace: 'vcs', name: 'listRepositories', - description: '', + description: '/docs/references/vcs/list-repositories.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -700,7 +700,7 @@ App::post('/v1/vcs/github/installations/:installationId/providerRepositories') ->label('sdk', new Method( namespace: 'vcs', name: 'createRepository', - description: '', + description: '/docs/references/vcs/create-repository.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -812,7 +812,7 @@ App::get('/v1/vcs/github/installations/:installationId/providerRepositories/:pro ->label('sdk', new Method( namespace: 'vcs', name: 'getRepository', - description: '', + description: '/docs/references/vcs/get-repository.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -866,7 +866,7 @@ App::get('/v1/vcs/github/installations/:installationId/providerRepositories/:pro ->label('sdk', new Method( namespace: 'vcs', name: 'listRepositoryBranches', - description: '', + description: '/docs/references/vcs/list-repository-branches.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1204,7 +1204,7 @@ App::patch('/v1/vcs/github/installations/:installationId/repositories/:repositor ->label('sdk', new Method( namespace: 'vcs', name: 'updateExternalDeployments', - description: '', + description: '/docs/references/vcs/update-external-deployments.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/docs/references/account/create-push-target.md b/docs/references/account/create-push-target.md new file mode 100644 index 0000000000..c54f180638 --- /dev/null +++ b/docs/references/account/create-push-target.md @@ -0,0 +1 @@ +Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model. \ No newline at end of file diff --git a/docs/references/account/delete-push-target.md b/docs/references/account/delete-push-target.md new file mode 100644 index 0000000000..5909a37b27 --- /dev/null +++ b/docs/references/account/delete-push-target.md @@ -0,0 +1 @@ +Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user. \ No newline at end of file diff --git a/docs/references/account/update-push-target.md b/docs/references/account/update-push-target.md new file mode 100644 index 0000000000..997ffaafea --- /dev/null +++ b/docs/references/account/update-push-target.md @@ -0,0 +1 @@ +Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead. \ No newline at end of file diff --git a/docs/references/databases/get-collection-usage.md b/docs/references/databases/get-collection-usage.md new file mode 100644 index 0000000000..48682a075f --- /dev/null +++ b/docs/references/databases/get-collection-usage.md @@ -0,0 +1 @@ +Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/docs/references/databases/get-database-usage.md b/docs/references/databases/get-database-usage.md new file mode 100644 index 0000000000..2c2628a464 --- /dev/null +++ b/docs/references/databases/get-database-usage.md @@ -0,0 +1 @@ +Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/docs/references/databases/get-usage.md b/docs/references/databases/get-usage.md new file mode 100644 index 0000000000..d41f8704c8 --- /dev/null +++ b/docs/references/databases/get-usage.md @@ -0,0 +1 @@ +Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/docs/references/functions/create-build.md b/docs/references/functions/create-build.md new file mode 100644 index 0000000000..7a8ac750e8 --- /dev/null +++ b/docs/references/functions/create-build.md @@ -0,0 +1 @@ +Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build. \ No newline at end of file diff --git a/docs/references/functions/get-function-usage.md b/docs/references/functions/get-function-usage.md new file mode 100644 index 0000000000..4498abb05b --- /dev/null +++ b/docs/references/functions/get-function-usage.md @@ -0,0 +1 @@ +Get usage metrics and statistics for a for a specific function. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days. \ No newline at end of file diff --git a/docs/references/functions/get-functions-usage.md b/docs/references/functions/get-functions-usage.md new file mode 100644 index 0000000000..14427d335d --- /dev/null +++ b/docs/references/functions/get-functions-usage.md @@ -0,0 +1 @@ +Get usage metrics and statistics for a for all functions. View statistics including total functions, deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days. \ No newline at end of file diff --git a/docs/references/functions/update-deployment-build.md b/docs/references/functions/update-deployment-build.md new file mode 100644 index 0000000000..d047990adf --- /dev/null +++ b/docs/references/functions/update-deployment-build.md @@ -0,0 +1 @@ +Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details. \ No newline at end of file diff --git a/docs/references/project/get-usage.md b/docs/references/project/get-usage.md new file mode 100644 index 0000000000..d6802c5588 --- /dev/null +++ b/docs/references/project/get-usage.md @@ -0,0 +1 @@ +Get comprehensive usage statistics for your project. View metrics including network requests, bandwidth, storage, function executions, database usage, and user activity. Specify a time range with startDate and endDate, and optionally set the data granularity with period (1h or 1d). The response includes both total counts and detailed breakdowns by resource, along with historical data over the specified period. \ No newline at end of file diff --git a/docs/references/proxy/update-rule-verification.md b/docs/references/proxy/update-rule-verification.md new file mode 100644 index 0000000000..c06994bc59 --- /dev/null +++ b/docs/references/proxy/update-rule-verification.md @@ -0,0 +1 @@ +Retry getting verification process of a proxy rule. This endpoint triggers domain verification by checking DNS records (CNAME) against the configured target domain. If verification is successful, a TLS certificate will be automatically provisioned for the domain. \ No newline at end of file diff --git a/docs/references/storage/get-bucket-usage.md b/docs/references/storage/get-bucket-usage.md new file mode 100644 index 0000000000..98e9867831 --- /dev/null +++ b/docs/references/storage/get-bucket-usage.md @@ -0,0 +1 @@ +Get usage metrics and statistics a specific bucket in the project. You can view the total number of files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. diff --git a/docs/references/storage/get-usage.md b/docs/references/storage/get-usage.md new file mode 100644 index 0000000000..697c680001 --- /dev/null +++ b/docs/references/storage/get-usage.md @@ -0,0 +1 @@ +Get usage metrics and statistics for all buckets in the project. You can view the total number of buckets, files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. diff --git a/docs/references/users/get-usage.md b/docs/references/users/get-usage.md new file mode 100644 index 0000000000..2a9379c847 --- /dev/null +++ b/docs/references/users/get-usage.md @@ -0,0 +1 @@ +Get usage metrics and statistics for all users in the project. You can view the total number of users and sessions. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. diff --git a/docs/references/vcs/create-github-installation.md b/docs/references/vcs/create-github-installation.md new file mode 100644 index 0000000000..60873faf6d --- /dev/null +++ b/docs/references/vcs/create-github-installation.md @@ -0,0 +1 @@ +Begin Appwrite's GitHub's app installation to set up version control integration. This endpoint responds with a redirect URL to the GitHub App's installation page. The GitHub App must be configured in your environment for this endpoint to work. \ No newline at end of file diff --git a/docs/references/vcs/create-repository-detection.md b/docs/references/vcs/create-repository-detection.md new file mode 100644 index 0000000000..d031cdc746 --- /dev/null +++ b/docs/references/vcs/create-repository-detection.md @@ -0,0 +1 @@ +Analyze a GitHub repository to automatically detect the programming language and runtime environment. This endpoint scans the repository's files and language statistics to determine the appropriate runtime settings for your function. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work. \ No newline at end of file diff --git a/docs/references/vcs/create-repository.md b/docs/references/vcs/create-repository.md new file mode 100644 index 0000000000..771265bd01 --- /dev/null +++ b/docs/references/vcs/create-repository.md @@ -0,0 +1 @@ +Create a new GitHub repository through your installation. This endpoint allows you to create either a public or private repository by specifying a name and visibility setting. The repository will be created under your GitHub user account or organization, depending on your installation type. The GitHub installation must be properly configured and have the necessary permissions for repository creation. \ No newline at end of file diff --git a/docs/references/vcs/get-repository-contents.md b/docs/references/vcs/get-repository-contents.md new file mode 100644 index 0000000000..ab5ef7f8da --- /dev/null +++ b/docs/references/vcs/get-repository-contents.md @@ -0,0 +1 @@ +Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work. diff --git a/docs/references/vcs/get-repository.md b/docs/references/vcs/get-repository.md new file mode 100644 index 0000000000..ee57861114 --- /dev/null +++ b/docs/references/vcs/get-repository.md @@ -0,0 +1 @@ +Get detailed information about a specific GitHub repository from your installation. This endpoint returns repository details including its ID, name, visibility status, organization, and latest push date. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work. \ No newline at end of file diff --git a/docs/references/vcs/list-repositories.md b/docs/references/vcs/list-repositories.md new file mode 100644 index 0000000000..f486e9b584 --- /dev/null +++ b/docs/references/vcs/list-repositories.md @@ -0,0 +1 @@ +Get a list of GitHub repositories available through your installation. This endpoint returns repositories with their basic information, detected runtime environments, and latest push dates. You can optionally filter repositories using a search term. Each repository's runtime is automatically detected based on its contents and language statistics. The GitHub installation must be properly configured for this endpoint to work. \ No newline at end of file diff --git a/docs/references/vcs/list-repository-branches.md b/docs/references/vcs/list-repository-branches.md new file mode 100644 index 0000000000..eea1795a3e --- /dev/null +++ b/docs/references/vcs/list-repository-branches.md @@ -0,0 +1 @@ +Get a list of all branches from a GitHub repository in your installation. This endpoint returns the names of all branches in the repository and their total count. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work. diff --git a/docs/references/vcs/update-external-deployments.md b/docs/references/vcs/update-external-deployments.md new file mode 100644 index 0000000000..22d95da9a7 --- /dev/null +++ b/docs/references/vcs/update-external-deployments.md @@ -0,0 +1 @@ +Authorize and create deployments for a GitHub pull request in your project. This endpoint allows external contributions by creating deployments from pull requests, enabling preview environments for code review. The pull request must be open and not previously authorized. The GitHub installation must be properly configured and have access to both the repository and pull request for this endpoint to work. \ No newline at end of file From 1d1b83afb6f46403a45e256a56910a172bb9ad39 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Fri, 17 Jan 2025 17:27:54 +0000 Subject: [PATCH 041/101] chore: review --- app/controllers/api/teams.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 7efe2a5a2d..d98cfe6f0b 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -582,11 +582,12 @@ App::post('/v1/teams/:teamId/memberships') Authorization::skip(fn () => $dbForProject->increaseDocumentAttribute('teams', $team->getId(), 'total', 1)); } else { - $membership = new Document([ - '$id' => $membership->getId(), - 'joined' => ($isPrivilegedUser || $isAppUser) ? DateTime::now() : null, - 'confirm' => ($isPrivilegedUser || $isAppUser), - ]); + $membership->setAttribute('invited', DateTime::now()); + + if ($isPrivilegedUser || $isAppUser) { + $membership->setAttribute('joined', DateTime::now()); + $membership->setAttribute('confirm', true); + } $membership = ($isPrivilegedUser || $isAppUser) ? Authorization::skip(fn () => $dbForProject->updateDocument('memberships', $membership->getId(), $membership)) : From 45a03822ee9a5b8b358eae9c1b83951fe72e3b91 Mon Sep 17 00:00:00 2001 From: Ebenezer Don Date: Fri, 17 Jan 2025 20:51:50 +0000 Subject: [PATCH 042/101] remove addition to gitignore --- .gitignore | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index a161277965..0c19fd215e 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,4 @@ dev/yasd_init.php .phpunit.result.cache Makefile appwrite.json -/.zed/ -.history -appwrite/.env -appwrite/docker-compose.yml \ No newline at end of file +/.zed/ \ No newline at end of file From 733434fdb8e582130d7c895e66a49638a42df488 Mon Sep 17 00:00:00 2001 From: fogelito Date: Sun, 19 Jan 2025 08:18:22 +0200 Subject: [PATCH 043/101] formatOptions default --- app/init.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/init.php b/app/init.php index 954e29410d..ba775956bd 100644 --- a/app/init.php +++ b/app/init.php @@ -769,7 +769,7 @@ Structure::addFormat(APP_DATABASE_ATTRIBUTE_DATETIME, function () { }, Database::VAR_DATETIME); Structure::addFormat(APP_DATABASE_ATTRIBUTE_ENUM, function ($attribute) { - $elements = $attribute['formatOptions']['elements']; + $elements = $attribute['formatOptions']['elements'] ?? []; return new WhiteList($elements, true); }, Database::VAR_STRING); From fba5060469850273803c925c3a19ab5628a3f106 Mon Sep 17 00:00:00 2001 From: fogelito Date: Sun, 19 Jan 2025 08:30:02 +0200 Subject: [PATCH 044/101] Bumb version --- composer.json | 6 ++-- composer.lock | 92 +++++++++++++++++++++++++-------------------------- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/composer.json b/composer.json index 4e1b5a98a2..0060e2727f 100644 --- a/composer.json +++ b/composer.json @@ -45,13 +45,13 @@ "ext-sockets": "*", "appwrite/php-runtimes": "0.16.*", "appwrite/php-clamav": "2.0.*", - "utopia-php/abuse": "0.46.*", + "utopia-php/abuse": "0.47.*", "utopia-php/analytics": "0.10.*", - "utopia-php/audit": "0.46.*", + "utopia-php/audit": "0.47.*", "utopia-php/cache": "0.11.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.53.32", + "utopia-php/database": "0.56.3", "utopia-php/domains": "0.5.*", "utopia-php/dsn": "0.2.1", "utopia-php/framework": "0.33.*", diff --git a/composer.lock b/composer.lock index 68dbc191bf..a5fafe51ea 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": "3853435a659889e86c16764046950bed", + "content-hash": "8577c89ac09e39dfd8d0c53afe6787bc", "packages": [ { "name": "adhocore/jwt", @@ -1430,16 +1430,16 @@ }, { "name": "open-telemetry/gen-otlp-protobuf", - "version": "1.2.1", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/gen-otlp-protobuf.git", - "reference": "66c3b98e998a726691c92e6405a82e6e7b8b169d" + "reference": "585bafddd4ae6565de154610b10a787a455c9ba0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/gen-otlp-protobuf/zipball/66c3b98e998a726691c92e6405a82e6e7b8b169d", - "reference": "66c3b98e998a726691c92e6405a82e6e7b8b169d", + "url": "https://api.github.com/repos/opentelemetry-php/gen-otlp-protobuf/zipball/585bafddd4ae6565de154610b10a787a455c9ba0", + "reference": "585bafddd4ae6565de154610b10a787a455c9ba0", "shasum": "" }, "require": { @@ -1489,7 +1489,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2024-10-30T11:49:49+00:00" + "time": "2025-01-15T23:07:07+00:00" }, { "name": "open-telemetry/sdk", @@ -3136,16 +3136,16 @@ }, { "name": "utopia-php/abuse", - "version": "0.46.2", + "version": "0.47.0", "source": { "type": "git", "url": "https://github.com/utopia-php/abuse.git", - "reference": "59749df988430b28953fb5cabfad88b0ff5b539b" + "reference": "2b52bb362234d4072b647ed57db1b3be030f57c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/abuse/zipball/59749df988430b28953fb5cabfad88b0ff5b539b", - "reference": "59749df988430b28953fb5cabfad88b0ff5b539b", + "url": "https://api.github.com/repos/utopia-php/abuse/zipball/2b52bb362234d4072b647ed57db1b3be030f57c2", + "reference": "2b52bb362234d4072b647ed57db1b3be030f57c2", "shasum": "" }, "require": { @@ -3153,7 +3153,7 @@ "ext-pdo": "*", "ext-redis": "*", "php": ">=8.0", - "utopia-php/database": "0.53.32" + "utopia-php/database": "0.56.*" }, "require-dev": { "laravel/pint": "1.5.*", @@ -3181,9 +3181,9 @@ ], "support": { "issues": "https://github.com/utopia-php/abuse/issues", - "source": "https://github.com/utopia-php/abuse/tree/0.46.2" + "source": "https://github.com/utopia-php/abuse/tree/0.47.0" }, - "time": "2025-01-13T02:09:43+00:00" + "time": "2025-01-15T02:41:02+00:00" }, { "name": "utopia-php/analytics", @@ -3233,21 +3233,21 @@ }, { "name": "utopia-php/audit", - "version": "0.46.1", + "version": "0.47.0", "source": { "type": "git", "url": "https://github.com/utopia-php/audit.git", - "reference": "21255fa1ce66433140a43d380b2859c7f0a0bb37" + "reference": "1ebd5784ba68645073426f2f04a67726a1bde4d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/audit/zipball/21255fa1ce66433140a43d380b2859c7f0a0bb37", - "reference": "21255fa1ce66433140a43d380b2859c7f0a0bb37", + "url": "https://api.github.com/repos/utopia-php/audit/zipball/1ebd5784ba68645073426f2f04a67726a1bde4d7", + "reference": "1ebd5784ba68645073426f2f04a67726a1bde4d7", "shasum": "" }, "require": { "php": ">=8.0", - "utopia-php/database": "0.53.32" + "utopia-php/database": "0.56.*" }, "require-dev": { "laravel/pint": "1.5.*", @@ -3274,9 +3274,9 @@ ], "support": { "issues": "https://github.com/utopia-php/audit/issues", - "source": "https://github.com/utopia-php/audit/tree/0.46.1" + "source": "https://github.com/utopia-php/audit/tree/0.47.0" }, - "time": "2025-01-13T02:19:56+00:00" + "time": "2025-01-15T02:40:53+00:00" }, { "name": "utopia-php/cache", @@ -3379,16 +3379,16 @@ }, { "name": "utopia-php/compression", - "version": "0.1.2", + "version": "0.1.3", "source": { "type": "git", "url": "https://github.com/utopia-php/compression.git", - "reference": "6062f70596415f8d5de40a589367b0eb2a435f98" + "reference": "66f093557ba66d98245e562036182016c7dcfe8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/compression/zipball/6062f70596415f8d5de40a589367b0eb2a435f98", - "reference": "6062f70596415f8d5de40a589367b0eb2a435f98", + "url": "https://api.github.com/repos/utopia-php/compression/zipball/66f093557ba66d98245e562036182016c7dcfe8a", + "reference": "66f093557ba66d98245e562036182016c7dcfe8a", "shasum": "" }, "require": { @@ -3419,9 +3419,9 @@ ], "support": { "issues": "https://github.com/utopia-php/compression/issues", - "source": "https://github.com/utopia-php/compression/tree/0.1.2" + "source": "https://github.com/utopia-php/compression/tree/0.1.3" }, - "time": "2024-11-08T14:59:54+00:00" + "time": "2025-01-15T15:15:51+00:00" }, { "name": "utopia-php/config", @@ -3476,16 +3476,16 @@ }, { "name": "utopia-php/database", - "version": "0.53.32", + "version": "0.56.3", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "981a1241139b42dccd531511130b79137740b205" + "reference": "b53f7018fd9c9feff4e2235a0011f2f48609f19c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/981a1241139b42dccd531511130b79137740b205", - "reference": "981a1241139b42dccd531511130b79137740b205", + "url": "https://api.github.com/repos/utopia-php/database/zipball/b53f7018fd9c9feff4e2235a0011f2f48609f19c", + "reference": "b53f7018fd9c9feff4e2235a0011f2f48609f19c", "shasum": "" }, "require": { @@ -3526,9 +3526,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.53.32" + "source": "https://github.com/utopia-php/database/tree/0.56.3" }, - "time": "2025-01-10T08:53:47+00:00" + "time": "2025-01-17T04:04:20+00:00" }, { "name": "utopia-php/domains", @@ -3678,16 +3678,16 @@ }, { "name": "utopia-php/framework", - "version": "0.33.15", + "version": "0.33.16", "source": { "type": "git", "url": "https://github.com/utopia-php/http.git", - "reference": "83b0628900c2c53e8c3efbf069f3e13050295edc" + "reference": "e91d4c560d1b809e25faa63d564fef034363b50f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/http/zipball/83b0628900c2c53e8c3efbf069f3e13050295edc", - "reference": "83b0628900c2c53e8c3efbf069f3e13050295edc", + "url": "https://api.github.com/repos/utopia-php/http/zipball/e91d4c560d1b809e25faa63d564fef034363b50f", + "reference": "e91d4c560d1b809e25faa63d564fef034363b50f", "shasum": "" }, "require": { @@ -3719,9 +3719,9 @@ ], "support": { "issues": "https://github.com/utopia-php/http/issues", - "source": "https://github.com/utopia-php/http/tree/0.33.15" + "source": "https://github.com/utopia-php/http/tree/0.33.16" }, - "time": "2024-12-10T13:07:04+00:00" + "time": "2025-01-16T15:58:50+00:00" }, { "name": "utopia-php/image", @@ -3929,16 +3929,16 @@ }, { "name": "utopia-php/migration", - "version": "0.6.14", + "version": "0.6.15", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "59a19f09ded0ccab4c8cca35b1242c01e2b9cfd2" + "reference": "e849ec3e7ad38f5f5273ebb0132b112639cdf01c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/59a19f09ded0ccab4c8cca35b1242c01e2b9cfd2", - "reference": "59a19f09ded0ccab4c8cca35b1242c01e2b9cfd2", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/e849ec3e7ad38f5f5273ebb0132b112639cdf01c", + "reference": "e849ec3e7ad38f5f5273ebb0132b112639cdf01c", "shasum": "" }, "require": { @@ -3946,7 +3946,7 @@ "ext-curl": "*", "ext-openssl": "*", "php": "8.3.*", - "utopia-php/database": "0.53.*", + "utopia-php/database": "0.56.*", "utopia-php/dsn": "0.2.*", "utopia-php/framework": "0.33.*", "utopia-php/storage": "0.18.*" @@ -3979,9 +3979,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.6.14" + "source": "https://github.com/utopia-php/migration/tree/0.6.15" }, - "time": "2025-01-08T01:07:25+00:00" + "time": "2025-01-15T04:55:08+00:00" }, { "name": "utopia-php/mongo", @@ -8556,7 +8556,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { From 0408de32535e9aa226e0ff8bdde4097eec4cd685 Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Mon, 20 Jan 2025 02:14:29 +0000 Subject: [PATCH 045/101] Update Fetch to 0.3.0 --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 4e1b5a98a2..1cdbe5053c 100644 --- a/composer.json +++ b/composer.json @@ -55,7 +55,7 @@ "utopia-php/domains": "0.5.*", "utopia-php/dsn": "0.2.1", "utopia-php/framework": "0.33.*", - "utopia-php/fetch": "0.2.*", + "utopia-php/fetch": "0.3.*", "utopia-php/image": "0.7.*", "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", diff --git a/composer.lock b/composer.lock index 980dcdcd29..dea3ad41f6 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": "3853435a659889e86c16764046950bed", + "content-hash": "92b40e75d531c98b72508dd104eeab0d", "packages": [ { "name": "adhocore/jwt", @@ -3639,16 +3639,16 @@ }, { "name": "utopia-php/fetch", - "version": "0.2.1", + "version": "0.3.0", "source": { "type": "git", "url": "https://github.com/utopia-php/fetch.git", - "reference": "1423c0ee3eef944d816ca6e31706895b585aea82" + "reference": "02b12c05aec13399dcc2da8d51f908e328ab63f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/fetch/zipball/1423c0ee3eef944d816ca6e31706895b585aea82", - "reference": "1423c0ee3eef944d816ca6e31706895b585aea82", + "url": "https://api.github.com/repos/utopia-php/fetch/zipball/02b12c05aec13399dcc2da8d51f908e328ab63f4", + "reference": "02b12c05aec13399dcc2da8d51f908e328ab63f4", "shasum": "" }, "require": { @@ -3672,9 +3672,9 @@ "description": "A simple library that provides an interface for making HTTP Requests.", "support": { "issues": "https://github.com/utopia-php/fetch/issues", - "source": "https://github.com/utopia-php/fetch/tree/0.2.1" + "source": "https://github.com/utopia-php/fetch/tree/0.3.0" }, - "time": "2024-03-18T11:50:59+00:00" + "time": "2025-01-17T06:11:10+00:00" }, { "name": "utopia-php/framework", From f3b395f3f3a0d1ad10a73931354881f182b34396 Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Mon, 20 Jan 2025 12:16:00 +0900 Subject: [PATCH 046/101] Add remaining missing descriptions and enable the desc check --- app/config/specs/open-api3-latest-client.json | 12 +- .../specs/open-api3-latest-console.json | 304 +++++++++--------- app/config/specs/open-api3-latest-server.json | 8 +- app/config/specs/swagger2-latest-client.json | 12 +- app/config/specs/swagger2-latest-console.json | 304 +++++++++--------- app/config/specs/swagger2-latest-server.json | 8 +- app/controllers/api/projects.php | 92 +++--- docs/references/assistant/chat.md | 1 + .../references/migrations/delete-migration.md | 1 + docs/references/migrations/get-migration.md | 1 + docs/references/migrations/list-migrations.md | 1 + .../migrations/migration-appwrite-report.md | 1 + .../migrations/migration-appwrite.md | 1 + .../migrations/migration-firebase-report.md | 1 + .../migrations/migration-firebase.md | 1 + .../migrations/migration-nhost-report.md | 1 + docs/references/migrations/migration-nhost.md | 1 + .../migrations/migration-supabase-report.md | 1 + .../migrations/migration-supabase.md | 1 + docs/references/migrations/retry-migration.md | 1 + docs/references/projects/create-jwt.md | 1 + docs/references/projects/create-key.md | 1 + docs/references/projects/create-platform.md | 1 + docs/references/projects/create-smtp-test.md | 1 + docs/references/projects/create-webhook.md | 1 + docs/references/projects/create.md | 1 + .../projects/delete-email-template.md | 1 + docs/references/projects/delete-key.md | 1 + docs/references/projects/delete-platform.md | 1 + .../projects/delete-sms-template.md | 1 + docs/references/projects/delete-webhook.md | 1 + docs/references/projects/delete.md | 1 + .../references/projects/get-email-template.md | 1 + docs/references/projects/get-key.md | 1 + docs/references/projects/get-platform.md | 1 + docs/references/projects/get-sms-template.md | 1 + docs/references/projects/get-webhook.md | 1 + docs/references/projects/get.md | 1 + docs/references/projects/list-keys.md | 1 + docs/references/projects/list-platforms.md | 1 + docs/references/projects/list-webhooks.md | 1 + docs/references/projects/list.md | 1 + .../projects/update-api-status-all.md | 1 + docs/references/projects/update-api-status.md | 1 + .../projects/update-auth-duration.md | 1 + docs/references/projects/update-auth-limit.md | 1 + .../update-auth-password-dictionary.md | 1 + .../projects/update-auth-password-history.md | 1 + .../projects/update-auth-sessions-limit.md | 1 + .../references/projects/update-auth-status.md | 1 + .../projects/update-email-template.md | 1 + docs/references/projects/update-key.md | 1 + .../projects/update-memberships-privacy.md | 1 + .../projects/update-mock-numbers.md | 1 + docs/references/projects/update-oauth2.md | 1 + .../projects/update-personal-data-check.md | 1 + docs/references/projects/update-platform.md | 1 + .../projects/update-service-status-all.md | 1 + .../projects/update-service-status.md | 1 + .../projects/update-session-alerts.md | 1 + .../projects/update-sms-template.md | 1 + docs/references/projects/update-smtp.md | 1 + docs/references/projects/update-team.md | 1 + .../projects/update-webhook-signature.md | 1 + docs/references/projects/update-webhook.md | 1 + docs/references/projects/update.md | 1 + docs/references/vcs/delete-installation.md | 1 + docs/references/vcs/get-installation.md | 1 + docs/references/vcs/list-installations.md | 1 + src/Appwrite/SDK/Method.php | 2 +- 70 files changed, 433 insertions(+), 371 deletions(-) create mode 100644 docs/references/assistant/chat.md create mode 100644 docs/references/migrations/delete-migration.md create mode 100644 docs/references/migrations/get-migration.md create mode 100644 docs/references/migrations/list-migrations.md create mode 100644 docs/references/migrations/migration-appwrite-report.md create mode 100644 docs/references/migrations/migration-appwrite.md create mode 100644 docs/references/migrations/migration-firebase-report.md create mode 100644 docs/references/migrations/migration-firebase.md create mode 100644 docs/references/migrations/migration-nhost-report.md create mode 100644 docs/references/migrations/migration-nhost.md create mode 100644 docs/references/migrations/migration-supabase-report.md create mode 100644 docs/references/migrations/migration-supabase.md create mode 100644 docs/references/migrations/retry-migration.md create mode 100644 docs/references/projects/create-jwt.md create mode 100644 docs/references/projects/create-key.md create mode 100644 docs/references/projects/create-platform.md create mode 100644 docs/references/projects/create-smtp-test.md create mode 100644 docs/references/projects/create-webhook.md create mode 100644 docs/references/projects/create.md create mode 100644 docs/references/projects/delete-email-template.md create mode 100644 docs/references/projects/delete-key.md create mode 100644 docs/references/projects/delete-platform.md create mode 100644 docs/references/projects/delete-sms-template.md create mode 100644 docs/references/projects/delete-webhook.md create mode 100644 docs/references/projects/delete.md create mode 100644 docs/references/projects/get-email-template.md create mode 100644 docs/references/projects/get-key.md create mode 100644 docs/references/projects/get-platform.md create mode 100644 docs/references/projects/get-sms-template.md create mode 100644 docs/references/projects/get-webhook.md create mode 100644 docs/references/projects/get.md create mode 100644 docs/references/projects/list-keys.md create mode 100644 docs/references/projects/list-platforms.md create mode 100644 docs/references/projects/list-webhooks.md create mode 100644 docs/references/projects/list.md create mode 100644 docs/references/projects/update-api-status-all.md create mode 100644 docs/references/projects/update-api-status.md create mode 100644 docs/references/projects/update-auth-duration.md create mode 100644 docs/references/projects/update-auth-limit.md create mode 100644 docs/references/projects/update-auth-password-dictionary.md create mode 100644 docs/references/projects/update-auth-password-history.md create mode 100644 docs/references/projects/update-auth-sessions-limit.md create mode 100644 docs/references/projects/update-auth-status.md create mode 100644 docs/references/projects/update-email-template.md create mode 100644 docs/references/projects/update-key.md create mode 100644 docs/references/projects/update-memberships-privacy.md create mode 100644 docs/references/projects/update-mock-numbers.md create mode 100644 docs/references/projects/update-oauth2.md create mode 100644 docs/references/projects/update-personal-data-check.md create mode 100644 docs/references/projects/update-platform.md create mode 100644 docs/references/projects/update-service-status-all.md create mode 100644 docs/references/projects/update-service-status.md create mode 100644 docs/references/projects/update-session-alerts.md create mode 100644 docs/references/projects/update-sms-template.md create mode 100644 docs/references/projects/update-smtp.md create mode 100644 docs/references/projects/update-team.md create mode 100644 docs/references/projects/update-webhook-signature.md create mode 100644 docs/references/projects/update-webhook.md create mode 100644 docs/references/projects/update.md create mode 100644 docs/references/vcs/delete-installation.md create mode 100644 docs/references/vcs/get-installation.md create mode 100644 docs/references/vcs/list-installations.md diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 4c82afc8a7..232861f0ff 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -2371,7 +2371,7 @@ "tags": [ "account" ], - "description": "", + "description": "Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.", "responses": { "201": { "description": "Target", @@ -2391,7 +2391,7 @@ "type": "", "deprecated": false, "demo": "account\/create-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -2449,7 +2449,7 @@ "tags": [ "account" ], - "description": "", + "description": "Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.", "responses": { "200": { "description": "Target", @@ -2469,7 +2469,7 @@ "type": "", "deprecated": false, "demo": "account\/update-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -2526,7 +2526,7 @@ "tags": [ "account" ], - "description": "", + "description": "Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.", "responses": { "204": { "description": "No content" @@ -2539,7 +2539,7 @@ "type": "", "deprecated": false, "demo": "account\/delete-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index fa0455e2ee..42ed7b9d28 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -2382,7 +2382,7 @@ "tags": [ "account" ], - "description": "", + "description": "Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.", "responses": { "201": { "description": "Target", @@ -2402,7 +2402,7 @@ "type": "", "deprecated": false, "demo": "account\/create-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -2459,7 +2459,7 @@ "tags": [ "account" ], - "description": "", + "description": "Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.", "responses": { "200": { "description": "Target", @@ -2479,7 +2479,7 @@ "type": "", "deprecated": false, "demo": "account\/update-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -2535,7 +2535,7 @@ "tags": [ "account" ], - "description": "", + "description": "Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.", "responses": { "204": { "description": "No content" @@ -2548,7 +2548,7 @@ "type": "", "deprecated": false, "demo": "account\/delete-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -4285,7 +4285,7 @@ "tags": [ "assistant" ], - "description": "", + "description": "Send a prompt to the AI assistant and receive a response. This endpoint allows you to interact with Appwrite's AI assistant by sending questions or prompts and receiving helpful responses in real-time through a server-sent events stream. ", "responses": { "200": { "description": "File" @@ -4541,7 +4541,7 @@ "tags": [ "databases" ], - "description": "", + "description": "Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { "200": { "description": "UsageDatabases", @@ -4561,7 +4561,7 @@ "type": "", "deprecated": false, "demo": "databases\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -8727,7 +8727,7 @@ "tags": [ "databases" ], - "description": "", + "description": "Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { "200": { "description": "UsageCollection", @@ -8747,7 +8747,7 @@ "type": "", "deprecated": false, "demo": "databases\/get-collection-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -8890,7 +8890,7 @@ "tags": [ "databases" ], - "description": "", + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { "200": { "description": "UsageDatabase", @@ -8910,7 +8910,7 @@ "type": "", "deprecated": false, "demo": "databases\/get-database-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9544,7 +9544,7 @@ "tags": [ "functions" ], - "description": "", + "description": "Get usage metrics and statistics for a for all functions. View statistics including total functions, deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "responses": { "200": { "description": "UsageFunctions", @@ -9564,7 +9564,7 @@ "type": "", "deprecated": false, "demo": "functions\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-functions-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10332,7 +10332,7 @@ "tags": [ "functions" ], - "description": "", + "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "responses": { "204": { "description": "No content" @@ -10345,7 +10345,7 @@ "type": "", "deprecated": false, "demo": "functions\/create-build.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-build.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10409,7 +10409,7 @@ "tags": [ "functions" ], - "description": "", + "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "responses": { "200": { "description": "Build", @@ -10429,7 +10429,7 @@ "type": "", "deprecated": false, "demo": "functions\/update-deployment-build.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-deployment-build.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10877,7 +10877,7 @@ "tags": [ "functions" ], - "description": "", + "description": "Get usage metrics and statistics for a for a specific function. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "responses": { "200": { "description": "UsageFunction", @@ -10897,7 +10897,7 @@ "type": "", "deprecated": false, "demo": "functions\/get-function-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -17482,7 +17482,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.", "responses": { "200": { "description": "Migrations List", @@ -17555,7 +17555,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project. ", "responses": { "202": { "description": "Migration", @@ -17642,7 +17642,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", "responses": { "200": { "description": "Migration Report", @@ -17734,7 +17734,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project. ", "responses": { "202": { "description": "Migration", @@ -17809,7 +17809,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", "responses": { "200": { "description": "Migration Report", @@ -17880,7 +17880,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project. ", "responses": { "202": { "description": "Migration", @@ -17990,7 +17990,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", "responses": { "200": { "description": "Migration Report", @@ -18122,7 +18122,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project. ", "responses": { "202": { "description": "Migration", @@ -18226,7 +18226,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", "responses": { "200": { "description": "Migration Report", @@ -18349,7 +18349,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process. ", "responses": { "200": { "description": "Migration", @@ -18406,7 +18406,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Retry a failed migration. This endpoint allows you to retry a migration that has previously failed.", "responses": { "202": { "description": "Migration", @@ -18463,7 +18463,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Delete a migration by its unique ID. This endpoint allows you to remove a migration from your project's migration history. ", "responses": { "204": { "description": "No content" @@ -18515,7 +18515,7 @@ "tags": [ "project" ], - "description": "", + "description": "Get comprehensive usage statistics for your project. View metrics including network requests, bandwidth, storage, function executions, database usage, and user activity. Specify a time range with startDate and endDate, and optionally set the data granularity with period (1h or 1d). The response includes both total counts and detailed breakdowns by resource, along with historical data over the specified period.", "responses": { "200": { "description": "UsageProject", @@ -18535,7 +18535,7 @@ "type": "", "deprecated": false, "demo": "project\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/get-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -18909,7 +18909,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a list of all projects. You can use the query params to filter your results. ", "responses": { "200": { "description": "Projects List", @@ -18929,7 +18929,7 @@ "type": "", "deprecated": false, "demo": "projects\/list.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -18980,7 +18980,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Create a new project. You can create a maximum of 100 projects per account. ", "responses": { "201": { "description": "Project", @@ -19000,7 +19000,7 @@ "type": "", "deprecated": false, "demo": "projects\/create.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19114,7 +19114,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata. ", "responses": { "200": { "description": "Project", @@ -19134,7 +19134,7 @@ "type": "", "deprecated": false, "demo": "projects\/get.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19171,7 +19171,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a project by its unique ID.", "responses": { "200": { "description": "Project", @@ -19191,7 +19191,7 @@ "type": "", "deprecated": false, "demo": "projects\/update.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19292,7 +19292,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Delete a project by its unique ID.", "responses": { "204": { "description": "No content" @@ -19305,7 +19305,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19344,7 +19344,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.", "responses": { "200": { "description": "Project", @@ -19364,7 +19364,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-api-status.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-api-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19435,7 +19435,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.", "responses": { "200": { "description": "Project", @@ -19455,7 +19455,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-api-status-all.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-api-status-all.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19513,7 +19513,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update how long sessions created within a project should stay active for.", "responses": { "200": { "description": "Project", @@ -19533,7 +19533,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-duration.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-duration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19591,7 +19591,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the maximum number of users allowed in this project. Set to 0 for unlimited users. ", "responses": { "200": { "description": "Project", @@ -19611,7 +19611,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-limit.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-limit.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19669,7 +19669,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions.", "responses": { "200": { "description": "Project", @@ -19689,7 +19689,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-sessions-limit.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-sessions-limit.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19747,7 +19747,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update project membership privacy settings. Use this endpoint to control what user information is visible to other team members, such as user name, email, and MFA status. ", "responses": { "200": { "description": "Project", @@ -19767,7 +19767,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-memberships-privacy.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-memberships-privacy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19837,7 +19837,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the list of mock phone numbers for testing. Use these numbers to bypass SMS verification in development. ", "responses": { "200": { "description": "Project", @@ -19857,7 +19857,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-mock-numbers.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-mock-numbers.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19918,7 +19918,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don't use common and insecure passwords. ", "responses": { "200": { "description": "Project", @@ -19938,7 +19938,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-password-dictionary.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-password-dictionary.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19996,7 +19996,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the authentication password history requirement. Use this endpoint to require new passwords to be different than the last X amount of previously used ones.", "responses": { "200": { "description": "Project", @@ -20016,7 +20016,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-password-history.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-password-history.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20074,7 +20074,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords. ", "responses": { "200": { "description": "Project", @@ -20094,7 +20094,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-personal-data-check.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-personal-data-check.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20152,7 +20152,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.", "responses": { "200": { "description": "Project", @@ -20172,7 +20172,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-session-alerts.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-session-alerts.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20230,7 +20230,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the status of a specific authentication method. Use this endpoint to enable or disable different authentication methods such as email, magic urls or sms in your project. ", "responses": { "200": { "description": "Project", @@ -20250,7 +20250,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-status.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20329,7 +20329,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time. ", "responses": { "201": { "description": "JWT", @@ -20349,7 +20349,7 @@ "type": "", "deprecated": false, "demo": "projects\/create-j-w-t.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-jwt.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20415,7 +20415,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a list of all API keys from the current project. ", "responses": { "200": { "description": "API Keys List", @@ -20435,7 +20435,7 @@ "type": "", "deprecated": false, "demo": "projects\/list-keys.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-keys.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20472,7 +20472,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.", "responses": { "201": { "description": "Key", @@ -20492,7 +20492,7 @@ "type": "", "deprecated": false, "demo": "projects\/create-key.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20564,7 +20564,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it's scopes.", "responses": { "200": { "description": "Key", @@ -20584,7 +20584,7 @@ "type": "", "deprecated": false, "demo": "projects\/get-key.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20631,7 +20631,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key. ", "responses": { "200": { "description": "Key", @@ -20651,7 +20651,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-key.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20731,7 +20731,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls. ", "responses": { "204": { "description": "No content" @@ -20744,7 +20744,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete-key.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20793,7 +20793,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable\/disable providers. ", "responses": { "200": { "description": "Project", @@ -20813,7 +20813,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-o-auth2.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-oauth2.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20929,7 +20929,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations. ", "responses": { "200": { "description": "Platforms List", @@ -20949,7 +20949,7 @@ "type": "", "deprecated": false, "demo": "projects\/list-platforms.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-platforms.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20986,7 +20986,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Create a new platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.", "responses": { "201": { "description": "Platform", @@ -21006,7 +21006,7 @@ "type": "", "deprecated": false, "demo": "projects\/create-platform.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21104,7 +21104,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations. ", "responses": { "200": { "description": "Platform", @@ -21124,7 +21124,7 @@ "type": "", "deprecated": false, "demo": "projects\/get-platform.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21171,7 +21171,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a platform by its unique ID. Use this endpoint to update the platform's name, key, platform store ID, or hostname. ", "responses": { "200": { "description": "Platform", @@ -21191,7 +21191,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-platform.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21272,7 +21272,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project. ", "responses": { "204": { "description": "No content" @@ -21285,7 +21285,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete-platform.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21334,7 +21334,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the status of a specific service. Use this endpoint to enable or disable a service in your project. ", "responses": { "200": { "description": "Project", @@ -21354,7 +21354,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-service-status.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-service-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21433,7 +21433,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the status of all services. Use this endpoint to enable or disable all optional services at once. ", "responses": { "200": { "description": "Project", @@ -21453,7 +21453,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-service-status-all.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-service-status-all.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21511,7 +21511,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails. ", "responses": { "200": { "description": "Project", @@ -21531,7 +21531,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-smtp.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-smtp.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21635,7 +21635,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Send a test email to verify SMTP configuration. ", "responses": { "204": { "description": "No content" @@ -21648,7 +21648,7 @@ "type": "", "deprecated": false, "demo": "projects\/create-smtp-test.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-smtp-test.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21758,7 +21758,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the team ID of a project allowing for it to be transferred to another team.", "responses": { "200": { "description": "Project", @@ -21778,7 +21778,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-team.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-team.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21836,7 +21836,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details. ", "responses": { "200": { "description": "EmailTemplate", @@ -21856,7 +21856,7 @@ "type": "", "deprecated": false, "demo": "projects\/get-email-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-email-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22059,7 +22059,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.", "responses": { "200": { "description": "EmailTemplate", @@ -22079,7 +22079,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-email-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-email-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22322,7 +22322,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Reset a custom email template to its default value. This endpoint removes any custom content and restores the template to its original state. ", "responses": { "200": { "description": "EmailTemplate", @@ -22342,7 +22342,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete-email-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-email-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22547,7 +22547,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a custom SMS template for the specified locale and type returning it's contents.", "responses": { "200": { "description": "SmsTemplate", @@ -22567,7 +22567,7 @@ "type": "", "deprecated": false, "demo": "projects\/get-sms-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-sms-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22767,7 +22767,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. ", "responses": { "200": { "description": "SmsTemplate", @@ -22787,7 +22787,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-sms-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-sms-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23006,7 +23006,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. ", "responses": { "200": { "description": "SmsTemplate", @@ -23026,7 +23026,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete-sms-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-sms-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23228,7 +23228,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a list of all webhooks belonging to the project. You can use the query params to filter your results. ", "responses": { "200": { "description": "Webhooks List", @@ -23248,7 +23248,7 @@ "type": "", "deprecated": false, "demo": "projects\/list-webhooks.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-webhooks.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23285,7 +23285,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur. ", "responses": { "201": { "description": "Webhook", @@ -23305,7 +23305,7 @@ "type": "", "deprecated": false, "demo": "projects\/create-webhook.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-webhook.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23399,7 +23399,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. ", "responses": { "200": { "description": "Webhook", @@ -23419,7 +23419,7 @@ "type": "", "deprecated": false, "demo": "projects\/get-webhook.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-webhook.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23466,7 +23466,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook. ", "responses": { "200": { "description": "Webhook", @@ -23486,7 +23486,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-webhook.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-webhook.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23588,7 +23588,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. ", "responses": { "204": { "description": "No content" @@ -23601,7 +23601,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete-webhook.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-webhook.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23650,7 +23650,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook. ", "responses": { "200": { "description": "Webhook", @@ -23670,7 +23670,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-webhook-signature.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-webhook-signature.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23982,7 +23982,7 @@ "tags": [ "proxy" ], - "description": "", + "description": "Retry getting verification process of a proxy rule. This endpoint triggers domain verification by checking DNS records (CNAME) against the configured target domain. If verification is successful, a TLS certificate will be automatically provisioned for the domain.", "responses": { "200": { "description": "Rule", @@ -24002,7 +24002,7 @@ "type": "", "deprecated": false, "demo": "proxy\/update-rule-verification.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/update-rule-verification.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -25241,7 +25241,7 @@ "tags": [ "storage" ], - "description": "", + "description": "Get usage metrics and statistics for all buckets in the project. You can view the total number of buckets, files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.\n", "responses": { "200": { "description": "StorageUsage", @@ -25261,7 +25261,7 @@ "type": "", "deprecated": false, "demo": "storage\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -25312,7 +25312,7 @@ "tags": [ "storage" ], - "description": "", + "description": "Get usage metrics and statistics a specific bucket in the project. You can view the total number of files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.\n", "responses": { "200": { "description": "UsageBuckets", @@ -25332,7 +25332,7 @@ "type": "", "deprecated": false, "demo": "storage\/get-bucket-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -27423,7 +27423,7 @@ "tags": [ "users" ], - "description": "", + "description": "Get usage metrics and statistics for all users in the project. You can view the total number of users and sessions. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.\n", "responses": { "200": { "description": "UsageUsers", @@ -27443,7 +27443,7 @@ "type": "", "deprecated": false, "demo": "users\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -29696,7 +29696,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Get a list of GitHub repositories available through your installation. This endpoint returns repositories with their basic information, detected runtime environments, and latest push dates. You can optionally filter repositories using a search term. Each repository's runtime is automatically detected based on its contents and language statistics. The GitHub installation must be properly configured for this endpoint to work.", "responses": { "200": { "description": "Provider Repositories List", @@ -29716,7 +29716,7 @@ "type": "", "deprecated": false, "demo": "vcs\/list-repositories.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repositories.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -29764,7 +29764,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Create a new GitHub repository through your installation. This endpoint allows you to create either a public or private repository by specifying a name and visibility setting. The repository will be created under your GitHub user account or organization, depending on your installation type. The GitHub installation must be properly configured and have the necessary permissions for repository creation.", "responses": { "200": { "description": "ProviderRepository", @@ -29784,7 +29784,7 @@ "type": "", "deprecated": false, "demo": "vcs\/create-repository.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -29848,7 +29848,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Get detailed information about a specific GitHub repository from your installation. This endpoint returns repository details including its ID, name, visibility status, organization, and latest push date. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.", "responses": { "200": { "description": "ProviderRepository", @@ -29868,7 +29868,7 @@ "type": "", "deprecated": false, "demo": "vcs\/get-repository.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -29917,7 +29917,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Get a list of all branches from a GitHub repository in your installation. This endpoint returns the names of all branches in the repository and their total count. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.\n", "responses": { "200": { "description": "Branches List", @@ -29937,7 +29937,7 @@ "type": "", "deprecated": false, "demo": "vcs\/list-repository-branches.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repository-branches.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -29986,7 +29986,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.\n", "responses": { "200": { "description": "VCS Content List", @@ -30006,7 +30006,7 @@ "type": "", "deprecated": false, "demo": "vcs\/get-repository-contents.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository-contents.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -30066,7 +30066,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Analyze a GitHub repository to automatically detect the programming language and runtime environment. This endpoint scans the repository's files and language statistics to determine the appropriate runtime settings for your function. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", "responses": { "200": { "description": "Detection", @@ -30086,7 +30086,7 @@ "type": "", "deprecated": false, "demo": "vcs\/create-repository-detection.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository-detection.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -30151,7 +30151,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Authorize and create deployments for a GitHub pull request in your project. This endpoint allows external contributions by creating deployments from pull requests, enabling preview environments for code review. The pull request must be open and not previously authorized. The GitHub installation must be properly configured and have access to both the repository and pull request for this endpoint to work.", "responses": { "204": { "description": "No content" @@ -30164,7 +30164,7 @@ "type": "", "deprecated": false, "demo": "vcs\/update-external-deployments.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/update-external-deployments.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -30232,7 +30232,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "List all VCS installations configured for the current project. This endpoint returns a list of installations including their provider, organization, and other configuration details.\n", "responses": { "200": { "description": "Installations List", @@ -30305,7 +30305,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Get a VCS installation by its unique ID. This endpoint returns the installation's details including its provider, organization, and configuration. ", "responses": { "200": { "description": "Installation", @@ -30362,7 +30362,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Delete a VCS installation by its unique ID. This endpoint removes the installation and all its associated repositories from the project.", "responses": { "204": { "description": "No content" diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index d0630d8ac1..aee66626cf 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -9267,7 +9267,7 @@ "tags": [ "functions" ], - "description": "", + "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "responses": { "204": { "description": "No content" @@ -9280,7 +9280,7 @@ "type": "", "deprecated": false, "demo": "functions\/create-build.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-build.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9345,7 +9345,7 @@ "tags": [ "functions" ], - "description": "", + "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "responses": { "200": { "description": "Build", @@ -9365,7 +9365,7 @@ "type": "", "deprecated": false, "demo": "functions\/update-deployment-build.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-deployment-build.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 17eef07fdc..5369cd4c92 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -2508,7 +2508,7 @@ "tags": [ "account" ], - "description": "", + "description": "Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.", "responses": { "201": { "description": "Target", @@ -2524,7 +2524,7 @@ "type": "", "deprecated": false, "demo": "account\/create-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -2591,7 +2591,7 @@ "tags": [ "account" ], - "description": "", + "description": "Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.", "responses": { "200": { "description": "Target", @@ -2607,7 +2607,7 @@ "type": "", "deprecated": false, "demo": "account\/update-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -2665,7 +2665,7 @@ "tags": [ "account" ], - "description": "", + "description": "Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.", "responses": { "204": { "description": "No content" @@ -2678,7 +2678,7 @@ "type": "", "deprecated": false, "demo": "account\/delete-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index b2f4797690..f9a423d954 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -2535,7 +2535,7 @@ "tags": [ "account" ], - "description": "", + "description": "Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.", "responses": { "201": { "description": "Target", @@ -2551,7 +2551,7 @@ "type": "", "deprecated": false, "demo": "account\/create-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -2617,7 +2617,7 @@ "tags": [ "account" ], - "description": "", + "description": "Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.", "responses": { "200": { "description": "Target", @@ -2633,7 +2633,7 @@ "type": "", "deprecated": false, "demo": "account\/update-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -2690,7 +2690,7 @@ "tags": [ "account" ], - "description": "", + "description": "Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.", "responses": { "204": { "description": "No content" @@ -2703,7 +2703,7 @@ "type": "", "deprecated": false, "demo": "account\/delete-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -4486,7 +4486,7 @@ "tags": [ "assistant" ], - "description": "", + "description": "Send a prompt to the AI assistant and receive a response. This endpoint allows you to interact with Appwrite's AI assistant by sending questions or prompts and receiving helpful responses in real-time through a server-sent events stream. ", "responses": { "200": { "description": "File", @@ -4758,7 +4758,7 @@ "tags": [ "databases" ], - "description": "", + "description": "Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { "200": { "description": "UsageDatabases", @@ -4774,7 +4774,7 @@ "type": "", "deprecated": false, "demo": "databases\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -8887,7 +8887,7 @@ "tags": [ "databases" ], - "description": "", + "description": "Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { "200": { "description": "UsageCollection", @@ -8903,7 +8903,7 @@ "type": "", "deprecated": false, "demo": "databases\/get-collection-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9045,7 +9045,7 @@ "tags": [ "databases" ], - "description": "", + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { "200": { "description": "UsageDatabase", @@ -9061,7 +9061,7 @@ "type": "", "deprecated": false, "demo": "databases\/get-database-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9720,7 +9720,7 @@ "tags": [ "functions" ], - "description": "", + "description": "Get usage metrics and statistics for a for all functions. View statistics including total functions, deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "responses": { "200": { "description": "UsageFunctions", @@ -9736,7 +9736,7 @@ "type": "", "deprecated": false, "demo": "functions\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-functions-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10514,7 +10514,7 @@ "tags": [ "functions" ], - "description": "", + "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "responses": { "204": { "description": "No content" @@ -10527,7 +10527,7 @@ "type": "", "deprecated": false, "demo": "functions\/create-build.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-build.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10592,7 +10592,7 @@ "tags": [ "functions" ], - "description": "", + "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "responses": { "200": { "description": "Build", @@ -10608,7 +10608,7 @@ "type": "", "deprecated": false, "demo": "functions\/update-deployment-build.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-deployment-build.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11062,7 +11062,7 @@ "tags": [ "functions" ], - "description": "", + "description": "Get usage metrics and statistics for a for a specific function. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "responses": { "200": { "description": "UsageFunction", @@ -11078,7 +11078,7 @@ "type": "", "deprecated": false, "demo": "functions\/get-function-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -17946,7 +17946,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.", "responses": { "200": { "description": "Migrations List", @@ -18018,7 +18018,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project. ", "responses": { "202": { "description": "Migration", @@ -18111,7 +18111,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", "responses": { "200": { "description": "Migration Report", @@ -18198,7 +18198,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project. ", "responses": { "202": { "description": "Migration", @@ -18277,7 +18277,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", "responses": { "200": { "description": "Migration Report", @@ -18347,7 +18347,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project. ", "responses": { "202": { "description": "Migration", @@ -18467,7 +18467,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", "responses": { "200": { "description": "Migration Report", @@ -18586,7 +18586,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project. ", "responses": { "202": { "description": "Migration", @@ -18699,7 +18699,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", "responses": { "200": { "description": "Migration Report", @@ -18811,7 +18811,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process. ", "responses": { "200": { "description": "Migration", @@ -18868,7 +18868,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Retry a failed migration. This endpoint allows you to retry a migration that has previously failed.", "responses": { "202": { "description": "Migration", @@ -18923,7 +18923,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Delete a migration by its unique ID. This endpoint allows you to remove a migration from your project's migration history. ", "responses": { "204": { "description": "No content" @@ -18979,7 +18979,7 @@ "tags": [ "project" ], - "description": "", + "description": "Get comprehensive usage statistics for your project. View metrics including network requests, bandwidth, storage, function executions, database usage, and user activity. Specify a time range with startDate and endDate, and optionally set the data granularity with period (1h or 1d). The response includes both total counts and detailed breakdowns by resource, along with historical data over the specified period.", "responses": { "200": { "description": "UsageProject", @@ -18995,7 +18995,7 @@ "type": "", "deprecated": false, "demo": "project\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/get-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19377,7 +19377,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a list of all projects. You can use the query params to filter your results. ", "responses": { "200": { "description": "Projects List", @@ -19393,7 +19393,7 @@ "type": "", "deprecated": false, "demo": "projects\/list.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19447,7 +19447,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Create a new project. You can create a maximum of 100 projects per account. ", "responses": { "201": { "description": "Project", @@ -19463,7 +19463,7 @@ "type": "", "deprecated": false, "demo": "projects\/create.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19596,7 +19596,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata. ", "responses": { "200": { "description": "Project", @@ -19612,7 +19612,7 @@ "type": "", "deprecated": false, "demo": "projects\/get.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19653,7 +19653,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a project by its unique ID.", "responses": { "200": { "description": "Project", @@ -19669,7 +19669,7 @@ "type": "", "deprecated": false, "demo": "projects\/update.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19780,7 +19780,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Delete a project by its unique ID.", "responses": { "204": { "description": "No content" @@ -19793,7 +19793,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19836,7 +19836,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.", "responses": { "200": { "description": "Project", @@ -19852,7 +19852,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-api-status.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-api-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19927,7 +19927,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.", "responses": { "200": { "description": "Project", @@ -19943,7 +19943,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-api-status-all.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-api-status-all.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20004,7 +20004,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update how long sessions created within a project should stay active for.", "responses": { "200": { "description": "Project", @@ -20020,7 +20020,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-duration.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-duration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20081,7 +20081,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the maximum number of users allowed in this project. Set to 0 for unlimited users. ", "responses": { "200": { "description": "Project", @@ -20097,7 +20097,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-limit.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-limit.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20158,7 +20158,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions.", "responses": { "200": { "description": "Project", @@ -20174,7 +20174,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-sessions-limit.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-sessions-limit.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20235,7 +20235,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update project membership privacy settings. Use this endpoint to control what user information is visible to other team members, such as user name, email, and MFA status. ", "responses": { "200": { "description": "Project", @@ -20251,7 +20251,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-memberships-privacy.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-memberships-privacy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20326,7 +20326,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the list of mock phone numbers for testing. Use these numbers to bypass SMS verification in development. ", "responses": { "200": { "description": "Project", @@ -20342,7 +20342,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-mock-numbers.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-mock-numbers.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20406,7 +20406,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don't use common and insecure passwords. ", "responses": { "200": { "description": "Project", @@ -20422,7 +20422,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-password-dictionary.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-password-dictionary.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20483,7 +20483,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the authentication password history requirement. Use this endpoint to require new passwords to be different than the last X amount of previously used ones.", "responses": { "200": { "description": "Project", @@ -20499,7 +20499,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-password-history.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-password-history.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20560,7 +20560,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords. ", "responses": { "200": { "description": "Project", @@ -20576,7 +20576,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-personal-data-check.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-personal-data-check.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20637,7 +20637,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.", "responses": { "200": { "description": "Project", @@ -20653,7 +20653,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-session-alerts.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-session-alerts.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20714,7 +20714,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the status of a specific authentication method. Use this endpoint to enable or disable different authentication methods such as email, magic urls or sms in your project. ", "responses": { "200": { "description": "Project", @@ -20730,7 +20730,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-status.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20810,7 +20810,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time. ", "responses": { "201": { "description": "JWT", @@ -20826,7 +20826,7 @@ "type": "", "deprecated": false, "demo": "projects\/create-j-w-t.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-jwt.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20896,7 +20896,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a list of all API keys from the current project. ", "responses": { "200": { "description": "API Keys List", @@ -20912,7 +20912,7 @@ "type": "", "deprecated": false, "demo": "projects\/list-keys.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-keys.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20953,7 +20953,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.", "responses": { "201": { "description": "Key", @@ -20969,7 +20969,7 @@ "type": "", "deprecated": false, "demo": "projects\/create-key.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21046,7 +21046,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it's scopes.", "responses": { "200": { "description": "Key", @@ -21062,7 +21062,7 @@ "type": "", "deprecated": false, "demo": "projects\/get-key.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21111,7 +21111,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key. ", "responses": { "200": { "description": "Key", @@ -21127,7 +21127,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-key.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21208,7 +21208,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls. ", "responses": { "204": { "description": "No content" @@ -21221,7 +21221,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete-key.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21272,7 +21272,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable\/disable providers. ", "responses": { "200": { "description": "Project", @@ -21288,7 +21288,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-o-auth2.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-oauth2.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21410,7 +21410,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations. ", "responses": { "200": { "description": "Platforms List", @@ -21426,7 +21426,7 @@ "type": "", "deprecated": false, "demo": "projects\/list-platforms.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-platforms.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21467,7 +21467,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Create a new platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.", "responses": { "201": { "description": "Platform", @@ -21483,7 +21483,7 @@ "type": "", "deprecated": false, "demo": "projects\/create-platform.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21588,7 +21588,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations. ", "responses": { "200": { "description": "Platform", @@ -21604,7 +21604,7 @@ "type": "", "deprecated": false, "demo": "projects\/get-platform.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21653,7 +21653,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a platform by its unique ID. Use this endpoint to update the platform's name, key, platform store ID, or hostname. ", "responses": { "200": { "description": "Platform", @@ -21669,7 +21669,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-platform.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21752,7 +21752,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project. ", "responses": { "204": { "description": "No content" @@ -21765,7 +21765,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete-platform.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21816,7 +21816,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the status of a specific service. Use this endpoint to enable or disable a service in your project. ", "responses": { "200": { "description": "Project", @@ -21832,7 +21832,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-service-status.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-service-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21915,7 +21915,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the status of all services. Use this endpoint to enable or disable all optional services at once. ", "responses": { "200": { "description": "Project", @@ -21931,7 +21931,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-service-status-all.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-service-status-all.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21992,7 +21992,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails. ", "responses": { "200": { "description": "Project", @@ -22008,7 +22008,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-smtp.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-smtp.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22123,7 +22123,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Send a test email to verify SMTP configuration. ", "responses": { "204": { "description": "No content" @@ -22136,7 +22136,7 @@ "type": "", "deprecated": false, "demo": "projects\/create-smtp-test.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-smtp-test.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22257,7 +22257,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the team ID of a project allowing for it to be transferred to another team.", "responses": { "200": { "description": "Project", @@ -22273,7 +22273,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-team.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-team.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22334,7 +22334,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details. ", "responses": { "200": { "description": "EmailTemplate", @@ -22350,7 +22350,7 @@ "type": "", "deprecated": false, "demo": "projects\/get-email-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-email-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22553,7 +22553,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.", "responses": { "200": { "description": "EmailTemplate", @@ -22569,7 +22569,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-email-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-email-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22815,7 +22815,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Reset a custom email template to its default value. This endpoint removes any custom content and restores the template to its original state. ", "responses": { "200": { "description": "EmailTemplate", @@ -22831,7 +22831,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete-email-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-email-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23036,7 +23036,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a custom SMS template for the specified locale and type returning it's contents.", "responses": { "200": { "description": "SmsTemplate", @@ -23052,7 +23052,7 @@ "type": "", "deprecated": false, "demo": "projects\/get-sms-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-sms-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23252,7 +23252,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. ", "responses": { "200": { "description": "SmsTemplate", @@ -23268,7 +23268,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-sms-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-sms-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23486,7 +23486,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. ", "responses": { "200": { "description": "SmsTemplate", @@ -23502,7 +23502,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete-sms-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-sms-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23704,7 +23704,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a list of all webhooks belonging to the project. You can use the query params to filter your results. ", "responses": { "200": { "description": "Webhooks List", @@ -23720,7 +23720,7 @@ "type": "", "deprecated": false, "demo": "projects\/list-webhooks.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-webhooks.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23761,7 +23761,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur. ", "responses": { "201": { "description": "Webhook", @@ -23777,7 +23777,7 @@ "type": "", "deprecated": false, "demo": "projects\/create-webhook.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-webhook.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23880,7 +23880,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. ", "responses": { "200": { "description": "Webhook", @@ -23896,7 +23896,7 @@ "type": "", "deprecated": false, "demo": "projects\/get-webhook.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-webhook.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23945,7 +23945,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook. ", "responses": { "200": { "description": "Webhook", @@ -23961,7 +23961,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-webhook.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-webhook.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -24068,7 +24068,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. ", "responses": { "204": { "description": "No content" @@ -24081,7 +24081,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete-webhook.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-webhook.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -24132,7 +24132,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook. ", "responses": { "200": { "description": "Webhook", @@ -24148,7 +24148,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-webhook-signature.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-webhook-signature.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -24468,7 +24468,7 @@ "tags": [ "proxy" ], - "description": "", + "description": "Retry getting verification process of a proxy rule. This endpoint triggers domain verification by checking DNS records (CNAME) against the configured target domain. If verification is successful, a TLS certificate will be automatically provisioned for the domain.", "responses": { "200": { "description": "Rule", @@ -24484,7 +24484,7 @@ "type": "", "deprecated": false, "demo": "proxy\/update-rule-verification.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/update-rule-verification.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -25727,7 +25727,7 @@ "tags": [ "storage" ], - "description": "", + "description": "Get usage metrics and statistics for all buckets in the project. You can view the total number of buckets, files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.\n", "responses": { "200": { "description": "StorageUsage", @@ -25743,7 +25743,7 @@ "type": "", "deprecated": false, "demo": "storage\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -25798,7 +25798,7 @@ "tags": [ "storage" ], - "description": "", + "description": "Get usage metrics and statistics a specific bucket in the project. You can view the total number of files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.\n", "responses": { "200": { "description": "UsageBuckets", @@ -25814,7 +25814,7 @@ "type": "", "deprecated": false, "demo": "storage\/get-bucket-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -27964,7 +27964,7 @@ "tags": [ "users" ], - "description": "", + "description": "Get usage metrics and statistics for all users in the project. You can view the total number of users and sessions. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.\n", "responses": { "200": { "description": "UsageUsers", @@ -27980,7 +27980,7 @@ "type": "", "deprecated": false, "demo": "users\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -30229,7 +30229,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Get a list of GitHub repositories available through your installation. This endpoint returns repositories with their basic information, detected runtime environments, and latest push dates. You can optionally filter repositories using a search term. Each repository's runtime is automatically detected based on its contents and language statistics. The GitHub installation must be properly configured for this endpoint to work.", "responses": { "200": { "description": "Provider Repositories List", @@ -30245,7 +30245,7 @@ "type": "", "deprecated": false, "demo": "vcs\/list-repositories.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repositories.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -30295,7 +30295,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Create a new GitHub repository through your installation. This endpoint allows you to create either a public or private repository by specifying a name and visibility setting. The repository will be created under your GitHub user account or organization, depending on your installation type. The GitHub installation must be properly configured and have the necessary permissions for repository creation.", "responses": { "200": { "description": "ProviderRepository", @@ -30311,7 +30311,7 @@ "type": "", "deprecated": false, "demo": "vcs\/create-repository.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -30379,7 +30379,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Get detailed information about a specific GitHub repository from your installation. This endpoint returns repository details including its ID, name, visibility status, organization, and latest push date. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.", "responses": { "200": { "description": "ProviderRepository", @@ -30395,7 +30395,7 @@ "type": "", "deprecated": false, "demo": "vcs\/get-repository.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -30446,7 +30446,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Get a list of all branches from a GitHub repository in your installation. This endpoint returns the names of all branches in the repository and their total count. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.\n", "responses": { "200": { "description": "Branches List", @@ -30462,7 +30462,7 @@ "type": "", "deprecated": false, "demo": "vcs\/list-repository-branches.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repository-branches.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -30513,7 +30513,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.\n", "responses": { "200": { "description": "VCS Content List", @@ -30529,7 +30529,7 @@ "type": "", "deprecated": false, "demo": "vcs\/get-repository-contents.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository-contents.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -30589,7 +30589,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Analyze a GitHub repository to automatically detect the programming language and runtime environment. This endpoint scans the repository's files and language statistics to determine the appropriate runtime settings for your function. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", "responses": { "200": { "description": "Detection", @@ -30605,7 +30605,7 @@ "type": "", "deprecated": false, "demo": "vcs\/create-repository-detection.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository-detection.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -30671,7 +30671,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Authorize and create deployments for a GitHub pull request in your project. This endpoint allows external contributions by creating deployments from pull requests, enabling preview environments for code review. The pull request must be open and not previously authorized. The GitHub installation must be properly configured and have access to both the repository and pull request for this endpoint to work.", "responses": { "204": { "description": "No content" @@ -30684,7 +30684,7 @@ "type": "", "deprecated": false, "demo": "vcs\/update-external-deployments.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/update-external-deployments.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -30753,7 +30753,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "List all VCS installations configured for the current project. This endpoint returns a list of installations including their provider, organization, and other configuration details.\n", "responses": { "200": { "description": "Installations List", @@ -30825,7 +30825,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Get a VCS installation by its unique ID. This endpoint returns the installation's details including its provider, organization, and configuration. ", "responses": { "200": { "description": "Installation", @@ -30880,7 +30880,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Delete a VCS installation by its unique ID. This endpoint removes the installation and all its associated repositories from the project.", "responses": { "204": { "description": "No content" diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 3d787172a9..a3c6a0d70c 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -9450,7 +9450,7 @@ "tags": [ "functions" ], - "description": "", + "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "responses": { "204": { "description": "No content" @@ -9463,7 +9463,7 @@ "type": "", "deprecated": false, "demo": "functions\/create-build.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-build.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9529,7 +9529,7 @@ "tags": [ "functions" ], - "description": "", + "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "responses": { "200": { "description": "Build", @@ -9545,7 +9545,7 @@ "type": "", "deprecated": false, "demo": "functions\/update-deployment-build.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-deployment-build.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index c40d7601c4..48d20cd17f 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -69,7 +69,7 @@ App::post('/v1/projects') ->label('sdk', new Method( namespace: 'projects', name: 'create', - description: '', + description: '/docs/references/projects/create.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -298,7 +298,7 @@ App::get('/v1/projects') ->label('sdk', new Method( namespace: 'projects', name: 'list', - description: '', + description: '/docs/references/projects/list.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -363,7 +363,7 @@ App::get('/v1/projects/:projectId') ->label('sdk', new Method( namespace: 'projects', name: 'get', - description: '', + description: '/docs/references/projects/get.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -395,7 +395,7 @@ App::patch('/v1/projects/:projectId') ->label('sdk', new Method( namespace: 'projects', name: 'update', - description: '', + description: '/docs/references/projects/update.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -448,7 +448,7 @@ App::patch('/v1/projects/:projectId/team') ->label('sdk', new Method( namespace: 'projects', name: 'updateTeam', - description: '', + description: '/docs/references/projects/update-team.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -522,7 +522,7 @@ App::patch('/v1/projects/:projectId/service') ->label('sdk', new Method( namespace: 'projects', name: 'updateServiceStatus', - description: '', + description: '/docs/references/projects/update-service-status.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -559,7 +559,7 @@ App::patch('/v1/projects/:projectId/service/all') ->label('sdk', new Method( namespace: 'projects', name: 'updateServiceStatusAll', - description: '', + description: '/docs/references/projects/update-service-status-all.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -599,7 +599,7 @@ App::patch('/v1/projects/:projectId/api') ->label('sdk', new Method( namespace: 'projects', name: 'updateApiStatus', - description: '', + description: '/docs/references/projects/update-api-status.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -636,7 +636,7 @@ App::patch('/v1/projects/:projectId/api/all') ->label('sdk', new Method( namespace: 'projects', name: 'updateApiStatusAll', - description: '', + description: '/docs/references/projects/update-api-status-all.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -676,7 +676,7 @@ App::patch('/v1/projects/:projectId/oauth2') ->label('sdk', new Method( namespace: 'projects', name: 'updateOAuth2', - description: '', + description: '/docs/references/projects/update-oauth2.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -726,7 +726,7 @@ App::patch('/v1/projects/:projectId/auth/session-alerts') ->label('sdk', new Method( namespace: 'projects', name: 'updateSessionAlerts', - description: '', + description: '/docs/references/projects/update-session-alerts.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -763,7 +763,7 @@ App::patch('/v1/projects/:projectId/auth/memberships-privacy') ->label('sdk', new Method( namespace: 'projects', name: 'updateMembershipsPrivacy', - description: '', + description: '/docs/references/projects/update-memberships-privacy.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -804,7 +804,7 @@ App::patch('/v1/projects/:projectId/auth/limit') ->label('sdk', new Method( namespace: 'projects', name: 'updateAuthLimit', - description: '', + description: '/docs/references/projects/update-auth-limit.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -841,7 +841,7 @@ App::patch('/v1/projects/:projectId/auth/duration') ->label('sdk', new Method( namespace: 'projects', name: 'updateAuthDuration', - description: '', + description: '/docs/references/projects/update-auth-duration.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -878,7 +878,7 @@ App::patch('/v1/projects/:projectId/auth/:method') ->label('sdk', new Method( namespace: 'projects', name: 'updateAuthStatus', - description: '', + description: '/docs/references/projects/update-auth-status.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -918,7 +918,7 @@ App::patch('/v1/projects/:projectId/auth/password-history') ->label('sdk', new Method( namespace: 'projects', name: 'updateAuthPasswordHistory', - description: '', + description: '/docs/references/projects/update-auth-password-history.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -955,7 +955,7 @@ App::patch('/v1/projects/:projectId/auth/password-dictionary') ->label('sdk', new Method( namespace: 'projects', name: 'updateAuthPasswordDictionary', - description: '', + description: '/docs/references/projects/update-auth-password-dictionary.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -992,7 +992,7 @@ App::patch('/v1/projects/:projectId/auth/personal-data') ->label('sdk', new Method( namespace: 'projects', name: 'updatePersonalDataCheck', - description: '', + description: '/docs/references/projects/update-personal-data-check.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1029,7 +1029,7 @@ App::patch('/v1/projects/:projectId/auth/max-sessions') ->label('sdk', new Method( namespace: 'projects', name: 'updateAuthSessionsLimit', - description: '', + description: '/docs/references/projects/update-auth-sessions-limit.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1066,7 +1066,7 @@ App::patch('/v1/projects/:projectId/auth/mock-numbers') ->label('sdk', new Method( namespace: 'projects', name: 'updateMockNumbers', - description: '', + description: '/docs/references/projects/update-mock-numbers.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1113,7 +1113,7 @@ App::delete('/v1/projects/:projectId') ->label('sdk', new Method( namespace: 'projects', name: 'delete', - description: '', + description: '/docs/references/projects/delete.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1156,7 +1156,7 @@ App::post('/v1/projects/:projectId/webhooks') ->label('sdk', new Method( namespace: 'projects', name: 'createWebhook', - description: '', + description: '/docs/references/projects/create-webhook.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1220,7 +1220,7 @@ App::get('/v1/projects/:projectId/webhooks') ->label('sdk', new Method( namespace: 'projects', name: 'listWebhooks', - description: '', + description: '/docs/references/projects/list-webhooks.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1258,7 +1258,7 @@ App::get('/v1/projects/:projectId/webhooks/:webhookId') ->label('sdk', new Method( namespace: 'projects', name: 'getWebhook', - description: '', + description: '/docs/references/projects/get-webhook.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1298,7 +1298,7 @@ App::put('/v1/projects/:projectId/webhooks/:webhookId') ->label('sdk', new Method( namespace: 'projects', name: 'updateWebhook', - description: '', + description: '/docs/references/projects/update-webhook.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1363,7 +1363,7 @@ App::patch('/v1/projects/:projectId/webhooks/:webhookId/signature') ->label('sdk', new Method( namespace: 'projects', name: 'updateWebhookSignature', - description: '', + description: '/docs/references/projects/update-webhook-signature.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1408,7 +1408,7 @@ App::delete('/v1/projects/:projectId/webhooks/:webhookId') ->label('sdk', new Method( namespace: 'projects', name: 'deleteWebhook', - description: '', + description: '/docs/references/projects/delete-webhook.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1455,7 +1455,7 @@ App::post('/v1/projects/:projectId/keys') ->label('sdk', new Method( namespace: 'projects', name: 'createKey', - description: '', + description: '/docs/references/projects/create-key.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1511,7 +1511,7 @@ App::get('/v1/projects/:projectId/keys') ->label('sdk', new Method( namespace: 'projects', name: 'listKeys', - description: '', + description: '/docs/references/projects/list-keys.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1549,7 +1549,7 @@ App::get('/v1/projects/:projectId/keys/:keyId') ->label('sdk', new Method( namespace: 'projects', name: 'getKey', - description: '', + description: '/docs/references/projects/get-key.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1589,7 +1589,7 @@ App::put('/v1/projects/:projectId/keys/:keyId') ->label('sdk', new Method( namespace: 'projects', name: 'updateKey', - description: '', + description: '/docs/references/projects/update-key.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1641,7 +1641,7 @@ App::delete('/v1/projects/:projectId/keys/:keyId') ->label('sdk', new Method( namespace: 'projects', name: 'deleteKey', - description: '', + description: '/docs/references/projects/delete-key.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1688,7 +1688,7 @@ App::post('/v1/projects/:projectId/jwts') ->label('sdk', new Method( namespace: 'projects', name: 'createJWT', - description: '', + description: '/docs/references/projects/create-jwt.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1731,7 +1731,7 @@ App::post('/v1/projects/:projectId/platforms') ->label('sdk', new Method( namespace: 'projects', name: 'createPlatform', - description: '', + description: '/docs/references/projects/create-platform.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1787,7 +1787,7 @@ App::get('/v1/projects/:projectId/platforms') ->label('sdk', new Method( namespace: 'projects', name: 'listPlatforms', - description: '', + description: '/docs/references/projects/list-platforms.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1825,7 +1825,7 @@ App::get('/v1/projects/:projectId/platforms/:platformId') ->label('sdk', new Method( namespace: 'projects', name: 'getPlatform', - description: '', + description: '/docs/references/projects/get-platform.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1865,7 +1865,7 @@ App::put('/v1/projects/:projectId/platforms/:platformId') ->label('sdk', new Method( namespace: 'projects', name: 'updatePlatform', - description: '', + description: '/docs/references/projects/update-platform.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1920,7 +1920,7 @@ App::delete('/v1/projects/:projectId/platforms/:platformId') ->label('sdk', new Method( namespace: 'projects', name: 'deletePlatform', - description: '', + description: '/docs/references/projects/delete-platform.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -1967,7 +1967,7 @@ App::patch('/v1/projects/:projectId/smtp') ->label('sdk', new Method( namespace: 'projects', name: 'updateSmtp', - description: '', + description: '/docs/references/projects/update-smtp.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -2063,7 +2063,7 @@ App::post('/v1/projects/:projectId/smtp/tests') ->label('sdk', new Method( namespace: 'projects', name: 'createSmtpTest', - description: '', + description: '/docs/references/projects/create-smtp-test.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -2129,7 +2129,7 @@ App::get('/v1/projects/:projectId/templates/sms/:type/:locale') ->label('sdk', new Method( namespace: 'projects', name: 'getSmsTemplate', - description: '', + description: '/docs/references/projects/get-sms-template.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -2176,7 +2176,7 @@ App::get('/v1/projects/:projectId/templates/email/:type/:locale') ->label('sdk', new Method( namespace: 'projects', name: 'getEmailTemplate', - description: '', + description: '/docs/references/projects/get-email-template.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -2234,7 +2234,7 @@ App::patch('/v1/projects/:projectId/templates/sms/:type/:locale') ->label('sdk', new Method( namespace: 'projects', name: 'updateSmsTemplate', - description: '', + description: '/docs/references/projects/update-sms-template.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -2280,7 +2280,7 @@ App::patch('/v1/projects/:projectId/templates/email/:type/:locale') ->label('sdk', new Method( namespace: 'projects', name: 'updateEmailTemplate', - description: '', + description: '/docs/references/projects/update-email-template.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -2336,7 +2336,7 @@ App::delete('/v1/projects/:projectId/templates/sms/:type/:locale') ->label('sdk', new Method( namespace: 'projects', name: 'deleteSmsTemplate', - description: '', + description: '/docs/references/projects/delete-sms-template.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -2386,7 +2386,7 @@ App::delete('/v1/projects/:projectId/templates/email/:type/:locale') ->label('sdk', new Method( namespace: 'projects', name: 'deleteEmailTemplate', - description: '', + description: '/docs/references/projects/delete-email-template.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/docs/references/assistant/chat.md b/docs/references/assistant/chat.md new file mode 100644 index 0000000000..5297d1c195 --- /dev/null +++ b/docs/references/assistant/chat.md @@ -0,0 +1 @@ +Send a prompt to the AI assistant and receive a response. This endpoint allows you to interact with Appwrite's AI assistant by sending questions or prompts and receiving helpful responses in real-time through a server-sent events stream. \ No newline at end of file diff --git a/docs/references/migrations/delete-migration.md b/docs/references/migrations/delete-migration.md new file mode 100644 index 0000000000..9d361ac693 --- /dev/null +++ b/docs/references/migrations/delete-migration.md @@ -0,0 +1 @@ +Delete a migration by its unique ID. This endpoint allows you to remove a migration from your project's migration history. \ No newline at end of file diff --git a/docs/references/migrations/get-migration.md b/docs/references/migrations/get-migration.md new file mode 100644 index 0000000000..710bef6863 --- /dev/null +++ b/docs/references/migrations/get-migration.md @@ -0,0 +1 @@ +Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process. \ No newline at end of file diff --git a/docs/references/migrations/list-migrations.md b/docs/references/migrations/list-migrations.md new file mode 100644 index 0000000000..b1acb3f7b3 --- /dev/null +++ b/docs/references/migrations/list-migrations.md @@ -0,0 +1 @@ +List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process. \ No newline at end of file diff --git a/docs/references/migrations/migration-appwrite-report.md b/docs/references/migrations/migration-appwrite-report.md new file mode 100644 index 0000000000..69d556f5f3 --- /dev/null +++ b/docs/references/migrations/migration-appwrite-report.md @@ -0,0 +1 @@ +Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. \ No newline at end of file diff --git a/docs/references/migrations/migration-appwrite.md b/docs/references/migrations/migration-appwrite.md new file mode 100644 index 0000000000..12ee742387 --- /dev/null +++ b/docs/references/migrations/migration-appwrite.md @@ -0,0 +1 @@ +Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project. \ No newline at end of file diff --git a/docs/references/migrations/migration-firebase-report.md b/docs/references/migrations/migration-firebase-report.md new file mode 100644 index 0000000000..af27587331 --- /dev/null +++ b/docs/references/migrations/migration-firebase-report.md @@ -0,0 +1 @@ +Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. \ No newline at end of file diff --git a/docs/references/migrations/migration-firebase.md b/docs/references/migrations/migration-firebase.md new file mode 100644 index 0000000000..3a7f620a7c --- /dev/null +++ b/docs/references/migrations/migration-firebase.md @@ -0,0 +1 @@ +Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project. \ No newline at end of file diff --git a/docs/references/migrations/migration-nhost-report.md b/docs/references/migrations/migration-nhost-report.md new file mode 100644 index 0000000000..895da51464 --- /dev/null +++ b/docs/references/migrations/migration-nhost-report.md @@ -0,0 +1 @@ +Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. \ No newline at end of file diff --git a/docs/references/migrations/migration-nhost.md b/docs/references/migrations/migration-nhost.md new file mode 100644 index 0000000000..b7a727dd2b --- /dev/null +++ b/docs/references/migrations/migration-nhost.md @@ -0,0 +1 @@ +Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project. \ No newline at end of file diff --git a/docs/references/migrations/migration-supabase-report.md b/docs/references/migrations/migration-supabase-report.md new file mode 100644 index 0000000000..d9636b5f1d --- /dev/null +++ b/docs/references/migrations/migration-supabase-report.md @@ -0,0 +1 @@ +Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. \ No newline at end of file diff --git a/docs/references/migrations/migration-supabase.md b/docs/references/migrations/migration-supabase.md new file mode 100644 index 0000000000..34bbb1eece --- /dev/null +++ b/docs/references/migrations/migration-supabase.md @@ -0,0 +1 @@ +Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project. \ No newline at end of file diff --git a/docs/references/migrations/retry-migration.md b/docs/references/migrations/retry-migration.md new file mode 100644 index 0000000000..49b80ad6d4 --- /dev/null +++ b/docs/references/migrations/retry-migration.md @@ -0,0 +1 @@ +Retry a failed migration. This endpoint allows you to retry a migration that has previously failed. \ No newline at end of file diff --git a/docs/references/projects/create-jwt.md b/docs/references/projects/create-jwt.md new file mode 100644 index 0000000000..9a6f8ebf6b --- /dev/null +++ b/docs/references/projects/create-jwt.md @@ -0,0 +1 @@ +Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time. \ No newline at end of file diff --git a/docs/references/projects/create-key.md b/docs/references/projects/create-key.md new file mode 100644 index 0000000000..d6633d936d --- /dev/null +++ b/docs/references/projects/create-key.md @@ -0,0 +1 @@ +Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project. \ No newline at end of file diff --git a/docs/references/projects/create-platform.md b/docs/references/projects/create-platform.md new file mode 100644 index 0000000000..b5d8be0ff9 --- /dev/null +++ b/docs/references/projects/create-platform.md @@ -0,0 +1 @@ +Create a new platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API. \ No newline at end of file diff --git a/docs/references/projects/create-smtp-test.md b/docs/references/projects/create-smtp-test.md new file mode 100644 index 0000000000..63cea9d21f --- /dev/null +++ b/docs/references/projects/create-smtp-test.md @@ -0,0 +1 @@ +Send a test email to verify SMTP configuration. \ No newline at end of file diff --git a/docs/references/projects/create-webhook.md b/docs/references/projects/create-webhook.md new file mode 100644 index 0000000000..cd0e93332b --- /dev/null +++ b/docs/references/projects/create-webhook.md @@ -0,0 +1 @@ +Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur. \ No newline at end of file diff --git a/docs/references/projects/create.md b/docs/references/projects/create.md new file mode 100644 index 0000000000..d502c269ef --- /dev/null +++ b/docs/references/projects/create.md @@ -0,0 +1 @@ +Create a new project. You can create a maximum of 100 projects per account. \ No newline at end of file diff --git a/docs/references/projects/delete-email-template.md b/docs/references/projects/delete-email-template.md new file mode 100644 index 0000000000..332b1d6117 --- /dev/null +++ b/docs/references/projects/delete-email-template.md @@ -0,0 +1 @@ +Reset a custom email template to its default value. This endpoint removes any custom content and restores the template to its original state. \ No newline at end of file diff --git a/docs/references/projects/delete-key.md b/docs/references/projects/delete-key.md new file mode 100644 index 0000000000..9f3774b419 --- /dev/null +++ b/docs/references/projects/delete-key.md @@ -0,0 +1 @@ +Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls. \ No newline at end of file diff --git a/docs/references/projects/delete-platform.md b/docs/references/projects/delete-platform.md new file mode 100644 index 0000000000..7d538cac26 --- /dev/null +++ b/docs/references/projects/delete-platform.md @@ -0,0 +1 @@ +Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project. \ No newline at end of file diff --git a/docs/references/projects/delete-sms-template.md b/docs/references/projects/delete-sms-template.md new file mode 100644 index 0000000000..c5a7e6cac9 --- /dev/null +++ b/docs/references/projects/delete-sms-template.md @@ -0,0 +1 @@ +Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. \ No newline at end of file diff --git a/docs/references/projects/delete-webhook.md b/docs/references/projects/delete-webhook.md new file mode 100644 index 0000000000..74fee2bcec --- /dev/null +++ b/docs/references/projects/delete-webhook.md @@ -0,0 +1 @@ +Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. \ No newline at end of file diff --git a/docs/references/projects/delete.md b/docs/references/projects/delete.md new file mode 100644 index 0000000000..4a8070c082 --- /dev/null +++ b/docs/references/projects/delete.md @@ -0,0 +1 @@ +Delete a project by its unique ID. \ No newline at end of file diff --git a/docs/references/projects/get-email-template.md b/docs/references/projects/get-email-template.md new file mode 100644 index 0000000000..6119a0a183 --- /dev/null +++ b/docs/references/projects/get-email-template.md @@ -0,0 +1 @@ +Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details. \ No newline at end of file diff --git a/docs/references/projects/get-key.md b/docs/references/projects/get-key.md new file mode 100644 index 0000000000..bd6351f420 --- /dev/null +++ b/docs/references/projects/get-key.md @@ -0,0 +1 @@ +Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it's scopes. \ No newline at end of file diff --git a/docs/references/projects/get-platform.md b/docs/references/projects/get-platform.md new file mode 100644 index 0000000000..87129b829d --- /dev/null +++ b/docs/references/projects/get-platform.md @@ -0,0 +1 @@ +Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations. \ No newline at end of file diff --git a/docs/references/projects/get-sms-template.md b/docs/references/projects/get-sms-template.md new file mode 100644 index 0000000000..6ef1d93029 --- /dev/null +++ b/docs/references/projects/get-sms-template.md @@ -0,0 +1 @@ +Get a custom SMS template for the specified locale and type returning it's contents. \ No newline at end of file diff --git a/docs/references/projects/get-webhook.md b/docs/references/projects/get-webhook.md new file mode 100644 index 0000000000..559c73c748 --- /dev/null +++ b/docs/references/projects/get-webhook.md @@ -0,0 +1 @@ +Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. \ No newline at end of file diff --git a/docs/references/projects/get.md b/docs/references/projects/get.md new file mode 100644 index 0000000000..b7a1165adc --- /dev/null +++ b/docs/references/projects/get.md @@ -0,0 +1 @@ +Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata. \ No newline at end of file diff --git a/docs/references/projects/list-keys.md b/docs/references/projects/list-keys.md new file mode 100644 index 0000000000..a7b701b0d7 --- /dev/null +++ b/docs/references/projects/list-keys.md @@ -0,0 +1 @@ +Get a list of all API keys from the current project. \ No newline at end of file diff --git a/docs/references/projects/list-platforms.md b/docs/references/projects/list-platforms.md new file mode 100644 index 0000000000..ed9ade0852 --- /dev/null +++ b/docs/references/projects/list-platforms.md @@ -0,0 +1 @@ +Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations. \ No newline at end of file diff --git a/docs/references/projects/list-webhooks.md b/docs/references/projects/list-webhooks.md new file mode 100644 index 0000000000..bbbf4c7376 --- /dev/null +++ b/docs/references/projects/list-webhooks.md @@ -0,0 +1 @@ +Get a list of all webhooks belonging to the project. You can use the query params to filter your results. \ No newline at end of file diff --git a/docs/references/projects/list.md b/docs/references/projects/list.md new file mode 100644 index 0000000000..576a4b79ae --- /dev/null +++ b/docs/references/projects/list.md @@ -0,0 +1 @@ +Get a list of all projects. You can use the query params to filter your results. \ No newline at end of file diff --git a/docs/references/projects/update-api-status-all.md b/docs/references/projects/update-api-status-all.md new file mode 100644 index 0000000000..654070759f --- /dev/null +++ b/docs/references/projects/update-api-status-all.md @@ -0,0 +1 @@ +Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once. \ No newline at end of file diff --git a/docs/references/projects/update-api-status.md b/docs/references/projects/update-api-status.md new file mode 100644 index 0000000000..af10a0d4f4 --- /dev/null +++ b/docs/references/projects/update-api-status.md @@ -0,0 +1 @@ +Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime. \ No newline at end of file diff --git a/docs/references/projects/update-auth-duration.md b/docs/references/projects/update-auth-duration.md new file mode 100644 index 0000000000..bdc75fa6f0 --- /dev/null +++ b/docs/references/projects/update-auth-duration.md @@ -0,0 +1 @@ +Update how long sessions created within a project should stay active for. \ No newline at end of file diff --git a/docs/references/projects/update-auth-limit.md b/docs/references/projects/update-auth-limit.md new file mode 100644 index 0000000000..c8faa3fe37 --- /dev/null +++ b/docs/references/projects/update-auth-limit.md @@ -0,0 +1 @@ +Update the maximum number of users allowed in this project. Set to 0 for unlimited users. \ No newline at end of file diff --git a/docs/references/projects/update-auth-password-dictionary.md b/docs/references/projects/update-auth-password-dictionary.md new file mode 100644 index 0000000000..1d47d30bb5 --- /dev/null +++ b/docs/references/projects/update-auth-password-dictionary.md @@ -0,0 +1 @@ +Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don't use common and insecure passwords. \ No newline at end of file diff --git a/docs/references/projects/update-auth-password-history.md b/docs/references/projects/update-auth-password-history.md new file mode 100644 index 0000000000..3a892915d5 --- /dev/null +++ b/docs/references/projects/update-auth-password-history.md @@ -0,0 +1 @@ +Update the authentication password history requirement. Use this endpoint to require new passwords to be different than the last X amount of previously used ones. \ No newline at end of file diff --git a/docs/references/projects/update-auth-sessions-limit.md b/docs/references/projects/update-auth-sessions-limit.md new file mode 100644 index 0000000000..7d5fdffae7 --- /dev/null +++ b/docs/references/projects/update-auth-sessions-limit.md @@ -0,0 +1 @@ +Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions. \ No newline at end of file diff --git a/docs/references/projects/update-auth-status.md b/docs/references/projects/update-auth-status.md new file mode 100644 index 0000000000..5d39ec29c4 --- /dev/null +++ b/docs/references/projects/update-auth-status.md @@ -0,0 +1 @@ +Update the status of a specific authentication method. Use this endpoint to enable or disable different authentication methods such as email, magic urls or sms in your project. \ No newline at end of file diff --git a/docs/references/projects/update-email-template.md b/docs/references/projects/update-email-template.md new file mode 100644 index 0000000000..d2bf124541 --- /dev/null +++ b/docs/references/projects/update-email-template.md @@ -0,0 +1 @@ +Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates. \ No newline at end of file diff --git a/docs/references/projects/update-key.md b/docs/references/projects/update-key.md new file mode 100644 index 0000000000..4934a51497 --- /dev/null +++ b/docs/references/projects/update-key.md @@ -0,0 +1 @@ +Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key. \ No newline at end of file diff --git a/docs/references/projects/update-memberships-privacy.md b/docs/references/projects/update-memberships-privacy.md new file mode 100644 index 0000000000..a1affc1166 --- /dev/null +++ b/docs/references/projects/update-memberships-privacy.md @@ -0,0 +1 @@ +Update project membership privacy settings. Use this endpoint to control what user information is visible to other team members, such as user name, email, and MFA status. \ No newline at end of file diff --git a/docs/references/projects/update-mock-numbers.md b/docs/references/projects/update-mock-numbers.md new file mode 100644 index 0000000000..7fa92455c1 --- /dev/null +++ b/docs/references/projects/update-mock-numbers.md @@ -0,0 +1 @@ +Update the list of mock phone numbers for testing. Use these numbers to bypass SMS verification in development. \ No newline at end of file diff --git a/docs/references/projects/update-oauth2.md b/docs/references/projects/update-oauth2.md new file mode 100644 index 0000000000..2285135991 --- /dev/null +++ b/docs/references/projects/update-oauth2.md @@ -0,0 +1 @@ +Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable/disable providers. \ No newline at end of file diff --git a/docs/references/projects/update-personal-data-check.md b/docs/references/projects/update-personal-data-check.md new file mode 100644 index 0000000000..42847fdbfc --- /dev/null +++ b/docs/references/projects/update-personal-data-check.md @@ -0,0 +1 @@ +Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords. \ No newline at end of file diff --git a/docs/references/projects/update-platform.md b/docs/references/projects/update-platform.md new file mode 100644 index 0000000000..d04b07bafd --- /dev/null +++ b/docs/references/projects/update-platform.md @@ -0,0 +1 @@ +Update a platform by its unique ID. Use this endpoint to update the platform's name, key, platform store ID, or hostname. \ No newline at end of file diff --git a/docs/references/projects/update-service-status-all.md b/docs/references/projects/update-service-status-all.md new file mode 100644 index 0000000000..f05e7d8c5c --- /dev/null +++ b/docs/references/projects/update-service-status-all.md @@ -0,0 +1 @@ +Update the status of all services. Use this endpoint to enable or disable all optional services at once. \ No newline at end of file diff --git a/docs/references/projects/update-service-status.md b/docs/references/projects/update-service-status.md new file mode 100644 index 0000000000..9d3b0743a8 --- /dev/null +++ b/docs/references/projects/update-service-status.md @@ -0,0 +1 @@ +Update the status of a specific service. Use this endpoint to enable or disable a service in your project. \ No newline at end of file diff --git a/docs/references/projects/update-session-alerts.md b/docs/references/projects/update-session-alerts.md new file mode 100644 index 0000000000..36859e0c1e --- /dev/null +++ b/docs/references/projects/update-session-alerts.md @@ -0,0 +1 @@ +Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created. \ No newline at end of file diff --git a/docs/references/projects/update-sms-template.md b/docs/references/projects/update-sms-template.md new file mode 100644 index 0000000000..3e67f613b7 --- /dev/null +++ b/docs/references/projects/update-sms-template.md @@ -0,0 +1 @@ +Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. \ No newline at end of file diff --git a/docs/references/projects/update-smtp.md b/docs/references/projects/update-smtp.md new file mode 100644 index 0000000000..7d898e1ed1 --- /dev/null +++ b/docs/references/projects/update-smtp.md @@ -0,0 +1 @@ +Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails. \ No newline at end of file diff --git a/docs/references/projects/update-team.md b/docs/references/projects/update-team.md new file mode 100644 index 0000000000..fb02eda88c --- /dev/null +++ b/docs/references/projects/update-team.md @@ -0,0 +1 @@ +Update the team ID of a project allowing for it to be transferred to another team. \ No newline at end of file diff --git a/docs/references/projects/update-webhook-signature.md b/docs/references/projects/update-webhook-signature.md new file mode 100644 index 0000000000..8525a05777 --- /dev/null +++ b/docs/references/projects/update-webhook-signature.md @@ -0,0 +1 @@ +Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook. \ No newline at end of file diff --git a/docs/references/projects/update-webhook.md b/docs/references/projects/update-webhook.md new file mode 100644 index 0000000000..745e4aebe1 --- /dev/null +++ b/docs/references/projects/update-webhook.md @@ -0,0 +1 @@ +Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook. \ No newline at end of file diff --git a/docs/references/projects/update.md b/docs/references/projects/update.md new file mode 100644 index 0000000000..60c072c477 --- /dev/null +++ b/docs/references/projects/update.md @@ -0,0 +1 @@ +Update a project by its unique ID. \ No newline at end of file diff --git a/docs/references/vcs/delete-installation.md b/docs/references/vcs/delete-installation.md new file mode 100644 index 0000000000..1f07de364d --- /dev/null +++ b/docs/references/vcs/delete-installation.md @@ -0,0 +1 @@ +Delete a VCS installation by its unique ID. This endpoint removes the installation and all its associated repositories from the project. \ No newline at end of file diff --git a/docs/references/vcs/get-installation.md b/docs/references/vcs/get-installation.md new file mode 100644 index 0000000000..0679d9a0e9 --- /dev/null +++ b/docs/references/vcs/get-installation.md @@ -0,0 +1 @@ +Get a VCS installation by its unique ID. This endpoint returns the installation's details including its provider, organization, and configuration. \ No newline at end of file diff --git a/docs/references/vcs/list-installations.md b/docs/references/vcs/list-installations.md new file mode 100644 index 0000000000..e77daf7db0 --- /dev/null +++ b/docs/references/vcs/list-installations.md @@ -0,0 +1 @@ +List all VCS installations configured for the current project. This endpoint returns a list of installations including their provider, organization, and other configuration details. diff --git a/src/Appwrite/SDK/Method.php b/src/Appwrite/SDK/Method.php index 8064b75561..4495af3e09 100644 --- a/src/Appwrite/SDK/Method.php +++ b/src/Appwrite/SDK/Method.php @@ -48,7 +48,7 @@ class Method ) { $this->validateMethod($name, $namespace); $this->validateAuthTypes($auth); - //$this->validateDesc($description); + $this->validateDesc($description); foreach ($responses as $response) { /** @var SDKResponse $response */ From 731529455554f7e27cc78e46dc8fa84a89494345 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 20 Jan 2025 05:44:19 +0000 Subject: [PATCH 047/101] fix: phone number parsing exception handling --- app/controllers/api/account.php | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 6935029450..592b72e83a 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -28,6 +28,7 @@ use Appwrite\Utopia\Database\Validator\CustomId; use Appwrite\Utopia\Database\Validator\Queries\Identities; use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; +use libphonenumber\NumberParseException; use libphonenumber\PhoneNumberUtil; use MaxMind\Db\Reader; use Utopia\Abuse\Abuse; @@ -2467,7 +2468,12 @@ App::post('/v1/account/tokens/phone') $abuse = new Abuse($timelimit); if ($abuse->check() && System::getEnv('_APP_OPTIONS_ABUSE', 'enabled') === 'enabled') { $helper = PhoneNumberUtil::getInstance(); - $countryCode = $helper->parse($phone)->getCountryCode(); + + try { + $countryCode = $helper->parse($phone)->getCountryCode(); + } catch (NumberParseException $e) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Invalid phone number'); + } if (!empty($countryCode)) { $queueForUsage @@ -3587,7 +3593,12 @@ App::post('/v1/account/verification/phone') $abuse = new Abuse($timelimit); if ($abuse->check() && System::getEnv('_APP_OPTIONS_ABUSE', 'enabled') === 'enabled') { $helper = PhoneNumberUtil::getInstance(); - $countryCode = $helper->parse($phone)->getCountryCode(); + + try { + $countryCode = $helper->parse($phone)->getCountryCode(); + } catch (NumberParseException $e) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Invalid phone number'); + } if (!empty($countryCode)) { $queueForUsage @@ -4148,7 +4159,12 @@ App::post('/v1/account/mfa/challenge') $abuse = new Abuse($timelimit); if ($abuse->check() && System::getEnv('_APP_OPTIONS_ABUSE', 'enabled') === 'enabled') { $helper = PhoneNumberUtil::getInstance(); - $countryCode = $helper->parse($phone)->getCountryCode(); + + try { + $countryCode = $helper->parse($phone)->getCountryCode(); + } catch (NumberParseException $e) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Invalid phone number'); + } if (!empty($countryCode)) { $queueForUsage From 8fb772340f2f6a5623e9689646808b1d159bded7 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 20 Jan 2025 08:12:42 +0000 Subject: [PATCH 048/101] chore: shifted validation --- app/controllers/api/account.php | 22 +++------------------- src/Appwrite/Auth/Validator/Phone.php | 13 +++++++++++++ tests/unit/Auth/Validator/PhoneTest.php | 1 + 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 592b72e83a..6935029450 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -28,7 +28,6 @@ use Appwrite\Utopia\Database\Validator\CustomId; use Appwrite\Utopia\Database\Validator\Queries\Identities; use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; -use libphonenumber\NumberParseException; use libphonenumber\PhoneNumberUtil; use MaxMind\Db\Reader; use Utopia\Abuse\Abuse; @@ -2468,12 +2467,7 @@ App::post('/v1/account/tokens/phone') $abuse = new Abuse($timelimit); if ($abuse->check() && System::getEnv('_APP_OPTIONS_ABUSE', 'enabled') === 'enabled') { $helper = PhoneNumberUtil::getInstance(); - - try { - $countryCode = $helper->parse($phone)->getCountryCode(); - } catch (NumberParseException $e) { - throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Invalid phone number'); - } + $countryCode = $helper->parse($phone)->getCountryCode(); if (!empty($countryCode)) { $queueForUsage @@ -3593,12 +3587,7 @@ App::post('/v1/account/verification/phone') $abuse = new Abuse($timelimit); if ($abuse->check() && System::getEnv('_APP_OPTIONS_ABUSE', 'enabled') === 'enabled') { $helper = PhoneNumberUtil::getInstance(); - - try { - $countryCode = $helper->parse($phone)->getCountryCode(); - } catch (NumberParseException $e) { - throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Invalid phone number'); - } + $countryCode = $helper->parse($phone)->getCountryCode(); if (!empty($countryCode)) { $queueForUsage @@ -4159,12 +4148,7 @@ App::post('/v1/account/mfa/challenge') $abuse = new Abuse($timelimit); if ($abuse->check() && System::getEnv('_APP_OPTIONS_ABUSE', 'enabled') === 'enabled') { $helper = PhoneNumberUtil::getInstance(); - - try { - $countryCode = $helper->parse($phone)->getCountryCode(); - } catch (NumberParseException $e) { - throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Invalid phone number'); - } + $countryCode = $helper->parse($phone)->getCountryCode(); if (!empty($countryCode)) { $queueForUsage diff --git a/src/Appwrite/Auth/Validator/Phone.php b/src/Appwrite/Auth/Validator/Phone.php index 26aa687278..2ad4d4fad7 100644 --- a/src/Appwrite/Auth/Validator/Phone.php +++ b/src/Appwrite/Auth/Validator/Phone.php @@ -2,6 +2,8 @@ namespace Appwrite\Auth\Validator; +use libphonenumber\NumberParseException; +use libphonenumber\PhoneNumberUtil; use Utopia\Validator; /** @@ -12,10 +14,12 @@ use Utopia\Validator; class Phone extends Validator { protected bool $allowEmpty; + protected PhoneNumberUtil $helper; public function __construct(bool $allowEmpty = false) { $this->allowEmpty = $allowEmpty; + $this->helper = PhoneNumberUtil::getInstance(); } /** @@ -47,6 +51,15 @@ class Phone extends Validator return true; } + try { + $parsedValue = $this->helper->parse($value); + if (!$this->helper->isValidNumber($parsedValue)) { + return false; + } + } catch (NumberParseException $e) { + return false; + } + return !!\preg_match('/^\+[1-9]\d{6,14}$/', $value); } diff --git a/tests/unit/Auth/Validator/PhoneTest.php b/tests/unit/Auth/Validator/PhoneTest.php index d5a4e7f826..e9103e608a 100644 --- a/tests/unit/Auth/Validator/PhoneTest.php +++ b/tests/unit/Auth/Validator/PhoneTest.php @@ -31,6 +31,7 @@ class PhoneTest extends TestCase $this->assertEquals($this->object->isValid('+0415553452342'), false); $this->assertEquals($this->object->isValid('+14 155 5524564'), false); $this->assertEquals($this->object->isValid('+1415555245634543'), false); + $this->assertEquals($this->object->isValid('+8027547935'), false); $this->assertEquals($this->object->isValid(+14155552456), false); $this->assertEquals($this->object->isValid('+1415555'), true); From ca0459046d21b04c9445c5a4e4c6c0f46d7c18b1 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 20 Jan 2025 08:33:49 +0000 Subject: [PATCH 049/101] chore: remove isValidNumber check --- src/Appwrite/Auth/Validator/Phone.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Appwrite/Auth/Validator/Phone.php b/src/Appwrite/Auth/Validator/Phone.php index 2ad4d4fad7..e74a78d265 100644 --- a/src/Appwrite/Auth/Validator/Phone.php +++ b/src/Appwrite/Auth/Validator/Phone.php @@ -52,10 +52,7 @@ class Phone extends Validator } try { - $parsedValue = $this->helper->parse($value); - if (!$this->helper->isValidNumber($parsedValue)) { - return false; - } + $this->helper->parse($value); } catch (NumberParseException $e) { return false; } From b87c750536aa98bb2ab462636dfb4e27a0d827a9 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 20 Jan 2025 14:31:22 +0530 Subject: [PATCH 050/101] chore: add temporary check to deletes worker to prevent it from throwing an exception --- src/Appwrite/Platform/Workers/Deletes.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Deletes.php b/src/Appwrite/Platform/Workers/Deletes.php index 539bbd61f9..a72bd2be77 100644 --- a/src/Appwrite/Platform/Workers/Deletes.php +++ b/src/Appwrite/Platform/Workers/Deletes.php @@ -201,10 +201,15 @@ class Deletes extends Action 'message' => 'messages' }; - $resource = $getProjectDB($project)->getDocument( - $collectionId, - $document->getAttribute('resourceId') - ); + try { + $resource = $getProjectDB($project)->getDocument( + $collectionId, + $document->getAttribute('resourceId') + ); + } catch (Throwable $e) { + Console::error('Failed to get resource for schedule ' . $document->getId() . ' ' . $e->getMessage()); + return; + } $delete = true; From 9c95c162d97a448d52d90779899edf7c7ec7e70b Mon Sep 17 00:00:00 2001 From: fogelito Date: Mon, 20 Jan 2025 11:28:48 +0200 Subject: [PATCH 051/101] bumb database version --- composer.json | 2 +- composer.lock | 58 +++++++++++++++++++++++++-------------------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/composer.json b/composer.json index 84fcd355d7..d90f09fb2b 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,7 @@ "utopia-php/cache": "0.11.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.56.3", + "utopia-php/database": "0.56.4", "utopia-php/domains": "0.5.*", "utopia-php/dsn": "0.2.1", "utopia-php/framework": "0.33.*", diff --git a/composer.lock b/composer.lock index dea3ad41f6..d85fb52461 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": "92b40e75d531c98b72508dd104eeab0d", + "content-hash": "7ef4409cc1690563b87dffc0d52b06d5", "packages": [ { "name": "adhocore/jwt", @@ -3136,16 +3136,16 @@ }, { "name": "utopia-php/abuse", - "version": "0.46.2", + "version": "0.47.0", "source": { "type": "git", "url": "https://github.com/utopia-php/abuse.git", - "reference": "59749df988430b28953fb5cabfad88b0ff5b539b" + "reference": "2b52bb362234d4072b647ed57db1b3be030f57c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/abuse/zipball/59749df988430b28953fb5cabfad88b0ff5b539b", - "reference": "59749df988430b28953fb5cabfad88b0ff5b539b", + "url": "https://api.github.com/repos/utopia-php/abuse/zipball/2b52bb362234d4072b647ed57db1b3be030f57c2", + "reference": "2b52bb362234d4072b647ed57db1b3be030f57c2", "shasum": "" }, "require": { @@ -3153,7 +3153,7 @@ "ext-pdo": "*", "ext-redis": "*", "php": ">=8.0", - "utopia-php/database": "0.53.32" + "utopia-php/database": "0.56.*" }, "require-dev": { "laravel/pint": "1.5.*", @@ -3181,9 +3181,9 @@ ], "support": { "issues": "https://github.com/utopia-php/abuse/issues", - "source": "https://github.com/utopia-php/abuse/tree/0.46.2" + "source": "https://github.com/utopia-php/abuse/tree/0.47.0" }, - "time": "2025-01-13T02:09:43+00:00" + "time": "2025-01-15T02:41:02+00:00" }, { "name": "utopia-php/analytics", @@ -3233,21 +3233,21 @@ }, { "name": "utopia-php/audit", - "version": "0.46.1", + "version": "0.47.0", "source": { "type": "git", "url": "https://github.com/utopia-php/audit.git", - "reference": "21255fa1ce66433140a43d380b2859c7f0a0bb37" + "reference": "1ebd5784ba68645073426f2f04a67726a1bde4d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/audit/zipball/21255fa1ce66433140a43d380b2859c7f0a0bb37", - "reference": "21255fa1ce66433140a43d380b2859c7f0a0bb37", + "url": "https://api.github.com/repos/utopia-php/audit/zipball/1ebd5784ba68645073426f2f04a67726a1bde4d7", + "reference": "1ebd5784ba68645073426f2f04a67726a1bde4d7", "shasum": "" }, "require": { "php": ">=8.0", - "utopia-php/database": "0.53.32" + "utopia-php/database": "0.56.*" }, "require-dev": { "laravel/pint": "1.5.*", @@ -3274,9 +3274,9 @@ ], "support": { "issues": "https://github.com/utopia-php/audit/issues", - "source": "https://github.com/utopia-php/audit/tree/0.46.1" + "source": "https://github.com/utopia-php/audit/tree/0.47.0" }, - "time": "2025-01-13T02:19:56+00:00" + "time": "2025-01-15T02:40:53+00:00" }, { "name": "utopia-php/cache", @@ -3476,16 +3476,16 @@ }, { "name": "utopia-php/database", - "version": "0.53.32", + "version": "0.56.4", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "981a1241139b42dccd531511130b79137740b205" + "reference": "240478a60797124a885ceac40046fe47c22415b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/981a1241139b42dccd531511130b79137740b205", - "reference": "981a1241139b42dccd531511130b79137740b205", + "url": "https://api.github.com/repos/utopia-php/database/zipball/240478a60797124a885ceac40046fe47c22415b7", + "reference": "240478a60797124a885ceac40046fe47c22415b7", "shasum": "" }, "require": { @@ -3526,9 +3526,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.53.32" + "source": "https://github.com/utopia-php/database/tree/0.56.4" }, - "time": "2025-01-10T08:53:47+00:00" + "time": "2025-01-20T09:22:08+00:00" }, { "name": "utopia-php/domains", @@ -3929,16 +3929,16 @@ }, { "name": "utopia-php/migration", - "version": "0.6.14", + "version": "0.6.15", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "59a19f09ded0ccab4c8cca35b1242c01e2b9cfd2" + "reference": "e849ec3e7ad38f5f5273ebb0132b112639cdf01c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/59a19f09ded0ccab4c8cca35b1242c01e2b9cfd2", - "reference": "59a19f09ded0ccab4c8cca35b1242c01e2b9cfd2", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/e849ec3e7ad38f5f5273ebb0132b112639cdf01c", + "reference": "e849ec3e7ad38f5f5273ebb0132b112639cdf01c", "shasum": "" }, "require": { @@ -3946,7 +3946,7 @@ "ext-curl": "*", "ext-openssl": "*", "php": "8.3.*", - "utopia-php/database": "0.53.*", + "utopia-php/database": "0.56.*", "utopia-php/dsn": "0.2.*", "utopia-php/framework": "0.33.*", "utopia-php/storage": "0.18.*" @@ -3979,9 +3979,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.6.14" + "source": "https://github.com/utopia-php/migration/tree/0.6.15" }, - "time": "2025-01-08T01:07:25+00:00" + "time": "2025-01-15T04:55:08+00:00" }, { "name": "utopia-php/mongo", @@ -8556,7 +8556,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { From 2533a95b8b0ceca817300c0b3da57f1ceb3f87d0 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 20 Jan 2025 15:13:50 +0530 Subject: [PATCH 052/101] chore: add missing case for executions --- src/Appwrite/Platform/Workers/Deletes.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Appwrite/Platform/Workers/Deletes.php b/src/Appwrite/Platform/Workers/Deletes.php index a72bd2be77..46ae480684 100644 --- a/src/Appwrite/Platform/Workers/Deletes.php +++ b/src/Appwrite/Platform/Workers/Deletes.php @@ -198,6 +198,7 @@ class Deletes extends Action $collectionId = match ($document->getAttribute('resourceType')) { 'function' => 'functions', + 'execution' => 'executions', 'message' => 'messages' }; @@ -217,6 +218,9 @@ class Deletes extends Action case 'function': $delete = $resource->isEmpty(); break; + case 'execution': + $delete = false; + break; } if ($delete) { From 07630c272defa75a938d37fd16cafb05a9f46225 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 20 Jan 2025 12:41:57 +0000 Subject: [PATCH 053/101] chore: update test --- tests/unit/Auth/Validator/PhoneTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/Auth/Validator/PhoneTest.php b/tests/unit/Auth/Validator/PhoneTest.php index e9103e608a..b5308ac8a9 100644 --- a/tests/unit/Auth/Validator/PhoneTest.php +++ b/tests/unit/Auth/Validator/PhoneTest.php @@ -31,7 +31,7 @@ class PhoneTest extends TestCase $this->assertEquals($this->object->isValid('+0415553452342'), false); $this->assertEquals($this->object->isValid('+14 155 5524564'), false); $this->assertEquals($this->object->isValid('+1415555245634543'), false); - $this->assertEquals($this->object->isValid('+8027547935'), false); + $this->assertEquals($this->object->isValid('+8020000000'), false); $this->assertEquals($this->object->isValid(+14155552456), false); $this->assertEquals($this->object->isValid('+1415555'), true); From af8cb29bfbeaf877a8f0866c17648e1eb916204a Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 21 Jan 2025 05:41:47 +0000 Subject: [PATCH 054/101] chore: added log --- src/Appwrite/Platform/Workers/Certificates.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Workers/Certificates.php b/src/Appwrite/Platform/Workers/Certificates.php index 0ae40b2df0..e763cb54ee 100644 --- a/src/Appwrite/Platform/Workers/Certificates.php +++ b/src/Appwrite/Platform/Workers/Certificates.php @@ -147,7 +147,8 @@ class Certificates extends Action // If certificate exists already, double-check expiry date. Skip if job is forced if (!$certificates->isRenewRequired($domain->get(), $log)) { - throw new Exception('Renew isn\'t required.'); + Console::info("Skipping, renew isn't required"); + return; } } From f8f403a66aa421b6053244899c1c08ad252b8b95 Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 21 Jan 2025 12:02:08 +0530 Subject: [PATCH 055/101] remove: comments. --- app/controllers/shared/api.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index b231903d8e..012ff3d420 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -259,7 +259,6 @@ App::init() Authorization::setRole(Auth::USER_ROLE_APPS); Authorization::setDefaultStatus(false); // Cancel security segmentation for API keys. - // dynamic api key user $queueForAudits->setUser($user); } } elseif ($keyType === API_KEY_STANDARD) { @@ -311,7 +310,6 @@ App::init() } } - // standard api key user $queueForAudits->setUser($user); } } From 3c3559aee5be3d814cc7e5b7bb7e0b40be2db1b1 Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 21 Jan 2025 12:07:03 +0530 Subject: [PATCH 056/101] update: apply comment suggestion. --- app/controllers/shared/api.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 012ff3d420..086129f116 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -520,8 +520,7 @@ App::init() ->setEvent($route->getLabel('audits.event', '')) ->setProject($project); - // check first, - // as api key user might already exists + /* If a session exists, use the user associated with the session */ if (!$user->isEmpty()) { $typedUser = clone $user; // $user doesn't support `type` and can cause unintended effects. From bc533aeeaacf0ad279a754305622e1efbe0e6392 Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 21 Jan 2025 12:11:20 +0530 Subject: [PATCH 057/101] update: change var name. --- app/controllers/shared/api.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 086129f116..dafebb735d 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -522,10 +522,10 @@ App::init() /* If a session exists, use the user associated with the session */ if (!$user->isEmpty()) { - $typedUser = clone $user; + $userClone = clone $user; // $user doesn't support `type` and can cause unintended effects. - $typedUser->setAttribute('type', Auth::ACTIVITY_TYPE_USER); - $queueForAudits->setUser($typedUser); + $userClone->setAttribute('type', Auth::ACTIVITY_TYPE_USER); + $queueForAudits->setUser($userClone); } $queueForDeletes->setProject($project); @@ -734,10 +734,10 @@ App::shutdown() } if (!$user->isEmpty()) { - $typedUser = clone $user; + $userClone = clone $user; // $user doesn't support `type` and can cause unintended effects. - $typedUser->setAttribute('type', Auth::ACTIVITY_TYPE_USER); - $queueForAudits->setUser($typedUser); + $userClone->setAttribute('type', Auth::ACTIVITY_TYPE_USER); + $queueForAudits->setUser($userClone); } elseif ($queueForAudits->getUser() === null || $queueForAudits->getUser()->isEmpty()) { /** * User in the request is empty, and no user was set for auditing previously. From 27459cc2c0497ecadcd284076dd6de14eedceb3d Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 21 Jan 2025 07:04:16 +0000 Subject: [PATCH 058/101] chore: added test comment --- tests/unit/Auth/Validator/PhoneTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/Auth/Validator/PhoneTest.php b/tests/unit/Auth/Validator/PhoneTest.php index b5308ac8a9..b7730641c3 100644 --- a/tests/unit/Auth/Validator/PhoneTest.php +++ b/tests/unit/Auth/Validator/PhoneTest.php @@ -31,7 +31,7 @@ class PhoneTest extends TestCase $this->assertEquals($this->object->isValid('+0415553452342'), false); $this->assertEquals($this->object->isValid('+14 155 5524564'), false); $this->assertEquals($this->object->isValid('+1415555245634543'), false); - $this->assertEquals($this->object->isValid('+8020000000'), false); + $this->assertEquals($this->object->isValid('+8020000000'), false); // when country code is not present $this->assertEquals($this->object->isValid(+14155552456), false); $this->assertEquals($this->object->isValid('+1415555'), true); From 15aa0e031593188046ace21e3e53ce4de5a7dd04 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 21 Jan 2025 11:09:16 +0000 Subject: [PATCH 059/101] feat: enable heic --- app/config/storage/mimes.php | 103 +++++++++++++++++---------------- app/config/storage/outputs.php | 19 +++--- 2 files changed, 62 insertions(+), 60 deletions(-) diff --git a/app/config/storage/mimes.php b/app/config/storage/mimes.php index 26aaf8e1ff..5c1752ca51 100644 --- a/app/config/storage/mimes.php +++ b/app/config/storage/mimes.php @@ -1,70 +1,71 @@ 'image/jpeg', - 'jpeg' => 'image/jpeg', - 'gif' => 'image/gif', - 'png' => 'image/png', - 'webp' => 'image/webp', - // 'heic' => 'image/heic', - // 'heics' => 'image/heic', - 'avif' => 'image/avif' +return [ + // Accepted outputs files + "jpg" => "image/jpeg", + "jpeg" => "image/jpeg", + "gif" => "image/gif", + "png" => "image/png", + "webp" => "image/webp", + "heic" => "image/heic", + "heics" => "image/heic", + "avif" => "image/avif", ]; From f6385c716ed57ab13bebbe12eb3aecb16859a110 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 21 Jan 2025 12:17:48 +0000 Subject: [PATCH 060/101] fix: encoding state --- src/Appwrite/Auth/OAuth2/Amazon.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Auth/OAuth2/Amazon.php b/src/Appwrite/Auth/OAuth2/Amazon.php index d1d2cb5a38..2fa3f4cfe9 100644 --- a/src/Appwrite/Auth/OAuth2/Amazon.php +++ b/src/Appwrite/Auth/OAuth2/Amazon.php @@ -43,7 +43,7 @@ class Amazon extends OAuth2 */ public function parseState(string $state) { - return \json_decode(\html_entity_decode($state), true); + return \json_decode(\urldecode(\html_entity_decode($state)), true); } @@ -56,7 +56,7 @@ class Amazon extends OAuth2 'response_type' => 'code', 'client_id' => $this->appID, 'scope' => \implode(' ', $this->getScopes()), - 'state' => \json_encode($this->state), + 'state' => \urlencode(\json_encode($this->state)), 'redirect_uri' => $this->callback ]); } From bc3ac237bef39081aa58f43fdf62a5fb60155908 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 21 Jan 2025 18:06:20 +0000 Subject: [PATCH 061/101] fix: add heic input/output --- app/config/storage/inputs.php | 12 +++++++----- app/config/storage/outputs.php | 1 - 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/config/storage/inputs.php b/app/config/storage/inputs.php index 3b83269261..4532279b31 100644 --- a/app/config/storage/inputs.php +++ b/app/config/storage/inputs.php @@ -1,8 +1,10 @@ 'image/jpeg', - 'jpeg' => 'image/jpeg', - 'gif' => 'image/gif', - 'png' => 'image/png', +return [ + // Accepted inputs files + "jpg" => "image/jpeg", + "jpeg" => "image/jpeg", + "gif" => "image/gif", + "png" => "image/png", + "heic" => "image/heic", ]; diff --git a/app/config/storage/outputs.php b/app/config/storage/outputs.php index e25121838e..49548dda50 100644 --- a/app/config/storage/outputs.php +++ b/app/config/storage/outputs.php @@ -8,6 +8,5 @@ return [ "png" => "image/png", "webp" => "image/webp", "heic" => "image/heic", - "heics" => "image/heic", "avif" => "image/avif", ]; From 5123cf5f8eabcedf363ea675ed76c3395aec99d7 Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Wed, 22 Jan 2025 11:08:23 +0900 Subject: [PATCH 062/101] Make Method Extendable --- src/Appwrite/SDK/Method.php | 24 +++++++++++++------ .../Specification/Format/OpenAPI3.php | 2 +- .../Specification/Format/Swagger2.php | 2 +- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/Appwrite/SDK/Method.php b/src/Appwrite/SDK/Method.php index 4495af3e09..bbeb80595f 100644 --- a/src/Appwrite/SDK/Method.php +++ b/src/Appwrite/SDK/Method.php @@ -57,12 +57,12 @@ class Method } } - private function getRouteName(): string + protected function getRouteName(): string { return $this->namespace . '.' . $this->name; } - private function validateMethod(string $name, string $namespace): void + protected function validateMethod(string $name, string $namespace): void { if (\in_array($this->getRouteName(), self::$processed)) { self::$errors[] = "Error with {$this->getRouteName()} method: Method already exists in namespace {$namespace}"; @@ -71,7 +71,7 @@ class Method self::$processed[] = $this->getRouteName(); } - private function validateAuthTypes(array $authTypes): void + protected function validateAuthTypes(array $authTypes): void { foreach ($authTypes as $authType) { if (!($authType instanceof AuthType)) { @@ -80,14 +80,14 @@ class Method } } - private function validateDesc(string $desc): void + protected function validateDesc(string $desc): void { if (empty($desc)) { self::$errors[] = "Error with {$this->getRouteName()} method: Description label is empty"; return; } - $descPath = \realpath(__DIR__ . '/../../../' . $desc); + $descPath = $this->getDescriptionFilePath(); if (!\file_exists($descPath)) { self::$errors[] = "Error with {$this->getRouteName()} method: Description file not found at {$desc}"; @@ -95,7 +95,7 @@ class Method } } - private function validateResponseModel(string|array $responseModel): void + protected function validateResponseModel(string|array $responseModel): void { $response = new Response(new HttpResponse()); @@ -112,7 +112,7 @@ class Method } } - private function validateNoContent(SDKResponse $response): void + protected function validateNoContent(SDKResponse $response): void { if ($response->getCode() === 204) { if ($response->getModel() !== Response::MODEL_NONE) { @@ -136,6 +136,16 @@ class Method return $this->description; } + /** + * This method returns the absolute path to the description file returning null if the file does not exist. + * + * @return string|null + */ + public function getDescriptionFilePath(): ?string + { + return \realpath(__DIR__ . '/../../../' . $this->getDescription()) ?: null; + } + public function getAuth(): array { return $this->auth; diff --git a/src/Appwrite/Specification/Format/OpenAPI3.php b/src/Appwrite/Specification/Format/OpenAPI3.php index 02568a8ccf..bd5405539d 100644 --- a/src/Appwrite/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/Specification/Format/OpenAPI3.php @@ -148,7 +148,7 @@ class OpenAPI3 extends Format $method = array_keys($method)[0]; } - $desc = (!empty($sdk->getDescription())) ? \realpath(__DIR__ . '/../../../../' . $sdk->getDescription()) : null; + $desc = $sdk->getDescriptionFilePath(); $produces = ($sdk->getContentType())->value; $routeSecurity = $sdk->getAuth() ?? []; $sdkPlatforms = []; diff --git a/src/Appwrite/Specification/Format/Swagger2.php b/src/Appwrite/Specification/Format/Swagger2.php index 22aac47113..7277e3ab2b 100644 --- a/src/Appwrite/Specification/Format/Swagger2.php +++ b/src/Appwrite/Specification/Format/Swagger2.php @@ -144,7 +144,7 @@ class Swagger2 extends Format $method = array_keys($method)[0]; } - $desc = (!empty($sdk->getDescription())) ? \realpath(__DIR__ . '/../../../../' . $sdk->getDescription()) : null; + $desc = $sdk->getDescriptionFilePath(); $produces = ($sdk->getContentType())->value; $routeSecurity = $sdk->getAuth() ?? []; $sdkPlatforms = []; From df491f6f4607d79c1c350913d6174ad0bd191515 Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Wed, 22 Jan 2025 16:02:56 +0900 Subject: [PATCH 063/101] Fix null deprecation warning --- src/Appwrite/SDK/Method.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/SDK/Method.php b/src/Appwrite/SDK/Method.php index bbeb80595f..626459ea7f 100644 --- a/src/Appwrite/SDK/Method.php +++ b/src/Appwrite/SDK/Method.php @@ -89,7 +89,7 @@ class Method $descPath = $this->getDescriptionFilePath(); - if (!\file_exists($descPath)) { + if (empty($descPath)) { self::$errors[] = "Error with {$this->getRouteName()} method: Description file not found at {$desc}"; return; } From d533113d867b09e22083de09336c8704702658d0 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 23 Jan 2025 01:44:33 +1300 Subject: [PATCH 064/101] Update usage dump to upsert documents in batches --- src/Appwrite/Platform/Workers/UsageDump.php | 208 +++++++++++--------- 1 file changed, 113 insertions(+), 95 deletions(-) diff --git a/src/Appwrite/Platform/Workers/UsageDump.php b/src/Appwrite/Platform/Workers/UsageDump.php index 2f1d13f29a..1e3d3149ce 100644 --- a/src/Appwrite/Platform/Workers/UsageDump.php +++ b/src/Appwrite/Platform/Workers/UsageDump.php @@ -8,6 +8,7 @@ use Utopia\Database\Database; use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Exception\Duplicate; +use Utopia\Database\Exception\NotFound; use Utopia\Platform\Action; use Utopia\Queue\Message; use Utopia\System\System; @@ -70,10 +71,11 @@ class UsageDump extends Action continue; } - console::log('['.DateTime::now().'] Id: '.$project->getId(). ' InternalId: '.$project->getInternalId(). ' Db: '.$project->getAttribute('database').' ReceivedAt: '.$receivedAt. ' Keys: '.$numberOfKeys); + Console::log('['.DateTime::now().'] Id: '.$project->getId(). ' InternalId: '.$project->getInternalId(). ' Db: '.$project->getAttribute('database').' ReceivedAt: '.$receivedAt. ' Keys: '.$numberOfKeys); try { $dbForProject = $getProjectDB($project); + foreach ($stats['keys'] ?? [] as $key => $value) { if ($value == 0) { continue; @@ -83,109 +85,73 @@ class UsageDump extends Action try { $this->handleDatabaseStorage($key, $dbForProject); } catch (\Exception $e) { - console::error('[' . DateTime::now() . '] failed to calculate database storage for key [' . $key . '] ' . $e->getMessage()); + Console::error('[' . DateTime::now() . '] failed to calculate database storage for key [' . $key . '] ' . $e->getMessage()); } continue; } + $documents = []; + foreach ($this->periods as $period => $format) { $time = 'inf' === $period ? null : date($format, time()); $id = \md5("{$time}_{$period}_{$key}"); - try { - $dbForProject->createDocument('stats', new Document([ - '$id' => $id, - 'period' => $period, - 'time' => $time, - 'metric' => $key, - 'value' => $value, - 'region' => System::getEnv('_APP_REGION', 'default'), - ])); - } catch (Duplicate $th) { - if ($value < 0) { - $dbForProject->decreaseDocumentAttribute( - 'stats', - $id, - 'value', - abs($value) - ); - } else { - $dbForProject->increaseDocumentAttribute( - 'stats', - $id, - 'value', - $value - ); - } - } + $documents[] = new Document([ + '$id' => $id, + 'period' => $period, + 'time' => $time, + 'metric' => $key, + 'value' => $value, + 'region' => System::getEnv('_APP_REGION', 'default'), + ]); } + + $dbForProject->createOrUpdateDocumentsWithInplaceIncrease( + collection: 'stats', + attribute: 'value', + documents: $documents + ); } } catch (\Exception $e) { - console::error('[' . DateTime::now() . '] project [' . $project->getInternalId() . '] database [' . $project['database'] . '] ' . ' ' . $e->getMessage()); + Console::error('[' . DateTime::now() . '] project [' . $project->getInternalId() . '] database [' . $project['database'] . '] ' . ' ' . $e->getMessage()); } } } private function handleDatabaseStorage(string $key, Database $dbForProject): void { - $data = explode('.', $key); - $start = microtime(true); + $data = \explode('.', $key); + $start = \microtime(true); - $updateMetric = function (Database $dbForProject, int $value, string $key, string $period, string|null $time) { - $id = \md5("{$time}_{$period}_{$key}"); - - try { - $dbForProject->createDocument('stats', new Document([ - '$id' => $id, - 'period' => $period, - 'time' => $time, - 'metric' => $key, - 'value' => $value, - 'region' => System::getEnv('_APP_REGION', 'default'), - ])); - } catch (Duplicate $th) { - if ($value < 0) { - $dbForProject->decreaseDocumentAttribute( - 'stats', - $id, - 'value', - abs($value) - ); - } else { - $dbForProject->increaseDocumentAttribute( - 'stats', - $id, - 'value', - $value - ); - } - } - }; + $documents = []; foreach ($this->periods as $period => $format) { - $time = 'inf' === $period ? null : date($format, time()); + $time = 'inf' === $period ? null : \date($format, \time()); $id = \md5("{$time}_{$period}_{$key}"); $value = 0; $previousValue = 0; + try { - $previousValue = ($dbForProject->getDocument('stats', $id))->getAttribute('value', 0); - } catch (\Exception $e) { + $previousValue = $dbForProject + ->getDocument('stats', $id) + ->getAttribute('value', 0); + } catch (\Exception) { // No previous value } - switch (count($data)) { + switch (\count($data)) { // Collection Level case METRIC_COLLECTION_LEVEL_STORAGE: Console::log('[' . DateTime::now() . '] Collection Level Storage Calculation [' . $key . ']'); + $databaseInternalId = $data[0]; $collectionInternalId = $data[1]; try { $value = $dbForProject->getSizeOfCollection('database_' . $databaseInternalId . '_collection_' . $collectionInternalId); } catch (\Exception $e) { - // Collection not found - if ($e->getMessage() !== 'Collection not found') { + if (!$e instanceof NotFound) { throw $e; } } @@ -197,18 +163,43 @@ class UsageDump extends Action break; } - // Update Collection - $updateMetric($dbForProject, $diff, $key, $period, $time); + $databaseKey = \str_replace( + ['{databaseInternalId}'], + [$data[0]], + METRIC_DATABASE_ID_STORAGE + ); - // Update Database - $databaseKey = str_replace(['{databaseInternalId}'], [$data[0]], METRIC_DATABASE_ID_STORAGE); - $updateMetric($dbForProject, $diff, $databaseKey, $period, $time); + // Database + $documents[] = new Document([ + '$id' => $id, + 'period' => $period, + 'time' => $time, + 'metric' => $databaseKey, + 'value' => $diff, + 'region' => System::getEnv('_APP_REGION', 'default'), + ]); - // Update Project - $projectKey = METRIC_DATABASES_STORAGE; - $updateMetric($dbForProject, $diff, $projectKey, $period, $time); + // Collection + $documents[] = new Document([ + '$id' => $id, + 'period' => $period, + 'time' => $time, + 'metric' => $key, + 'value' => $diff, + 'region' => System::getEnv('_APP_REGION', 'default'), + ]); + + // Project + $documents[] = new Document([ + '$id' => $id, + 'period' => $period, + 'time' => $time, + 'metric' => METRIC_DATABASES_STORAGE, + 'value' => $diff, + 'region' => System::getEnv('_APP_REGION', 'default'), + ]); break; - // Database Level + // Database Level case METRIC_DATABASE_LEVEL_STORAGE: Console::log('[' . DateTime::now() . '] Database Level Storage Calculation [' . $key . ']'); $databaseInternalId = $data[0]; @@ -217,8 +208,7 @@ class UsageDump extends Action try { $collections = $dbForProject->find('database_' . $databaseInternalId); } catch (\Exception $e) { - // Database not found - if ($e->getMessage() !== 'Collection not found') { + if (!$e instanceof NotFound) { throw $e; } } @@ -227,8 +217,7 @@ class UsageDump extends Action try { $value += $dbForProject->getSizeOfCollection('database_' . $databaseInternalId . '_collection_' . $collection->getInternalId()); } catch (\Exception $e) { - // Collection not found - if ($e->getMessage() !== 'Collection not found') { + if (!$e instanceof NotFound) { throw $e; } } @@ -240,19 +229,37 @@ class UsageDump extends Action break; } - // Update Database - $databaseKey = str_replace(['{databaseInternalId}'], [$data[0]], METRIC_DATABASE_ID_STORAGE); - $updateMetric($dbForProject, $diff, $databaseKey, $period, $time); + // Database + $databaseKey = str_replace( + ['{databaseInternalId}'], + [$data[0]], + METRIC_DATABASE_ID_STORAGE + ); - // Update Project - $projectKey = METRIC_DATABASES_STORAGE; - $updateMetric($dbForProject, $diff, $projectKey, $period, $time); + $documents[] = new Document([ + '$id' => $id, + 'period' => $period, + 'time' => $time, + 'metric' => $databaseKey, + 'value' => $diff, + 'region' => System::getEnv('_APP_REGION', 'default'), + ]); + + // Project + $documents[] = new Document([ + '$id' => $id, + 'period' => $period, + 'time' => $time, + 'metric' => METRIC_DATABASES_STORAGE, + 'value' => $diff, + 'region' => System::getEnv('_APP_REGION', 'default'), + ]); break; - // Project Level + // Project Level case METRIC_PROJECT_LEVEL_STORAGE: Console::log('[' . DateTime::now() . '] Project Level Storage Calculation [' . $key . ']'); - // Get all project databases - $databases = $dbForProject->find('database'); + + $databases = $dbForProject->find('databases'); // Recalculate all databases foreach ($databases as $database) { @@ -262,8 +269,7 @@ class UsageDump extends Action try { $value += $dbForProject->getSizeOfCollection('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId()); } catch (\Exception $e) { - // Collection not found - if ($e->getMessage() !== 'Collection not found') { + if (!$e instanceof NotFound) { throw $e; } } @@ -272,15 +278,27 @@ class UsageDump extends Action $diff = $value - $previousValue; - // Update Project - $projectKey = METRIC_DATABASES_STORAGE; - $updateMetric($dbForProject, $diff, $projectKey, $period, $time); + // Project + $documents[] = new Document([ + '$id' => $id, + 'period' => $period, + 'time' => $time, + 'metric' => METRIC_DATABASES_STORAGE, + 'value' => $diff, + 'region' => System::getEnv('_APP_REGION', 'default'), + ]); break; } } + $dbForProject->createOrUpdateDocumentsWithInplaceIncrease( + collection: 'stats', + attribute: 'value', + documents: $documents + ); + $end = microtime(true); - console::log('[' . DateTime::now() . '] DB Storage Calculation [' . $key . '] took ' . (($end - $start) * 1000) . ' milliseconds'); + Console::log('[' . DateTime::now() . '] DB Storage Calculation [' . $key . '] took ' . (($end - $start) * 1000) . ' milliseconds'); } } From e0eea5b13d9601371bbcec1f2ab33cd3f1a334f6 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 23 Jan 2025 01:47:06 +1300 Subject: [PATCH 065/101] Update db --- composer.json | 2 +- composer.lock | 27 ++++++++++++++++++--------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index 9674bce2fd..1a641c06ce 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,7 @@ "utopia-php/cache": "0.11.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.56.4", + "utopia-php/database": "dev-feat-batch-upsert as 0.56.4", "utopia-php/domains": "0.5.*", "utopia-php/dsn": "0.2.1", "utopia-php/framework": "0.33.*", diff --git a/composer.lock b/composer.lock index cd14e512a7..4d6e62c2ff 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": "3cd37ea04612e04b9e76eb51c5da41dd", + "content-hash": "8b621344d83a71a93913bfc12d1ebf4f", "packages": [ { "name": "adhocore/jwt", @@ -3476,16 +3476,16 @@ }, { "name": "utopia-php/database", - "version": "0.56.4", + "version": "dev-feat-batch-upsert", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "240478a60797124a885ceac40046fe47c22415b7" + "reference": "c9170c85c07997fc3718f35928b252062a02070a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/240478a60797124a885ceac40046fe47c22415b7", - "reference": "240478a60797124a885ceac40046fe47c22415b7", + "url": "https://api.github.com/repos/utopia-php/database/zipball/c9170c85c07997fc3718f35928b252062a02070a", + "reference": "c9170c85c07997fc3718f35928b252062a02070a", "shasum": "" }, "require": { @@ -3526,9 +3526,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.56.4" + "source": "https://github.com/utopia-php/database/tree/feat-batch-upsert" }, - "time": "2025-01-20T09:22:08+00:00" + "time": "2025-01-22T12:38:29+00:00" }, { "name": "utopia-php/domains", @@ -8554,9 +8554,18 @@ "time": "2024-03-07T20:33:40+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "utopia-php/database", + "version": "dev-feat-batch-upsert", + "alias": "0.56.4", + "alias_normalized": "0.56.4.0" + } + ], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": { + "utopia-php/database": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { From 343ef4944bb61a92e803faa937831b03da7479ba Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 23 Jan 2025 01:57:23 +1300 Subject: [PATCH 066/101] Format --- composer.lock | 8 ++++---- src/Appwrite/Platform/Workers/UsageDump.php | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/composer.lock b/composer.lock index 4d6e62c2ff..dac940b775 100644 --- a/composer.lock +++ b/composer.lock @@ -3480,12 +3480,12 @@ "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "c9170c85c07997fc3718f35928b252062a02070a" + "reference": "fb3fc216f3c8006528f42264216067aceb2f392c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/c9170c85c07997fc3718f35928b252062a02070a", - "reference": "c9170c85c07997fc3718f35928b252062a02070a", + "url": "https://api.github.com/repos/utopia-php/database/zipball/fb3fc216f3c8006528f42264216067aceb2f392c", + "reference": "fb3fc216f3c8006528f42264216067aceb2f392c", "shasum": "" }, "require": { @@ -3528,7 +3528,7 @@ "issues": "https://github.com/utopia-php/database/issues", "source": "https://github.com/utopia-php/database/tree/feat-batch-upsert" }, - "time": "2025-01-22T12:38:29+00:00" + "time": "2025-01-22T12:49:21+00:00" }, { "name": "utopia-php/domains", diff --git a/src/Appwrite/Platform/Workers/UsageDump.php b/src/Appwrite/Platform/Workers/UsageDump.php index 1e3d3149ce..87faf9263c 100644 --- a/src/Appwrite/Platform/Workers/UsageDump.php +++ b/src/Appwrite/Platform/Workers/UsageDump.php @@ -7,7 +7,6 @@ use Utopia\CLI\Console; use Utopia\Database\Database; use Utopia\Database\DateTime; use Utopia\Database\Document; -use Utopia\Database\Exception\Duplicate; use Utopia\Database\Exception\NotFound; use Utopia\Platform\Action; use Utopia\Queue\Message; @@ -199,7 +198,7 @@ class UsageDump extends Action 'region' => System::getEnv('_APP_REGION', 'default'), ]); break; - // Database Level + // Database Level case METRIC_DATABASE_LEVEL_STORAGE: Console::log('[' . DateTime::now() . '] Database Level Storage Calculation [' . $key . ']'); $databaseInternalId = $data[0]; @@ -255,7 +254,7 @@ class UsageDump extends Action 'region' => System::getEnv('_APP_REGION', 'default'), ]); break; - // Project Level + // Project Level case METRIC_PROJECT_LEVEL_STORAGE: Console::log('[' . DateTime::now() . '] Project Level Storage Calculation [' . $key . ']'); From ee9bf984c714c1ea4d37c86f6d7e98ff40056106 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 22 Jan 2025 17:35:30 +0200 Subject: [PATCH 067/101] Delete collection first --- src/Appwrite/Platform/Workers/Databases.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Databases.php b/src/Appwrite/Platform/Workers/Databases.php index 9345f31165..441b09b4cc 100644 --- a/src/Appwrite/Platform/Workers/Databases.php +++ b/src/Appwrite/Platform/Workers/Databases.php @@ -535,6 +535,8 @@ class Databases extends Action $databaseId = $database->getId(); $databaseInternalId = $database->getInternalId(); + $dbForProject->deleteCollection('database_' . $databaseInternalId . '_collection_' . $collection->getInternalId()); + /** * Related collections relating to current collection */ @@ -553,8 +555,6 @@ class Databases extends Action } ); - $dbForProject->deleteCollection('database_' . $databaseInternalId . '_collection_' . $collection->getInternalId()); - $this->deleteByGroup('attributes', [ Query::equal('databaseInternalId', [$databaseInternalId]), Query::equal('collectionInternalId', [$collectionInternalId]) From 5e9955ed3e09da032f9030d43ad85e338d7270ca Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 23 Jan 2025 17:42:12 +1300 Subject: [PATCH 068/101] Update database --- composer.json | 6 ++-- composer.lock | 95 +++++++++++++++++++++++---------------------------- 2 files changed, 46 insertions(+), 55 deletions(-) diff --git a/composer.json b/composer.json index 1a641c06ce..e024cff1c6 100644 --- a/composer.json +++ b/composer.json @@ -45,13 +45,13 @@ "ext-sockets": "*", "appwrite/php-runtimes": "0.16.*", "appwrite/php-clamav": "2.0.*", - "utopia-php/abuse": "0.47.*", + "utopia-php/abuse": "0.48.*", "utopia-php/analytics": "0.10.*", - "utopia-php/audit": "0.47.*", + "utopia-php/audit": "0.48.*", "utopia-php/cache": "0.11.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "dev-feat-batch-upsert as 0.56.4", + "utopia-php/database": "0.57.*", "utopia-php/domains": "0.5.*", "utopia-php/dsn": "0.2.1", "utopia-php/framework": "0.33.*", diff --git a/composer.lock b/composer.lock index dac940b775..23badedd08 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": "8b621344d83a71a93913bfc12d1ebf4f", + "content-hash": "8927ec7d3cfa460ce223e4c13cf61ada", "packages": [ { "name": "adhocore/jwt", @@ -3136,16 +3136,16 @@ }, { "name": "utopia-php/abuse", - "version": "0.47.0", + "version": "0.48.0", "source": { "type": "git", "url": "https://github.com/utopia-php/abuse.git", - "reference": "2b52bb362234d4072b647ed57db1b3be030f57c2" + "reference": "8387c65cc7148af58adbbede06eedc1a7b568e57" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/abuse/zipball/2b52bb362234d4072b647ed57db1b3be030f57c2", - "reference": "2b52bb362234d4072b647ed57db1b3be030f57c2", + "url": "https://api.github.com/repos/utopia-php/abuse/zipball/8387c65cc7148af58adbbede06eedc1a7b568e57", + "reference": "8387c65cc7148af58adbbede06eedc1a7b568e57", "shasum": "" }, "require": { @@ -3153,13 +3153,13 @@ "ext-pdo": "*", "ext-redis": "*", "php": ">=8.0", - "utopia-php/database": "0.56.*" + "utopia-php/database": "0.57.*" }, "require-dev": { - "laravel/pint": "1.5.*", - "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^1.9", - "phpunit/phpunit": "^9.4" + "laravel/pint": "1.*", + "phpbench/phpbench": "1.*", + "phpstan/phpstan": "1.*", + "phpunit/phpunit": "9.*" }, "type": "library", "autoload": { @@ -3181,9 +3181,9 @@ ], "support": { "issues": "https://github.com/utopia-php/abuse/issues", - "source": "https://github.com/utopia-php/abuse/tree/0.47.0" + "source": "https://github.com/utopia-php/abuse/tree/0.48.0" }, - "time": "2025-01-15T02:41:02+00:00" + "time": "2025-01-23T04:40:14+00:00" }, { "name": "utopia-php/analytics", @@ -3233,26 +3233,26 @@ }, { "name": "utopia-php/audit", - "version": "0.47.0", + "version": "0.48.0", "source": { "type": "git", "url": "https://github.com/utopia-php/audit.git", - "reference": "1ebd5784ba68645073426f2f04a67726a1bde4d7" + "reference": "6aab185fce3ba7878b0f26cc8b4eefa1663fb395" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/audit/zipball/1ebd5784ba68645073426f2f04a67726a1bde4d7", - "reference": "1ebd5784ba68645073426f2f04a67726a1bde4d7", + "url": "https://api.github.com/repos/utopia-php/audit/zipball/6aab185fce3ba7878b0f26cc8b4eefa1663fb395", + "reference": "6aab185fce3ba7878b0f26cc8b4eefa1663fb395", "shasum": "" }, "require": { "php": ">=8.0", - "utopia-php/database": "0.56.*" + "utopia-php/database": "0.57.*" }, "require-dev": { - "laravel/pint": "1.5.*", - "phpstan/phpstan": "^1.8", - "phpunit/phpunit": "^9.3" + "laravel/pint": "1.*", + "phpstan/phpstan": "1.*", + "phpunit/phpunit": "9.*" }, "type": "library", "autoload": { @@ -3274,9 +3274,9 @@ ], "support": { "issues": "https://github.com/utopia-php/audit/issues", - "source": "https://github.com/utopia-php/audit/tree/0.47.0" + "source": "https://github.com/utopia-php/audit/tree/0.48.0" }, - "time": "2025-01-15T02:40:53+00:00" + "time": "2025-01-23T04:40:07+00:00" }, { "name": "utopia-php/cache", @@ -3476,16 +3476,16 @@ }, { "name": "utopia-php/database", - "version": "dev-feat-batch-upsert", + "version": "0.57.1", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "fb3fc216f3c8006528f42264216067aceb2f392c" + "reference": "6ec27ade27e1b42b79ac42b06869e9c34d529357" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/fb3fc216f3c8006528f42264216067aceb2f392c", - "reference": "fb3fc216f3c8006528f42264216067aceb2f392c", + "url": "https://api.github.com/repos/utopia-php/database/zipball/6ec27ade27e1b42b79ac42b06869e9c34d529357", + "reference": "6ec27ade27e1b42b79ac42b06869e9c34d529357", "shasum": "" }, "require": { @@ -3526,9 +3526,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/feat-batch-upsert" + "source": "https://github.com/utopia-php/database/tree/0.57.1" }, - "time": "2025-01-22T12:49:21+00:00" + "time": "2025-01-23T04:26:35+00:00" }, { "name": "utopia-php/domains", @@ -3929,35 +3929,35 @@ }, { "name": "utopia-php/migration", - "version": "0.6.15", + "version": "0.6.16", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "e849ec3e7ad38f5f5273ebb0132b112639cdf01c" + "reference": "a1da9b75a0e406ea8caca0d61b57a4d206ea0715" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/e849ec3e7ad38f5f5273ebb0132b112639cdf01c", - "reference": "e849ec3e7ad38f5f5273ebb0132b112639cdf01c", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/a1da9b75a0e406ea8caca0d61b57a4d206ea0715", + "reference": "a1da9b75a0e406ea8caca0d61b57a4d206ea0715", "shasum": "" }, "require": { - "appwrite/appwrite": "11.1.*", + "appwrite/appwrite": "11.*", "ext-curl": "*", "ext-openssl": "*", - "php": "8.3.*", - "utopia-php/database": "0.56.*", + "php": ">=8.3", + "utopia-php/database": "0.57.*", "utopia-php/dsn": "0.2.*", "utopia-php/framework": "0.33.*", "utopia-php/storage": "0.18.*" }, "require-dev": { "ext-pdo": "*", - "laravel/pint": "1.17.*", - "phpstan/phpstan": "1.11.*", - "phpunit/phpunit": "11.2.*", + "laravel/pint": "1.*", + "phpstan/phpstan": "1.*", + "phpunit/phpunit": "11.*", "utopia-php/cli": "0.16.*", - "vlucas/phpdotenv": "5.6.*" + "vlucas/phpdotenv": "5.*" }, "type": "library", "autoload": { @@ -3979,9 +3979,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.6.15" + "source": "https://github.com/utopia-php/migration/tree/0.6.16" }, - "time": "2025-01-15T04:55:08+00:00" + "time": "2025-01-23T04:34:02+00:00" }, { "name": "utopia-php/mongo", @@ -8554,18 +8554,9 @@ "time": "2024-03-07T20:33:40+00:00" } ], - "aliases": [ - { - "package": "utopia-php/database", - "version": "dev-feat-batch-upsert", - "alias": "0.56.4", - "alias_normalized": "0.56.4.0" - } - ], + "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "utopia-php/database": 20 - }, + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { From 2a03bbf5b8a805c2cc15311a92fffe8ffcdd0435 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 23 Jan 2025 18:20:00 +1300 Subject: [PATCH 069/101] Update database --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index 23badedd08..02c3b65284 100644 --- a/composer.lock +++ b/composer.lock @@ -3476,16 +3476,16 @@ }, { "name": "utopia-php/database", - "version": "0.57.1", + "version": "0.57.2", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "6ec27ade27e1b42b79ac42b06869e9c34d529357" + "reference": "bd6f080dd9f4210349a6a862fa6da65a4d9d6339" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/6ec27ade27e1b42b79ac42b06869e9c34d529357", - "reference": "6ec27ade27e1b42b79ac42b06869e9c34d529357", + "url": "https://api.github.com/repos/utopia-php/database/zipball/bd6f080dd9f4210349a6a862fa6da65a4d9d6339", + "reference": "bd6f080dd9f4210349a6a862fa6da65a4d9d6339", "shasum": "" }, "require": { @@ -3526,9 +3526,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.57.1" + "source": "https://github.com/utopia-php/database/tree/0.57.2" }, - "time": "2025-01-23T04:26:35+00:00" + "time": "2025-01-23T05:19:02+00:00" }, { "name": "utopia-php/domains", From 65c2b99dfe9ba4c8f07a1b0f9f5d5cfb3853a2b8 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 23 Jan 2025 18:32:36 +1300 Subject: [PATCH 070/101] Fix method refs --- src/Appwrite/Platform/Workers/UsageDump.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Workers/UsageDump.php b/src/Appwrite/Platform/Workers/UsageDump.php index 87faf9263c..99e312c64e 100644 --- a/src/Appwrite/Platform/Workers/UsageDump.php +++ b/src/Appwrite/Platform/Workers/UsageDump.php @@ -105,7 +105,7 @@ class UsageDump extends Action ]); } - $dbForProject->createOrUpdateDocumentsWithInplaceIncrease( + $dbForProject->createOrUpdateDocumentsWithIncrease( collection: 'stats', attribute: 'value', documents: $documents @@ -290,7 +290,7 @@ class UsageDump extends Action } } - $dbForProject->createOrUpdateDocumentsWithInplaceIncrease( + $dbForProject->createOrUpdateDocumentsWithIncrease( collection: 'stats', attribute: 'value', documents: $documents From 8cd400075143126313e1302e95ab0c26f1b9ee59 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 23 Jan 2025 23:25:10 +1300 Subject: [PATCH 071/101] One write per project --- src/Appwrite/Platform/Workers/UsageDump.php | 350 ++++++++++---------- 1 file changed, 172 insertions(+), 178 deletions(-) diff --git a/src/Appwrite/Platform/Workers/UsageDump.php b/src/Appwrite/Platform/Workers/UsageDump.php index 99e312c64e..3590398aaa 100644 --- a/src/Appwrite/Platform/Workers/UsageDump.php +++ b/src/Appwrite/Platform/Workers/UsageDump.php @@ -38,9 +38,7 @@ class UsageDump extends Action $this ->inject('message') ->inject('getProjectDB') - ->callback(function (Message $message, callable $getProjectDB) { - $this->action($message, $getProjectDB); - }); + ->callback([$this, 'action']); } /** @@ -57,45 +55,38 @@ class UsageDump extends Action throw new Exception('Missing payload'); } - - foreach ($payload['stats'] ?? [] as $stats) { - $project = new Document($stats['project'] ?? []); - - /** - * End temp bug fallback - */ - $numberOfKeys = !empty($stats['keys']) ? count($stats['keys']) : 0; - $receivedAt = $stats['receivedAt'] ?? 'NONE'; - if ($numberOfKeys === 0) { - continue; - } - - Console::log('['.DateTime::now().'] Id: '.$project->getId(). ' InternalId: '.$project->getInternalId(). ' Db: '.$project->getAttribute('database').' ReceivedAt: '.$receivedAt. ' Keys: '.$numberOfKeys); - - try { + try { + foreach ($payload['stats'] ?? [] as $stats) { + $project = new Document($stats['project'] ?? []); $dbForProject = $getProjectDB($project); + $projectDocuments = []; + $databaseCache = []; + $collectionSizeCache = []; foreach ($stats['keys'] ?? [] as $key => $value) { if ($value == 0) { continue; } - if (str_contains($key, METRIC_DATABASES_STORAGE)) { - try { - $this->handleDatabaseStorage($key, $dbForProject); - } catch (\Exception $e) { - Console::error('[' . DateTime::now() . '] failed to calculate database storage for key [' . $key . '] ' . $e->getMessage()); - } - continue; - } - - $documents = []; - foreach ($this->periods as $period => $format) { - $time = 'inf' === $period ? null : date($format, time()); + $time = 'inf' === $period ? null : \date($format, \time()); $id = \md5("{$time}_{$period}_{$key}"); - $documents[] = new Document([ + if (\str_contains($key, METRIC_DATABASES_STORAGE)) { + $this->handleDatabaseStorage( + $id, + $key, + $time, + $period, + $dbForProject, + $projectDocuments, + $databaseCache, + $collectionSizeCache + ); + continue; + } + + $projectDocuments[] = new Document([ '$id' => $id, 'period' => $period, 'time' => $time, @@ -104,200 +95,203 @@ class UsageDump extends Action 'region' => System::getEnv('_APP_REGION', 'default'), ]); } - - $dbForProject->createOrUpdateDocumentsWithIncrease( - collection: 'stats', - attribute: 'value', - documents: $documents - ); } - } catch (\Exception $e) { - Console::error('[' . DateTime::now() . '] project [' . $project->getInternalId() . '] database [' . $project['database'] . '] ' . ' ' . $e->getMessage()); + + $dbForProject->createOrUpdateDocumentsWithIncrease( + collection: 'stats', + attribute: 'value', + documents: $projectDocuments + ); } + } catch (\Exception $e) { + Console::error('[' . DateTime::now() . '] Error processing stats: ' . $e->getMessage()); } } - private function handleDatabaseStorage(string $key, Database $dbForProject): void + private function handleDatabaseStorage( + string $id, + string $key, + string $time, + string $period, + Database $dbForProject, + array &$projectDocuments, + array &$databaseCache, + array &$collectionSizeCache, + ): void { $data = \explode('.', $key); - $start = \microtime(true); + $value = 0; + $previousValue = 0; - $documents = []; + try { + $previousValue = $dbForProject + ->getDocument('stats', $id) + ->getAttribute('value', 0); + } catch (\Exception) { + // No previous value + } - foreach ($this->periods as $period => $format) { - $time = 'inf' === $period ? null : \date($format, \time()); - $id = \md5("{$time}_{$period}_{$key}"); + switch (\count($data)) { + case METRIC_COLLECTION_LEVEL_STORAGE: + Console::log('[' . DateTime::now() . '] Collection Level Storage Calculation [' . $key . ']'); - $value = 0; - $previousValue = 0; - - try { - $previousValue = $dbForProject - ->getDocument('stats', $id) - ->getAttribute('value', 0); - } catch (\Exception) { - // No previous value - } - - switch (\count($data)) { - // Collection Level - case METRIC_COLLECTION_LEVEL_STORAGE: - Console::log('[' . DateTime::now() . '] Collection Level Storage Calculation [' . $key . ']'); - - $databaseInternalId = $data[0]; - $collectionInternalId = $data[1]; + $databaseInternalId = $data[0]; + $collectionInternalId = $data[1]; + $collectionId = "database_{$databaseInternalId}_collection_{$collectionInternalId}"; + if (!isset($collectionSizeCache[$collectionId])) { try { - $value = $dbForProject->getSizeOfCollection('database_' . $databaseInternalId . '_collection_' . $collectionInternalId); + $collectionSizeCache[$collectionId] = $dbForProject->getSizeOfCollection($collectionId); } catch (\Exception $e) { if (!$e instanceof NotFound) { throw $e; } + $collectionSizeCache[$collectionId] = 0; } + } - // Compare with previous value - $diff = $value - $previousValue; + $value = $collectionSizeCache[$collectionId]; - if ($diff === 0) { - break; - } - - $databaseKey = \str_replace( - ['{databaseInternalId}'], - [$data[0]], - METRIC_DATABASE_ID_STORAGE - ); - - // Database - $documents[] = new Document([ - '$id' => $id, - 'period' => $period, - 'time' => $time, - 'metric' => $databaseKey, - 'value' => $diff, - 'region' => System::getEnv('_APP_REGION', 'default'), - ]); - - // Collection - $documents[] = new Document([ - '$id' => $id, - 'period' => $period, - 'time' => $time, - 'metric' => $key, - 'value' => $diff, - 'region' => System::getEnv('_APP_REGION', 'default'), - ]); - - // Project - $documents[] = new Document([ - '$id' => $id, - 'period' => $period, - 'time' => $time, - 'metric' => METRIC_DATABASES_STORAGE, - 'value' => $diff, - 'region' => System::getEnv('_APP_REGION', 'default'), - ]); + $diff = $value - $previousValue; + if ($diff === 0) { break; - // Database Level - case METRIC_DATABASE_LEVEL_STORAGE: - Console::log('[' . DateTime::now() . '] Database Level Storage Calculation [' . $key . ']'); - $databaseInternalId = $data[0]; + } - $collections = []; + $keys = [ + $key, + \str_replace(['{databaseInternalId}'], [$data[0]], METRIC_DATABASE_ID_STORAGE), + METRIC_DATABASES_STORAGE + ]; + + foreach ($keys as $metric) { + $projectDocuments[] = $this->createStatsDocument($id, $period, $time, $metric, $diff); + } + break; + + case METRIC_DATABASE_LEVEL_STORAGE: + Console::log('[' . DateTime::now() . '] Database Level Storage Calculation [' . $key . ']'); + $databaseInternalId = $data[0]; + $databaseId = "database_{$databaseInternalId}"; + + if (!isset($databaseCache[$databaseId])) { try { - $collections = $dbForProject->find('database_' . $databaseInternalId); + $databaseCache[$databaseId] = $dbForProject->find($databaseId); } catch (\Exception $e) { if (!$e instanceof NotFound) { throw $e; } + $databaseCache[$databaseId] = []; } + } - foreach ($collections as $collection) { + foreach ($databaseCache[$databaseId] as $collection) { + $collectionId = "{$databaseId}_collection_{$collection->getInternalId()}"; + + if (!isset($collectionSizeCache[$collectionId])) { try { - $value += $dbForProject->getSizeOfCollection('database_' . $databaseInternalId . '_collection_' . $collection->getInternalId()); + $collectionSizeCache[$collectionId] = $dbForProject->getSizeOfCollection($collectionId); } catch (\Exception $e) { if (!$e instanceof NotFound) { throw $e; } + $collectionSizeCache[$collectionId] = 0; + } + } + $value += $collectionSizeCache[$collectionId]; + } + + $diff = $value - $previousValue; + if ($diff === 0) { + break; + } + + $keys = [ + \str_replace(['{databaseInternalId}'], [$data[0]], METRIC_DATABASE_ID_STORAGE), + METRIC_DATABASES_STORAGE + ]; + + foreach ($keys as $metric) { + $projectDocuments[] = $this->createStatsDocument($id, $period, $time, $metric, $diff); + } + break; + + case METRIC_PROJECT_LEVEL_STORAGE: + if (!isset($databaseCache['*'])) { + try { + $databaseCache['*'] = $dbForProject->find('databases'); + } catch (\Exception $e) { + if (!$e instanceof NotFound) { + throw $e; + } + $databaseCache['*'] = []; + } + } + + foreach ($databaseCache['*'] as $database) { + $databaseId = "database_{$database->getInternalId()}"; + if (!isset($databaseCache[$databaseId])) { + try { + $databaseCache[$databaseId] = $dbForProject->find($databaseId); + } catch (\Exception $e) { + if (!$e instanceof NotFound) { + throw $e; + } + $databaseCache[$databaseId] = []; } } - $diff = $value - $previousValue; + foreach ($databaseCache[$databaseId] as $collection) { + $collectionId = "{$databaseId}_collection_{$collection->getInternalId()}"; - if ($diff === 0) { - break; - } - - // Database - $databaseKey = str_replace( - ['{databaseInternalId}'], - [$data[0]], - METRIC_DATABASE_ID_STORAGE - ); - - $documents[] = new Document([ - '$id' => $id, - 'period' => $period, - 'time' => $time, - 'metric' => $databaseKey, - 'value' => $diff, - 'region' => System::getEnv('_APP_REGION', 'default'), - ]); - - // Project - $documents[] = new Document([ - '$id' => $id, - 'period' => $period, - 'time' => $time, - 'metric' => METRIC_DATABASES_STORAGE, - 'value' => $diff, - 'region' => System::getEnv('_APP_REGION', 'default'), - ]); - break; - // Project Level - case METRIC_PROJECT_LEVEL_STORAGE: - Console::log('[' . DateTime::now() . '] Project Level Storage Calculation [' . $key . ']'); - - $databases = $dbForProject->find('databases'); - - // Recalculate all databases - foreach ($databases as $database) { - $collections = $dbForProject->find('database_' . $database->getInternalId()); - - foreach ($collections as $collection) { + if (!isset($collectionSizeCache[$collectionId])) { try { - $value += $dbForProject->getSizeOfCollection('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId()); + $collectionSizeCache[$collectionId] = $dbForProject->getSizeOfCollection($collectionId); } catch (\Exception $e) { if (!$e instanceof NotFound) { throw $e; } + $collectionSizeCache[$collectionId] = 0; } } + $value += $collectionSizeCache[$collectionId]; } + } - $diff = $value - $previousValue; - - // Project - $documents[] = new Document([ - '$id' => $id, - 'period' => $period, - 'time' => $time, - 'metric' => METRIC_DATABASES_STORAGE, - 'value' => $diff, - 'region' => System::getEnv('_APP_REGION', 'default'), - ]); + $diff = $value - $previousValue; + if ($diff === 0) { break; - } + } + + $keys = [ + METRIC_DATABASES_STORAGE + ]; + + foreach ($keys as $metric) { + $projectDocuments[] = $this->createStatsDocument($id, $period, $time, $metric, $diff); + } + + break; + default: + Console::log('Unknown storage level.'); + break; } + } - $dbForProject->createOrUpdateDocumentsWithIncrease( - collection: 'stats', - attribute: 'value', - documents: $documents - ); - - $end = microtime(true); - - Console::log('[' . DateTime::now() . '] DB Storage Calculation [' . $key . '] took ' . (($end - $start) * 1000) . ' milliseconds'); + private function createStatsDocument( + string $id, + string $period, + string $time, + string $key, + int $diff, + ): Document + { + return new Document([ + '$id' => $id, + 'period' => $period, + 'time' => $time, + 'metric' => $key, + 'value' => $diff, + 'region' => System::getEnv('_APP_REGION', 'default'), + ]); } } From 77ae8dcc631e52c1643a1faa6c2001b0237897e2 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 23 Jan 2025 23:28:15 +1300 Subject: [PATCH 072/101] Lint --- src/Appwrite/Platform/Workers/UsageDump.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Appwrite/Platform/Workers/UsageDump.php b/src/Appwrite/Platform/Workers/UsageDump.php index 3590398aaa..16f7f63321 100644 --- a/src/Appwrite/Platform/Workers/UsageDump.php +++ b/src/Appwrite/Platform/Workers/UsageDump.php @@ -117,8 +117,7 @@ class UsageDump extends Action array &$projectDocuments, array &$databaseCache, array &$collectionSizeCache, - ): void - { + ): void { $data = \explode('.', $key); $value = 0; $previousValue = 0; @@ -283,8 +282,7 @@ class UsageDump extends Action string $time, string $key, int $diff, - ): Document - { + ): Document { return new Document([ '$id' => $id, 'period' => $period, From fe930d8f646ad39ead1c6e87020ae3bf96a24017 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 24 Jan 2025 00:07:45 +1300 Subject: [PATCH 073/101] Fix tests --- src/Appwrite/Platform/Workers/UsageDump.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Workers/UsageDump.php b/src/Appwrite/Platform/Workers/UsageDump.php index 16f7f63321..7d11bab3ce 100644 --- a/src/Appwrite/Platform/Workers/UsageDump.php +++ b/src/Appwrite/Platform/Workers/UsageDump.php @@ -111,7 +111,7 @@ class UsageDump extends Action private function handleDatabaseStorage( string $id, string $key, - string $time, + ?string $time, string $period, Database $dbForProject, array &$projectDocuments, @@ -279,7 +279,7 @@ class UsageDump extends Action private function createStatsDocument( string $id, string $period, - string $time, + ?string $time, string $key, int $diff, ): Document { From 687be05d95454c67e8a23d48444ecf4528abfbf1 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 24 Jan 2025 00:08:04 +1300 Subject: [PATCH 074/101] Speed up dev mode usage tests --- .env | 2 +- tests/e2e/General/UsageTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 8f7d7996e7..c26d1ce7e0 100644 --- a/.env +++ b/.env @@ -85,7 +85,7 @@ _APP_MAINTENANCE_RETENTION_CACHE=2592000 _APP_MAINTENANCE_RETENTION_EXECUTION=1209600 _APP_MAINTENANCE_RETENTION_ABUSE=86400 _APP_MAINTENANCE_RETENTION_AUDIT=1209600 -_APP_USAGE_AGGREGATION_INTERVAL=30 +_APP_USAGE_AGGREGATION_INTERVAL=5 _APP_MAINTENANCE_RETENTION_USAGE_HOURLY=8640000 _APP_MAINTENANCE_RETENTION_SCHEDULES=86400 _APP_USAGE_STATS=enabled diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index f6b2ca4882..4666922a47 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -23,7 +23,7 @@ class UsageTest extends Scope use SideServer; use FunctionsBase; - private const WAIT = 35; + private const WAIT = 5; private const CREATE = 20; protected string $projectId; From 91c319bc5070295360d397a8480e33d66b1bf0f5 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 24 Jan 2025 00:09:08 +1300 Subject: [PATCH 075/101] Remove redundant logs --- src/Appwrite/Platform/Workers/Usage.php | 16 ++++++---------- src/Appwrite/Platform/Workers/UsageDump.php | 8 +------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Usage.php b/src/Appwrite/Platform/Workers/Usage.php index 3687eeab67..3f7428d0dd 100644 --- a/src/Appwrite/Platform/Workers/Usage.php +++ b/src/Appwrite/Platform/Workers/Usage.php @@ -30,16 +30,13 @@ class Usage extends Action */ public function __construct() { - $this - ->desc('Usage worker') - ->inject('message') - ->inject('project') - ->inject('getProjectDB') - ->inject('queueForUsageDump') - ->callback(function (Message $message, Document $project, callable $getProjectDB, UsageDump $queueForUsageDump) { - $this->action($message, $project, $getProjectDB, $queueForUsageDump); - }); + ->desc('Usage worker') + ->inject('message') + ->inject('project') + ->inject('getProjectDB') + ->inject('queueForUsageDump') + ->callback([$this, 'action']); $this->aggregationInterval = (int) System::getEnv('_APP_USAGE_AGGREGATION_INTERVAL', '20'); $this->lastTriggeredTime = time(); @@ -61,7 +58,6 @@ class Usage extends Action throw new Exception('Missing payload'); } - if (empty($project->getAttribute('database'))) { var_dump($payload); return; diff --git a/src/Appwrite/Platform/Workers/UsageDump.php b/src/Appwrite/Platform/Workers/UsageDump.php index 7d11bab3ce..b75d2ac47f 100644 --- a/src/Appwrite/Platform/Workers/UsageDump.php +++ b/src/Appwrite/Platform/Workers/UsageDump.php @@ -132,8 +132,6 @@ class UsageDump extends Action switch (\count($data)) { case METRIC_COLLECTION_LEVEL_STORAGE: - Console::log('[' . DateTime::now() . '] Collection Level Storage Calculation [' . $key . ']'); - $databaseInternalId = $data[0]; $collectionInternalId = $data[1]; $collectionId = "database_{$databaseInternalId}_collection_{$collectionInternalId}"; @@ -168,7 +166,6 @@ class UsageDump extends Action break; case METRIC_DATABASE_LEVEL_STORAGE: - Console::log('[' . DateTime::now() . '] Database Level Storage Calculation [' . $key . ']'); $databaseInternalId = $data[0]; $databaseId = "database_{$databaseInternalId}"; @@ -268,10 +265,7 @@ class UsageDump extends Action foreach ($keys as $metric) { $projectDocuments[] = $this->createStatsDocument($id, $period, $time, $metric, $diff); } - - break; - default: - Console::log('Unknown storage level.'); + break; } } From 5dd3b09ca7d76464e6de4cfbf889dbb8d8b126b0 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 24 Jan 2025 00:13:13 +1300 Subject: [PATCH 076/101] Lint --- src/Appwrite/Platform/Workers/UsageDump.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Workers/UsageDump.php b/src/Appwrite/Platform/Workers/UsageDump.php index b75d2ac47f..3b9bc6cc31 100644 --- a/src/Appwrite/Platform/Workers/UsageDump.php +++ b/src/Appwrite/Platform/Workers/UsageDump.php @@ -265,7 +265,7 @@ class UsageDump extends Action foreach ($keys as $metric) { $projectDocuments[] = $this->createStatsDocument($id, $period, $time, $metric, $diff); } - + break; } } From 03a8f350827136c3949be9ef8c34e0c7b4d13f79 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 24 Jan 2025 00:14:30 +1300 Subject: [PATCH 077/101] Ensure wait overlaps aggregation interval --- tests/e2e/General/UsageTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index 4666922a47..e03d853e90 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -23,7 +23,7 @@ class UsageTest extends Scope use SideServer; use FunctionsBase; - private const WAIT = 5; + private const WAIT = 7; private const CREATE = 20; protected string $projectId; From 8097f1607fb7a9532c266a1886beb2c70a1e52fc Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 24 Jan 2025 01:34:44 +1300 Subject: [PATCH 078/101] Add project log --- src/Appwrite/Platform/Workers/UsageDump.php | 8 + tests/e2e/General/UsageTest.php | 205 +------------------- 2 files changed, 11 insertions(+), 202 deletions(-) diff --git a/src/Appwrite/Platform/Workers/UsageDump.php b/src/Appwrite/Platform/Workers/UsageDump.php index 3b9bc6cc31..74280ddfad 100644 --- a/src/Appwrite/Platform/Workers/UsageDump.php +++ b/src/Appwrite/Platform/Workers/UsageDump.php @@ -58,11 +58,19 @@ class UsageDump extends Action try { foreach ($payload['stats'] ?? [] as $stats) { $project = new Document($stats['project'] ?? []); + $numberOfKeys = !empty($stats['keys']) ? \count($stats['keys']) : 0; + $receivedAt = $stats['receivedAt'] ?? 'NONE'; + if ($numberOfKeys === 0) { + continue; + } + $dbForProject = $getProjectDB($project); $projectDocuments = []; $databaseCache = []; $collectionSizeCache = []; + Console::log('['.DateTime::now().'] Id: '.$project->getId(). ' InternalId: '.$project->getInternalId(). ' Db: '.$project->getAttribute('database').' ReceivedAt: '.$receivedAt. ' Keys: '.$numberOfKeys); + foreach ($stats['keys'] ?? [] as $key => $value) { if ($value == 0) { continue; diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index e03d853e90..a239625a96 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -651,200 +651,6 @@ class UsageTest extends Scope ]; } - // /** @depends testDatabaseStoragePrepare */ - // #[Retry(count: 1)] - // public function testDatabaseStorageStatsCreateDocument(array $data): array - // { - // $databaseId = $data['databaseId']; - // $collectionId = $data['collectionId']; - - // $originalProjectMetrics = $this->client->call( - // Client::METHOD_GET, - // '/project/usage', - // $this->getConsoleHeaders(), - // [ - // 'period' => '1d', - // 'startDate' => self::getToday(), - // 'endDate' => self::getTomorrow(), - // ] - // ); - - // $this->assertEquals(200, $originalProjectMetrics['headers']['status-code']); - // $this->assertArrayHasKey('databasesStorageTotal', $originalProjectMetrics['body']); - - // $originalProjectMetrics = $originalProjectMetrics['body']; - - // $originalDatabaseMetrics = $this->client->call( - // Client::METHOD_GET, - // '/databases/' . $databaseId . '/usage?range=30d', - // $this->getConsoleHeaders() - // ); - - // $this->assertEquals(200, $originalDatabaseMetrics['headers']['status-code']); - // $this->assertArrayHasKey('storageTotal', $originalDatabaseMetrics['body']); - // $originalDatabaseMetrics = $originalDatabaseMetrics['body']; - - // // Create documents - // for ($i = 0; $i < 100; $i++) { - // $response = $this->client->call( - // Client::METHOD_POST, - // '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', - // array_merge([ - // 'content-type' => 'application/json', - // 'x-appwrite-project' => $this->getProject()['$id'] - // ], $this->getHeaders()), - // [ - // 'documentId' => 'unique()', - // 'data' => ['data' => str_repeat('a', 10000)], - // ] - // ); - - // $this->assertEquals(201, $response['headers']['status-code']); - // } - - // sleep(self::WAIT); - - // for ($i = 0; $i < 3; $i++) { - // try { - // $newProjectMetrics = $this->client->call( - // Client::METHOD_GET, - // '/project/usage', - // $this->getConsoleHeaders(), - // [ - // 'period' => '1d', - // 'startDate' => self::getToday(), - // 'endDate' => self::getTomorrow(), - // ] - // ); - - // $this->assertEquals(200, $newProjectMetrics['headers']['status-code']); - // $this->assertArrayHasKey('databasesStorageTotal', $newProjectMetrics['body']); - // $this->assertGreaterThan($originalProjectMetrics['databasesStorageTotal'], $newProjectMetrics['body']['databasesStorageTotal']); - - // $newProjectMetrics = $newProjectMetrics['body']; - - // $newDatabaseMetrics = $this->client->call( - // Client::METHOD_GET, - // '/databases/' . $databaseId . '/usage?range=30d', - // $this->getConsoleHeaders() - // ); - - // $this->assertEquals(200, $newDatabaseMetrics['headers']['status-code']); - // $this->assertArrayHasKey('storageTotal', $newDatabaseMetrics['body']); - // $this->assertGreaterThan($originalDatabaseMetrics['storageTotal'], $newDatabaseMetrics['body']['storageTotal']); - - // $newDatabaseMetrics = $newDatabaseMetrics['body']; - - // return [ - // 'databaseId' => $databaseId, - // 'collectionId' => $collectionId, - // 'currentProjectMetrics' => $newProjectMetrics, - // 'currentDatabaseMetrics' => $newDatabaseMetrics, - // ]; - // } catch (ExpectationFailedException $e) { - // if ($i === 2) { - // throw $e; - // } - // sleep(self::WAIT); - // continue; - // } - // } - // } - - // /** @depends testDatabaseStorageStatsCreateDocument */ - // #[Retry(count: 1)] - // public function testDatabaseStorageStatsDeleteDocument(array $data): array - // { - // $databaseId = $data['databaseId']; - // $collectionId = $data['collectionId']; - // $currentProjectMetrics = $data['currentProjectMetrics']; - // $currentDatabaseMetrics = $data['currentDatabaseMetrics']; - - // $documents = $this->client->call( - // Client::METHOD_GET, - // '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', - // array_merge([ - // 'x-appwrite-project' => $this->getProject()['$id'] - // ], $this->getHeaders()), - // [ - // 'queries' => [ - // Query::limit(50)->toString() - // ] - // ] - // ); - - // foreach ($documents['body']['documents'] as $document) { - // $response = $this->client->call( - // Client::METHOD_DELETE, - // '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $document['$id'], - // array_merge([ - // 'x-appwrite-project' => $this->getProject()['$id'] - // ], $this->getHeaders()) - // ); - - // $this->assertEquals(204, $response['headers']['status-code']); - // } - - // sleep(self::WAIT); - - // for ($i = 0; $i < 3; $i++) { - // try { - // $newProjectMetrics = $this->client->call( - // Client::METHOD_GET, - // '/project/usage', - // $this->getConsoleHeaders(), - // [ - // 'period' => '1d', - // 'startDate' => self::getToday(), - // 'endDate' => self::getTomorrow(), - // ] - // ); - - // $this->assertEquals(200, $newProjectMetrics['headers']['status-code']); - // $this->assertArrayHasKey('databasesStorageTotal', $newProjectMetrics['body']); - // $this->assertLessThan($currentProjectMetrics['databasesStorageTotal'], $newProjectMetrics['body']['databasesStorageTotal']); - - // $newProjectMetrics = $newProjectMetrics['body']; - - // $newDatabaseMetrics = $this->client->call( - // Client::METHOD_GET, - // '/databases/' . $databaseId . '/usage?range=30d', - // $this->getConsoleHeaders() - // ); - - // $this->assertEquals(200, $newDatabaseMetrics['headers']['status-code']); - // $this->assertArrayHasKey('storageTotal', $newDatabaseMetrics['body']); - // $this->assertLessThan($currentDatabaseMetrics['storageTotal'], $newDatabaseMetrics['body']['storageTotal']); - - // $newDatabaseMetrics = $newDatabaseMetrics['body']; - - // return [ - // 'databaseId' => $databaseId, - // 'collectionId' => $collectionId, - // 'currentProjectMetrics' => $newProjectMetrics, - // 'currentDatabaseMetrics' => $newDatabaseMetrics, - // ]; - // } catch (ExpectationFailedException $e) { - // if ($i === 2) { - // throw $e; - // } - // sleep(self::WAIT); - // continue; - // } - // } - - // $newProjectMetrics = $this->client->call( - // Client::METHOD_GET, - // '/project/usage', - // $this->getConsoleHeaders(), - // [ - // 'period' => '1d', - // 'startDate' => self::getToday(), - // 'endDate' => self::getTomorrow(), - // ] - // ); - // } - /** @depends testDatabaseStats */ public function testPrepareFunctionsStats(array $data): array { @@ -905,7 +711,7 @@ class UsageTest extends Scope $this->assertEquals('index.php', $response['body']['entrypoint']); // Wait for deployment to build. - sleep(self::WAIT + 20); + sleep(self::WAIT); $response = $this->client->call( Client::METHOD_PATCH, @@ -976,18 +782,13 @@ class UsageTest extends Scope array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] - ], $this->getHeaders()), - [ - 'async' => true, - ] + ], $this->getHeaders()) ); - $this->assertEquals(202, $response['headers']['status-code']); + $this->assertEquals(200, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); $this->assertEquals($functionId, $response['body']['functionId']); - sleep(self::WAIT); - $response = $this->client->call( Client::METHOD_GET, '/functions/' . $functionId . '/executions/' . $response['body']['$id'], From 1360c16f65cc015a7515761dfb68942fc5c578a6 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 24 Jan 2025 01:43:25 +1300 Subject: [PATCH 079/101] Partial revert "Add project log" This partially reverts commit 8097f1607fb7a9532c266a1886beb2c70a1e52fc. --- tests/e2e/General/UsageTest.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index a239625a96..ffc63708c8 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -711,7 +711,7 @@ class UsageTest extends Scope $this->assertEquals('index.php', $response['body']['entrypoint']); // Wait for deployment to build. - sleep(self::WAIT); + sleep(self::WAIT + 20); $response = $this->client->call( Client::METHOD_PATCH, @@ -782,13 +782,18 @@ class UsageTest extends Scope array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] - ], $this->getHeaders()) + ], $this->getHeaders()), + [ + 'async' => true, + ] ); - $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(202, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); $this->assertEquals($functionId, $response['body']['functionId']); + sleep(self::WAIT); + $response = $this->client->call( Client::METHOD_GET, '/functions/' . $functionId . '/executions/' . $response['body']['$id'], From f849fb9b30496af213d6aa04acb7425114e41f3e Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 24 Jan 2025 02:04:18 +1300 Subject: [PATCH 080/101] Add project job timing --- src/Appwrite/Platform/Workers/UsageDump.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Workers/UsageDump.php b/src/Appwrite/Platform/Workers/UsageDump.php index 74280ddfad..bb1d605442 100644 --- a/src/Appwrite/Platform/Workers/UsageDump.php +++ b/src/Appwrite/Platform/Workers/UsageDump.php @@ -69,7 +69,8 @@ class UsageDump extends Action $databaseCache = []; $collectionSizeCache = []; - Console::log('['.DateTime::now().'] Id: '.$project->getId(). ' InternalId: '.$project->getInternalId(). ' Db: '.$project->getAttribute('database').' ReceivedAt: '.$receivedAt. ' Keys: '.$numberOfKeys); + Console::log('['.DateTime::now().'] Id: '.$project->getId(). ' InternalId: '.$project->getInternalId(). ' Db: '.$project->getAttribute('database').' ReceivedAt: '.$receivedAt. ' Keys: '.$numberOfKeys . ' Started'); + $start = \microtime(true); foreach ($stats['keys'] ?? [] as $key => $value) { if ($value == 0) { @@ -110,6 +111,9 @@ class UsageDump extends Action attribute: 'value', documents: $projectDocuments ); + + $end = \microtime(true); + Console::log('['.DateTime::now().'] Id: '.$project->getId(). ' InternalId: '.$project->getInternalId(). ' Db: '.$project->getAttribute('database').' ReceivedAt: '.$receivedAt. ' Keys: '.$numberOfKeys. ' Time: '.($end - $start).'s'); } } catch (\Exception $e) { Console::error('[' . DateTime::now() . '] Error processing stats: ' . $e->getMessage()); From 08f2a59766651ec744e1b5937a6777e1b42acd4e Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 23 Jan 2025 18:54:02 +0530 Subject: [PATCH 081/101] add: database read, write metrics. --- app/controllers/api/databases.php | 16 +++++++++++-- app/controllers/api/project.php | 14 +++++++---- .../Utopia/Response/Model/UsageDatabase.php | 24 +++++++++++++++++++ .../Utopia/Response/Model/UsageDatabases.php | 24 +++++++++++++++++++ .../Utopia/Response/Model/UsageProject.php | 24 +++++++++++++++++++ 5 files changed, 96 insertions(+), 6 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 6798d71502..44eab5a08a 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -3904,7 +3904,9 @@ App::get('/v1/databases/usage') METRIC_DATABASES, METRIC_COLLECTIONS, METRIC_DOCUMENTS, - METRIC_DATABASES_STORAGE + METRIC_DATABASES_STORAGE, + METRIC_DATABASES_OPERATIONS_READS, + METRIC_DATABASES_OPERATIONS_WRITES, ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { @@ -3956,10 +3958,14 @@ App::get('/v1/databases/usage') 'collectionsTotal' => $usage[$metrics[1]]['total'], 'documentsTotal' => $usage[$metrics[2]]['total'], 'storageTotal' => $usage[$metrics[3]]['total'], + 'databasesReadsTotal' => $usage[$metrics[4]]['total'], + 'databasesWritesTotal' => $usage[$metrics[5]]['total'], 'databases' => $usage[$metrics[0]]['data'], 'collections' => $usage[$metrics[1]]['data'], 'documents' => $usage[$metrics[2]]['data'], 'storage' => $usage[$metrics[3]]['data'], + 'databasesReads' => $usage[$metrics[4]]['data'], + 'databasesWrites' => $usage[$metrics[5]]['data'], ]), Response::MODEL_USAGE_DATABASES); }); @@ -3992,7 +3998,9 @@ App::get('/v1/databases/:databaseId/usage') $metrics = [ str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_COLLECTIONS), str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_DOCUMENTS), - str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_STORAGE) + str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_STORAGE), + str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASES_OPERATIONS_READS), + str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASES_OPERATIONS_WRITES) ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { @@ -4044,9 +4052,13 @@ App::get('/v1/databases/:databaseId/usage') 'collectionsTotal' => $usage[$metrics[0]]['total'], 'documentsTotal' => $usage[$metrics[1]]['total'], 'storageTotal' => $usage[$metrics[2]]['total'], + 'databaseReadsTotal' => $usage[$metrics[3]]['total'], + 'databaseWritesTotal' => $usage[$metrics[4]]['total'], 'collections' => $usage[$metrics[0]]['data'], 'documents' => $usage[$metrics[1]]['data'], 'storage' => $usage[$metrics[2]]['data'], + 'databaseReads' => $usage[$metrics[3]]['data'], + 'databaseWrites' => $usage[$metrics[4]]['data'], ]), Response::MODEL_USAGE_DATABASE); }); diff --git a/app/controllers/api/project.php b/app/controllers/api/project.php index 5a1bf063f2..44c5d797ba 100644 --- a/app/controllers/api/project.php +++ b/app/controllers/api/project.php @@ -50,7 +50,9 @@ App::get('/v1/project/usage') METRIC_FILES_STORAGE, METRIC_DATABASES_STORAGE, METRIC_DEPLOYMENTS_STORAGE, - METRIC_BUILDS_STORAGE + METRIC_BUILDS_STORAGE, + METRIC_DATABASES_OPERATIONS_READS, + METRIC_DATABASES_OPERATIONS_WRITES, ], 'period' => [ METRIC_NETWORK_REQUESTS, @@ -60,7 +62,9 @@ App::get('/v1/project/usage') METRIC_EXECUTIONS, METRIC_DATABASES_STORAGE, METRIC_EXECUTIONS_MB_SECONDS, - METRIC_BUILDS_MB_SECONDS + METRIC_BUILDS_MB_SECONDS, + METRIC_DATABASES_OPERATIONS_READS, + METRIC_DATABASES_OPERATIONS_WRITES, ] ]; @@ -336,10 +340,12 @@ App::get('/v1/project/usage') 'functionsStorageTotal' => $total[METRIC_DEPLOYMENTS_STORAGE] + $total[METRIC_BUILDS_STORAGE], 'buildsStorageTotal' => $total[METRIC_BUILDS_STORAGE], 'deploymentsStorageTotal' => $total[METRIC_DEPLOYMENTS_STORAGE], + 'databasesReadsTotal' => $total[METRIC_DATABASES_OPERATIONS_READS], + 'databasesWritesTotal' => $total[METRIC_DATABASES_OPERATIONS_WRITES], 'executionsBreakdown' => $executionsBreakdown, - 'executionsMbSecondsBreakdown' => $executionsMbSecondsBreakdown, - 'buildsMbSecondsBreakdown' => $buildsMbSecondsBreakdown, 'bucketsBreakdown' => $bucketsBreakdown, + 'databasesReads' => $usage[METRIC_DATABASES_OPERATIONS_READS], + 'databasesWrites' => $usage[METRIC_DATABASES_OPERATIONS_WRITES], 'databasesStorageBreakdown' => $databasesStorageBreakdown, 'executionsMbSecondsBreakdown' => $executionsMbSecondsBreakdown, 'buildsMbSecondsBreakdown' => $buildsMbSecondsBreakdown, diff --git a/src/Appwrite/Utopia/Response/Model/UsageDatabase.php b/src/Appwrite/Utopia/Response/Model/UsageDatabase.php index eb985baabb..d6afa02f65 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageDatabase.php +++ b/src/Appwrite/Utopia/Response/Model/UsageDatabase.php @@ -34,6 +34,18 @@ class UsageDatabase extends Model 'default' => 0, 'example' => 0, ]) + ->addRule('databaseReadsTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total number of databases reads.', + 'default' => 0, + 'example' => 0, + ]) + ->addRule('databaseWritesTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total number of databases writes.', + 'default' => 0, + 'example' => 0, + ]) ->addRule('collections', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated number of collections per period.', @@ -55,6 +67,18 @@ class UsageDatabase extends Model 'example' => [], 'array' => true ]) + ->addRule('databaseReads', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'An array of aggregated number of database reads.', + 'default' => 0, + 'example' => 0, + ]) + ->addRule('databaseWrites', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'An array of aggregated number of database writes.', + 'default' => 0, + 'example' => 0, + ]) ; } diff --git a/src/Appwrite/Utopia/Response/Model/UsageDatabases.php b/src/Appwrite/Utopia/Response/Model/UsageDatabases.php index e0abba8ab8..a9c8e5fada 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageDatabases.php +++ b/src/Appwrite/Utopia/Response/Model/UsageDatabases.php @@ -40,6 +40,18 @@ class UsageDatabases extends Model 'default' => 0, 'example' => 0, ]) + ->addRule('databasesReadsTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total number of databases reads.', + 'default' => 0, + 'example' => 0, + ]) + ->addRule('databasesWritesTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total number of databases writes.', + 'default' => 0, + 'example' => 0, + ]) ->addRule('databases', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated number of databases per period.', @@ -68,6 +80,18 @@ class UsageDatabases extends Model 'example' => [], 'array' => true ]) + ->addRule('databasesReads', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'An array of aggregated number of database reads.', + 'default' => 0, + 'example' => 0, + ]) + ->addRule('databasesWrites', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'An array of aggregated number of database writes.', + 'default' => 0, + 'example' => 0, + ]) ; } diff --git a/src/Appwrite/Utopia/Response/Model/UsageProject.php b/src/Appwrite/Utopia/Response/Model/UsageProject.php index 39c245a542..ff4106eaed 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageProject.php +++ b/src/Appwrite/Utopia/Response/Model/UsageProject.php @@ -82,6 +82,18 @@ class UsageProject extends Model 'default' => 0, 'example' => 0, ]) + ->addRule('databasesReadsTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total number of databases reads.', + 'default' => 0, + 'example' => 0, + ]) + ->addRule('databasesWritesTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total number of databases writes.', + 'default' => 0, + 'example' => 0, + ]) ->addRule('requests', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated number of requests per period.', @@ -171,6 +183,18 @@ class UsageProject extends Model 'example' => [], 'array' => true ]) + ->addRule('databasesReads', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'An array of aggregated number of database reads.', + 'default' => 0, + 'example' => 0, + ]) + ->addRule('databasesWrites', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'An array of aggregated number of database writes.', + 'default' => 0, + 'example' => 0, + ]) ; } From 00a24133661ec15105a2d819dfe635ecc831d0b2 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 23 Jan 2025 19:17:20 +0530 Subject: [PATCH 082/101] fix: tests due to additional response vars. --- tests/e2e/General/UsageTest.php | 2 +- tests/e2e/Services/Databases/DatabasesConsoleClientTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index ffc63708c8..d408ee7645 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -143,7 +143,7 @@ class UsageTest extends Scope ); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(25, count($response['body'])); + $this->assertEquals(29, count($response['body'])); $this->validateDates($response['body']['network']); $this->validateDates($response['body']['requests']); $this->validateDates($response['body']['users']); diff --git a/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php b/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php index 96bb0b5609..2266c91afe 100644 --- a/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php +++ b/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php @@ -224,7 +224,7 @@ class DatabasesConsoleClientTest extends Scope ]); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(7, count($response['body'])); + $this->assertEquals(11, count($response['body'])); $this->assertEquals('24h', $response['body']['range']); $this->assertIsNumeric($response['body']['documentsTotal']); $this->assertIsNumeric($response['body']['collectionsTotal']); From 3cfd59235168f3e92a1d6edee7288565be9dc8d0 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 23 Jan 2025 19:35:36 +0530 Subject: [PATCH 083/101] fix: tests further. --- tests/e2e/General/UsageTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index d408ee7645..17e432103d 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -324,7 +324,7 @@ class UsageTest extends Scope ] ); - $this->assertEquals(25, count($response['body'])); + $this->assertEquals(29, count($response['body'])); $this->assertEquals(1, count($response['body']['requests'])); $this->assertEquals($requestsTotal, $response['body']['requests'][array_key_last($response['body']['requests'])]['value']); $this->validateDates($response['body']['requests']); @@ -545,7 +545,7 @@ class UsageTest extends Scope ] ); - $this->assertEquals(25, count($response['body'])); + $this->assertEquals(29, count($response['body'])); $this->assertEquals(1, count($response['body']['requests'])); $this->assertEquals(1, count($response['body']['network'])); $this->assertEquals($requestsTotal, $response['body']['requests'][array_key_last($response['body']['requests'])]['value']); From 297098b252e1b9db3f7d58fae8bc94434cf53f3d Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 24 Jan 2025 03:23:25 +1300 Subject: [PATCH 084/101] Revert test timing changes --- .env | 2 +- tests/e2e/General/UsageTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env b/.env index c26d1ce7e0..8f7d7996e7 100644 --- a/.env +++ b/.env @@ -85,7 +85,7 @@ _APP_MAINTENANCE_RETENTION_CACHE=2592000 _APP_MAINTENANCE_RETENTION_EXECUTION=1209600 _APP_MAINTENANCE_RETENTION_ABUSE=86400 _APP_MAINTENANCE_RETENTION_AUDIT=1209600 -_APP_USAGE_AGGREGATION_INTERVAL=5 +_APP_USAGE_AGGREGATION_INTERVAL=30 _APP_MAINTENANCE_RETENTION_USAGE_HOURLY=8640000 _APP_MAINTENANCE_RETENTION_SCHEDULES=86400 _APP_USAGE_STATS=enabled diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index ffc63708c8..af8bb19102 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -23,7 +23,7 @@ class UsageTest extends Scope use SideServer; use FunctionsBase; - private const WAIT = 7; + private const WAIT = 35; private const CREATE = 20; protected string $projectId; From 0e5b59e9f0f873d0fb3168db245a5965f2c2cbb2 Mon Sep 17 00:00:00 2001 From: shimon Date: Fri, 24 Jan 2025 09:03:39 +0200 Subject: [PATCH 085/101] payload debug --- app/controllers/api/vcs.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/api/vcs.php b/app/controllers/api/vcs.php index 2c145febcc..7f571f066e 100644 --- a/app/controllers/api/vcs.php +++ b/app/controllers/api/vcs.php @@ -926,6 +926,7 @@ App::post('/v1/vcs/github/events') ->action( function (GitHub $github, Request $request, Response $response, Database $dbForPlatform, callable $getProjectDB, Build $queueForBuilds) use ($createGitDeployments) { $payload = $request->getRawPayload(); + var_dump(['payload' => $payload]); $signatureRemote = $request->getHeader('x-hub-signature-256', ''); $signatureLocal = System::getEnv('_APP_VCS_GITHUB_WEBHOOK_SECRET', ''); From 303f7d484589672e8b55d679d7675b8905456f58 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Fri, 24 Jan 2025 21:34:00 +0530 Subject: [PATCH 086/101] feat: add fast2SMS adapter --- .env | 4 +--- composer.json | 2 +- composer.lock | 14 +++++++------- src/Appwrite/Platform/Workers/Messaging.php | 18 ++++++++++++++++-- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/.env b/.env index 8f7d7996e7..f237a4bc22 100644 --- a/.env +++ b/.env @@ -63,9 +63,7 @@ _APP_SMTP_PORT=1025 _APP_SMTP_SECURE= _APP_SMTP_USERNAME= _APP_SMTP_PASSWORD= -_APP_SMS_PROVIDER=sms://username:password@mock -_APP_SMS_FROM=+123456789 -_APP_SMS_PROJECTS_DENY_LIST= + _APP_STORAGE_LIMIT=30000000 _APP_STORAGE_PREVIEW_LIMIT=20000000 _APP_FUNCTIONS_SIZE_LIMIT=30000000 diff --git a/composer.json b/composer.json index e024cff1c6..e7cc2e5fab 100644 --- a/composer.json +++ b/composer.json @@ -59,7 +59,7 @@ "utopia-php/image": "0.7.*", "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", - "utopia-php/messaging": "0.13.*", + "utopia-php/messaging": "0.14.*", "utopia-php/migration": "0.6.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.1", diff --git a/composer.lock b/composer.lock index 02c3b65284..f8a8fbefc3 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": "8927ec7d3cfa460ce223e4c13cf61ada", + "content-hash": "b688586471d8fc6cc39ba144044795f9", "packages": [ { "name": "adhocore/jwt", @@ -3878,16 +3878,16 @@ }, { "name": "utopia-php/messaging", - "version": "0.13.0", + "version": "0.14.0", "source": { "type": "git", "url": "https://github.com/utopia-php/messaging.git", - "reference": "0e3e57351fe4fe875ef3ab9a01a7fff5f022de90" + "reference": "ca87e106c94eecc81f344cddc8582cc1ff2dc85d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/messaging/zipball/0e3e57351fe4fe875ef3ab9a01a7fff5f022de90", - "reference": "0e3e57351fe4fe875ef3ab9a01a7fff5f022de90", + "url": "https://api.github.com/repos/utopia-php/messaging/zipball/ca87e106c94eecc81f344cddc8582cc1ff2dc85d", + "reference": "ca87e106c94eecc81f344cddc8582cc1ff2dc85d", "shasum": "" }, "require": { @@ -3923,9 +3923,9 @@ ], "support": { "issues": "https://github.com/utopia-php/messaging/issues", - "source": "https://github.com/utopia-php/messaging/tree/0.13.0" + "source": "https://github.com/utopia-php/messaging/tree/0.14.0" }, - "time": "2024-12-05T08:36:07+00:00" + "time": "2025-01-23T17:57:02+00:00" }, { "name": "utopia-php/migration", diff --git a/src/Appwrite/Platform/Workers/Messaging.php b/src/Appwrite/Platform/Workers/Messaging.php index 7837957c5d..d4dc36e9e2 100644 --- a/src/Appwrite/Platform/Workers/Messaging.php +++ b/src/Appwrite/Platform/Workers/Messaging.php @@ -22,6 +22,8 @@ use Utopia\Messaging\Adapter\Push\APNS; use Utopia\Messaging\Adapter\Push as PushAdapter; use Utopia\Messaging\Adapter\Push\FCM; use Utopia\Messaging\Adapter\SMS as SMSAdapter; +use Utopia\Messaging\Adapter\SMS\Fast2SMS; +use Utopia\Messaging\Adapter\SMS\GEOSMS; use Utopia\Messaging\Adapter\SMS\Mock; use Utopia\Messaging\Adapter\SMS\Msg91; use Utopia\Messaging\Adapter\SMS\Telesign; @@ -439,6 +441,12 @@ class Messaging extends Action 'apiKey' => $user, 'apiSecret' => $password ], + 'fast2sms' => [ + 'senderId' => $user, + 'apiKey' => $password, + 'messageId' => $smsDSN->getParam('messageId'), + 'useDLT' => $smsDSN->getParam('useDLT'), + ], default => null }, 'options' => match ($host) { @@ -465,7 +473,7 @@ class Messaging extends Action $data = $this->buildSmsMessage($message, $provider); try { - $adapter->send($data); + $result = $adapter->send($data); } catch (\Throwable $th) { throw new \Exception('Failed sending to targets with error: ' . $th->getMessage()); } @@ -474,7 +482,6 @@ class Messaging extends Action } - private function getSmsAdapter(Document $provider): ?SMSAdapter { $credentials = $provider->getAttribute('credentials'); @@ -504,6 +511,13 @@ class Messaging extends Action $credentials['apiKey'] ?? '', $credentials['apiSecret'] ?? '' ), + 'fast2sms' => new Fast2SMS( + $credentials['apiKey'] ?? '', + $credentials['senderId'] ?? '', + $credentials['messageId'] ?? '', + [], + $credentials['useDLT'] ?? true + ), default => null }; } From e9136444d79d5f5914a35a9209631a1ff1c9cc74 Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 27 Jan 2025 17:33:49 +0530 Subject: [PATCH 087/101] update: latest sdk specs. --- app/config/specs/open-api3-latest-client.json | 1 + .../specs/open-api3-latest-console.json | 103 ++++++++++++++++- app/config/specs/open-api3-latest-server.json | 1 + app/config/specs/swagger2-latest-client.json | 1 + app/config/specs/swagger2-latest-console.json | 109 +++++++++++++++++- app/config/specs/swagger2-latest-server.json | 1 + 6 files changed, 210 insertions(+), 6 deletions(-) diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 232861f0ff..820b1f55e0 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -6361,6 +6361,7 @@ "gif", "png", "webp", + "heic", "avif" ], "x-enum-name": "ImageFormat", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 42ed7b9d28..a709c12b9c 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -25157,6 +25157,7 @@ "gif", "png", "webp", + "heic", "avif" ], "x-enum-name": "ImageFormat", @@ -35706,6 +35707,18 @@ "x-example": 0, "format": "int32" }, + "databasesReadsTotal": { + "type": "integer", + "description": "Total number of databases reads.", + "x-example": 0, + "format": "int32" + }, + "databasesWritesTotal": { + "type": "integer", + "description": "Total number of databases writes.", + "x-example": 0, + "format": "int32" + }, "databases": { "type": "array", "description": "Aggregated number of databases per period.", @@ -35737,6 +35750,22 @@ "$ref": "#\/components\/schemas\/metric" }, "x-example": [] + }, + "databasesReads": { + "type": "object", + "description": "An array of aggregated number of database reads.", + "x-example": 0, + "items": { + "$ref": "#\/components\/schemas\/metric" + } + }, + "databasesWrites": { + "type": "object", + "description": "An array of aggregated number of database writes.", + "x-example": 0, + "items": { + "$ref": "#\/components\/schemas\/metric" + } } }, "required": [ @@ -35745,10 +35774,14 @@ "collectionsTotal", "documentsTotal", "storageTotal", + "databasesReadsTotal", + "databasesWritesTotal", "databases", "collections", "documents", - "storage" + "storage", + "databasesReads", + "databasesWrites" ] }, "usageDatabase": { @@ -35778,6 +35811,18 @@ "x-example": 0, "format": "int32" }, + "databaseReadsTotal": { + "type": "integer", + "description": "Total number of databases reads.", + "x-example": 0, + "format": "int32" + }, + "databaseWritesTotal": { + "type": "integer", + "description": "Total number of databases writes.", + "x-example": 0, + "format": "int32" + }, "collections": { "type": "array", "description": "Aggregated number of collections per period.", @@ -35801,6 +35846,22 @@ "$ref": "#\/components\/schemas\/metric" }, "x-example": [] + }, + "databaseReads": { + "type": "object", + "description": "An array of aggregated number of database reads.", + "x-example": 0, + "items": { + "$ref": "#\/components\/schemas\/metric" + } + }, + "databaseWrites": { + "type": "object", + "description": "An array of aggregated number of database writes.", + "x-example": 0, + "items": { + "$ref": "#\/components\/schemas\/metric" + } } }, "required": [ @@ -35808,9 +35869,13 @@ "collectionsTotal", "documentsTotal", "storageTotal", + "databaseReadsTotal", + "databaseWritesTotal", "collections", "documents", - "storage" + "storage", + "databaseReads", + "databaseWrites" ] }, "usageCollection": { @@ -36405,6 +36470,18 @@ "x-example": 0, "format": "int32" }, + "databasesReadsTotal": { + "type": "integer", + "description": "Total number of databases reads.", + "x-example": 0, + "format": "int32" + }, + "databasesWritesTotal": { + "type": "integer", + "description": "Total number of databases writes.", + "x-example": 0, + "format": "int32" + }, "requests": { "type": "array", "description": "Aggregated number of requests per period.", @@ -36504,6 +36581,22 @@ "$ref": "#\/components\/schemas\/metricBreakdown" }, "x-example": [] + }, + "databasesReads": { + "type": "object", + "description": "An array of aggregated number of database reads.", + "x-example": 0, + "items": { + "$ref": "#\/components\/schemas\/metric" + } + }, + "databasesWrites": { + "type": "object", + "description": "An array of aggregated number of database writes.", + "x-example": 0, + "items": { + "$ref": "#\/components\/schemas\/metric" + } } }, "required": [ @@ -36519,6 +36612,8 @@ "bucketsTotal", "executionsMbSecondsTotal", "buildsMbSecondsTotal", + "databasesReadsTotal", + "databasesWritesTotal", "requests", "network", "users", @@ -36531,7 +36626,9 @@ "functionsStorageBreakdown", "authPhoneTotal", "authPhoneEstimate", - "authPhoneCountryBreakdown" + "authPhoneCountryBreakdown", + "databasesReads", + "databasesWrites" ] }, "headers": { diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index aee66626cf..aec14113b6 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -17577,6 +17577,7 @@ "gif", "png", "webp", + "heic", "avif" ], "x-enum-name": "ImageFormat", diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 5369cd4c92..c0980c44ce 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -6560,6 +6560,7 @@ "gif", "png", "webp", + "heic", "avif" ], "x-enum-name": "ImageFormat", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index f9a423d954..3a59d6e9da 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -25633,6 +25633,7 @@ "gif", "png", "webp", + "heic", "avif" ], "x-enum-name": "ImageFormat", @@ -36243,6 +36244,18 @@ "x-example": 0, "format": "int32" }, + "databasesReadsTotal": { + "type": "integer", + "description": "Total number of databases reads.", + "x-example": 0, + "format": "int32" + }, + "databasesWritesTotal": { + "type": "integer", + "description": "Total number of databases writes.", + "x-example": 0, + "format": "int32" + }, "databases": { "type": "array", "description": "Aggregated number of databases per period.", @@ -36278,6 +36291,24 @@ "$ref": "#\/definitions\/metric" }, "x-example": [] + }, + "databasesReads": { + "type": "object", + "description": "An array of aggregated number of database reads.", + "x-example": 0, + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + } + }, + "databasesWrites": { + "type": "object", + "description": "An array of aggregated number of database writes.", + "x-example": 0, + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + } } }, "required": [ @@ -36286,10 +36317,14 @@ "collectionsTotal", "documentsTotal", "storageTotal", + "databasesReadsTotal", + "databasesWritesTotal", "databases", "collections", "documents", - "storage" + "storage", + "databasesReads", + "databasesWrites" ] }, "usageDatabase": { @@ -36319,6 +36354,18 @@ "x-example": 0, "format": "int32" }, + "databaseReadsTotal": { + "type": "integer", + "description": "Total number of databases reads.", + "x-example": 0, + "format": "int32" + }, + "databaseWritesTotal": { + "type": "integer", + "description": "Total number of databases writes.", + "x-example": 0, + "format": "int32" + }, "collections": { "type": "array", "description": "Aggregated number of collections per period.", @@ -36345,6 +36392,24 @@ "$ref": "#\/definitions\/metric" }, "x-example": [] + }, + "databaseReads": { + "type": "object", + "description": "An array of aggregated number of database reads.", + "x-example": 0, + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + } + }, + "databaseWrites": { + "type": "object", + "description": "An array of aggregated number of database writes.", + "x-example": 0, + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + } } }, "required": [ @@ -36352,9 +36417,13 @@ "collectionsTotal", "documentsTotal", "storageTotal", + "databaseReadsTotal", + "databaseWritesTotal", "collections", "documents", - "storage" + "storage", + "databaseReads", + "databaseWrites" ] }, "usageCollection": { @@ -36976,6 +37045,18 @@ "x-example": 0, "format": "int32" }, + "databasesReadsTotal": { + "type": "integer", + "description": "Total number of databases reads.", + "x-example": 0, + "format": "int32" + }, + "databasesWritesTotal": { + "type": "integer", + "description": "Total number of databases writes.", + "x-example": 0, + "format": "int32" + }, "requests": { "type": "array", "description": "Aggregated number of requests per period.", @@ -37086,6 +37167,24 @@ "$ref": "#\/definitions\/metricBreakdown" }, "x-example": [] + }, + "databasesReads": { + "type": "object", + "description": "An array of aggregated number of database reads.", + "x-example": 0, + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + } + }, + "databasesWrites": { + "type": "object", + "description": "An array of aggregated number of database writes.", + "x-example": 0, + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + } } }, "required": [ @@ -37101,6 +37200,8 @@ "bucketsTotal", "executionsMbSecondsTotal", "buildsMbSecondsTotal", + "databasesReadsTotal", + "databasesWritesTotal", "requests", "network", "users", @@ -37113,7 +37214,9 @@ "functionsStorageBreakdown", "authPhoneTotal", "authPhoneEstimate", - "authPhoneCountryBreakdown" + "authPhoneCountryBreakdown", + "databasesReads", + "databasesWrites" ] }, "headers": { diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index a3c6a0d70c..98ebfa6116 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -18034,6 +18034,7 @@ "gif", "png", "webp", + "heic", "avif" ], "x-enum-name": "ImageFormat", From 5ac95bc103b9eea7e56c5d1aaab3a4784a492e4a Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 27 Jan 2025 18:03:31 +0530 Subject: [PATCH 088/101] fix: wrong types on sdk models. --- src/Appwrite/Utopia/Response/Model/UsageDatabase.php | 10 ++++++---- src/Appwrite/Utopia/Response/Model/UsageDatabases.php | 10 ++++++---- src/Appwrite/Utopia/Response/Model/UsageProject.php | 10 ++++++---- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Model/UsageDatabase.php b/src/Appwrite/Utopia/Response/Model/UsageDatabase.php index d6afa02f65..a0fe421f5f 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageDatabase.php +++ b/src/Appwrite/Utopia/Response/Model/UsageDatabase.php @@ -70,14 +70,16 @@ class UsageDatabase extends Model ->addRule('databaseReads', [ 'type' => Response::MODEL_METRIC, 'description' => 'An array of aggregated number of database reads.', - 'default' => 0, - 'example' => 0, + 'default' => [], + 'example' => [], + 'array' => true ]) ->addRule('databaseWrites', [ 'type' => Response::MODEL_METRIC, 'description' => 'An array of aggregated number of database writes.', - 'default' => 0, - 'example' => 0, + 'default' => [], + 'example' => [], + 'array' => true ]) ; } diff --git a/src/Appwrite/Utopia/Response/Model/UsageDatabases.php b/src/Appwrite/Utopia/Response/Model/UsageDatabases.php index a9c8e5fada..4e053e5223 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageDatabases.php +++ b/src/Appwrite/Utopia/Response/Model/UsageDatabases.php @@ -83,14 +83,16 @@ class UsageDatabases extends Model ->addRule('databasesReads', [ 'type' => Response::MODEL_METRIC, 'description' => 'An array of aggregated number of database reads.', - 'default' => 0, - 'example' => 0, + 'default' => [], + 'example' => [], + 'array' => true ]) ->addRule('databasesWrites', [ 'type' => Response::MODEL_METRIC, 'description' => 'An array of aggregated number of database writes.', - 'default' => 0, - 'example' => 0, + 'default' => [], + 'example' => [], + 'array' => true ]) ; } diff --git a/src/Appwrite/Utopia/Response/Model/UsageProject.php b/src/Appwrite/Utopia/Response/Model/UsageProject.php index ff4106eaed..1006276b56 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageProject.php +++ b/src/Appwrite/Utopia/Response/Model/UsageProject.php @@ -186,14 +186,16 @@ class UsageProject extends Model ->addRule('databasesReads', [ 'type' => Response::MODEL_METRIC, 'description' => 'An array of aggregated number of database reads.', - 'default' => 0, - 'example' => 0, + 'default' => [], + 'example' => [], + 'array' => true ]) ->addRule('databasesWrites', [ 'type' => Response::MODEL_METRIC, 'description' => 'An array of aggregated number of database writes.', - 'default' => 0, - 'example' => 0, + 'default' => [], + 'example' => [], + 'array' => true ]) ; } From c0dc43fb2941ebdc0c6e89b68dd60bc36418fd21 Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 27 Jan 2025 18:19:07 +0530 Subject: [PATCH 089/101] update: specs. --- .../specs/open-api3-latest-console.json | 36 +++++++++---------- app/config/specs/swagger2-latest-console.json | 36 +++++++++---------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index a709c12b9c..1390319703 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -35752,20 +35752,20 @@ "x-example": [] }, "databasesReads": { - "type": "object", + "type": "array", "description": "An array of aggregated number of database reads.", - "x-example": 0, "items": { "$ref": "#\/components\/schemas\/metric" - } + }, + "x-example": [] }, "databasesWrites": { - "type": "object", + "type": "array", "description": "An array of aggregated number of database writes.", - "x-example": 0, "items": { "$ref": "#\/components\/schemas\/metric" - } + }, + "x-example": [] } }, "required": [ @@ -35848,20 +35848,20 @@ "x-example": [] }, "databaseReads": { - "type": "object", + "type": "array", "description": "An array of aggregated number of database reads.", - "x-example": 0, "items": { "$ref": "#\/components\/schemas\/metric" - } + }, + "x-example": [] }, "databaseWrites": { - "type": "object", + "type": "array", "description": "An array of aggregated number of database writes.", - "x-example": 0, "items": { "$ref": "#\/components\/schemas\/metric" - } + }, + "x-example": [] } }, "required": [ @@ -36583,20 +36583,20 @@ "x-example": [] }, "databasesReads": { - "type": "object", + "type": "array", "description": "An array of aggregated number of database reads.", - "x-example": 0, "items": { "$ref": "#\/components\/schemas\/metric" - } + }, + "x-example": [] }, "databasesWrites": { - "type": "object", + "type": "array", "description": "An array of aggregated number of database writes.", - "x-example": 0, "items": { "$ref": "#\/components\/schemas\/metric" - } + }, + "x-example": [] } }, "required": [ diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 3a59d6e9da..d57385c56e 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -36293,22 +36293,22 @@ "x-example": [] }, "databasesReads": { - "type": "object", + "type": "array", "description": "An array of aggregated number of database reads.", - "x-example": 0, "items": { "type": "object", "$ref": "#\/definitions\/metric" - } + }, + "x-example": [] }, "databasesWrites": { - "type": "object", + "type": "array", "description": "An array of aggregated number of database writes.", - "x-example": 0, "items": { "type": "object", "$ref": "#\/definitions\/metric" - } + }, + "x-example": [] } }, "required": [ @@ -36394,22 +36394,22 @@ "x-example": [] }, "databaseReads": { - "type": "object", + "type": "array", "description": "An array of aggregated number of database reads.", - "x-example": 0, "items": { "type": "object", "$ref": "#\/definitions\/metric" - } + }, + "x-example": [] }, "databaseWrites": { - "type": "object", + "type": "array", "description": "An array of aggregated number of database writes.", - "x-example": 0, "items": { "type": "object", "$ref": "#\/definitions\/metric" - } + }, + "x-example": [] } }, "required": [ @@ -37169,22 +37169,22 @@ "x-example": [] }, "databasesReads": { - "type": "object", + "type": "array", "description": "An array of aggregated number of database reads.", - "x-example": 0, "items": { "type": "object", "$ref": "#\/definitions\/metric" - } + }, + "x-example": [] }, "databasesWrites": { - "type": "object", + "type": "array", "description": "An array of aggregated number of database writes.", - "x-example": 0, "items": { "type": "object", "$ref": "#\/definitions\/metric" - } + }, + "x-example": [] } }, "required": [ From bbe52db4ff2b7dad7672fea9203149423f92b43f Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 28 Jan 2025 11:29:15 +0530 Subject: [PATCH 090/101] feat: add geosms adapter --- .env | 4 +- composer.json | 2 +- composer.lock | 107 +++------- src/Appwrite/Platform/Workers/Messaging.php | 223 ++++++++++++-------- 4 files changed, 171 insertions(+), 165 deletions(-) diff --git a/.env b/.env index f237a4bc22..8f7d7996e7 100644 --- a/.env +++ b/.env @@ -63,7 +63,9 @@ _APP_SMTP_PORT=1025 _APP_SMTP_SECURE= _APP_SMTP_USERNAME= _APP_SMTP_PASSWORD= - +_APP_SMS_PROVIDER=sms://username:password@mock +_APP_SMS_FROM=+123456789 +_APP_SMS_PROJECTS_DENY_LIST= _APP_STORAGE_LIMIT=30000000 _APP_STORAGE_PREVIEW_LIMIT=20000000 _APP_FUNCTIONS_SIZE_LIMIT=30000000 diff --git a/composer.json b/composer.json index e7cc2e5fab..18318654d5 100644 --- a/composer.json +++ b/composer.json @@ -59,7 +59,7 @@ "utopia-php/image": "0.7.*", "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", - "utopia-php/messaging": "0.14.*", + "utopia-php/messaging": "dev-update-fast2sms-adapter", "utopia-php/migration": "0.6.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.1", diff --git a/composer.lock b/composer.lock index f8a8fbefc3..d991cab3bd 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": "b688586471d8fc6cc39ba144044795f9", + "content-hash": "232f9dd47974029f8dcd24ad4cbe6ae9", "packages": [ { "name": "adhocore/jwt", @@ -1237,16 +1237,16 @@ }, { "name": "open-telemetry/api", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/api.git", - "reference": "351a30baa79699de3de3a814c8ccc7b52ccdfb1d" + "reference": "74b1a03263be8c5acb578f41da054b4bac3af4a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/351a30baa79699de3de3a814c8ccc7b52ccdfb1d", - "reference": "351a30baa79699de3de3a814c8ccc7b52ccdfb1d", + "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/74b1a03263be8c5acb578f41da054b4bac3af4a0", + "reference": "74b1a03263be8c5acb578f41da054b4bac3af4a0", "shasum": "" }, "require": { @@ -1303,7 +1303,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-01-08T23:50:34+00:00" + "time": "2025-01-20T23:35:16+00:00" }, { "name": "open-telemetry/context", @@ -1493,16 +1493,16 @@ }, { "name": "open-telemetry/sdk", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/sdk.git", - "reference": "9a1c3b866239dbff291e5cc555bb7793eab08127" + "reference": "96aeaee5b7cb8c0bc4af7ff4717b429f2d9f67e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/9a1c3b866239dbff291e5cc555bb7793eab08127", - "reference": "9a1c3b866239dbff291e5cc555bb7793eab08127", + "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/96aeaee5b7cb8c0bc4af7ff4717b429f2d9f67e1", + "reference": "96aeaee5b7cb8c0bc4af7ff4717b429f2d9f67e1", "shasum": "" }, "require": { @@ -1579,7 +1579,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-01-08T23:50:34+00:00" + "time": "2025-01-09T23:17:14+00:00" }, { "name": "open-telemetry/sem-conv", @@ -3878,16 +3878,16 @@ }, { "name": "utopia-php/messaging", - "version": "0.14.0", + "version": "dev-update-fast2sms-adapter", "source": { "type": "git", "url": "https://github.com/utopia-php/messaging.git", - "reference": "ca87e106c94eecc81f344cddc8582cc1ff2dc85d" + "reference": "01a20625dbe1d552e09084f81c8e3b9ccc25bae5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/messaging/zipball/ca87e106c94eecc81f344cddc8582cc1ff2dc85d", - "reference": "ca87e106c94eecc81f344cddc8582cc1ff2dc85d", + "url": "https://api.github.com/repos/utopia-php/messaging/zipball/01a20625dbe1d552e09084f81c8e3b9ccc25bae5", + "reference": "01a20625dbe1d552e09084f81c8e3b9ccc25bae5", "shasum": "" }, "require": { @@ -3923,9 +3923,9 @@ ], "support": { "issues": "https://github.com/utopia-php/messaging/issues", - "source": "https://github.com/utopia-php/messaging/tree/0.14.0" + "source": "https://github.com/utopia-php/messaging/tree/update-fast2sms-adapter" }, - "time": "2025-01-23T17:57:02+00:00" + "time": "2025-01-28T04:58:00+00:00" }, { "name": "utopia-php/migration", @@ -5601,70 +5601,18 @@ }, "time": "2023-10-30T13:38:26+00:00" }, - { - "name": "phpbench/dom", - "version": "0.3.3", - "source": { - "type": "git", - "url": "https://github.com/phpbench/dom.git", - "reference": "786a96db538d0def931f5b19225233ec42ec7a72" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpbench/dom/zipball/786a96db538d0def931f5b19225233ec42ec7a72", - "reference": "786a96db538d0def931f5b19225233ec42ec7a72", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "php": "^7.3||^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.14", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^8.0||^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "PhpBench\\Dom\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Leech", - "email": "daniel@dantleech.com" - } - ], - "description": "DOM wrapper to simplify working with the PHP DOM implementation", - "support": { - "issues": "https://github.com/phpbench/dom/issues", - "source": "https://github.com/phpbench/dom/tree/0.3.3" - }, - "abandoned": true, - "time": "2023-03-06T23:46:57+00:00" - }, { "name": "phpbench/phpbench", - "version": "1.3.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/phpbench/phpbench.git", - "reference": "a3e1ef08d9d7736d43a7fbd444893d6a073c0ca0" + "reference": "4248817222514421cba466bfa7adc7d8932345d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpbench/phpbench/zipball/a3e1ef08d9d7736d43a7fbd444893d6a073c0ca0", - "reference": "a3e1ef08d9d7736d43a7fbd444893d6a073c0ca0", + "url": "https://api.github.com/repos/phpbench/phpbench/zipball/4248817222514421cba466bfa7adc7d8932345d4", + "reference": "4248817222514421cba466bfa7adc7d8932345d4", "shasum": "" }, "require": { @@ -5677,7 +5625,6 @@ "ext-tokenizer": "*", "php": "^8.1", "phpbench/container": "^2.2", - "phpbench/dom": "~0.3.3", "psr/log": "^1.1 || ^2.0 || ^3.0", "seld/jsonlint": "^1.1", "symfony/console": "^6.1 || ^7.0", @@ -5696,8 +5643,8 @@ "phpstan/extension-installer": "^1.1", "phpstan/phpstan": "^1.0", "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^10.4", - "rector/rector": "^0.18.11 || ^1.0.0", + "phpunit/phpunit": "^10.4 || ^11.0", + "rector/rector": "^1.2", "symfony/error-handler": "^6.1 || ^7.0", "symfony/var-dumper": "^6.1 || ^7.0" }, @@ -5742,7 +5689,7 @@ ], "support": { "issues": "https://github.com/phpbench/phpbench/issues", - "source": "https://github.com/phpbench/phpbench/tree/1.3.1" + "source": "https://github.com/phpbench/phpbench/tree/1.4.0" }, "funding": [ { @@ -5750,7 +5697,7 @@ "type": "github" } ], - "time": "2024-06-30T11:04:37+00:00" + "time": "2025-01-26T19:54:45+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -8556,7 +8503,9 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": { + "utopia-php/messaging": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/src/Appwrite/Platform/Workers/Messaging.php b/src/Appwrite/Platform/Workers/Messaging.php index d4dc36e9e2..7abd6cf857 100644 --- a/src/Appwrite/Platform/Workers/Messaging.php +++ b/src/Appwrite/Platform/Workers/Messaging.php @@ -48,6 +48,10 @@ class Messaging extends Action { private ?Local $localDevice = null; + private array $dsns = []; + + private ?SMSAdapter $adapter = null; + public static function getName(): string { return 'messaging'; @@ -58,6 +62,21 @@ class Messaging extends Action */ public function __construct() { + if (empty(System::getEnv('_APP_SMS_PROVIDER')) || empty(System::getEnv('_APP_SMS_FROM'))) { + throw new \Exception('Skipped SMS processing. Missing "_APP_SMS_PROVIDER" or "_APP_SMS_FROM" environment variables.'); + } + + $providers = System::getEnv('_APP_SMS_PROVIDER', ''); + + if (!empty($providers)) { + $providers = explode(',', $providers); + foreach ($providers as $provider) { + $this->dsns[] = new DSN($provider); + } + } + + $this->adapter = $this->createInternalSMSAdapter($this->dsns); + $this ->desc('Messaging worker') ->inject('message') @@ -383,102 +402,31 @@ class Messaging extends Action private function sendInternalSMSMessage(Document $message, Document $project, array $recipients, Log $log): void { - if (empty(System::getEnv('_APP_SMS_PROVIDER')) || empty(System::getEnv('_APP_SMS_FROM'))) { - throw new \Exception('Skipped SMS processing. Missing "_APP_SMS_PROVIDER" or "_APP_SMS_FROM" environment variables.'); - } - if ($project->isEmpty()) { throw new \Exception('Project not set in payload'); } - Console::log('Project: ' . $project->getId()); - + Console::log('Processing project: ' . $project->getId()); $denyList = System::getEnv('_APP_SMS_PROJECTS_DENY_LIST', ''); $denyList = explode(',', $denyList); - if (\in_array($project->getId(), $denyList)) { Console::error('Project is in the deny list. Skipping...'); return; } - $smsDSN = new DSN(System::getEnv('_APP_SMS_PROVIDER')); - $host = $smsDSN->getHost(); - $password = $smsDSN->getPassword(); - $user = $smsDSN->getUser(); - - $log->addTag('type', $host); - - $from = System::getEnv('_APP_SMS_FROM'); - - $provider = new Document([ - '$id' => ID::unique(), - 'provider' => $host, - 'type' => MESSAGE_TYPE_SMS, - 'name' => 'Internal SMS', - 'enabled' => true, - 'credentials' => match ($host) { - 'twilio' => [ - 'accountSid' => $user, - 'authToken' => $password, - // Twilio Messaging Service SIDs always start with MG - // https://www.twilio.com/docs/messaging/services - 'messagingServiceSid' => \str_starts_with($from, 'MG') ? $from : null - ], - 'textmagic' => [ - 'username' => $user, - 'apiKey' => $password - ], - 'telesign' => [ - 'customerId' => $user, - 'apiKey' => $password - ], - 'msg91' => [ - 'senderId' => $user, - 'authKey' => $password, - 'templateId' => $smsDSN->getParam('templateId', $from), - ], - 'vonage' => [ - 'apiKey' => $user, - 'apiSecret' => $password - ], - 'fast2sms' => [ - 'senderId' => $user, - 'apiKey' => $password, - 'messageId' => $smsDSN->getParam('messageId'), - 'useDLT' => $smsDSN->getParam('useDLT'), - ], - default => null - }, - 'options' => match ($host) { - 'twilio' => [ - 'from' => \str_starts_with($from, 'MG') ? null : $from - ], - default => [ - 'from' => $from - ] - } - ]); - - $adapter = $this->getSmsAdapter($provider); - - $batches = \array_chunk( - $recipients, - $adapter->getMaxMessagesPerRequest() + $from = System::getEnv('_APP_SMS_FROM', ''); + $sms = new SMS( + $recipients, + $message->getAttribute('data')['content'], + $from ); - batch(\array_map(function ($batch) use ($message, $provider, $adapter) { - return function () use ($batch, $message, $provider, $adapter) { - $message->setAttribute('to', $batch); - - $data = $this->buildSmsMessage($message, $provider); - - try { - $result = $adapter->send($data); - } catch (\Throwable $th) { - throw new \Exception('Failed sending to targets with error: ' . $th->getMessage()); - } - }; - }, $batches)); + try { + $result = $this->adapter->send($sms); + var_dump($result); + } catch (\Throwable $th) { + throw new \Exception('Failed sending to targets with error: ' . $th->getMessage()); + } } @@ -515,7 +463,6 @@ class Messaging extends Action $credentials['apiKey'] ?? '', $credentials['senderId'] ?? '', $credentials['messageId'] ?? '', - [], $credentials['useDLT'] ?? true ), default => null @@ -734,4 +681,112 @@ class Messaging extends Action return $this->localDevice; } + + private function createInternalSMSAdapter(array $dsns): SMSAdapter + { + if (count($dsns) === 1) { + $provider = $this->createProviderFromDSN($dsns[0]); + $adapter = $this->getSmsAdapter($provider); + return $adapter; + } + + $defaultDSN = null; + $localDSNs = []; + + /** @var DSN $dsn */ + foreach ($dsns as $dsn) { + if ($dsn->getParam('local', '') === 'default') { + $defaultDSN = $dsn; + } else { + $localDSNs[] = $dsn; + } + } + + if ($defaultDSN === null) { + throw new \Exception('No default SMS provider found'); + } + + $defaultProvider = $this->createProviderFromDSN($defaultDSN); + $adapter = $this->getSmsAdapter($defaultProvider); + $geosms = new GEOSMS($adapter); + + /** @var DSN $localDSN */ + foreach ($localDSNs as $localDSN) { + try { + $provider = $this->createProviderFromDSN($localDSN); + $adapter = $this->getSmsAdapter($provider); + } catch (\Exception) { + Console::warning('Unable to create adapter: ' . $localDSN->getHost()); + continue; + } + + $callingCode = $localDSN->getParam('local', ''); + if (empty($callingCode)) { + Console::warning('Unable to register adapter: ' . $localDSN->getHost() . '. Missing `local` parameter.'); + continue; + } + + $geosms->setLocal($callingCode, $adapter); + } + return $geosms; + } + + private function createProviderFromDSN(DSN $dsn): Document + { + $host = $dsn->getHost(); + $password = $dsn->getPassword(); + $user = $dsn->getUser(); + $from = System::getEnv('_APP_SMS_FROM'); + + $provider = new Document([ + '$id' => ID::unique(), + 'provider' => $host, + 'type' => MESSAGE_TYPE_SMS, + 'name' => 'Internal SMS', + 'enabled' => true, + 'credentials' => match ($host) { + 'twilio' => [ + 'accountSid' => $user, + 'authToken' => $password, + // Twilio Messaging Service SIDs always start with MG + // https://www.twilio.com/docs/messaging/services + 'messagingServiceSid' => \str_starts_with($from, 'MG') ? $from : null + ], + 'textmagic' => [ + 'username' => $user, + 'apiKey' => $password + ], + 'telesign' => [ + 'customerId' => $user, + 'apiKey' => $password + ], + 'msg91' => [ + 'senderId' => $user, + 'authKey' => $password, + 'templateId' => $dsn->getParam('templateId', $from), + ], + 'vonage' => [ + 'apiKey' => $user, + 'apiSecret' => $password + ], + 'fast2sms' => [ + 'senderId' => $user, + 'apiKey' => $password, + 'messageId' => $dsn->getParam('messageId'), + 'useDLT' => $dsn->getParam('useDLT'), + ], + default => null + }, + 'options' => match ($host) { + 'twilio' => [ + 'from' => \str_starts_with($from, 'MG') ? null : $from + ], + default => [ + 'from' => $from + ] + } + ]); + + return $provider; + } } From dfbe3220d85438ab5cc5d5144879abcae0860f35 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 28 Jan 2025 11:49:29 +0530 Subject: [PATCH 091/101] chore: linter --- composer.json | 2 +- composer.lock | 18 ++++++++---------- src/Appwrite/Platform/Workers/Messaging.php | 4 ++-- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/composer.json b/composer.json index 18318654d5..e7cc2e5fab 100644 --- a/composer.json +++ b/composer.json @@ -59,7 +59,7 @@ "utopia-php/image": "0.7.*", "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", - "utopia-php/messaging": "dev-update-fast2sms-adapter", + "utopia-php/messaging": "0.14.*", "utopia-php/migration": "0.6.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.1", diff --git a/composer.lock b/composer.lock index d991cab3bd..537c8bfc80 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": "232f9dd47974029f8dcd24ad4cbe6ae9", + "content-hash": "b688586471d8fc6cc39ba144044795f9", "packages": [ { "name": "adhocore/jwt", @@ -3878,16 +3878,16 @@ }, { "name": "utopia-php/messaging", - "version": "dev-update-fast2sms-adapter", + "version": "0.14.1", "source": { "type": "git", "url": "https://github.com/utopia-php/messaging.git", - "reference": "01a20625dbe1d552e09084f81c8e3b9ccc25bae5" + "reference": "4ba356a3aa382802727f7e13e0f0152bcc1fc535" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/messaging/zipball/01a20625dbe1d552e09084f81c8e3b9ccc25bae5", - "reference": "01a20625dbe1d552e09084f81c8e3b9ccc25bae5", + "url": "https://api.github.com/repos/utopia-php/messaging/zipball/4ba356a3aa382802727f7e13e0f0152bcc1fc535", + "reference": "4ba356a3aa382802727f7e13e0f0152bcc1fc535", "shasum": "" }, "require": { @@ -3923,9 +3923,9 @@ ], "support": { "issues": "https://github.com/utopia-php/messaging/issues", - "source": "https://github.com/utopia-php/messaging/tree/update-fast2sms-adapter" + "source": "https://github.com/utopia-php/messaging/tree/0.14.1" }, - "time": "2025-01-28T04:58:00+00:00" + "time": "2025-01-28T06:14:28+00:00" }, { "name": "utopia-php/migration", @@ -8503,9 +8503,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "utopia-php/messaging": 20 - }, + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/src/Appwrite/Platform/Workers/Messaging.php b/src/Appwrite/Platform/Workers/Messaging.php index 7abd6cf857..0f4297c159 100644 --- a/src/Appwrite/Platform/Workers/Messaging.php +++ b/src/Appwrite/Platform/Workers/Messaging.php @@ -416,8 +416,8 @@ class Messaging extends Action $from = System::getEnv('_APP_SMS_FROM', ''); $sms = new SMS( - $recipients, - $message->getAttribute('data')['content'], + $recipients, + $message->getAttribute('data')['content'], $from ); From 6cef099890ab886a4e9686d1d226c4102b01a9ad Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 28 Jan 2025 11:51:11 +0530 Subject: [PATCH 092/101] chore: linter --- src/Appwrite/Platform/Workers/Messaging.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Appwrite/Platform/Workers/Messaging.php b/src/Appwrite/Platform/Workers/Messaging.php index 0f4297c159..43fe9b728b 100644 --- a/src/Appwrite/Platform/Workers/Messaging.php +++ b/src/Appwrite/Platform/Workers/Messaging.php @@ -423,7 +423,6 @@ class Messaging extends Action try { $result = $this->adapter->send($sms); - var_dump($result); } catch (\Throwable $th) { throw new \Exception('Failed sending to targets with error: ' . $th->getMessage()); } From 8ceb6e2c25e7a26aaf80ea6059d0f1fb8f4efa38 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 28 Jan 2025 12:23:18 +0530 Subject: [PATCH 093/101] chore: review comments --- src/Appwrite/Platform/Workers/Messaging.php | 35 ++++++++++++--------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Messaging.php b/src/Appwrite/Platform/Workers/Messaging.php index 43fe9b728b..8f2d7547df 100644 --- a/src/Appwrite/Platform/Workers/Messaging.php +++ b/src/Appwrite/Platform/Workers/Messaging.php @@ -62,19 +62,7 @@ class Messaging extends Action */ public function __construct() { - if (empty(System::getEnv('_APP_SMS_PROVIDER')) || empty(System::getEnv('_APP_SMS_FROM'))) { - throw new \Exception('Skipped SMS processing. Missing "_APP_SMS_PROVIDER" or "_APP_SMS_FROM" environment variables.'); - } - - $providers = System::getEnv('_APP_SMS_PROVIDER', ''); - - if (!empty($providers)) { - $providers = explode(',', $providers); - foreach ($providers as $provider) { - $this->dsns[] = new DSN($provider); - } - } - + $this->adapter = $this->createInternalSMSAdapter($this->dsns); $this @@ -402,6 +390,11 @@ class Messaging extends Action private function sendInternalSMSMessage(Document $message, Document $project, array $recipients, Log $log): void { + if ($this->adapter === null) { + Console::warning('Skipped SMS processing. SMS adapter is not set.'); + return; + } + if ($project->isEmpty()) { throw new \Exception('Project not set in payload'); } @@ -681,8 +674,22 @@ class Messaging extends Action return $this->localDevice; } - private function createInternalSMSAdapter(array $dsns): SMSAdapter + private function createInternalSMSAdapter(array $dsns): ?SMSAdapter { + if (empty(System::getEnv('_APP_SMS_PROVIDER')) || empty(System::getEnv('_APP_SMS_FROM'))) { + Console::warning('Skipped SMS processing. Missing "_APP_SMS_PROVIDER" or "_APP_SMS_FROM" environment variables.'); + return null; + } + + $providers = System::getEnv('_APP_SMS_PROVIDER', ''); + + if (!empty($providers)) { + $providers = explode(',', $providers); + foreach ($providers as $provider) { + $this->dsns[] = new DSN($provider); + } + } + if (count($dsns) === 1) { $provider = $this->createProviderFromDSN($dsns[0]); $adapter = $this->getSmsAdapter($provider); From 5593682c3dae58b75b5a6dee6e242c841e63ff20 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 28 Jan 2025 12:24:16 +0530 Subject: [PATCH 094/101] chore: review comments --- src/Appwrite/Platform/Workers/Messaging.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Workers/Messaging.php b/src/Appwrite/Platform/Workers/Messaging.php index 8f2d7547df..888e083da1 100644 --- a/src/Appwrite/Platform/Workers/Messaging.php +++ b/src/Appwrite/Platform/Workers/Messaging.php @@ -62,7 +62,7 @@ class Messaging extends Action */ public function __construct() { - + $this->adapter = $this->createInternalSMSAdapter($this->dsns); $this From 419f3bee1d429ddbbff46c3b692764cf791ad041 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 28 Jan 2025 13:32:10 +0530 Subject: [PATCH 095/101] chore: fix tests --- src/Appwrite/Platform/Workers/Messaging.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Messaging.php b/src/Appwrite/Platform/Workers/Messaging.php index 888e083da1..aee60a2bb5 100644 --- a/src/Appwrite/Platform/Workers/Messaging.php +++ b/src/Appwrite/Platform/Workers/Messaging.php @@ -48,8 +48,6 @@ class Messaging extends Action { private ?Local $localDevice = null; - private array $dsns = []; - private ?SMSAdapter $adapter = null; public static function getName(): string @@ -63,7 +61,7 @@ class Messaging extends Action public function __construct() { - $this->adapter = $this->createInternalSMSAdapter($this->dsns); + $this->adapter = $this->createInternalSMSAdapter(); $this ->desc('Messaging worker') @@ -674,7 +672,7 @@ class Messaging extends Action return $this->localDevice; } - private function createInternalSMSAdapter(array $dsns): ?SMSAdapter + private function createInternalSMSAdapter(): ?SMSAdapter { if (empty(System::getEnv('_APP_SMS_PROVIDER')) || empty(System::getEnv('_APP_SMS_FROM'))) { Console::warning('Skipped SMS processing. Missing "_APP_SMS_PROVIDER" or "_APP_SMS_FROM" environment variables.'); @@ -683,10 +681,11 @@ class Messaging extends Action $providers = System::getEnv('_APP_SMS_PROVIDER', ''); + $dsns = []; if (!empty($providers)) { $providers = explode(',', $providers); foreach ($providers as $provider) { - $this->dsns[] = new DSN($provider); + $dsns[] = new DSN($provider); } } From 76680bcbcc48d26662872054be539da4ec6a7ec9 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 28 Jan 2025 22:29:24 +1300 Subject: [PATCH 096/101] Revert "Feat batch usage dump" --- composer.json | 6 +- composer.lock | 82 ++--- src/Appwrite/Platform/Workers/Usage.php | 16 +- src/Appwrite/Platform/Workers/UsageDump.php | 361 ++++++++++---------- tests/e2e/General/UsageTest.php | 194 +++++++++++ 5 files changed, 421 insertions(+), 238 deletions(-) diff --git a/composer.json b/composer.json index e024cff1c6..9674bce2fd 100644 --- a/composer.json +++ b/composer.json @@ -45,13 +45,13 @@ "ext-sockets": "*", "appwrite/php-runtimes": "0.16.*", "appwrite/php-clamav": "2.0.*", - "utopia-php/abuse": "0.48.*", + "utopia-php/abuse": "0.47.*", "utopia-php/analytics": "0.10.*", - "utopia-php/audit": "0.48.*", + "utopia-php/audit": "0.47.*", "utopia-php/cache": "0.11.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.57.*", + "utopia-php/database": "0.56.4", "utopia-php/domains": "0.5.*", "utopia-php/dsn": "0.2.1", "utopia-php/framework": "0.33.*", diff --git a/composer.lock b/composer.lock index 02c3b65284..cd14e512a7 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": "8927ec7d3cfa460ce223e4c13cf61ada", + "content-hash": "3cd37ea04612e04b9e76eb51c5da41dd", "packages": [ { "name": "adhocore/jwt", @@ -3136,16 +3136,16 @@ }, { "name": "utopia-php/abuse", - "version": "0.48.0", + "version": "0.47.0", "source": { "type": "git", "url": "https://github.com/utopia-php/abuse.git", - "reference": "8387c65cc7148af58adbbede06eedc1a7b568e57" + "reference": "2b52bb362234d4072b647ed57db1b3be030f57c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/abuse/zipball/8387c65cc7148af58adbbede06eedc1a7b568e57", - "reference": "8387c65cc7148af58adbbede06eedc1a7b568e57", + "url": "https://api.github.com/repos/utopia-php/abuse/zipball/2b52bb362234d4072b647ed57db1b3be030f57c2", + "reference": "2b52bb362234d4072b647ed57db1b3be030f57c2", "shasum": "" }, "require": { @@ -3153,13 +3153,13 @@ "ext-pdo": "*", "ext-redis": "*", "php": ">=8.0", - "utopia-php/database": "0.57.*" + "utopia-php/database": "0.56.*" }, "require-dev": { - "laravel/pint": "1.*", - "phpbench/phpbench": "1.*", - "phpstan/phpstan": "1.*", - "phpunit/phpunit": "9.*" + "laravel/pint": "1.5.*", + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9", + "phpunit/phpunit": "^9.4" }, "type": "library", "autoload": { @@ -3181,9 +3181,9 @@ ], "support": { "issues": "https://github.com/utopia-php/abuse/issues", - "source": "https://github.com/utopia-php/abuse/tree/0.48.0" + "source": "https://github.com/utopia-php/abuse/tree/0.47.0" }, - "time": "2025-01-23T04:40:14+00:00" + "time": "2025-01-15T02:41:02+00:00" }, { "name": "utopia-php/analytics", @@ -3233,26 +3233,26 @@ }, { "name": "utopia-php/audit", - "version": "0.48.0", + "version": "0.47.0", "source": { "type": "git", "url": "https://github.com/utopia-php/audit.git", - "reference": "6aab185fce3ba7878b0f26cc8b4eefa1663fb395" + "reference": "1ebd5784ba68645073426f2f04a67726a1bde4d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/audit/zipball/6aab185fce3ba7878b0f26cc8b4eefa1663fb395", - "reference": "6aab185fce3ba7878b0f26cc8b4eefa1663fb395", + "url": "https://api.github.com/repos/utopia-php/audit/zipball/1ebd5784ba68645073426f2f04a67726a1bde4d7", + "reference": "1ebd5784ba68645073426f2f04a67726a1bde4d7", "shasum": "" }, "require": { "php": ">=8.0", - "utopia-php/database": "0.57.*" + "utopia-php/database": "0.56.*" }, "require-dev": { - "laravel/pint": "1.*", - "phpstan/phpstan": "1.*", - "phpunit/phpunit": "9.*" + "laravel/pint": "1.5.*", + "phpstan/phpstan": "^1.8", + "phpunit/phpunit": "^9.3" }, "type": "library", "autoload": { @@ -3274,9 +3274,9 @@ ], "support": { "issues": "https://github.com/utopia-php/audit/issues", - "source": "https://github.com/utopia-php/audit/tree/0.48.0" + "source": "https://github.com/utopia-php/audit/tree/0.47.0" }, - "time": "2025-01-23T04:40:07+00:00" + "time": "2025-01-15T02:40:53+00:00" }, { "name": "utopia-php/cache", @@ -3476,16 +3476,16 @@ }, { "name": "utopia-php/database", - "version": "0.57.2", + "version": "0.56.4", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "bd6f080dd9f4210349a6a862fa6da65a4d9d6339" + "reference": "240478a60797124a885ceac40046fe47c22415b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/bd6f080dd9f4210349a6a862fa6da65a4d9d6339", - "reference": "bd6f080dd9f4210349a6a862fa6da65a4d9d6339", + "url": "https://api.github.com/repos/utopia-php/database/zipball/240478a60797124a885ceac40046fe47c22415b7", + "reference": "240478a60797124a885ceac40046fe47c22415b7", "shasum": "" }, "require": { @@ -3526,9 +3526,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.57.2" + "source": "https://github.com/utopia-php/database/tree/0.56.4" }, - "time": "2025-01-23T05:19:02+00:00" + "time": "2025-01-20T09:22:08+00:00" }, { "name": "utopia-php/domains", @@ -3929,35 +3929,35 @@ }, { "name": "utopia-php/migration", - "version": "0.6.16", + "version": "0.6.15", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "a1da9b75a0e406ea8caca0d61b57a4d206ea0715" + "reference": "e849ec3e7ad38f5f5273ebb0132b112639cdf01c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/a1da9b75a0e406ea8caca0d61b57a4d206ea0715", - "reference": "a1da9b75a0e406ea8caca0d61b57a4d206ea0715", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/e849ec3e7ad38f5f5273ebb0132b112639cdf01c", + "reference": "e849ec3e7ad38f5f5273ebb0132b112639cdf01c", "shasum": "" }, "require": { - "appwrite/appwrite": "11.*", + "appwrite/appwrite": "11.1.*", "ext-curl": "*", "ext-openssl": "*", - "php": ">=8.3", - "utopia-php/database": "0.57.*", + "php": "8.3.*", + "utopia-php/database": "0.56.*", "utopia-php/dsn": "0.2.*", "utopia-php/framework": "0.33.*", "utopia-php/storage": "0.18.*" }, "require-dev": { "ext-pdo": "*", - "laravel/pint": "1.*", - "phpstan/phpstan": "1.*", - "phpunit/phpunit": "11.*", + "laravel/pint": "1.17.*", + "phpstan/phpstan": "1.11.*", + "phpunit/phpunit": "11.2.*", "utopia-php/cli": "0.16.*", - "vlucas/phpdotenv": "5.*" + "vlucas/phpdotenv": "5.6.*" }, "type": "library", "autoload": { @@ -3979,9 +3979,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.6.16" + "source": "https://github.com/utopia-php/migration/tree/0.6.15" }, - "time": "2025-01-23T04:34:02+00:00" + "time": "2025-01-15T04:55:08+00:00" }, { "name": "utopia-php/mongo", diff --git a/src/Appwrite/Platform/Workers/Usage.php b/src/Appwrite/Platform/Workers/Usage.php index 3f7428d0dd..3687eeab67 100644 --- a/src/Appwrite/Platform/Workers/Usage.php +++ b/src/Appwrite/Platform/Workers/Usage.php @@ -30,13 +30,16 @@ class Usage extends Action */ public function __construct() { + $this - ->desc('Usage worker') - ->inject('message') - ->inject('project') - ->inject('getProjectDB') - ->inject('queueForUsageDump') - ->callback([$this, 'action']); + ->desc('Usage worker') + ->inject('message') + ->inject('project') + ->inject('getProjectDB') + ->inject('queueForUsageDump') + ->callback(function (Message $message, Document $project, callable $getProjectDB, UsageDump $queueForUsageDump) { + $this->action($message, $project, $getProjectDB, $queueForUsageDump); + }); $this->aggregationInterval = (int) System::getEnv('_APP_USAGE_AGGREGATION_INTERVAL', '20'); $this->lastTriggeredTime = time(); @@ -58,6 +61,7 @@ class Usage extends Action throw new Exception('Missing payload'); } + if (empty($project->getAttribute('database'))) { var_dump($payload); return; diff --git a/src/Appwrite/Platform/Workers/UsageDump.php b/src/Appwrite/Platform/Workers/UsageDump.php index bb1d605442..2f1d13f29a 100644 --- a/src/Appwrite/Platform/Workers/UsageDump.php +++ b/src/Appwrite/Platform/Workers/UsageDump.php @@ -7,7 +7,7 @@ use Utopia\CLI\Console; use Utopia\Database\Database; use Utopia\Database\DateTime; use Utopia\Database\Document; -use Utopia\Database\Exception\NotFound; +use Utopia\Database\Exception\Duplicate; use Utopia\Platform\Action; use Utopia\Queue\Message; use Utopia\System\System; @@ -38,7 +38,9 @@ class UsageDump extends Action $this ->inject('message') ->inject('getProjectDB') - ->callback([$this, 'action']); + ->callback(function (Message $message, callable $getProjectDB) { + $this->action($message, $getProjectDB); + }); } /** @@ -55,247 +57,230 @@ class UsageDump extends Action throw new Exception('Missing payload'); } - try { - foreach ($payload['stats'] ?? [] as $stats) { - $project = new Document($stats['project'] ?? []); - $numberOfKeys = !empty($stats['keys']) ? \count($stats['keys']) : 0; - $receivedAt = $stats['receivedAt'] ?? 'NONE'; - if ($numberOfKeys === 0) { - continue; - } + foreach ($payload['stats'] ?? [] as $stats) { + $project = new Document($stats['project'] ?? []); + + /** + * End temp bug fallback + */ + $numberOfKeys = !empty($stats['keys']) ? count($stats['keys']) : 0; + $receivedAt = $stats['receivedAt'] ?? 'NONE'; + if ($numberOfKeys === 0) { + continue; + } + + console::log('['.DateTime::now().'] Id: '.$project->getId(). ' InternalId: '.$project->getInternalId(). ' Db: '.$project->getAttribute('database').' ReceivedAt: '.$receivedAt. ' Keys: '.$numberOfKeys); + + try { $dbForProject = $getProjectDB($project); - $projectDocuments = []; - $databaseCache = []; - $collectionSizeCache = []; - - Console::log('['.DateTime::now().'] Id: '.$project->getId(). ' InternalId: '.$project->getInternalId(). ' Db: '.$project->getAttribute('database').' ReceivedAt: '.$receivedAt. ' Keys: '.$numberOfKeys . ' Started'); - $start = \microtime(true); - foreach ($stats['keys'] ?? [] as $key => $value) { if ($value == 0) { continue; } + if (str_contains($key, METRIC_DATABASES_STORAGE)) { + try { + $this->handleDatabaseStorage($key, $dbForProject); + } catch (\Exception $e) { + console::error('[' . DateTime::now() . '] failed to calculate database storage for key [' . $key . '] ' . $e->getMessage()); + } + continue; + } + foreach ($this->periods as $period => $format) { - $time = 'inf' === $period ? null : \date($format, \time()); + $time = 'inf' === $period ? null : date($format, time()); $id = \md5("{$time}_{$period}_{$key}"); - if (\str_contains($key, METRIC_DATABASES_STORAGE)) { - $this->handleDatabaseStorage( - $id, - $key, - $time, - $period, - $dbForProject, - $projectDocuments, - $databaseCache, - $collectionSizeCache - ); - continue; + try { + $dbForProject->createDocument('stats', new Document([ + '$id' => $id, + 'period' => $period, + 'time' => $time, + 'metric' => $key, + 'value' => $value, + 'region' => System::getEnv('_APP_REGION', 'default'), + ])); + } catch (Duplicate $th) { + if ($value < 0) { + $dbForProject->decreaseDocumentAttribute( + 'stats', + $id, + 'value', + abs($value) + ); + } else { + $dbForProject->increaseDocumentAttribute( + 'stats', + $id, + 'value', + $value + ); + } } - - $projectDocuments[] = new Document([ - '$id' => $id, - 'period' => $period, - 'time' => $time, - 'metric' => $key, - 'value' => $value, - 'region' => System::getEnv('_APP_REGION', 'default'), - ]); } } - - $dbForProject->createOrUpdateDocumentsWithIncrease( - collection: 'stats', - attribute: 'value', - documents: $projectDocuments - ); - - $end = \microtime(true); - Console::log('['.DateTime::now().'] Id: '.$project->getId(). ' InternalId: '.$project->getInternalId(). ' Db: '.$project->getAttribute('database').' ReceivedAt: '.$receivedAt. ' Keys: '.$numberOfKeys. ' Time: '.($end - $start).'s'); + } catch (\Exception $e) { + console::error('[' . DateTime::now() . '] project [' . $project->getInternalId() . '] database [' . $project['database'] . '] ' . ' ' . $e->getMessage()); } - } catch (\Exception $e) { - Console::error('[' . DateTime::now() . '] Error processing stats: ' . $e->getMessage()); } } - private function handleDatabaseStorage( - string $id, - string $key, - ?string $time, - string $period, - Database $dbForProject, - array &$projectDocuments, - array &$databaseCache, - array &$collectionSizeCache, - ): void { - $data = \explode('.', $key); - $value = 0; - $previousValue = 0; + private function handleDatabaseStorage(string $key, Database $dbForProject): void + { + $data = explode('.', $key); + $start = microtime(true); - try { - $previousValue = $dbForProject - ->getDocument('stats', $id) - ->getAttribute('value', 0); - } catch (\Exception) { - // No previous value - } + $updateMetric = function (Database $dbForProject, int $value, string $key, string $period, string|null $time) { + $id = \md5("{$time}_{$period}_{$key}"); - switch (\count($data)) { - case METRIC_COLLECTION_LEVEL_STORAGE: - $databaseInternalId = $data[0]; - $collectionInternalId = $data[1]; - $collectionId = "database_{$databaseInternalId}_collection_{$collectionInternalId}"; + try { + $dbForProject->createDocument('stats', new Document([ + '$id' => $id, + 'period' => $period, + 'time' => $time, + 'metric' => $key, + 'value' => $value, + 'region' => System::getEnv('_APP_REGION', 'default'), + ])); + } catch (Duplicate $th) { + if ($value < 0) { + $dbForProject->decreaseDocumentAttribute( + 'stats', + $id, + 'value', + abs($value) + ); + } else { + $dbForProject->increaseDocumentAttribute( + 'stats', + $id, + 'value', + $value + ); + } + } + }; + + foreach ($this->periods as $period => $format) { + $time = 'inf' === $period ? null : date($format, time()); + $id = \md5("{$time}_{$period}_{$key}"); + + $value = 0; + $previousValue = 0; + try { + $previousValue = ($dbForProject->getDocument('stats', $id))->getAttribute('value', 0); + } catch (\Exception $e) { + // No previous value + } + + switch (count($data)) { + // Collection Level + case METRIC_COLLECTION_LEVEL_STORAGE: + Console::log('[' . DateTime::now() . '] Collection Level Storage Calculation [' . $key . ']'); + $databaseInternalId = $data[0]; + $collectionInternalId = $data[1]; - if (!isset($collectionSizeCache[$collectionId])) { try { - $collectionSizeCache[$collectionId] = $dbForProject->getSizeOfCollection($collectionId); + $value = $dbForProject->getSizeOfCollection('database_' . $databaseInternalId . '_collection_' . $collectionInternalId); } catch (\Exception $e) { - if (!$e instanceof NotFound) { + // Collection not found + if ($e->getMessage() !== 'Collection not found') { throw $e; } - $collectionSizeCache[$collectionId] = 0; } - } - $value = $collectionSizeCache[$collectionId]; + // Compare with previous value + $diff = $value - $previousValue; - $diff = $value - $previousValue; - if ($diff === 0) { + if ($diff === 0) { + break; + } + + // Update Collection + $updateMetric($dbForProject, $diff, $key, $period, $time); + + // Update Database + $databaseKey = str_replace(['{databaseInternalId}'], [$data[0]], METRIC_DATABASE_ID_STORAGE); + $updateMetric($dbForProject, $diff, $databaseKey, $period, $time); + + // Update Project + $projectKey = METRIC_DATABASES_STORAGE; + $updateMetric($dbForProject, $diff, $projectKey, $period, $time); break; - } + // Database Level + case METRIC_DATABASE_LEVEL_STORAGE: + Console::log('[' . DateTime::now() . '] Database Level Storage Calculation [' . $key . ']'); + $databaseInternalId = $data[0]; - $keys = [ - $key, - \str_replace(['{databaseInternalId}'], [$data[0]], METRIC_DATABASE_ID_STORAGE), - METRIC_DATABASES_STORAGE - ]; - - foreach ($keys as $metric) { - $projectDocuments[] = $this->createStatsDocument($id, $period, $time, $metric, $diff); - } - break; - - case METRIC_DATABASE_LEVEL_STORAGE: - $databaseInternalId = $data[0]; - $databaseId = "database_{$databaseInternalId}"; - - if (!isset($databaseCache[$databaseId])) { + $collections = []; try { - $databaseCache[$databaseId] = $dbForProject->find($databaseId); + $collections = $dbForProject->find('database_' . $databaseInternalId); } catch (\Exception $e) { - if (!$e instanceof NotFound) { + // Database not found + if ($e->getMessage() !== 'Collection not found') { throw $e; } - $databaseCache[$databaseId] = []; } - } - foreach ($databaseCache[$databaseId] as $collection) { - $collectionId = "{$databaseId}_collection_{$collection->getInternalId()}"; - - if (!isset($collectionSizeCache[$collectionId])) { + foreach ($collections as $collection) { try { - $collectionSizeCache[$collectionId] = $dbForProject->getSizeOfCollection($collectionId); + $value += $dbForProject->getSizeOfCollection('database_' . $databaseInternalId . '_collection_' . $collection->getInternalId()); } catch (\Exception $e) { - if (!$e instanceof NotFound) { + // Collection not found + if ($e->getMessage() !== 'Collection not found') { throw $e; } - $collectionSizeCache[$collectionId] = 0; } } - $value += $collectionSizeCache[$collectionId]; - } - $diff = $value - $previousValue; - if ($diff === 0) { + $diff = $value - $previousValue; + + if ($diff === 0) { + break; + } + + // Update Database + $databaseKey = str_replace(['{databaseInternalId}'], [$data[0]], METRIC_DATABASE_ID_STORAGE); + $updateMetric($dbForProject, $diff, $databaseKey, $period, $time); + + // Update Project + $projectKey = METRIC_DATABASES_STORAGE; + $updateMetric($dbForProject, $diff, $projectKey, $period, $time); break; - } + // Project Level + case METRIC_PROJECT_LEVEL_STORAGE: + Console::log('[' . DateTime::now() . '] Project Level Storage Calculation [' . $key . ']'); + // Get all project databases + $databases = $dbForProject->find('database'); - $keys = [ - \str_replace(['{databaseInternalId}'], [$data[0]], METRIC_DATABASE_ID_STORAGE), - METRIC_DATABASES_STORAGE - ]; + // Recalculate all databases + foreach ($databases as $database) { + $collections = $dbForProject->find('database_' . $database->getInternalId()); - foreach ($keys as $metric) { - $projectDocuments[] = $this->createStatsDocument($id, $period, $time, $metric, $diff); - } - break; - - case METRIC_PROJECT_LEVEL_STORAGE: - if (!isset($databaseCache['*'])) { - try { - $databaseCache['*'] = $dbForProject->find('databases'); - } catch (\Exception $e) { - if (!$e instanceof NotFound) { - throw $e; - } - $databaseCache['*'] = []; - } - } - - foreach ($databaseCache['*'] as $database) { - $databaseId = "database_{$database->getInternalId()}"; - if (!isset($databaseCache[$databaseId])) { - try { - $databaseCache[$databaseId] = $dbForProject->find($databaseId); - } catch (\Exception $e) { - if (!$e instanceof NotFound) { - throw $e; - } - $databaseCache[$databaseId] = []; - } - } - - foreach ($databaseCache[$databaseId] as $collection) { - $collectionId = "{$databaseId}_collection_{$collection->getInternalId()}"; - - if (!isset($collectionSizeCache[$collectionId])) { + foreach ($collections as $collection) { try { - $collectionSizeCache[$collectionId] = $dbForProject->getSizeOfCollection($collectionId); + $value += $dbForProject->getSizeOfCollection('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId()); } catch (\Exception $e) { - if (!$e instanceof NotFound) { + // Collection not found + if ($e->getMessage() !== 'Collection not found') { throw $e; } - $collectionSizeCache[$collectionId] = 0; } } - $value += $collectionSizeCache[$collectionId]; } - } - $diff = $value - $previousValue; - if ($diff === 0) { + $diff = $value - $previousValue; + + // Update Project + $projectKey = METRIC_DATABASES_STORAGE; + $updateMetric($dbForProject, $diff, $projectKey, $period, $time); break; - } - - $keys = [ - METRIC_DATABASES_STORAGE - ]; - - foreach ($keys as $metric) { - $projectDocuments[] = $this->createStatsDocument($id, $period, $time, $metric, $diff); - } - - break; + } } - } - private function createStatsDocument( - string $id, - string $period, - ?string $time, - string $key, - int $diff, - ): Document { - return new Document([ - '$id' => $id, - 'period' => $period, - 'time' => $time, - 'metric' => $key, - 'value' => $diff, - 'region' => System::getEnv('_APP_REGION', 'default'), - ]); + $end = microtime(true); + + console::log('[' . DateTime::now() . '] DB Storage Calculation [' . $key . '] took ' . (($end - $start) * 1000) . ' milliseconds'); } } diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index 3bf727a45e..74ae1c00bc 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -651,6 +651,200 @@ class UsageTest extends Scope ]; } + // /** @depends testDatabaseStoragePrepare */ + // #[Retry(count: 1)] + // public function testDatabaseStorageStatsCreateDocument(array $data): array + // { + // $databaseId = $data['databaseId']; + // $collectionId = $data['collectionId']; + + // $originalProjectMetrics = $this->client->call( + // Client::METHOD_GET, + // '/project/usage', + // $this->getConsoleHeaders(), + // [ + // 'period' => '1d', + // 'startDate' => self::getToday(), + // 'endDate' => self::getTomorrow(), + // ] + // ); + + // $this->assertEquals(200, $originalProjectMetrics['headers']['status-code']); + // $this->assertArrayHasKey('databasesStorageTotal', $originalProjectMetrics['body']); + + // $originalProjectMetrics = $originalProjectMetrics['body']; + + // $originalDatabaseMetrics = $this->client->call( + // Client::METHOD_GET, + // '/databases/' . $databaseId . '/usage?range=30d', + // $this->getConsoleHeaders() + // ); + + // $this->assertEquals(200, $originalDatabaseMetrics['headers']['status-code']); + // $this->assertArrayHasKey('storageTotal', $originalDatabaseMetrics['body']); + // $originalDatabaseMetrics = $originalDatabaseMetrics['body']; + + // // Create documents + // for ($i = 0; $i < 100; $i++) { + // $response = $this->client->call( + // Client::METHOD_POST, + // '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', + // array_merge([ + // 'content-type' => 'application/json', + // 'x-appwrite-project' => $this->getProject()['$id'] + // ], $this->getHeaders()), + // [ + // 'documentId' => 'unique()', + // 'data' => ['data' => str_repeat('a', 10000)], + // ] + // ); + + // $this->assertEquals(201, $response['headers']['status-code']); + // } + + // sleep(self::WAIT); + + // for ($i = 0; $i < 3; $i++) { + // try { + // $newProjectMetrics = $this->client->call( + // Client::METHOD_GET, + // '/project/usage', + // $this->getConsoleHeaders(), + // [ + // 'period' => '1d', + // 'startDate' => self::getToday(), + // 'endDate' => self::getTomorrow(), + // ] + // ); + + // $this->assertEquals(200, $newProjectMetrics['headers']['status-code']); + // $this->assertArrayHasKey('databasesStorageTotal', $newProjectMetrics['body']); + // $this->assertGreaterThan($originalProjectMetrics['databasesStorageTotal'], $newProjectMetrics['body']['databasesStorageTotal']); + + // $newProjectMetrics = $newProjectMetrics['body']; + + // $newDatabaseMetrics = $this->client->call( + // Client::METHOD_GET, + // '/databases/' . $databaseId . '/usage?range=30d', + // $this->getConsoleHeaders() + // ); + + // $this->assertEquals(200, $newDatabaseMetrics['headers']['status-code']); + // $this->assertArrayHasKey('storageTotal', $newDatabaseMetrics['body']); + // $this->assertGreaterThan($originalDatabaseMetrics['storageTotal'], $newDatabaseMetrics['body']['storageTotal']); + + // $newDatabaseMetrics = $newDatabaseMetrics['body']; + + // return [ + // 'databaseId' => $databaseId, + // 'collectionId' => $collectionId, + // 'currentProjectMetrics' => $newProjectMetrics, + // 'currentDatabaseMetrics' => $newDatabaseMetrics, + // ]; + // } catch (ExpectationFailedException $e) { + // if ($i === 2) { + // throw $e; + // } + // sleep(self::WAIT); + // continue; + // } + // } + // } + + // /** @depends testDatabaseStorageStatsCreateDocument */ + // #[Retry(count: 1)] + // public function testDatabaseStorageStatsDeleteDocument(array $data): array + // { + // $databaseId = $data['databaseId']; + // $collectionId = $data['collectionId']; + // $currentProjectMetrics = $data['currentProjectMetrics']; + // $currentDatabaseMetrics = $data['currentDatabaseMetrics']; + + // $documents = $this->client->call( + // Client::METHOD_GET, + // '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', + // array_merge([ + // 'x-appwrite-project' => $this->getProject()['$id'] + // ], $this->getHeaders()), + // [ + // 'queries' => [ + // Query::limit(50)->toString() + // ] + // ] + // ); + + // foreach ($documents['body']['documents'] as $document) { + // $response = $this->client->call( + // Client::METHOD_DELETE, + // '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $document['$id'], + // array_merge([ + // 'x-appwrite-project' => $this->getProject()['$id'] + // ], $this->getHeaders()) + // ); + + // $this->assertEquals(204, $response['headers']['status-code']); + // } + + // sleep(self::WAIT); + + // for ($i = 0; $i < 3; $i++) { + // try { + // $newProjectMetrics = $this->client->call( + // Client::METHOD_GET, + // '/project/usage', + // $this->getConsoleHeaders(), + // [ + // 'period' => '1d', + // 'startDate' => self::getToday(), + // 'endDate' => self::getTomorrow(), + // ] + // ); + + // $this->assertEquals(200, $newProjectMetrics['headers']['status-code']); + // $this->assertArrayHasKey('databasesStorageTotal', $newProjectMetrics['body']); + // $this->assertLessThan($currentProjectMetrics['databasesStorageTotal'], $newProjectMetrics['body']['databasesStorageTotal']); + + // $newProjectMetrics = $newProjectMetrics['body']; + + // $newDatabaseMetrics = $this->client->call( + // Client::METHOD_GET, + // '/databases/' . $databaseId . '/usage?range=30d', + // $this->getConsoleHeaders() + // ); + + // $this->assertEquals(200, $newDatabaseMetrics['headers']['status-code']); + // $this->assertArrayHasKey('storageTotal', $newDatabaseMetrics['body']); + // $this->assertLessThan($currentDatabaseMetrics['storageTotal'], $newDatabaseMetrics['body']['storageTotal']); + + // $newDatabaseMetrics = $newDatabaseMetrics['body']; + + // return [ + // 'databaseId' => $databaseId, + // 'collectionId' => $collectionId, + // 'currentProjectMetrics' => $newProjectMetrics, + // 'currentDatabaseMetrics' => $newDatabaseMetrics, + // ]; + // } catch (ExpectationFailedException $e) { + // if ($i === 2) { + // throw $e; + // } + // sleep(self::WAIT); + // continue; + // } + // } + + // $newProjectMetrics = $this->client->call( + // Client::METHOD_GET, + // '/project/usage', + // $this->getConsoleHeaders(), + // [ + // 'period' => '1d', + // 'startDate' => self::getToday(), + // 'endDate' => self::getTomorrow(), + // ] + // ); + // } + /** @depends testDatabaseStats */ public function testPrepareFunctionsStats(array $data): array { From 8cf6a4f39335f3eaf65037e1b8b0737be176d6c8 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 28 Jan 2025 15:58:16 +0530 Subject: [PATCH 097/101] chore: update deps --- composer.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.lock b/composer.lock index 365541146d..b3c114c81c 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": "3cd37ea04612e04b9e76eb51c5da41dd", + "content-hash": "8a6a8d485f68d2ce144a7ee8bee424ac", "packages": [ { "name": "adhocore/jwt", From 63c841b7a8b06eadc27d9077c8c09cd6b6f5bc41 Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 28 Jan 2025 19:37:27 +0530 Subject: [PATCH 098/101] update: sdk generator dependency. --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index eff2e79e2d..346f1fa9df 100644 --- a/composer.json +++ b/composer.json @@ -84,7 +84,7 @@ }, "require-dev": { "ext-fileinfo": "*", - "appwrite/sdk-generator": "0.39.30", + "appwrite/sdk-generator": "0.39.31", "phpunit/phpunit": "9.5.20", "swoole/ide-helper": "5.1.2", "textalk/websocket": "1.5.7", diff --git a/composer.lock b/composer.lock index b3c114c81c..4e8766a5ab 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": "8a6a8d485f68d2ce144a7ee8bee424ac", + "content-hash": "9eb185afed5118f69b81c07700d723ea", "packages": [ { "name": "adhocore/jwt", @@ -4807,16 +4807,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.39.30", + "version": "0.39.31", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "830198d501f51163514305befefb775106a7198b" + "reference": "612b2e09286f5bd8fc8a4c4f69ad6d537d103b8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/830198d501f51163514305befefb775106a7198b", - "reference": "830198d501f51163514305befefb775106a7198b", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/612b2e09286f5bd8fc8a4c4f69ad6d537d103b8d", + "reference": "612b2e09286f5bd8fc8a4c4f69ad6d537d103b8d", "shasum": "" }, "require": { @@ -4852,9 +4852,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.39.30" + "source": "https://github.com/appwrite/sdk-generator/tree/0.39.31" }, - "time": "2025-01-20T06:10:03+00:00" + "time": "2025-01-27T16:12:02+00:00" }, { "name": "doctrine/annotations", From f97b3aaa86f23c4a4b9532201465d1eb2eb7a1f5 Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 28 Jan 2025 16:49:55 +0200 Subject: [PATCH 099/101] transformedAt for files addition --- app/config/collections/common.php | 18 ++++++++++++++++++ app/controllers/api/storage.php | 7 +++++++ app/controllers/shared/api.php | 6 ++++++ app/init.php | 1 + 4 files changed, 32 insertions(+) diff --git a/app/config/collections/common.php b/app/config/collections/common.php index a613e8f3ab..f68400e226 100644 --- a/app/config/collections/common.php +++ b/app/config/collections/common.php @@ -2548,6 +2548,17 @@ return [ 'array' => false, 'filters' => [], ], + [ + '$id' => 'transformedAt', + 'type' => Database::VAR_DATETIME, + 'format' => '', + 'size' => 0, + 'signed' => false, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => ['datetime'], + ], [ '$id' => ID::custom('search'), 'type' => Database::VAR_STRING, @@ -2617,6 +2628,13 @@ return [ 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], + [ + '$id' => ID::custom('_key_transformedAt'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['transformedAt'], + 'lengths' => [], + 'orders' => [], + ] ] ], ]; diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index b6a07c356d..b5ddc94c9d 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -21,6 +21,7 @@ use Appwrite\Utopia\Response; use Utopia\App; use Utopia\Config\Config; use Utopia\Database\Database; +use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Exception\Duplicate as DuplicateException; use Utopia\Database\Exception\NotFound as NotFoundException; @@ -1075,6 +1076,12 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview') ->addMetric(str_replace('{bucketInternalId}', $bucket->getInternalId(), METRIC_BUCKET_ID_FILES_TRANSFORMATIONS), 1) ; + $transformedAt = $file->getAttribute('transformedAt', ''); + if (DateTime::formatTz(DateTime::addSeconds(new \DateTime(), -APP_PROJECT_ACCESS)) > $transformedAt) { + $file->setAttribute('transformedAt', DateTime::now()); + Authorization::skip(fn () => $dbForProject->updateDocument('bucket_' . $file->getAttribute('bucketInternalId'), $file->getId(), $file)); + } + $response ->addHeader('Cache-Control', 'private, max-age=2592000') // 30 days ->setContentType($contentType) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index e2845521f8..12b65fe6cd 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -607,6 +607,12 @@ App::init() if ($file->isEmpty()) { throw new Exception(Exception::STORAGE_FILE_NOT_FOUND); } + + $transformedAt = $file->getAttribute('transformedAt', ''); + if (DateTime::formatTz(DateTime::addSeconds(new \DateTime(), -APP_PROJECT_ACCESS)) > $transformedAt) { + $file->setAttribute('transformedAt', DateTime::now()); + Authorization::skip(fn () => $dbForProject->updateDocument('bucket_' . $file->getAttribute('bucketInternalId'), $file->getId(), $file)); + } } $response diff --git a/app/init.php b/app/init.php index f812ef094c..e912ffd8f4 100644 --- a/app/init.php +++ b/app/init.php @@ -122,6 +122,7 @@ const APP_LIMIT_LIST_DEFAULT = 25; // Default maximum number of items to return const APP_KEY_ACCESS = 24 * 60 * 60; // 24 hours const APP_USER_ACCESS = 24 * 60 * 60; // 24 hours const APP_PROJECT_ACCESS = 24 * 60 * 60; // 24 hours +const APP_FILE_ACCESS = 24 * 60 * 60; // 24 hours const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours const APP_CACHE_BUSTER = 4318; const APP_VERSION_STABLE = '1.6.1'; From 34f6dab14eed354b4699fe0f703c9c287850c8a0 Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 28 Jan 2025 16:52:04 +0200 Subject: [PATCH 100/101] transformedAt for files addition --- app/controllers/api/vcs.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/controllers/api/vcs.php b/app/controllers/api/vcs.php index 7f571f066e..2c145febcc 100644 --- a/app/controllers/api/vcs.php +++ b/app/controllers/api/vcs.php @@ -926,7 +926,6 @@ App::post('/v1/vcs/github/events') ->action( function (GitHub $github, Request $request, Response $response, Database $dbForPlatform, callable $getProjectDB, Build $queueForBuilds) use ($createGitDeployments) { $payload = $request->getRawPayload(); - var_dump(['payload' => $payload]); $signatureRemote = $request->getHeader('x-hub-signature-256', ''); $signatureLocal = System::getEnv('_APP_VCS_GITHUB_WEBHOOK_SECRET', ''); From 2e438edcc142445ef9d0c4ce0888c4367fd09d9a Mon Sep 17 00:00:00 2001 From: Ebenezer Don Date: Tue, 28 Jan 2025 21:36:42 +0000 Subject: [PATCH 101/101] regenerate specs --- app/config/specs/open-api3-1.6.x-client.json | 313 +- app/config/specs/open-api3-1.6.x-console.json | 1550 +- app/config/specs/open-api3-1.6.x-server.json | 839 +- .../specs/open-api3-latest-console.json | 2 +- app/config/specs/open-api3-latest-server.json | 50750 +++++------ app/config/specs/swagger2-1.6.x-client.json | 317 +- app/config/specs/swagger2-1.6.x-console.json | 1608 +- app/config/specs/swagger2-1.6.x-server.json | 888 +- app/config/specs/swagger2-latest-console.json | 71744 ++++++++-------- app/config/specs/swagger2-latest-server.json | 50604 ++++++----- 10 files changed, 91495 insertions(+), 87120 deletions(-) diff --git a/app/config/specs/open-api3-1.6.x-client.json b/app/config/specs/open-api3-1.6.x-client.json index af7303c985..820b1f55e0 100644 --- a/app/config/specs/open-api3-1.6.x-client.json +++ b/app/config/specs/open-api3-1.6.x-client.json @@ -58,9 +58,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -109,9 +106,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -196,9 +190,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -274,9 +265,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/identities", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -335,9 +323,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -400,9 +385,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -451,9 +433,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -519,9 +498,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -591,9 +567,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -659,9 +632,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -739,9 +709,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -809,9 +776,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -857,10 +821,10 @@ ], "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", "responses": { - "204": { - "description": "No content", + "200": { + "description": "Session", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/session" } @@ -885,9 +849,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -963,9 +924,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1016,9 +974,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1067,9 +1022,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1118,9 +1070,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1171,9 +1120,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1243,9 +1189,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1320,9 +1263,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1398,9 +1338,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1449,9 +1386,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1524,9 +1458,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1600,9 +1531,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1684,9 +1612,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1728,9 +1653,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1781,9 +1703,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1832,9 +1751,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1908,9 +1824,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1977,9 +1890,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2120,9 +2030,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2196,9 +2103,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2272,9 +2176,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "{sessionId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2335,9 +2236,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2391,9 +2289,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2456,9 +2351,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2479,7 +2371,7 @@ "tags": [ "account" ], - "description": "", + "description": "Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.", "responses": { "201": { "description": "Target", @@ -2499,7 +2391,7 @@ "type": "", "deprecated": false, "demo": "account\/create-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -2508,9 +2400,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2560,7 +2449,7 @@ "tags": [ "account" ], - "description": "", + "description": "Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.", "responses": { "200": { "description": "Target", @@ -2580,7 +2469,7 @@ "type": "", "deprecated": false, "demo": "account\/update-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -2589,9 +2478,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2640,17 +2526,10 @@ "tags": [ "account" ], - "description": "", + "description": "Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.", "responses": { "204": { - "description": "No content", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/target" - } - } - } + "description": "No content" } }, "x-appwrite": { @@ -2660,7 +2539,7 @@ "type": "", "deprecated": false, "demo": "account\/delete-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -2669,9 +2548,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2733,9 +2609,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2817,9 +2690,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2896,9 +2766,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3042,9 +2909,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3118,9 +2982,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3188,9 +3049,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3269,9 +3127,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3320,9 +3175,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3392,9 +3244,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3520,9 +3369,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3652,9 +3498,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3712,9 +3555,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4202,9 +4042,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4286,9 +4123,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4380,9 +4214,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4481,9 +4312,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4568,9 +4396,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4677,9 +4502,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4774,9 +4596,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4875,9 +4694,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4961,9 +4777,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5049,9 +4862,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5166,9 +4976,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5242,9 +5049,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5296,9 +5100,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5350,9 +5151,6 @@ "server" ], "packaging": false, - "offline-model": "\/localed", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5404,9 +5202,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/localeCode", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5458,9 +5253,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/continents", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -5512,9 +5304,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -5566,9 +5355,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/eu", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -5620,9 +5406,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/phones", - "offline-key": "", - "offline-response-key": "countryCode", "auth": { "Project": [] } @@ -5674,9 +5457,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/currencies", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -5728,9 +5508,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/languages", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -5783,9 +5560,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5868,9 +5642,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5944,9 +5715,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6032,9 +5800,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6132,9 +5897,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6206,9 +5968,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6297,9 +6056,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6366,9 +6122,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6435,9 +6188,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6611,6 +6361,7 @@ "gif", "png", "webp", + "heic", "avif" ], "x-enum-name": "ImageFormat", @@ -6653,9 +6404,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6729,9 +6477,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6807,9 +6552,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6894,9 +6636,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6958,9 +6697,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7034,9 +6770,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7100,9 +6833,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7188,9 +6918,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7301,9 +7028,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "{membershipId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7375,9 +7099,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7464,9 +7185,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7539,9 +7257,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7639,9 +7354,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7702,9 +7414,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } diff --git a/app/config/specs/open-api3-1.6.x-console.json b/app/config/specs/open-api3-1.6.x-console.json index 825527cb29..7f57dfc437 100644 --- a/app/config/specs/open-api3-1.6.x-console.json +++ b/app/config/specs/open-api3-1.6.x-console.json @@ -58,9 +58,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -108,9 +105,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -185,9 +179,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -236,9 +227,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -313,9 +301,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/identities", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -373,9 +358,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -437,9 +419,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -488,9 +467,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -555,9 +531,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -626,9 +599,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -693,9 +663,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -772,9 +739,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -841,9 +805,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -889,10 +850,10 @@ ], "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", "responses": { - "204": { - "description": "No content", + "200": { + "description": "Session", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/session" } @@ -917,9 +878,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -994,9 +952,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1046,9 +1001,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1096,9 +1048,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1146,9 +1095,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1198,9 +1144,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1269,9 +1212,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1345,9 +1285,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1422,9 +1359,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1472,9 +1406,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1546,9 +1477,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1621,9 +1549,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1704,9 +1629,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1747,9 +1669,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1799,9 +1718,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1850,9 +1766,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1926,9 +1839,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1995,9 +1905,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2138,9 +2045,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2214,9 +2118,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2290,9 +2191,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "{sessionId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2352,9 +2250,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2407,9 +2302,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2471,9 +2363,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2493,7 +2382,7 @@ "tags": [ "account" ], - "description": "", + "description": "Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.", "responses": { "201": { "description": "Target", @@ -2513,7 +2402,7 @@ "type": "", "deprecated": false, "demo": "account\/create-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -2522,9 +2411,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2573,7 +2459,7 @@ "tags": [ "account" ], - "description": "", + "description": "Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.", "responses": { "200": { "description": "Target", @@ -2593,7 +2479,7 @@ "type": "", "deprecated": false, "demo": "account\/update-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -2602,9 +2488,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2652,17 +2535,10 @@ "tags": [ "account" ], - "description": "", + "description": "Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.", "responses": { "204": { - "description": "No content", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/target" - } - } - } + "description": "No content" } }, "x-appwrite": { @@ -2672,7 +2548,7 @@ "type": "", "deprecated": false, "demo": "account\/delete-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -2681,9 +2557,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2744,9 +2617,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2828,9 +2698,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2907,9 +2774,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3053,9 +2917,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3129,9 +2990,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3198,9 +3056,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3278,9 +3133,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3328,9 +3180,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3399,9 +3248,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3527,9 +3373,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3659,9 +3502,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3719,9 +3559,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4209,9 +4046,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4293,9 +4127,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4387,9 +4218,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4457,7 +4285,7 @@ "tags": [ "assistant" ], - "description": "", + "description": "Send a prompt to the AI assistant and receive a response. This endpoint allows you to interact with Appwrite's AI assistant by sending questions or prompts and receiving helpful responses in real-time through a server-sent events stream. ", "responses": { "200": { "description": "File" @@ -4479,9 +4307,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4548,9 +4373,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4598,9 +4420,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4673,9 +4492,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4725,7 +4541,7 @@ "tags": [ "databases" ], - "description": "", + "description": "Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { "200": { "description": "UsageDatabases", @@ -4745,7 +4561,7 @@ "type": "", "deprecated": false, "demo": "databases\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -4754,9 +4570,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4828,9 +4641,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4889,9 +4699,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4967,9 +4774,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5030,9 +4834,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5115,9 +4916,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5221,9 +5019,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5292,9 +5087,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5393,9 +5185,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5466,9 +5255,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5552,9 +5338,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5636,7 +5419,7 @@ "200": { "description": "AttributeBoolean", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeBoolean" } @@ -5660,9 +5443,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5773,9 +5553,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5857,7 +5634,7 @@ "200": { "description": "AttributeDatetime", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeDatetime" } @@ -5881,9 +5658,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5994,9 +5768,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6078,7 +5849,7 @@ "200": { "description": "AttributeEmail", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeEmail" } @@ -6102,9 +5873,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6215,9 +5983,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6308,7 +6073,7 @@ "200": { "description": "AttributeEnum", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeEnum" } @@ -6332,9 +6097,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6454,9 +6216,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6548,7 +6307,7 @@ "200": { "description": "AttributeFloat", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeFloat" } @@ -6572,9 +6331,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6697,9 +6453,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6791,7 +6544,7 @@ "200": { "description": "AttributeInteger", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeInteger" } @@ -6815,9 +6568,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6940,9 +6690,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7024,7 +6771,7 @@ "200": { "description": "AttributeIP", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeIp" } @@ -7048,9 +6795,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7161,9 +6905,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7294,9 +7035,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7389,7 +7127,7 @@ "200": { "description": "AttributeString", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeString" } @@ -7413,9 +7151,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7531,9 +7266,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7615,7 +7347,7 @@ "200": { "description": "AttributeURL", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeUrl" } @@ -7639,9 +7371,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7783,9 +7512,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7856,9 +7582,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7914,7 +7637,7 @@ "200": { "description": "AttributeRelationship", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeRelationship" } @@ -7938,9 +7661,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8050,9 +7770,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8137,9 +7854,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8246,9 +7960,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8343,9 +8054,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8444,9 +8152,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8528,9 +8233,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8623,9 +8325,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8707,9 +8406,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8829,9 +8525,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8902,9 +8595,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8984,9 +8674,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9040,7 +8727,7 @@ "tags": [ "databases" ], - "description": "", + "description": "Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { "200": { "description": "UsageCollection", @@ -9060,7 +8747,7 @@ "type": "", "deprecated": false, "demo": "databases\/get-collection-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9069,9 +8756,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9163,9 +8847,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9209,7 +8890,7 @@ "tags": [ "databases" ], - "description": "", + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { "200": { "description": "UsageDatabase", @@ -9229,7 +8910,7 @@ "type": "", "deprecated": false, "demo": "databases\/get-database-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9238,9 +8919,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9322,9 +9000,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9397,9 +9072,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9646,9 +9318,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9698,9 +9367,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9749,9 +9415,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9851,9 +9514,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9884,7 +9544,7 @@ "tags": [ "functions" ], - "description": "", + "description": "Get usage metrics and statistics for a for all functions. View statistics including total functions, deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "responses": { "200": { "description": "UsageFunctions", @@ -9904,7 +9564,7 @@ "type": "", "deprecated": false, "demo": "functions\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-functions-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9913,9 +9573,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9987,9 +9644,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10048,9 +9702,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10274,9 +9925,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10337,9 +9985,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10422,9 +10067,6 @@ "server" ], "packaging": true, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10520,9 +10162,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10591,9 +10230,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10655,9 +10291,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10699,7 +10332,7 @@ "tags": [ "functions" ], - "description": "", + "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "responses": { "204": { "description": "No content" @@ -10712,7 +10345,7 @@ "type": "", "deprecated": false, "demo": "functions\/create-build.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-build.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10721,9 +10354,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10779,7 +10409,7 @@ "tags": [ "functions" ], - "description": "", + "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "responses": { "200": { "description": "Build", @@ -10799,7 +10429,7 @@ "type": "", "deprecated": false, "demo": "functions\/update-deployment-build.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-deployment-build.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10808,9 +10438,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10875,9 +10502,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10951,9 +10575,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11039,9 +10660,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11156,9 +10774,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11221,9 +10836,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11265,7 +10877,7 @@ "tags": [ "functions" ], - "description": "", + "description": "Get usage metrics and statistics for a for a specific function. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "responses": { "200": { "description": "UsageFunction", @@ -11285,7 +10897,7 @@ "type": "", "deprecated": false, "demo": "functions\/get-function-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11294,9 +10906,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11378,9 +10987,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11439,9 +11045,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11527,9 +11130,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11598,9 +11198,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11686,9 +11283,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11761,9 +11355,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11815,9 +11406,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11867,9 +11455,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11918,9 +11503,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11969,9 +11551,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12020,9 +11599,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12082,9 +11658,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12133,9 +11706,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12184,9 +11754,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12235,9 +11802,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12299,9 +11863,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12363,9 +11924,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12438,9 +11996,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12502,9 +12057,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12592,9 +12144,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12656,9 +12205,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12720,9 +12266,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12784,9 +12327,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12848,9 +12388,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12912,9 +12449,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12976,9 +12510,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13040,9 +12571,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13104,9 +12632,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13155,9 +12680,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13206,9 +12728,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13259,9 +12778,6 @@ "server" ], "packaging": false, - "offline-model": "\/localed", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13313,9 +12829,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/localeCode", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13367,9 +12880,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/continents", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -13421,9 +12931,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -13475,9 +12982,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/eu", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -13529,9 +13033,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/phones", - "offline-key": "", - "offline-response-key": "countryCode", "auth": { "Project": [] } @@ -13583,9 +13084,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/currencies", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -13637,9 +13135,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/languages", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -13690,9 +13185,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13768,9 +13260,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13914,9 +13403,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14062,9 +13548,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14238,9 +13721,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14418,9 +13898,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14499,7 +13976,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", @@ -14519,7 +13996,7 @@ "type": "", "deprecated": false, "demo": "messaging\/update-sms.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -14529,9 +14006,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14643,9 +14117,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14698,9 +14169,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14762,9 +14230,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14839,9 +14304,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14916,9 +14378,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14994,9 +14453,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15101,9 +14557,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15211,9 +14664,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15298,9 +14748,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15388,9 +14835,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15505,9 +14949,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15625,9 +15066,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15722,9 +15160,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15822,9 +15257,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15929,9 +15361,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16039,9 +15468,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16184,9 +15610,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16331,9 +15754,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16428,9 +15848,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16528,9 +15945,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16625,9 +16039,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16725,9 +16136,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16822,9 +16230,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16922,9 +16327,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17019,9 +16421,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17119,9 +16518,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17174,9 +16570,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17238,9 +16631,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17315,9 +16705,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17392,9 +16779,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17468,9 +16852,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17553,9 +16934,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17615,9 +16993,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17694,9 +17069,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17758,9 +17130,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17835,9 +17204,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17923,9 +17289,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18013,9 +17376,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18080,9 +17440,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18125,7 +17482,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.", "responses": { "200": { "description": "Migrations List", @@ -18154,9 +17511,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18201,7 +17555,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project. ", "responses": { "202": { "description": "Migration", @@ -18230,9 +17584,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18291,7 +17642,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", "responses": { "200": { "description": "Migration Report", @@ -18320,9 +17671,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18386,7 +17734,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project. ", "responses": { "202": { "description": "Migration", @@ -18415,9 +17763,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18464,7 +17809,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", "responses": { "200": { "description": "Migration Report", @@ -18493,9 +17838,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18538,7 +17880,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project. ", "responses": { "202": { "description": "Migration", @@ -18567,9 +17909,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18651,7 +17990,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", "responses": { "200": { "description": "Migration Report", @@ -18680,9 +18019,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18786,7 +18122,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project. ", "responses": { "202": { "description": "Migration", @@ -18815,9 +18151,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18893,7 +18226,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", "responses": { "200": { "description": "Migration Report", @@ -18922,9 +18255,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19019,7 +18349,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process. ", "responses": { "200": { "description": "Migration", @@ -19048,9 +18378,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19079,7 +18406,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Retry a failed migration. This endpoint allows you to retry a migration that has previously failed.", "responses": { "202": { "description": "Migration", @@ -19108,9 +18435,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19139,7 +18463,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Delete a migration by its unique ID. This endpoint allows you to remove a migration from your project's migration history. ", "responses": { "204": { "description": "No content" @@ -19161,9 +18485,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19194,7 +18515,7 @@ "tags": [ "project" ], - "description": "", + "description": "Get comprehensive usage statistics for your project. View metrics including network requests, bandwidth, storage, function executions, database usage, and user activity. Specify a time range with startDate and endDate, and optionally set the data granularity with period (1h or 1d). The response includes both total counts and detailed breakdowns by resource, along with historical data over the specified period.", "responses": { "200": { "description": "UsageProject", @@ -19214,7 +18535,7 @@ "type": "", "deprecated": false, "demo": "project\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/get-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19223,9 +18544,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19313,9 +18631,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19361,9 +18676,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19436,9 +18748,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19496,9 +18805,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19573,9 +18879,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19606,7 +18909,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a list of all projects. You can use the query params to filter your results. ", "responses": { "200": { "description": "Projects List", @@ -19626,7 +18929,7 @@ "type": "", "deprecated": false, "demo": "projects\/list.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19635,9 +18938,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19680,7 +18980,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Create a new project. You can create a maximum of 100 projects per account. ", "responses": { "201": { "description": "Project", @@ -19700,7 +19000,7 @@ "type": "", "deprecated": false, "demo": "projects\/create.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19709,9 +19009,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19817,7 +19114,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata. ", "responses": { "200": { "description": "Project", @@ -19837,7 +19134,7 @@ "type": "", "deprecated": false, "demo": "projects\/get.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19846,9 +19143,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19877,7 +19171,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a project by its unique ID.", "responses": { "200": { "description": "Project", @@ -19897,7 +19191,7 @@ "type": "", "deprecated": false, "demo": "projects\/update.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19906,9 +19200,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20001,7 +19292,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Delete a project by its unique ID.", "responses": { "204": { "description": "No content" @@ -20014,7 +19305,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20023,9 +19314,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20056,7 +19344,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.", "responses": { "200": { "description": "Project", @@ -20076,7 +19364,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-api-status.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-api-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20085,9 +19373,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20150,7 +19435,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.", "responses": { "200": { "description": "Project", @@ -20170,7 +19455,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-api-status-all.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-api-status-all.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20179,9 +19464,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20231,7 +19513,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update how long sessions created within a project should stay active for.", "responses": { "200": { "description": "Project", @@ -20251,7 +19533,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-duration.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-duration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20260,9 +19542,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20312,7 +19591,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the maximum number of users allowed in this project. Set to 0 for unlimited users. ", "responses": { "200": { "description": "Project", @@ -20332,7 +19611,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-limit.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-limit.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20341,9 +19620,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20393,7 +19669,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions.", "responses": { "200": { "description": "Project", @@ -20413,7 +19689,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-sessions-limit.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-sessions-limit.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20422,9 +19698,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20474,7 +19747,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update project membership privacy settings. Use this endpoint to control what user information is visible to other team members, such as user name, email, and MFA status. ", "responses": { "200": { "description": "Project", @@ -20494,7 +19767,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-memberships-privacy.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-memberships-privacy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20503,9 +19776,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20567,7 +19837,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the list of mock phone numbers for testing. Use these numbers to bypass SMS verification in development. ", "responses": { "200": { "description": "Project", @@ -20587,7 +19857,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-mock-numbers.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-mock-numbers.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20596,9 +19866,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20651,7 +19918,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don't use common and insecure passwords. ", "responses": { "200": { "description": "Project", @@ -20671,7 +19938,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-password-dictionary.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-password-dictionary.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20680,9 +19947,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20732,7 +19996,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the authentication password history requirement. Use this endpoint to require new passwords to be different than the last X amount of previously used ones.", "responses": { "200": { "description": "Project", @@ -20752,7 +20016,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-password-history.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-password-history.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20761,9 +20025,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20813,7 +20074,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords. ", "responses": { "200": { "description": "Project", @@ -20833,7 +20094,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-personal-data-check.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-personal-data-check.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20842,9 +20103,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20894,7 +20152,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.", "responses": { "200": { "description": "Project", @@ -20914,7 +20172,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-session-alerts.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-session-alerts.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20923,9 +20181,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20975,7 +20230,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the status of a specific authentication method. Use this endpoint to enable or disable different authentication methods such as email, magic urls or sms in your project. ", "responses": { "200": { "description": "Project", @@ -20995,7 +20250,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-status.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21004,9 +20259,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21077,7 +20329,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time. ", "responses": { "201": { "description": "JWT", @@ -21097,7 +20349,7 @@ "type": "", "deprecated": false, "demo": "projects\/create-j-w-t.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-jwt.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21106,9 +20358,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21166,7 +20415,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a list of all API keys from the current project. ", "responses": { "200": { "description": "API Keys List", @@ -21186,7 +20435,7 @@ "type": "", "deprecated": false, "demo": "projects\/list-keys.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-keys.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21195,9 +20444,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21226,7 +20472,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.", "responses": { "201": { "description": "Key", @@ -21246,7 +20492,7 @@ "type": "", "deprecated": false, "demo": "projects\/create-key.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21255,9 +20501,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21321,7 +20564,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it's scopes.", "responses": { "200": { "description": "Key", @@ -21341,7 +20584,7 @@ "type": "", "deprecated": false, "demo": "projects\/get-key.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21350,9 +20593,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21391,7 +20631,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key. ", "responses": { "200": { "description": "Key", @@ -21411,7 +20651,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-key.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21420,9 +20660,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21494,7 +20731,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls. ", "responses": { "204": { "description": "No content" @@ -21507,7 +20744,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete-key.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21516,9 +20753,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21559,7 +20793,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable\/disable providers. ", "responses": { "200": { "description": "Project", @@ -21579,7 +20813,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-o-auth2.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-oauth2.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21588,9 +20822,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21698,7 +20929,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations. ", "responses": { "200": { "description": "Platforms List", @@ -21718,7 +20949,7 @@ "type": "", "deprecated": false, "demo": "projects\/list-platforms.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-platforms.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21727,9 +20958,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21758,7 +20986,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Create a new platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.", "responses": { "201": { "description": "Platform", @@ -21778,7 +21006,7 @@ "type": "", "deprecated": false, "demo": "projects\/create-platform.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21787,9 +21015,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21879,7 +21104,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations. ", "responses": { "200": { "description": "Platform", @@ -21899,7 +21124,7 @@ "type": "", "deprecated": false, "demo": "projects\/get-platform.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21908,9 +21133,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21949,7 +21171,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a platform by its unique ID. Use this endpoint to update the platform's name, key, platform store ID, or hostname. ", "responses": { "200": { "description": "Platform", @@ -21969,7 +21191,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-platform.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21978,9 +21200,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22053,7 +21272,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project. ", "responses": { "204": { "description": "No content" @@ -22066,7 +21285,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete-platform.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22075,9 +21294,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22118,7 +21334,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the status of a specific service. Use this endpoint to enable or disable a service in your project. ", "responses": { "200": { "description": "Project", @@ -22138,7 +21354,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-service-status.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-service-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22147,9 +21363,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22220,7 +21433,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the status of all services. Use this endpoint to enable or disable all optional services at once. ", "responses": { "200": { "description": "Project", @@ -22240,7 +21453,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-service-status-all.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-service-status-all.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22249,9 +21462,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22301,7 +21511,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails. ", "responses": { "200": { "description": "Project", @@ -22321,7 +21531,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-smtp.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-smtp.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22330,9 +21540,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22428,7 +21635,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Send a test email to verify SMTP configuration. ", "responses": { "204": { "description": "No content" @@ -22441,7 +21648,7 @@ "type": "", "deprecated": false, "demo": "projects\/create-smtp-test.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-smtp-test.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22450,9 +21657,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22554,7 +21758,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the team ID of a project allowing for it to be transferred to another team.", "responses": { "200": { "description": "Project", @@ -22574,7 +21778,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-team.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-team.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22583,9 +21787,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22635,7 +21836,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details. ", "responses": { "200": { "description": "EmailTemplate", @@ -22655,7 +21856,7 @@ "type": "", "deprecated": false, "demo": "projects\/get-email-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-email-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22664,9 +21865,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22861,14 +22059,14 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.", "responses": { "200": { - "description": "Project", + "description": "EmailTemplate", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/emailTemplate" } } } @@ -22881,7 +22079,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-email-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-email-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22890,9 +22088,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -23127,7 +22322,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Reset a custom email template to its default value. This endpoint removes any custom content and restores the template to its original state. ", "responses": { "200": { "description": "EmailTemplate", @@ -23147,7 +22342,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete-email-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-email-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23156,9 +22351,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -23355,7 +22547,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a custom SMS template for the specified locale and type returning it's contents.", "responses": { "200": { "description": "SmsTemplate", @@ -23375,7 +22567,7 @@ "type": "", "deprecated": false, "demo": "projects\/get-sms-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-sms-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23384,9 +22576,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -23578,7 +22767,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. ", "responses": { "200": { "description": "SmsTemplate", @@ -23598,7 +22787,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-sms-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-sms-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23607,9 +22796,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -23820,7 +23006,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. ", "responses": { "200": { "description": "SmsTemplate", @@ -23840,7 +23026,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete-sms-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-sms-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23849,9 +23035,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24045,7 +23228,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a list of all webhooks belonging to the project. You can use the query params to filter your results. ", "responses": { "200": { "description": "Webhooks List", @@ -24065,7 +23248,7 @@ "type": "", "deprecated": false, "demo": "projects\/list-webhooks.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-webhooks.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -24074,9 +23257,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24105,7 +23285,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur. ", "responses": { "201": { "description": "Webhook", @@ -24125,7 +23305,7 @@ "type": "", "deprecated": false, "demo": "projects\/create-webhook.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-webhook.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -24134,9 +23314,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24222,7 +23399,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. ", "responses": { "200": { "description": "Webhook", @@ -24242,7 +23419,7 @@ "type": "", "deprecated": false, "demo": "projects\/get-webhook.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-webhook.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -24251,9 +23428,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24292,7 +23466,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook. ", "responses": { "200": { "description": "Webhook", @@ -24312,7 +23486,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-webhook.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-webhook.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -24321,9 +23495,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24417,7 +23588,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. ", "responses": { "204": { "description": "No content" @@ -24430,7 +23601,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete-webhook.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-webhook.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -24439,9 +23610,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24482,7 +23650,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook. ", "responses": { "200": { "description": "Webhook", @@ -24502,7 +23670,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-webhook-signature.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-webhook-signature.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -24511,9 +23679,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24583,9 +23748,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24657,9 +23819,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24743,9 +23902,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24796,9 +23952,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24829,7 +23982,7 @@ "tags": [ "proxy" ], - "description": "", + "description": "Retry getting verification process of a proxy rule. This endpoint triggers domain verification by checking DNS records (CNAME) against the configured target domain. If verification is successful, a TLS certificate will be automatically provisioned for the domain.", "responses": { "200": { "description": "Rule", @@ -24849,7 +24002,7 @@ "type": "", "deprecated": false, "demo": "proxy\/update-rule-verification.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/update-rule-verification.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -24858,9 +24011,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24920,9 +24070,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24995,9 +24142,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25124,9 +24268,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25185,9 +24326,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25311,9 +24449,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25376,9 +24511,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25464,9 +24596,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25564,9 +24693,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25638,9 +24764,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25729,9 +24852,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25798,9 +24918,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25867,9 +24984,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26043,6 +25157,7 @@ "gif", "png", "webp", + "heic", "avif" ], "x-enum-name": "ImageFormat", @@ -26085,9 +25200,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26130,7 +25242,7 @@ "tags": [ "storage" ], - "description": "", + "description": "Get usage metrics and statistics for all buckets in the project. You can view the total number of buckets, files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.\n", "responses": { "200": { "description": "StorageUsage", @@ -26150,7 +25262,7 @@ "type": "", "deprecated": false, "demo": "storage\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -26159,9 +25271,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26204,7 +25313,7 @@ "tags": [ "storage" ], - "description": "", + "description": "Get usage metrics and statistics a specific bucket in the project. You can view the total number of files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.\n", "responses": { "200": { "description": "UsageBuckets", @@ -26224,7 +25333,7 @@ "type": "", "deprecated": false, "demo": "storage\/get-bucket-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -26233,9 +25342,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26319,9 +25425,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26397,9 +25500,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26484,9 +25584,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26548,9 +25645,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26624,9 +25718,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26688,9 +25779,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26765,9 +25853,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26853,9 +25938,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26966,9 +26048,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "{membershipId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27040,9 +26119,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27129,9 +26205,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27204,9 +26277,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27303,9 +26373,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27365,9 +26432,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27447,9 +26511,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27522,9 +26583,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27612,9 +26670,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27699,9 +26754,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27786,9 +26838,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27856,9 +26905,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27919,9 +26965,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28006,9 +27049,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28093,9 +27133,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28210,9 +27247,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28315,9 +27349,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28393,7 +27424,7 @@ "tags": [ "users" ], - "description": "", + "description": "Get usage metrics and statistics for all users in the project. You can view the total number of users and sessions. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.\n", "responses": { "200": { "description": "UsageUsers", @@ -28413,7 +27444,7 @@ "type": "", "deprecated": false, "demo": "users\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -28422,9 +27453,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28496,9 +27524,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28550,9 +27575,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28613,9 +27635,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28695,9 +27714,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28779,9 +27795,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28864,9 +27877,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28940,9 +27950,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29003,9 +28010,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29058,15 +28062,8 @@ ], "description": "Delete an authenticator app.", "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } + "204": { + "description": "No content" } }, "x-appwrite": { @@ -29085,9 +28082,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29163,9 +28157,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29226,9 +28217,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29287,9 +28275,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29348,9 +28333,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29411,9 +28393,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29493,9 +28472,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29575,9 +28551,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29657,9 +28630,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29718,9 +28688,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29800,9 +28767,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29861,9 +28825,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29915,9 +28876,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29971,9 +28929,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30044,9 +28999,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30127,9 +29079,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30202,9 +29151,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30314,9 +29260,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30386,9 +29329,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30477,9 +29417,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30550,9 +29487,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30634,9 +29568,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30716,9 +29647,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30769,7 +29697,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Get a list of GitHub repositories available through your installation. This endpoint returns repositories with their basic information, detected runtime environments, and latest push dates. You can optionally filter repositories using a search term. Each repository's runtime is automatically detected based on its contents and language statistics. The GitHub installation must be properly configured for this endpoint to work.", "responses": { "200": { "description": "Provider Repositories List", @@ -30789,7 +29717,7 @@ "type": "", "deprecated": false, "demo": "vcs\/list-repositories.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repositories.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -30798,9 +29726,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30840,7 +29765,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Create a new GitHub repository through your installation. This endpoint allows you to create either a public or private repository by specifying a name and visibility setting. The repository will be created under your GitHub user account or organization, depending on your installation type. The GitHub installation must be properly configured and have the necessary permissions for repository creation.", "responses": { "200": { "description": "ProviderRepository", @@ -30860,7 +29785,7 @@ "type": "", "deprecated": false, "demo": "vcs\/create-repository.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -30869,9 +29794,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30927,7 +29849,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Get detailed information about a specific GitHub repository from your installation. This endpoint returns repository details including its ID, name, visibility status, organization, and latest push date. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.", "responses": { "200": { "description": "ProviderRepository", @@ -30947,7 +29869,7 @@ "type": "", "deprecated": false, "demo": "vcs\/get-repository.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -30956,9 +29878,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30999,7 +29918,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Get a list of all branches from a GitHub repository in your installation. This endpoint returns the names of all branches in the repository and their total count. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.\n", "responses": { "200": { "description": "Branches List", @@ -31019,7 +29938,7 @@ "type": "", "deprecated": false, "demo": "vcs\/list-repository-branches.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repository-branches.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -31028,9 +29947,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31071,7 +29987,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.\n", "responses": { "200": { "description": "VCS Content List", @@ -31091,7 +30007,7 @@ "type": "", "deprecated": false, "demo": "vcs\/get-repository-contents.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository-contents.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -31100,9 +30016,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31154,7 +30067,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Analyze a GitHub repository to automatically detect the programming language and runtime environment. This endpoint scans the repository's files and language statistics to determine the appropriate runtime settings for your function. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", "responses": { "200": { "description": "Detection", @@ -31174,7 +30087,7 @@ "type": "", "deprecated": false, "demo": "vcs\/create-repository-detection.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository-detection.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -31183,9 +30096,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31242,7 +30152,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Authorize and create deployments for a GitHub pull request in your project. This endpoint allows external contributions by creating deployments from pull requests, enabling preview environments for code review. The pull request must be open and not previously authorized. The GitHub installation must be properly configured and have access to both the repository and pull request for this endpoint to work.", "responses": { "204": { "description": "No content" @@ -31255,7 +30165,7 @@ "type": "", "deprecated": false, "demo": "vcs\/update-external-deployments.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/update-external-deployments.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -31264,9 +30174,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31326,7 +30233,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "List all VCS installations configured for the current project. This endpoint returns a list of installations including their provider, organization, and other configuration details.\n", "responses": { "200": { "description": "Installations List", @@ -31355,9 +30262,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31402,7 +30306,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Get a VCS installation by its unique ID. This endpoint returns the installation's details including its provider, organization, and configuration. ", "responses": { "200": { "description": "Installation", @@ -31431,9 +30335,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31462,7 +30363,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Delete a VCS installation by its unique ID. This endpoint removes the installation and all its associated repositories from the project.", "responses": { "204": { "description": "No content" @@ -31484,9 +30385,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -36809,6 +35707,18 @@ "x-example": 0, "format": "int32" }, + "databasesReadsTotal": { + "type": "integer", + "description": "Total number of databases reads.", + "x-example": 0, + "format": "int32" + }, + "databasesWritesTotal": { + "type": "integer", + "description": "Total number of databases writes.", + "x-example": 0, + "format": "int32" + }, "databases": { "type": "array", "description": "Aggregated number of databases per period.", @@ -36840,6 +35750,22 @@ "$ref": "#\/components\/schemas\/metric" }, "x-example": [] + }, + "databasesReads": { + "type": "array", + "description": "An array of aggregated number of database reads.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "databasesWrites": { + "type": "array", + "description": "An array of aggregated number of database writes.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] } }, "required": [ @@ -36848,10 +35774,14 @@ "collectionsTotal", "documentsTotal", "storageTotal", + "databasesReadsTotal", + "databasesWritesTotal", "databases", "collections", "documents", - "storage" + "storage", + "databasesReads", + "databasesWrites" ] }, "usageDatabase": { @@ -36881,6 +35811,18 @@ "x-example": 0, "format": "int32" }, + "databaseReadsTotal": { + "type": "integer", + "description": "Total number of databases reads.", + "x-example": 0, + "format": "int32" + }, + "databaseWritesTotal": { + "type": "integer", + "description": "Total number of databases writes.", + "x-example": 0, + "format": "int32" + }, "collections": { "type": "array", "description": "Aggregated number of collections per period.", @@ -36904,6 +35846,22 @@ "$ref": "#\/components\/schemas\/metric" }, "x-example": [] + }, + "databaseReads": { + "type": "array", + "description": "An array of aggregated number of database reads.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "databaseWrites": { + "type": "array", + "description": "An array of aggregated number of database writes.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] } }, "required": [ @@ -36911,9 +35869,13 @@ "collectionsTotal", "documentsTotal", "storageTotal", + "databaseReadsTotal", + "databaseWritesTotal", "collections", "documents", - "storage" + "storage", + "databaseReads", + "databaseWrites" ] }, "usageCollection": { @@ -37508,6 +36470,18 @@ "x-example": 0, "format": "int32" }, + "databasesReadsTotal": { + "type": "integer", + "description": "Total number of databases reads.", + "x-example": 0, + "format": "int32" + }, + "databasesWritesTotal": { + "type": "integer", + "description": "Total number of databases writes.", + "x-example": 0, + "format": "int32" + }, "requests": { "type": "array", "description": "Aggregated number of requests per period.", @@ -37607,6 +36581,22 @@ "$ref": "#\/components\/schemas\/metricBreakdown" }, "x-example": [] + }, + "databasesReads": { + "type": "array", + "description": "An array of aggregated number of database reads.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "databasesWrites": { + "type": "array", + "description": "An array of aggregated number of database writes.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] } }, "required": [ @@ -37622,6 +36612,8 @@ "bucketsTotal", "executionsMbSecondsTotal", "buildsMbSecondsTotal", + "databasesReadsTotal", + "databasesWritesTotal", "requests", "network", "users", @@ -37634,7 +36626,9 @@ "functionsStorageBreakdown", "authPhoneTotal", "authPhoneEstimate", - "authPhoneCountryBreakdown" + "authPhoneCountryBreakdown", + "databasesReads", + "databasesWrites" ] }, "headers": { diff --git a/app/config/specs/open-api3-1.6.x-server.json b/app/config/specs/open-api3-1.6.x-server.json index a0b39655ff..68d408762a 100644 --- a/app/config/specs/open-api3-1.6.x-server.json +++ b/app/config/specs/open-api3-1.6.x-server.json @@ -58,9 +58,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -110,9 +107,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -197,9 +191,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -276,9 +267,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/identities", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -338,9 +326,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -404,9 +389,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -455,9 +437,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -524,9 +503,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -597,9 +573,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -666,9 +639,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -747,9 +717,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -818,9 +785,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -866,10 +830,10 @@ ], "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", "responses": { - "204": { - "description": "No content", + "200": { + "description": "Session", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/session" } @@ -894,9 +858,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -973,9 +934,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1027,9 +985,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1079,9 +1034,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1131,9 +1083,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1185,9 +1134,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1258,9 +1204,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1336,9 +1279,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1415,9 +1355,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1467,9 +1404,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1543,9 +1477,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1620,9 +1551,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1705,9 +1633,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1750,9 +1675,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1804,9 +1726,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1855,9 +1774,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1931,9 +1847,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2007,9 +1920,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2083,9 +1993,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2159,9 +2066,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "{sessionId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -2223,9 +2127,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -2280,9 +2181,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -2346,9 +2244,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -2400,9 +2295,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2484,9 +2376,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2563,9 +2452,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2709,9 +2595,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2785,9 +2668,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -2856,9 +2736,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -2938,9 +2815,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -2990,9 +2864,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3063,9 +2934,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3193,9 +3061,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3327,9 +3192,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3389,9 +3251,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3881,9 +3740,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3967,9 +3823,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -4063,9 +3916,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -4164,9 +4014,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4240,9 +4087,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4322,9 +4166,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4384,9 +4225,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4463,9 +4301,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4527,9 +4362,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4613,9 +4445,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4720,9 +4549,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4792,9 +4618,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4894,9 +4717,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4968,9 +4788,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5055,9 +4872,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5140,7 +4954,7 @@ "200": { "description": "AttributeBoolean", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeBoolean" } @@ -5164,9 +4978,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5278,9 +5089,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5363,7 +5171,7 @@ "200": { "description": "AttributeDatetime", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeDatetime" } @@ -5387,9 +5195,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5501,9 +5306,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5586,7 +5388,7 @@ "200": { "description": "AttributeEmail", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeEmail" } @@ -5610,9 +5412,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5724,9 +5523,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5818,7 +5614,7 @@ "200": { "description": "AttributeEnum", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeEnum" } @@ -5842,9 +5638,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5965,9 +5758,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6060,7 +5850,7 @@ "200": { "description": "AttributeFloat", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeFloat" } @@ -6084,9 +5874,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6210,9 +5997,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6305,7 +6089,7 @@ "200": { "description": "AttributeInteger", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeInteger" } @@ -6329,9 +6113,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6455,9 +6236,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6540,7 +6318,7 @@ "200": { "description": "AttributeIP", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeIp" } @@ -6564,9 +6342,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6678,9 +6453,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6812,9 +6584,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6908,7 +6677,7 @@ "200": { "description": "AttributeString", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeString" } @@ -6932,9 +6701,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7051,9 +6817,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7136,7 +6899,7 @@ "200": { "description": "AttributeURL", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeUrl" } @@ -7160,9 +6923,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7305,9 +7065,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7379,9 +7136,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7438,7 +7192,7 @@ "200": { "description": "AttributeRelationship", "content": { - "": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/attributeRelationship" } @@ -7462,9 +7216,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7575,9 +7326,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -7664,9 +7412,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -7775,9 +7520,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -7874,9 +7616,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -7977,9 +7716,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -8063,9 +7799,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8148,9 +7881,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8271,9 +8001,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8345,9 +8072,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8428,9 +8152,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8504,9 +8225,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8754,9 +8472,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8807,9 +8522,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8859,9 +8571,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8921,9 +8630,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9148,9 +8854,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9212,9 +8915,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9298,9 +8998,6 @@ "server" ], "packaging": true, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9397,9 +9094,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9469,9 +9163,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9534,9 +9225,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9579,7 +9267,7 @@ "tags": [ "functions" ], - "description": "", + "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "responses": { "204": { "description": "No content" @@ -9592,7 +9280,7 @@ "type": "", "deprecated": false, "demo": "functions\/create-build.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-build.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9601,9 +9289,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9660,7 +9345,7 @@ "tags": [ "functions" ], - "description": "", + "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "responses": { "200": { "description": "Build", @@ -9680,7 +9365,7 @@ "type": "", "deprecated": false, "demo": "functions\/update-deployment-build.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-deployment-build.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9689,9 +9374,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9757,9 +9439,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9834,9 +9513,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -9924,9 +9600,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -10043,9 +9716,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -10110,9 +9780,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10184,9 +9851,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10246,9 +9910,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10335,9 +9996,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10407,9 +10065,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10496,9 +10151,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10572,9 +10224,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10628,9 +10277,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10682,9 +10328,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10734,9 +10377,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10786,9 +10426,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10838,9 +10475,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10901,9 +10535,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10953,9 +10584,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11005,9 +10633,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11057,9 +10682,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11122,9 +10744,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11187,9 +10806,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11263,9 +10879,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11328,9 +10941,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11419,9 +11029,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11484,9 +11091,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11549,9 +11153,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11614,9 +11215,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11679,9 +11277,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11744,9 +11339,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11809,9 +11401,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11874,9 +11463,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11939,9 +11525,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11991,9 +11574,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12043,9 +11623,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12097,9 +11674,6 @@ "server" ], "packaging": false, - "offline-model": "\/localed", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -12153,9 +11727,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/localeCode", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -12209,9 +11780,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/continents", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [], "Session": [] @@ -12265,9 +11833,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [], "Session": [] @@ -12321,9 +11886,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/eu", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [], "Session": [] @@ -12377,9 +11939,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/phones", - "offline-key": "", - "offline-response-key": "countryCode", "auth": { "Project": [], "Session": [] @@ -12433,9 +11992,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/currencies", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [], "Session": [] @@ -12489,9 +12045,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/languages", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [], "Session": [] @@ -12544,9 +12097,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12623,9 +12173,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12770,9 +12317,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12919,9 +12463,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13096,9 +12637,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13277,9 +12815,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13359,7 +12894,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", @@ -13379,7 +12914,7 @@ "type": "", "deprecated": false, "demo": "messaging\/update-sms.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13389,9 +12924,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13504,9 +13036,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13560,9 +13089,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13625,9 +13151,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13703,9 +13226,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13781,9 +13301,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13860,9 +13377,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13968,9 +13482,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14079,9 +13590,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14167,9 +13675,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14258,9 +13763,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14376,9 +13878,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14497,9 +13996,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14595,9 +14091,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14696,9 +14189,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14804,9 +14294,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14915,9 +14402,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15061,9 +14545,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15209,9 +14690,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15307,9 +14785,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15408,9 +14883,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15506,9 +14978,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15607,9 +15076,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15705,9 +15171,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15806,9 +15269,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15904,9 +15364,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16005,9 +15462,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16061,9 +15515,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16126,9 +15577,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16204,9 +15652,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16282,9 +15727,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16359,9 +15801,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16445,9 +15884,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16508,9 +15944,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16588,9 +16021,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16653,9 +16083,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16731,9 +16158,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16820,9 +16244,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "JWT": [] @@ -16912,9 +16333,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16980,9 +16398,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "JWT": [] @@ -17056,9 +16471,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17132,9 +16544,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17262,9 +16671,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17324,9 +16730,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17451,9 +16854,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17517,9 +16917,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -17607,9 +17004,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -17709,9 +17103,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -17785,9 +17176,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -17878,9 +17266,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -17949,9 +17334,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18020,9 +17402,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18198,6 +17577,7 @@ "gif", "png", "webp", + "heic", "avif" ], "x-enum-name": "ImageFormat", @@ -18240,9 +17620,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18318,9 +17695,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18398,9 +17772,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18487,9 +17858,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18553,9 +17921,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18631,9 +17996,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18699,9 +18061,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18789,9 +18148,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18904,9 +18260,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "{membershipId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18980,9 +18333,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19071,9 +18421,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19148,9 +18495,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19249,9 +18593,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19313,9 +18654,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19397,9 +18735,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -19473,9 +18808,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -19564,9 +18896,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -19652,9 +18981,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -19740,9 +19066,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -19811,9 +19134,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -19875,9 +19195,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -19963,9 +19280,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20051,9 +19365,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20169,9 +19480,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20275,9 +19583,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20383,9 +19688,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20438,9 +19740,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20502,9 +19801,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20585,9 +19881,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20670,9 +19963,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20756,9 +20046,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20833,9 +20120,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20897,9 +20181,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20953,15 +20234,8 @@ ], "description": "Delete an authenticator app.", "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } + "204": { + "description": "No content" } }, "x-appwrite": { @@ -20980,9 +20254,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21059,9 +20330,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21123,9 +20391,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21185,9 +20450,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21247,9 +20509,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21311,9 +20570,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21394,9 +20650,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21477,9 +20730,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21560,9 +20810,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21622,9 +20869,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21705,9 +20949,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21767,9 +21008,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21822,9 +21060,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21879,9 +21114,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21953,9 +21185,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22037,9 +21266,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22113,9 +21339,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22226,9 +21449,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22299,9 +21519,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22391,9 +21608,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22465,9 +21679,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22550,9 +21761,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22633,9 +21841,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 99ac2bf5ec..7f57dfc437 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -13976,7 +13976,7 @@ "tags": [ "messaging" ], - "description": "Update an SMS message by its unique ID.\n", + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 8e7785a654..68d408762a 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -1,24609 +1,26401 @@ { - "openapi": "3.0.0", - "info": { - "version": "1.6.1", - "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://cloud.appwrite.io/v1" - } - ], - "paths": { - "/account": { - "get": { - "summary": "Get account", - "operationId": "accountGet", - "tags": ["account"], - "description": "Get the currently logged in user.", - "responses": { - "200": { - "description": "User", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user" - } - } - } - } + "openapi": "3.0.0", + "info": { + "version": "1.6.1", + "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" }, - "x-appwrite": { - "method": "get", - "weight": 9, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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](https://appwrite.io/docs/references/cloud/client-web/account#createVerification) 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](https://appwrite.io/docs/references/cloud/client-web/account#createEmailSession).", - "responses": { - "201": { - "description": "User", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user" - } - } - } - } - }, - "x-appwrite": { - "method": "create", - "weight": 8, - "cookies": false, - "type": "", - "deprecated": false, - "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": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com" - }, - "password": { - "type": "string", - "description": "New user password. Must be between 8 and 256 chars.", - "x-example": null - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "" - } - }, - "required": ["userId", "email", "password"] - } - } - } + "license": { + "name": "BSD-3-Clause", + "url": "https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE" } - } }, - "/account/email": { - "patch": { - "summary": "Update 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": 34, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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"] - } - } - } + "servers": [ + { + "url": "https:\/\/cloud.appwrite.io\/v1" } - } - }, - "/account/identities": { - "get": { - "summary": "List identities", - "operationId": "accountListIdentities", - "tags": ["account"], - "description": "Get the list of identities for the currently logged in user.", - "responses": { - "200": { - "description": "Identities List", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/identityList" - } - } - } - } - }, - "x-appwrite": { - "method": "listIdentities", - "weight": 57, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/list-identities.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/list-identities.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "/account/identities/{identityId}": { - "delete": { - "summary": "Delete identity", - "operationId": "accountDeleteIdentity", - "tags": ["account"], - "description": "Delete an identity by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteIdentity", - "weight": 58, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/delete-identity.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete-identity.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "identityId", - "description": "Identity ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, - "/account/jwts": { - "post": { - "summary": "Create 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": 29, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-j-w-t.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-jwt.md", - "rate-limit": 100, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ] - } - }, - "/account/logs": { - "get": { - "summary": "List logs", - "operationId": "accountListLogs", - "tags": ["account"], - "description": "Get the list of latest security activity logs for the currently logged in user. 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": "listLogs", - "weight": 31, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/list-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/list-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "/account/mfa": { - "patch": { - "summary": "Update MFA", - "operationId": "accountUpdateMFA", - "tags": ["account"], - "description": "Enable or disable MFA on an account.", - "responses": { - "200": { - "description": "User", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user" - } - } - } - } - }, - "x-appwrite": { - "method": "updateMFA", - "weight": 44, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-m-f-a.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-mfa.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "mfa": { - "type": "boolean", - "description": "Enable or disable MFA.", - "x-example": false - } - }, - "required": ["mfa"] - } - } - } - } - } - }, - "/account/mfa/authenticators/{type}": { - "post": { - "summary": "Create authenticator", - "operationId": "accountCreateMfaAuthenticator", - "tags": ["account"], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method.", - "responses": { - "200": { - "description": "MFAType", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/mfaType" - } - } - } - } - }, - "x-appwrite": { - "method": "createMfaAuthenticator", - "weight": 46, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-mfa-authenticator.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator. Must be `totp`", - "required": true, - "schema": { - "type": "string", - "x-example": "totp", - "enum": ["totp"], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [] - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Verify authenticator", - "operationId": "accountUpdateMfaAuthenticator", - "tags": ["account"], - "description": "Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.", - "responses": { - "200": { - "description": "User", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user" - } - } - } - } - }, - "x-appwrite": { - "method": "updateMfaAuthenticator", - "weight": 47, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-mfa-authenticator.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator.", - "required": true, - "schema": { - "type": "string", - "x-example": "totp", - "enum": ["totp"], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [] - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "otp": { - "type": "string", - "description": "Valid verification token.", - "x-example": "" - } - }, - "required": ["otp"] - } - } - } - } - }, - "delete": { - "summary": "Delete authenticator", - "operationId": "accountDeleteMfaAuthenticator", - "tags": ["account"], - "description": "Delete an authenticator for a user by ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteMfaAuthenticator", - "weight": 51, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/delete-mfa-authenticator.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator.", - "required": true, - "schema": { - "type": "string", - "x-example": "totp", - "enum": ["totp"], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [] - }, - "in": "path" - } - ] - } - }, - "/account/mfa/challenge": { - "post": { - "summary": "Create MFA challenge", - "operationId": "accountCreateMfaChallenge", - "tags": ["account"], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.", - "responses": { - "201": { - "description": "MFA Challenge", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/mfaChallenge" - } - } - } - } - }, - "x-appwrite": { - "method": "createMfaChallenge", - "weight": 52, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-mfa-challenge.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-mfa-challenge.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "factor": { - "type": "string", - "description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.", - "x-example": "email", - "enum": ["email", "phone", "totp", "recoverycode"], - "x-enum-name": "AuthenticationFactor", - "x-enum-keys": [] - } - }, - "required": ["factor"] - } - } - } - } - }, - "put": { - "summary": "Create MFA challenge (confirmation)", - "operationId": "accountUpdateMfaChallenge", - "tags": ["account"], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.", - "responses": { - "200": { - "description": "Session", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/session" - } - } - } - } - }, - "x-appwrite": { - "method": "updateMfaChallenge", - "weight": 53, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-mfa-challenge.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-mfa-challenge.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},challengeId:{param-challengeId}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "challengeId": { - "type": "string", - "description": "ID of the challenge.", - "x-example": "" - }, - "otp": { - "type": "string", - "description": "Valid verification token.", - "x-example": "" - } - }, - "required": ["challengeId", "otp"] - } - } - } - } - } - }, - "/account/mfa/factors": { - "get": { - "summary": "List factors", - "operationId": "accountListMfaFactors", - "tags": ["account"], - "description": "List the factors available on the account to be used as a MFA challange.", - "responses": { - "200": { - "description": "MFAFactors", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/mfaFactors" - } - } - } - } - }, - "x-appwrite": { - "method": "listMfaFactors", - "weight": 45, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/list-mfa-factors.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/list-mfa-factors.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "/account/mfa/recovery-codes": { - "get": { - "summary": "Get MFA recovery codes", - "operationId": "accountGetMfaRecoveryCodes", - "tags": ["account"], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/mfaRecoveryCodes" - } - } - } - } - }, - "x-appwrite": { - "method": "getMfaRecoveryCodes", - "weight": 50, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/get-mfa-recovery-codes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "post": { - "summary": "Create MFA recovery codes", - "operationId": "accountCreateMfaRecoveryCodes", - "tags": ["account"], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.", - "responses": { - "201": { - "description": "MFA Recovery Codes", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/mfaRecoveryCodes" - } - } - } - } - }, - "x-appwrite": { - "method": "createMfaRecoveryCodes", - "weight": 48, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-mfa-recovery-codes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "patch": { - "summary": "Regenerate MFA recovery codes", - "operationId": "accountUpdateMfaRecoveryCodes", - "tags": ["account"], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/mfaRecoveryCodes" - } - } - } - } - }, - "x-appwrite": { - "method": "updateMfaRecoveryCodes", - "weight": 49, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-mfa-recovery-codes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "/account/name": { - "patch": { - "summary": "Update 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": 32, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "" - } - }, - "required": ["name"] - } - } - } - } - } - }, - "/account/password": { - "patch": { - "summary": "Update 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": 33, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-password.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-password.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "password": { - "type": "string", - "description": "New user password. Must be at least 8 chars.", - "x-example": null - }, - "oldPassword": { - "type": "string", - "description": "Current user password. Must be at least 8 chars.", - "x-example": "password" - } - }, - "required": ["password"] - } - } - } - } - } - }, - "/account/phone": { - "patch": { - "summary": "Update phone", - "operationId": "accountUpdatePhone", - "tags": ["account"], - "description": "Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS.", - "responses": { - "200": { - "description": "User", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user" - } - } - } - } - }, - "x-appwrite": { - "method": "updatePhone", - "weight": 35, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-phone.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "x-example": "password" - } - }, - "required": ["phone", "password"] - } - } - } - } - } - }, - "/account/prefs": { - "get": { - "summary": "Get account preferences", - "operationId": "accountGetPrefs", - "tags": ["account"], - "description": "Get the preferences as a key-value object for the currently logged in user.", - "responses": { - "200": { - "description": "Preferences", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/preferences" - } - } - } - } - }, - "x-appwrite": { - "method": "getPrefs", - "weight": 30, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "patch": { - "summary": "Update 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": 36, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery) 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": 38, - "cookies": false, - "type": "", - "deprecated": false, - "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}", "url:{url},ip:{ip}"], - "scope": "sessions.write", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) 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": 39, - "cookies": false, - "type": "", - "deprecated": false, - "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": "sessions.write", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "" - }, - "secret": { - "type": "string", - "description": "Valid reset token.", - "x-example": "" - }, - "password": { - "type": "string", - "description": "New user password. Must be between 8 and 256 chars.", - "x-example": null - } - }, - "required": ["userId", "secret", "password"] - } - } - } - } - } - }, - "/account/sessions": { - "get": { - "summary": "List sessions", - "operationId": "accountListSessions", - "tags": ["account"], - "description": "Get the list of active sessions across different devices for the currently logged in user.", - "responses": { - "200": { - "description": "Sessions List", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/sessionList" - } - } - } - } - }, - "x-appwrite": { - "method": "listSessions", - "weight": 11, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/list-sessions.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/list-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "delete": { - "summary": "Delete 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": 12, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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](https://appwrite.io/docs/references/cloud/client-web/account#updateEmail) or create an [OAuth2 session](https://appwrite.io/docs/references/cloud/client-web/account#CreateOAuth2Session).", - "responses": { - "201": { - "description": "Session", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/session" - } - } - } - } - }, - "x-appwrite": { - "method": "createAnonymousSession", - "weight": 17, - "cookies": false, - "type": "", - "deprecated": false, - "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": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ] - } - }, - "/account/sessions/email": { - "post": { - "summary": "Create email password session", - "operationId": "accountCreateEmailPasswordSession", - "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.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).", - "responses": { - "201": { - "description": "Session", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/session" - } - } - } - } - }, - "x-appwrite": { - "method": "createEmailPasswordSession", - "weight": 16, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-email-password-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-session-email-password.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},email:{param-email}", - "scope": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "x-example": "password" - } - }, - "required": ["email", "password"] - } - } - } - } - } - }, - "/account/sessions/magic-url": { - "put": { - "summary": "Update magic URL session", - "operationId": "accountUpdateMagicURLSession", - "tags": ["account"], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/session" - } - } - } - } - }, - "x-appwrite": { - "method": "updateMagicURLSession", - "weight": 26, - "cookies": false, - "type": "", - "deprecated": true, - "demo": "account/update-magic-u-r-l-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "x-example": "" - } - }, - "required": ["userId", "secret"] - } - } - } - } - } - }, - "/account/sessions/phone": { - "put": { - "summary": "Update phone session", - "operationId": "accountUpdatePhoneSession", - "tags": ["account"], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/session" - } - } - } - } - }, - "x-appwrite": { - "method": "updatePhoneSession", - "weight": 27, - "cookies": false, - "type": "", - "deprecated": true, - "demo": "account/update-phone-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "x-example": "" - } - }, - "required": ["userId", "secret"] - } - } - } - } - } - }, - "/account/sessions/token": { - "post": { - "summary": "Create session", - "operationId": "accountCreateSession", - "tags": ["account"], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/session" - } - } - } - } - }, - "x-appwrite": { - "method": "createSession", - "weight": 18, - "cookies": false, - "type": "", - "deprecated": false, - "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": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "" - }, - "secret": { - "type": "string", - "description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.", - "x-example": "" - } - }, - "required": ["userId", "secret"] - } - } - } - } - } - }, - "/account/sessions/{sessionId}": { - "get": { - "summary": "Get session", - "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": 13, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to get the current device session.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update session", - "operationId": "accountUpdateSession", - "tags": ["account"], - "description": "Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.", - "responses": { - "200": { - "description": "Session", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/session" - } - } - } - } - }, - "x-appwrite": { - "method": "updateSession", - "weight": 15, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to update the current device session.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete session", - "operationId": "accountDeleteSession", - "tags": ["account"], - "description": "Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions) instead.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteSession", - "weight": 14, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to delete the current device session.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, - "/account/status": { - "patch": { - "summary": "Update 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": 37, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "/account/tokens/email": { - "post": { - "summary": "Create email token (OTP)", - "operationId": "accountCreateEmailToken", - "tags": ["account"], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).", - "responses": { - "201": { - "description": "Token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/token" - } - } - } - } - }, - "x-appwrite": { - "method": "createEmailToken", - "weight": 25, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-email-token.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-token-email.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},email:{param-email}", - "scope": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com" - }, - "phrase": { - "type": "boolean", - "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", - "x-example": false - } - }, - "required": ["userId", "email"] - } - } - } - } - } - }, - "/account/tokens/magic-url": { - "post": { - "summary": "Create magic URL token", - "operationId": "accountCreateMagicURLToken", - "tags": ["account"], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. 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 [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).\n", - "responses": { - "201": { - "description": "Token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/token" - } - } - } - } - }, - "x-appwrite": { - "method": "createMagicURLToken", - "weight": 24, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-magic-u-r-l-token.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-token-magic-url.md", - "rate-limit": 60, - "rate-time": 3600, - "rate-key": ["url:{url},email:{param-email}", "url:{url},ip:{ip}"], - "scope": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "" - }, - "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" - }, - "phrase": { - "type": "boolean", - "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", - "x-example": false - } - }, - "required": ["userId", "email"] - } - } - } - } - } - }, - "/account/tokens/oauth2/{provider}": { - "get": { - "summary": "Create OAuth2 token", - "operationId": "accountCreateOAuth2Token", - "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 authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).", - "responses": { - "301": { - "description": "File" - } - }, - "x-appwrite": { - "method": "createOAuth2Token", - "weight": 23, - "cookies": false, - "type": "webAuth", - "deprecated": false, - "demo": "account/create-o-auth2token.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-token-oauth2.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", - "required": true, - "schema": { - "type": "string", - "x-example": "amazon", - "enum": [ - "amazon", - "apple", - "auth0", - "authentik", - "autodesk", - "bitbucket", - "bitly", - "box", - "dailymotion", - "discord", - "disqus", - "dropbox", - "etsy", - "facebook", - "github", - "gitlab", - "google", - "linkedin", - "microsoft", - "notion", - "oidc", - "okta", - "paypal", - "paypalSandbox", - "podio", - "salesforce", - "slack", - "spotify", - "stripe", - "tradeshift", - "tradeshiftBox", - "twitch", - "wordpress", - "yahoo", - "yammer", - "yandex", - "zoho", - "zoom", - "mock" - ], - "x-enum-name": "OAuthProvider", - "x-enum-keys": [] - }, - "in": "path" - }, - { - "name": "success", - "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's 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's 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 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "/account/tokens/phone": { - "post": { - "summary": "Create phone token", - "operationId": "accountCreatePhoneToken", - "tags": ["account"], - "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).", - "responses": { - "201": { - "description": "Token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/token" - } - } - } - } - }, - "x-appwrite": { - "method": "createPhoneToken", - "weight": 28, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-phone-token.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-token-phone.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": ["url:{url},phone:{param-phone}", "url:{url},ip:{ip}"], - "scope": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "" - }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100" - } - }, - "required": ["userId", "phone"] - } - } - } - } - } - }, - "/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](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). 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": 40, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-email-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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": 41, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-email-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "public", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "x-example": "" - } - }, - "required": ["userId", "secret"] - } - } - } - } - } - }, - "/account/verification/phone": { - "post": { - "summary": "Create phone verification", - "operationId": "accountCreatePhoneVerification", - "tags": ["account"], - "description": "Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.", - "responses": { - "201": { - "description": "Token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/token" - } - } - } - } - }, - "x-appwrite": { - "method": "createPhoneVerification", - "weight": 42, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-phone-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-phone-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": ["url:{url},userId:{userId}", "url:{url},ip:{ip}"], - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "put": { - "summary": "Update phone verification (confirmation)", - "operationId": "accountUpdatePhoneVerification", - "tags": ["account"], - "description": "Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.", - "responses": { - "200": { - "description": "Token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/token" - } - } - } - } - }, - "x-appwrite": { - "method": "updatePhoneVerification", - "weight": 43, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-phone-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-phone-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "userId:{param-userId}", - "scope": "public", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "x-example": "" - } - }, - "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](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) 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": 60, - "cookies": false, - "type": "location", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Browser Code.", - "required": true, - "schema": { - "type": "string", - "x-example": "aa", - "enum": [ - "aa", - "an", - "ch", - "ci", - "cm", - "cr", - "ff", - "sf", - "mf", - "ps", - "oi", - "om", - "op", - "on" - ], - "x-enum-name": "Browser", - "x-enum-keys": [ - "Avant Browser", - "Android WebView Beta", - "Google Chrome", - "Google Chrome (iOS)", - "Google Chrome (Mobile)", - "Chromium", - "Mozilla Firefox", - "Safari", - "Mobile Safari", - "Microsoft Edge", - "Microsoft Edge (iOS)", - "Opera Mini", - "Opera", - "Opera (Next)" - ] - }, - "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": 59, - "cookies": false, - "type": "location", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.", - "required": true, - "schema": { - "type": "string", - "x-example": "amex", - "enum": [ - "amex", - "argencard", - "cabal", - "cencosud", - "diners", - "discover", - "elo", - "hipercard", - "jcb", - "mastercard", - "naranja", - "targeta-shopping", - "union-china-pay", - "visa", - "mir", - "maestro" - ], - "x-enum-name": "CreditCard", - "x-enum-keys": [ - "American Express", - "Argencard", - "Cabal", - "Cencosud", - "Diners Club", - "Discover", - "Elo", - "Hipercard", - "JCB", - "Mastercard", - "Naranja", - "Tarjeta Shopping", - "Union China Pay", - "Visa", - "MIR", - "Maestro" - ] - }, - "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\nThis endpoint does not follow HTTP redirects.", - "responses": { - "200": { - "description": "Image" - } - }, - "x-appwrite": { - "method": "getFavicon", - "weight": 63, - "cookies": false, - "type": "location", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.\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": 61, - "cookies": false, - "type": "location", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Country Code. ISO Alpha-2 country code format.", - "required": true, - "schema": { - "type": "string", - "x-example": "af", - "enum": [ - "af", - "ao", - "al", - "ad", - "ae", - "ar", - "am", - "ag", - "au", - "at", - "az", - "bi", - "be", - "bj", - "bf", - "bd", - "bg", - "bh", - "bs", - "ba", - "by", - "bz", - "bo", - "br", - "bb", - "bn", - "bt", - "bw", - "cf", - "ca", - "ch", - "cl", - "cn", - "ci", - "cm", - "cd", - "cg", - "co", - "km", - "cv", - "cr", - "cu", - "cy", - "cz", - "de", - "dj", - "dm", - "dk", - "do", - "dz", - "ec", - "eg", - "er", - "es", - "ee", - "et", - "fi", - "fj", - "fr", - "fm", - "ga", - "gb", - "ge", - "gh", - "gn", - "gm", - "gw", - "gq", - "gr", - "gd", - "gt", - "gy", - "hn", - "hr", - "ht", - "hu", - "id", - "in", - "ie", - "ir", - "iq", - "is", - "il", - "it", - "jm", - "jo", - "jp", - "kz", - "ke", - "kg", - "kh", - "ki", - "kn", - "kr", - "kw", - "la", - "lb", - "lr", - "ly", - "lc", - "li", - "lk", - "ls", - "lt", - "lu", - "lv", - "ma", - "mc", - "md", - "mg", - "mv", - "mx", - "mh", - "mk", - "ml", - "mt", - "mm", - "me", - "mn", - "mz", - "mr", - "mu", - "mw", - "my", - "na", - "ne", - "ng", - "ni", - "nl", - "no", - "np", - "nr", - "nz", - "om", - "pk", - "pa", - "pe", - "ph", - "pw", - "pg", - "pl", - "pf", - "kp", - "pt", - "py", - "qa", - "ro", - "ru", - "rw", - "sa", - "sd", - "sn", - "sg", - "sb", - "sl", - "sv", - "sm", - "so", - "rs", - "ss", - "st", - "sr", - "sk", - "si", - "se", - "sz", - "sc", - "sy", - "td", - "tg", - "th", - "tj", - "tm", - "tl", - "to", - "tt", - "tn", - "tr", - "tv", - "tz", - "ug", - "ua", - "uy", - "us", - "uz", - "va", - "vc", - "ve", - "vn", - "vu", - "ws", - "ye", - "za", - "zm", - "zw" - ], - "x-enum-name": "Flag", - "x-enum-keys": [ - "Afghanistan", - "Angola", - "Albania", - "Andorra", - "United Arab Emirates", - "Argentina", - "Armenia", - "Antigua and Barbuda", - "Australia", - "Austria", - "Azerbaijan", - "Burundi", - "Belgium", - "Benin", - "Burkina Faso", - "Bangladesh", - "Bulgaria", - "Bahrain", - "Bahamas", - "Bosnia and Herzegovina", - "Belarus", - "Belize", - "Bolivia", - "Brazil", - "Barbados", - "Brunei Darussalam", - "Bhutan", - "Botswana", - "Central African Republic", - "Canada", - "Switzerland", - "Chile", - "China", - "C\u00f4te d'Ivoire", - "Cameroon", - "Democratic Republic of the Congo", - "Republic of the Congo", - "Colombia", - "Comoros", - "Cape Verde", - "Costa Rica", - "Cuba", - "Cyprus", - "Czech Republic", - "Germany", - "Djibouti", - "Dominica", - "Denmark", - "Dominican Republic", - "Algeria", - "Ecuador", - "Egypt", - "Eritrea", - "Spain", - "Estonia", - "Ethiopia", - "Finland", - "Fiji", - "France", - "Micronesia (Federated States of)", - "Gabon", - "United Kingdom", - "Georgia", - "Ghana", - "Guinea", - "Gambia", - "Guinea-Bissau", - "Equatorial Guinea", - "Greece", - "Grenada", - "Guatemala", - "Guyana", - "Honduras", - "Croatia", - "Haiti", - "Hungary", - "Indonesia", - "India", - "Ireland", - "Iran (Islamic Republic of)", - "Iraq", - "Iceland", - "Israel", - "Italy", - "Jamaica", - "Jordan", - "Japan", - "Kazakhstan", - "Kenya", - "Kyrgyzstan", - "Cambodia", - "Kiribati", - "Saint Kitts and Nevis", - "South Korea", - "Kuwait", - "Lao People's Democratic Republic", - "Lebanon", - "Liberia", - "Libya", - "Saint Lucia", - "Liechtenstein", - "Sri Lanka", - "Lesotho", - "Lithuania", - "Luxembourg", - "Latvia", - "Morocco", - "Monaco", - "Moldova", - "Madagascar", - "Maldives", - "Mexico", - "Marshall Islands", - "North Macedonia", - "Mali", - "Malta", - "Myanmar", - "Montenegro", - "Mongolia", - "Mozambique", - "Mauritania", - "Mauritius", - "Malawi", - "Malaysia", - "Namibia", - "Niger", - "Nigeria", - "Nicaragua", - "Netherlands", - "Norway", - "Nepal", - "Nauru", - "New Zealand", - "Oman", - "Pakistan", - "Panama", - "Peru", - "Philippines", - "Palau", - "Papua New Guinea", - "Poland", - "French Polynesia", - "North Korea", - "Portugal", - "Paraguay", - "Qatar", - "Romania", - "Russia", - "Rwanda", - "Saudi Arabia", - "Sudan", - "Senegal", - "Singapore", - "Solomon Islands", - "Sierra Leone", - "El Salvador", - "San Marino", - "Somalia", - "Serbia", - "South Sudan", - "Sao Tome and Principe", - "Suriname", - "Slovakia", - "Slovenia", - "Sweden", - "Eswatini", - "Seychelles", - "Syria", - "Chad", - "Togo", - "Thailand", - "Tajikistan", - "Turkmenistan", - "Timor-Leste", - "Tonga", - "Trinidad and Tobago", - "Tunisia", - "Turkey", - "Tuvalu", - "Tanzania", - "Uganda", - "Ukraine", - "Uruguay", - "United States", - "Uzbekistan", - "Vatican City", - "Saint Vincent and the Grenadines", - "Venezuela", - "Vietnam", - "Vanuatu", - "Samoa", - "Yemen", - "South Africa", - "Zambia", - "Zimbabwe" - ] - }, - "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\nThis endpoint does not follow HTTP redirects.", - "responses": { - "200": { - "description": "Image" - } - }, - "x-appwrite": { - "method": "getImage", - "weight": 62, - "cookies": false, - "type": "location", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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": 65, - "cookies": false, - "type": "location", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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": "", - "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": "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": 64, - "cookies": false, - "type": "location", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "text", - "description": "Plain text to be converted to QR code image.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "query" - }, - { - "name": "size", - "description": "QR code size. Pass an integer between 1 to 1000. Defaults to 400.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 400 - }, - "in": "query" - }, - { - "name": "margin", - "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 1 - }, - "in": "query" - }, - { - "name": "download", - "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": false - }, - "in": "query" - } - ] - } - }, - "/databases": { - "get": { - "summary": "List databases", - "operationId": "databasesList", - "tags": ["databases"], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Databases List", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/databaseList" - } - } - } - } - }, - "x-appwrite": { - "method": "list", - "weight": 70, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/list.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "", - "default": "" - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create database", - "operationId": "databasesCreate", - "tags": ["databases"], - "description": "Create a new Database.\n", - "responses": { - "201": { - "description": "Database", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/database" - } - } - } - } - }, - "x-appwrite": { - "method": "create", - "weight": 69, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "databaseId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "" - }, - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "" - }, - "enabled": { - "type": "boolean", - "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": ["databaseId", "name"] - } - } - } - } - } - }, - "/databases/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "databasesGet", - "tags": ["databases"], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", - "responses": { - "200": { - "description": "Database", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/database" - } - } - } - } - }, - "x-appwrite": { - "method": "get", - "weight": 71, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/get.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update database", - "operationId": "databasesUpdate", - "tags": ["databases"], - "description": "Update a database by its unique ID.", - "responses": { - "200": { - "description": "Database", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/database" - } - } - } - } - }, - "x-appwrite": { - "method": "update", - "weight": 73, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "" - }, - "enabled": { - "type": "boolean", - "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": ["name"] - } - } - } - } - }, - "delete": { - "summary": "Delete database", - "operationId": "databasesDelete", - "tags": ["databases"], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "delete", - "weight": 74, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/delete.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, - "/databases/{databaseId}/collections": { - "get": { - "summary": "List collections", - "operationId": "databasesListCollections", - "tags": ["databases"], - "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Collections List", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/collectionList" - } - } - } - } - }, - "x-appwrite": { - "method": "listCollections", - "weight": 76, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/list-collections.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/list-collections.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "", - "default": "" - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create collection", - "operationId": "databasesCreateCollection", - "tags": ["databases"], - "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Collection", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/collection" - } - } - } - } - }, - "x-appwrite": { - "method": "createCollection", - "weight": 75, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-collection.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "collectionId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "" - }, - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "x-example": "" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" + ], + "paths": { + "\/account": { + "get": { + "summary": "Get account", + "operationId": "accountGet", + "tags": [ + "account" + ], + "description": "Get the currently logged in user.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "x-example": false - } }, - "required": ["collectionId", "name"] - } - } - } - } - } - }, - "/databases/{databaseId}/collections/{collectionId}": { - "get": { - "summary": "Get collection", - "operationId": "databasesGetCollection", - "tags": ["databases"], - "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": 77, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/get-collection.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/get-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update collection", - "operationId": "databasesUpdateCollection", - "tags": ["databases"], - "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": "", - "deprecated": false, - "demo": "databases/update-collection.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "x-example": "" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": ["name"] - } - } - } - } - }, - "delete": { - "summary": "Delete collection", - "operationId": "databasesDeleteCollection", - "tags": ["databases"], - "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": "", - "deprecated": false, - "demo": "databases/delete-collection.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/delete-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes": { - "get": { - "summary": "List attributes", - "operationId": "databasesListAttributes", - "tags": ["databases"], - "description": "List attributes in the collection.", - "responses": { - "200": { - "description": "Attributes List", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/attributeList" - } - } - } - } - }, - "x-appwrite": { - "method": "listAttributes", - "weight": 91, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/list-attributes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/list-attributes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/boolean": { - "post": { - "summary": "Create boolean attribute", - "operationId": "databasesCreateBooleanAttribute", - "tags": ["databases"], - "description": "Create a boolean attribute.\n", - "responses": { - "202": { - "description": "AttributeBoolean", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/attributeBoolean" - } - } - } - } - }, - "x-appwrite": { - "method": "createBooleanAttribute", - "weight": 88, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-boolean-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-boolean-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": false - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": ["key", "required"] - } - } - } - } - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key}": { - "patch": { - "summary": "Update boolean attribute", - "operationId": "databasesUpdateBooleanAttribute", - "tags": ["databases"], - "description": "Update a boolean attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributeBoolean", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/attributeBoolean" - } - } - } - } - }, - "x-appwrite": { - "method": "updateBooleanAttribute", - "weight": 100, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-boolean-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-boolean-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "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, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null - } - }, - "required": ["required", "default"] - } - } - } - } - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/datetime": { - "post": { - "summary": "Create datetime attribute", - "operationId": "databasesCreateDatetimeAttribute", - "tags": ["databases"], - "description": "Create a date time attribute according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "AttributeDatetime", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/attributeDatetime" - } - } - } - } - }, - "x-appwrite": { - "method": "createDatetimeAttribute", - "weight": 89, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-datetime-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-datetime-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "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 the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.", - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": ["key", "required"] - } - } - } - } - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key}": { - "patch": { - "summary": "Update dateTime attribute", - "operationId": "databasesUpdateDatetimeAttribute", - "tags": ["databases"], - "description": "Update a date time attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributeDatetime", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/attributeDatetime" - } - } - } - } - }, - "x-appwrite": { - "method": "updateDatetimeAttribute", - "weight": 101, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-datetime-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-datetime-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "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, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null - } - }, - "required": ["required", "default"] - } - } - } - } - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/email": { - "post": { - "summary": "Create email attribute", - "operationId": "databasesCreateEmailAttribute", - "tags": ["databases"], - "description": "Create an email attribute.\n", - "responses": { - "202": { - "description": "AttributeEmail", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/attributeEmail" - } - } - } - } - }, - "x-appwrite": { - "method": "createEmailAttribute", - "weight": 82, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-email-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-email-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "email@example.com" - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": ["key", "required"] - } - } - } - } - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/email/{key}": { - "patch": { - "summary": "Update email attribute", - "operationId": "databasesUpdateEmailAttribute", - "tags": ["databases"], - "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeEmail", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/attributeEmail" - } - } - } - } - }, - "x-appwrite": { - "method": "updateEmailAttribute", - "weight": 94, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-email-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-email-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "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", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null - } - }, - "required": ["required", "default"] - } - } - } - } - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/enum": { - "post": { - "summary": "Create enum attribute", - "operationId": "databasesCreateEnumAttribute", - "tags": ["databases"], - "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", - "responses": { - "202": { - "description": "AttributeEnum", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/attributeEnum" - } - } - } - } - }, - "x-appwrite": { - "method": "createEnumAttribute", - "weight": 83, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-enum-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-attribute-enum.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "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 255 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": "" - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": ["key", "elements", "required"] - } - } - } - } - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key}": { - "patch": { - "summary": "Update enum attribute", - "operationId": "databasesUpdateEnumAttribute", - "tags": ["databases"], - "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeEnum", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/attributeEnum" - } - } - } - } - }, - "x-appwrite": { - "method": "updateEnumAttribute", - "weight": 95, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-enum-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-enum-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "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 255 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": "", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null - } - }, - "required": ["elements", "required", "default"] - } - } - } - } - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/float": { - "post": { - "summary": "Create float attribute", - "operationId": "databasesCreateFloatAttribute", - "tags": ["databases"], - "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "AttributeFloat", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/attributeFloat" - } - } - } - } - }, - "x-appwrite": { - "method": "createFloatAttribute", - "weight": 87, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-float-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-float-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value to enforce on new documents", - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value to enforce on new documents", - "x-example": null - }, - "default": { - "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": ["key", "required"] - } - } - } - } - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/float/{key}": { - "patch": { - "summary": "Update float attribute", - "operationId": "databasesUpdateFloatAttribute", - "tags": ["databases"], - "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeFloat", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/attributeFloat" - } - } - } - } - }, - "x-appwrite": { - "method": "updateFloatAttribute", - "weight": 99, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-float-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-float-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "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, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null - } - }, - "required": ["required", "min", "max", "default"] - } - } - } - } - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/integer": { - "post": { - "summary": "Create integer attribute", - "operationId": "databasesCreateIntegerAttribute", - "tags": ["databases"], - "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "AttributeInteger", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/attributeInteger" - } - } - } - } - }, - "x-appwrite": { - "method": "createIntegerAttribute", - "weight": 86, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-integer-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-integer-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value to enforce on new documents", - "x-example": null - }, - "max": { - "type": "integer", - "description": "Maximum value to enforce on new documents", - "x-example": null - }, - "default": { - "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": ["key", "required"] - } - } - } - } - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}": { - "patch": { - "summary": "Update integer attribute", - "operationId": "databasesUpdateIntegerAttribute", - "tags": ["databases"], - "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeInteger", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/attributeInteger" - } - } - } - } - }, - "x-appwrite": { - "method": "updateIntegerAttribute", - "weight": 98, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-integer-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-integer-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "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, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null - } - }, - "required": ["required", "min", "max", "default"] - } - } - } - } - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/ip": { - "post": { - "summary": "Create IP address attribute", - "operationId": "databasesCreateIpAttribute", - "tags": ["databases"], - "description": "Create IP address attribute.\n", - "responses": { - "202": { - "description": "AttributeIP", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/attributeIp" - } - } - } - } - }, - "x-appwrite": { - "method": "createIpAttribute", - "weight": 84, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-ip-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-ip-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": ["key", "required"] - } - } - } - } - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key}": { - "patch": { - "summary": "Update IP address attribute", - "operationId": "databasesUpdateIpAttribute", - "tags": ["databases"], - "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeIP", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/attributeIp" - } - } - } - } - }, - "x-appwrite": { - "method": "updateIpAttribute", - "weight": 96, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-ip-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-ip-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "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, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null - } - }, - "required": ["required", "default"] - } - } - } - } - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/relationship": { - "post": { - "summary": "Create relationship attribute", - "operationId": "databasesCreateRelationshipAttribute", - "tags": ["databases"], - "description": "Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).\n", - "responses": { - "202": { - "description": "AttributeRelationship", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/attributeRelationship" - } - } - } - } - }, - "x-appwrite": { - "method": "createRelationshipAttribute", - "weight": 90, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-relationship-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-relationship-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "relatedCollectionId": { - "type": "string", - "description": "Related Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "x-example": "" - }, - "type": { - "type": "string", - "description": "Relation type", - "x-example": "oneToOne", - "enum": [ - "oneToOne", - "manyToOne", - "manyToMany", - "oneToMany" + "x-appwrite": { + "method": "get", + "weight": 9, + "cookies": false, + "type": "", + "deprecated": false, + "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" ], - "x-enum-name": "RelationshipType", - "x-enum-keys": [] - }, - "twoWay": { - "type": "boolean", - "description": "Is Two Way?", - "x-example": false - }, - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "twoWayKey": { - "type": "string", - "description": "Two Way Attribute Key.", - "x-example": null - }, - "onDelete": { - "type": "string", - "description": "Constraints option", - "x-example": "cascade", - "enum": ["cascade", "restrict", "setNull"], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": ["relatedCollectionId", "type"] - } - } - } - } - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/string": { - "post": { - "summary": "Create string attribute", - "operationId": "databasesCreateStringAttribute", - "tags": ["databases"], - "description": "Create a string attribute.\n", - "responses": { - "202": { - "description": "AttributeString", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/attributeString" - } - } - } - } - }, - "x-appwrite": { - "method": "createStringAttribute", - "weight": 81, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-string-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-string-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "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": "" - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", - "x-example": false - } - }, - "required": ["key", "size", "required"] - } - } - } - } - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}": { - "patch": { - "summary": "Update string attribute", - "operationId": "databasesUpdateStringAttribute", - "tags": ["databases"], - "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeString", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/attributeString" - } - } - } - } - }, - "x-appwrite": { - "method": "updateStringAttribute", - "weight": 93, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-string-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-string-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "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": "", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the string attribute.", - "x-example": 1 - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null - } - }, - "required": ["required", "default"] - } - } - } - } - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/url": { - "post": { - "summary": "Create URL attribute", - "operationId": "databasesCreateUrlAttribute", - "tags": ["databases"], - "description": "Create a URL attribute.\n", - "responses": { - "202": { - "description": "AttributeURL", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/attributeUrl" - } - } - } - } - }, - "x-appwrite": { - "method": "createUrlAttribute", - "weight": 85, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-url-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-url-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "https://example.com" - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": ["key", "required"] - } - } - } - } - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}": { - "patch": { - "summary": "Update URL attribute", - "operationId": "databasesUpdateUrlAttribute", - "tags": ["databases"], - "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeURL", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/attributeUrl" - } - } - } - } - }, - "x-appwrite": { - "method": "updateUrlAttribute", - "weight": 97, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-url-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-url-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "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", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null - } - }, - "required": ["required", "default"] - } - } - } - } - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/{key}": { - "get": { - "summary": "Get attribute", - "operationId": "databasesGetAttribute", - "tags": ["databases"], - "description": "Get attribute by ID.", - "responses": { - "200": { - "description": "AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeRelationship, 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/attributeDatetime" - }, - { - "$ref": "#/components/schemas/attributeRelationship" - }, - { - "$ref": "#/components/schemas/attributeString" + "packaging": false, + "auth": { + "Project": [], + "Session": [] } - ] - } - } - } - } - }, - "x-appwrite": { - "method": "getAttribute", - "weight": 92, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/get-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/get-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete attribute", - "operationId": "databasesDeleteAttribute", - "tags": ["databases"], - "description": "Deletes an attribute.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteAttribute", - "weight": 103, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/delete-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/delete-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship": { - "patch": { - "summary": "Update relationship attribute", - "operationId": "databasesUpdateRelationshipAttribute", - "tags": ["databases"], - "description": "Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).\n", - "responses": { - "200": { - "description": "AttributeRelationship", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/attributeRelationship" - } - } - } - } - }, - "x-appwrite": { - "method": "updateRelationshipAttribute", - "weight": 102, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-relationship-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-relationship-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "onDelete": { - "type": "string", - "description": "Constraints option", - "x-example": "cascade", - "enum": ["cascade", "restrict", "setNull"], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null - } - } - } - } - } - } - } - }, - "/databases/{databaseId}/collections/{collectionId}/documents": { - "get": { - "summary": "List documents", - "operationId": "databasesListDocuments", - "tags": ["databases"], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Documents List", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/documentList" - } - } - } - } - }, - "x-appwrite": { - "method": "listDocuments", - "weight": 109, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/list-documents.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "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/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create document", - "operationId": "databasesCreateDocument", - "tags": ["databases"], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/document" - } - } - } - } - }, - "x-appwrite": { - "method": "createDocument", - "weight": 108, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "" - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } }, - "required": ["documentId", "data"] - } - } - } - } - } - }, - "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "databasesGetDocument", - "tags": ["databases"], - "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": 110, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/get-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "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/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "patch": { - "summary": "Update document", - "operationId": "databasesUpdateDocument", - "tags": ["databases"], - "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": 112, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "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": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] } - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete document", - "operationId": "databasesDeleteDocument", - "tags": ["databases"], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteDocument", - "weight": 113, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/delete-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" + ] }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/indexes": { - "get": { - "summary": "List indexes", - "operationId": "databasesListIndexes", - "tags": ["databases"], - "description": "List indexes in the collection.", - "responses": { - "200": { - "description": "Indexes List", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/indexList" - } - } - } - } - }, - "x-appwrite": { - "method": "listIndexes", - "weight": 105, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/list-indexes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "databasesCreateIndex", - "tags": ["databases"], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", - "responses": { - "202": { - "description": "Index", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/index" - } - } - } - } - }, - "x-appwrite": { - "method": "createIndex", - "weight": 104, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-index.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "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", - "enum": ["key", "fulltext", "unique"], - "x-enum-name": "IndexType", - "x-enum-keys": [] - }, - "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" + "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](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createVerification) 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](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createEmailSession).", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "x-example": null, - "items": { - "type": "string" - } - } }, - "required": ["key", "type", "attributes"] - } - } - } - } - } - }, - "/databases/{databaseId}/collections/{collectionId}/indexes/{key}": { - "get": { - "summary": "Get index", - "operationId": "databasesGetIndex", - "tags": ["databases"], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/index" - } - } - } - } - }, - "x-appwrite": { - "method": "getIndex", - "weight": 106, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/get-index.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "databasesDeleteIndex", - "tags": ["databases"], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteIndex", - "weight": 107, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/delete-index.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "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": 289, - "cookies": false, - "type": "", - "deprecated": false, - "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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "", - "default": "" - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create function", - "operationId": "functionsCreate", - "tags": ["functions"], - "description": "Create a new function. You can pass a list of [permissions](https://appwrite.io/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": 288, - "cookies": false, - "type": "", - "deprecated": false, - "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 a custom ID or generate a random ID with `ID.unique()`. Valid 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": "" - }, - "name": { - "type": "string", - "description": "Function name. Max length: 128 chars.", - "x-example": "" - }, - "runtime": { - "type": "string", - "description": "Execution runtime.", - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-ml-3.11", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "go-1.23", - "static-1", - "flutter-3.24" + "x-appwrite": { + "method": "create", + "weight": 8, + "cookies": false, + "type": "", + "deprecated": false, + "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": "sessions.write", + "platforms": [ + "server", + "client" ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "execute": { - "type": "array", - "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "x-example": "[\"any\"]", - "items": { - "type": "string" + "packaging": false, + "auth": { + "Project": [] } - }, - "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 - }, - "enabled": { - "type": "boolean", - "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project.", - "x-example": false - }, - "entrypoint": { - "type": "string", - "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", - "x-example": "" - }, - "commands": { - "type": "string", - "description": "Build Commands.", - "x-example": "" - }, - "scopes": { - "type": "array", - "description": "List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.", - "x-example": null, - "items": { - "type": "string" - } - }, - "installationId": { - "type": "string", - "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", - "x-example": "" - }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the function.", - "x-example": "" - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the function.", - "x-example": "" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", - "x-example": false - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function code in the linked repo.", - "x-example": "" - }, - "templateRepository": { - "type": "string", - "description": "Repository name of the template.", - "x-example": "" - }, - "templateOwner": { - "type": "string", - "description": "The name of the owner of the template.", - "x-example": "" - }, - "templateRootDirectory": { - "type": "string", - "description": "Path to function code in the template repo.", - "x-example": "" - }, - "templateVersion": { - "type": "string", - "description": "Version (tag) for the repo linked to the function template.", - "x-example": "" - }, - "specification": { - "type": "string", - "description": "Runtime specification for the function and builds.", - "x-example": null - } }, - "required": ["functionId", "name", "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" + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com" + }, + "password": { + "type": "string", + "description": "New user password. Must be between 8 and 256 chars.", + "x-example": null + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } } - } } - } }, - "x-appwrite": { - "method": "listRuntimes", - "weight": 290, - "cookies": false, - "type": "", - "deprecated": false, - "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/specifications": { - "get": { - "summary": "List available function runtime specifications", - "operationId": "functionsListSpecifications", - "tags": ["functions"], - "description": "List allowed function specifications for this instance.\n", - "responses": { - "200": { - "description": "Specifications List", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/specificationList" - } - } - } - } - }, - "x-appwrite": { - "method": "listSpecifications", - "weight": 291, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/list-specifications.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-specifications.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": ["server", "console"], - "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": 292, - "cookies": false, - "type": "", - "deprecated": false, - "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": "" - }, - "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": 295, - "cookies": false, - "type": "", - "deprecated": false, - "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": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Function name. Max length: 128 chars.", - "x-example": "" - }, - "runtime": { - "type": "string", - "description": "Execution runtime.", - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-ml-3.11", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "go-1.23", - "static-1", - "flutter-3.24" + "\/account\/email": { + "patch": { + "summary": "Update 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": 34, + "cookies": false, + "type": "", + "deprecated": false, + "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" ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "execute": { - "type": "array", - "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "x-example": "[\"any\"]", - "items": { - "type": "string" + "packaging": false, + "auth": { + "Project": [], + "Session": [] } - }, - "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 - }, - "enabled": { - "type": "boolean", - "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project.", - "x-example": false - }, - "entrypoint": { - "type": "string", - "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", - "x-example": "" - }, - "commands": { - "type": "string", - "description": "Build Commands.", - "x-example": "" - }, - "scopes": { - "type": "array", - "description": "List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.", - "x-example": null, - "items": { - "type": "string" - } - }, - "installationId": { - "type": "string", - "description": "Appwrite Installation ID for VCS (Version Controle System) deployment.", - "x-example": "" - }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the function", - "x-example": "", - "x-nullable": true - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the function", - "x-example": "" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", - "x-example": false - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function code in the linked repo.", - "x-example": "" - }, - "specification": { - "type": "string", - "description": "Runtime specification for the function and builds.", - "x-example": null - } }, - "required": ["name"] - } - } - } - } - }, - "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": 298, - "cookies": false, - "type": "", - "deprecated": false, - "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": "" - }, - "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" + "security": [ + { + "Project": [], + "Session": [], + "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" + ] + } + } + } } - } } - } }, - "x-appwrite": { - "method": "listDeployments", - "weight": 300, - "cookies": false, - "type": "", - "deprecated": false, - "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": "" - }, - "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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: size, buildId, activate, entrypoint, commands, type, size", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "", - "default": "" - }, - "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](https://appwrite.io/docs/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", - "responses": { - "202": { - "description": "Deployment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/deployment" - } - } - } - } - }, - "x-appwrite": { - "method": "createDeployment", - "weight": 299, - "cookies": false, - "type": "upload", - "deprecated": false, - "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": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "entrypoint": { - "type": "string", - "description": "Entrypoint File.", - "x-example": "" - }, - "commands": { - "type": "string", - "description": "Build Commands.", - "x-example": "" - }, - "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 - } + "\/account\/identities": { + "get": { + "summary": "List identities", + "operationId": "accountListIdentities", + "tags": [ + "account" + ], + "description": "Get the list of identities for the currently logged in user.", + "responses": { + "200": { + "description": "Identities List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/identityList" + } + } + } + } }, - "required": ["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": "Deployment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/deployment" - } - } - } - } - }, - "x-appwrite": { - "method": "getDeployment", - "weight": 301, - "cookies": false, - "type": "", - "deprecated": false, - "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": "" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update 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": 297, - "cookies": false, - "type": "", - "deprecated": false, - "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": "" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "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": 302, - "cookies": false, - "type": "", - "deprecated": false, - "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": "" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, - "/functions/{functionId}/deployments/{deploymentId}/build": { - "post": { - "summary": "Rebuild deployment", - "operationId": "functionsCreateBuild", - "tags": ["functions"], - "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "createBuild", - "weight": 303, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/create-build.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/create-build.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": "" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "buildId": { - "type": "string", - "description": "Build unique ID.", - "x-example": "" - } - } - } - } - } - } - }, - "patch": { - "summary": "Cancel deployment", - "operationId": "functionsUpdateDeploymentBuild", - "tags": ["functions"], - "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", - "responses": { - "200": { - "description": "Build", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/build" - } - } - } - } - }, - "x-appwrite": { - "method": "updateDeploymentBuild", - "weight": 304, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/update-deployment-build.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/update-deployment-build.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": "" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, - "/functions/{functionId}/deployments/{deploymentId}/download": { - "get": { - "summary": "Download deployment", - "operationId": "functionsGetDeploymentDownload", - "tags": ["functions"], - "description": "Get a Deployment's contents by its unique ID. This endpoint supports range requests for partial or streaming file download.", - "responses": { - "200": { - "description": "File" - } - }, - "x-appwrite": { - "method": "getDeploymentDownload", - "weight": 296, - "cookies": false, - "type": "location", - "deprecated": false, - "demo": "functions/get-deployment-download.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/get-deployment-download.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": ["server", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "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.", - "responses": { - "200": { - "description": "Executions List", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/executionList" - } - } - } - } - }, - "x-appwrite": { - "method": "listExecutions", - "weight": 306, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "", - "default": "" - }, - "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": { - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/execution" - } - } - } - } - }, - "x-appwrite": { - "method": "createExecution", - "weight": 305, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/create-execution.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/create-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "execution.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "body": { - "type": "string", - "description": "HTTP body of execution. Default value is empty string.", - "x-example": "" - }, - "async": { - "type": "boolean", - "description": "Execute code in the background. Default value is false.", - "x-example": false - }, - "path": { - "type": "string", - "description": "HTTP path of execution. Path can include query params. Default value is /", - "x-example": "" - }, - "method": { - "type": "string", - "description": "HTTP method of execution. Default value is GET.", - "x-example": "GET", - "enum": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "OPTIONS" + "x-appwrite": { + "method": "listIdentities", + "weight": 57, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/list-identities.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" ], - "x-enum-name": "ExecutionMethod", - "x-enum-keys": [] - }, - "headers": { - "type": "string", - "description": "HTTP headers of execution. Defaults to empty.", - "x-example": null - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "x-example": null - } - } - } - } - } - } - } - }, - "/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": 307, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "executionId", - "description": "Execution ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete execution", - "operationId": "functionsDeleteExecution", - "tags": ["functions"], - "description": "Delete a function execution by its unique ID.\n", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteExecution", - "weight": 308, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/delete-execution.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/delete-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "execution.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "executionId", - "description": "Execution ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, - "/functions/{functionId}/variables": { - "get": { - "summary": "List variables", - "operationId": "functionsListVariables", - "tags": ["functions"], - "description": "Get a list of all variables of a specific function.", - "responses": { - "200": { - "description": "Variables List", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/variableList" - } - } - } - } - }, - "x-appwrite": { - "method": "listVariables", - "weight": 310, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/list-variables.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-variables.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 unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - }, - "post": { - "summary": "Create variable", - "operationId": "functionsCreateVariable", - "tags": ["functions"], - "description": "Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", - "responses": { - "201": { - "description": "Variable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/variable" - } - } - } - } - }, - "x-appwrite": { - "method": "createVariable", - "weight": 309, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/create-variable.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/create-variable.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 unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "x-example": "" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "x-example": "" - } + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } }, - "required": ["key", "value"] - } + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] } - } - } - } - }, - "/functions/{functionId}/variables/{variableId}": { - "get": { - "summary": "Get variable", - "operationId": "functionsGetVariable", - "tags": ["functions"], - "description": "Get a variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/variable" - } - } - } - } }, - "x-appwrite": { - "method": "getVariable", - "weight": 311, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/get-variable.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/get-variable.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 unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update variable", - "operationId": "functionsUpdateVariable", - "tags": ["functions"], - "description": "Update variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/variable" - } - } - } - } - }, - "x-appwrite": { - "method": "updateVariable", - "weight": 312, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/update-variable.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/update-variable.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 unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "x-example": "" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "x-example": "" - } + "\/account\/identities\/{identityId}": { + "delete": { + "summary": "Delete identity", + "operationId": "accountDeleteIdentity", + "tags": [ + "account" + ], + "description": "Delete an identity by its unique ID.", + "responses": { + "204": { + "description": "No content" + } }, - "required": ["key"] - } - } - } - } - }, - "delete": { - "summary": "Delete variable", - "operationId": "functionsDeleteVariable", - "tags": ["functions"], - "description": "Delete a variable by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteVariable", - "weight": 313, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/delete-variable.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/delete-variable.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 unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, - "/graphql": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlQuery", - "tags": ["graphql"], - "description": "Execute a GraphQL mutation.", - "responses": { - "200": { - "description": "Any", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/any" - } - } - } - } - }, - "x-appwrite": { - "method": "query", - "weight": 331, - "cookies": false, - "type": "graphql", - "deprecated": false, - "demo": "graphql/query.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/graphql/post.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", - "platforms": ["server", "client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "/graphql/mutation": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlMutation", - "tags": ["graphql"], - "description": "Execute a GraphQL mutation.", - "responses": { - "200": { - "description": "Any", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/any" - } - } - } - } - }, - "x-appwrite": { - "method": "mutation", - "weight": 330, - "cookies": false, - "type": "graphql", - "deprecated": false, - "demo": "graphql/mutation.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/graphql/post.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", - "platforms": ["server", "client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "/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": 125, - "cookies": false, - "type": "", - "deprecated": false, - "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": 147, - "cookies": false, - "type": "", - "deprecated": false, - "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 servers are up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/healthStatus" - } - } - } - } - }, - "x-appwrite": { - "method": "getCache", - "weight": 128, - "cookies": false, - "type": "", - "deprecated": false, - "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/certificate": { - "get": { - "summary": "Get the SSL certificate for a domain", - "operationId": "healthGetCertificate", - "tags": ["health"], - "description": "Get the SSL certificate for a domain", - "responses": { - "200": { - "description": "Health Certificate", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/healthCertificate" - } - } - } - } - }, - "x-appwrite": { - "method": "getCertificate", - "weight": 134, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-certificate.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-certificate.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": [] - } - ], - "parameters": [ - { - "name": "domain", - "description": "string", - "required": false, - "schema": { - "type": "string" - }, - "in": "query" - } - ] - } - }, - "/health/db": { - "get": { - "summary": "Get DB", - "operationId": "healthGetDB", - "tags": ["health"], - "description": "Check the Appwrite database servers are up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/healthStatus" - } - } - } - } - }, - "x-appwrite": { - "method": "getDB", - "weight": 127, - "cookies": false, - "type": "", - "deprecated": false, - "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/pubsub": { - "get": { - "summary": "Get pubsub", - "operationId": "healthGetPubSub", - "tags": ["health"], - "description": "Check the Appwrite pub-sub servers are up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/healthStatus" - } - } - } - } - }, - "x-appwrite": { - "method": "getPubSub", - "weight": 130, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-pub-sub.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-pubsub.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": { - "get": { - "summary": "Get queue", - "operationId": "healthGetQueue", - "tags": ["health"], - "description": "Check the Appwrite queue messaging servers are up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/healthStatus" - } - } - } - } - }, - "x-appwrite": { - "method": "getQueue", - "weight": 129, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue.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/builds": { - "get": { - "summary": "Get builds queue", - "operationId": "healthGetQueueBuilds", - "tags": ["health"], - "description": "Get the number of builds 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": "getQueueBuilds", - "weight": 136, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue-builds.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-builds.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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "/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": 135, - "cookies": false, - "type": "", - "deprecated": false, - "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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "/health/queue/databases": { - "get": { - "summary": "Get databases queue", - "operationId": "healthGetQueueDatabases", - "tags": ["health"], - "description": "Get the number of database changes 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": "getQueueDatabases", - "weight": 137, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue-databases.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-databases.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": [] - } - ], - "parameters": [ - { - "name": "name", - "description": "Queue name for which to check the queue size", - "required": false, - "schema": { - "type": "string", - "x-example": "", - "default": "database_db_main" - }, - "in": "query" - }, - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "/health/queue/deletes": { - "get": { - "summary": "Get deletes queue", - "operationId": "healthGetQueueDeletes", - "tags": ["health"], - "description": "Get the number of background destructive changes 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": "getQueueDeletes", - "weight": 138, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue-deletes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-deletes.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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "/health/queue/failed/{name}": { - "get": { - "summary": "Get number of failed queue jobs", - "operationId": "healthGetFailedJobs", - "tags": ["health"], - "description": "Returns the amount of failed jobs in a given queue.\n", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/healthQueue" - } - } - } - } - }, - "x-appwrite": { - "method": "getFailedJobs", - "weight": 148, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-failed-jobs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-failed-queue-jobs.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": [] - } - ], - "parameters": [ - { - "name": "name", - "description": "The name of the queue", - "required": true, - "schema": { - "type": "string", - "x-example": "v1-database", - "enum": [ - "v1-database", - "v1-deletes", - "v1-audits", - "v1-mails", - "v1-functions", - "v1-usage", - "v1-usage-dump", - "v1-webhooks", - "v1-certificates", - "v1-builds", - "v1-messaging", - "v1-migrations" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "in": "path" - }, - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "/health/queue/functions": { - "get": { - "summary": "Get functions queue", - "operationId": "healthGetQueueFunctions", - "tags": ["health"], - "description": "Get the number of function executions 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": "getQueueFunctions", - "weight": 142, - "cookies": false, - "type": "", - "deprecated": false, - "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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "/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": 133, - "cookies": false, - "type": "", - "deprecated": false, - "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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "/health/queue/mails": { - "get": { - "summary": "Get mails queue", - "operationId": "healthGetQueueMails", - "tags": ["health"], - "description": "Get the number of mails 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": "getQueueMails", - "weight": 139, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue-mails.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-mails.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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "/health/queue/messaging": { - "get": { - "summary": "Get messaging queue", - "operationId": "healthGetQueueMessaging", - "tags": ["health"], - "description": "Get the number of messages 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": "getQueueMessaging", - "weight": 140, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue-messaging.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-messaging.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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "/health/queue/migrations": { - "get": { - "summary": "Get migrations queue", - "operationId": "healthGetQueueMigrations", - "tags": ["health"], - "description": "Get the number of migrations 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": "getQueueMigrations", - "weight": 141, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue-migrations.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-migrations.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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "/health/queue/usage": { - "get": { - "summary": "Get usage queue", - "operationId": "healthGetQueueUsage", - "tags": ["health"], - "description": "Get the number of metrics 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": 143, - "cookies": false, - "type": "", - "deprecated": false, - "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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "/health/queue/usage-dump": { - "get": { - "summary": "Get usage dump queue", - "operationId": "healthGetQueueUsageDump", - "tags": ["health"], - "description": "Get the number of projects containing metrics 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": "getQueueUsageDump", - "weight": 144, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue-usage-dump.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-usage-dump.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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "/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": 132, - "cookies": false, - "type": "", - "deprecated": false, - "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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "/health/storage": { - "get": { - "summary": "Get storage", - "operationId": "healthGetStorage", - "tags": ["health"], - "description": "Check the Appwrite storage device is up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/healthStatus" - } - } - } - } - }, - "x-appwrite": { - "method": "getStorage", - "weight": 146, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-storage.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-storage.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": 145, - "cookies": false, - "type": "", - "deprecated": false, - "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": 131, - "cookies": false, - "type": "", - "deprecated": false, - "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": 117, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "/locale/codes": { - "get": { - "summary": "List locale codes", - "operationId": "localeListCodes", - "tags": ["locale"], - "description": "List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).", - "responses": { - "200": { - "description": "Locale codes list", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/localeCodeList" - } - } - } - } - }, - "x-appwrite": { - "method": "listCodes", - "weight": 118, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "locale/list-codes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/list-locale-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "/locale/continents": { - "get": { - "summary": "List continents", - "operationId": "localeListContinents", - "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": "listContinents", - "weight": 122, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "locale/list-continents.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/list-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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "/locale/countries": { - "get": { - "summary": "List countries", - "operationId": "localeListCountries", - "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": "listCountries", - "weight": 119, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "locale/list-countries.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/list-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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "/locale/countries/eu": { - "get": { - "summary": "List EU countries", - "operationId": "localeListCountriesEU", - "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": "listCountriesEU", - "weight": 120, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "locale/list-countries-e-u.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/list-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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "/locale/countries/phones": { - "get": { - "summary": "List countries phone codes", - "operationId": "localeListCountriesPhones", - "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": "listCountriesPhones", - "weight": 121, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "locale/list-countries-phones.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/list-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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "/locale/currencies": { - "get": { - "summary": "List currencies", - "operationId": "localeListCurrencies", - "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": "listCurrencies", - "weight": 123, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "locale/list-currencies.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/list-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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "/locale/languages": { - "get": { - "summary": "List languages", - "operationId": "localeListLanguages", - "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": "listLanguages", - "weight": 124, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "locale/list-languages.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/list-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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "/messaging/messages": { - "get": { - "summary": "List messages", - "operationId": "messagingListMessages", - "tags": ["messaging"], - "description": "Get a list of all messages from the current Appwrite project.", - "responses": { - "200": { - "description": "Message list", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/messageList" - } - } - } - } - }, - "x-appwrite": { - "method": "listMessages", - "weight": 384, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-messages.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-messages.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "", - "default": "" - }, - "in": "query" - } - ] - } - }, - "/messaging/messages/email": { - "post": { - "summary": "Create email", - "operationId": "messagingCreateEmail", - "tags": ["messaging"], - "description": "Create a new email message.", - "responses": { - "201": { - "description": "Message", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/message" - } - } - } - } - }, - "x-appwrite": { - "method": "createEmail", - "weight": 381, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-email.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "" - }, - "subject": { - "type": "string", - "description": "Email Subject.", - "x-example": "" - }, - "content": { - "type": "string", - "description": "Email Content.", - "x-example": "" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" + "x-appwrite": { + "method": "deleteIdentity", + "weight": 58, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/delete-identity.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "cc": { - "type": "array", - "description": "Array of target IDs to be added as CC.", - "x-example": null, - "items": { - "type": "string" - } - }, - "bcc": { - "type": "array", - "description": "Array of target IDs to be added as BCC.", - "x-example": null, - "items": { - "type": "string" - } - }, - "attachments": { - "type": "array", - "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as :.", - "x-example": null, - "items": { - "type": "string" - } - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false - }, - "html": { - "type": "boolean", - "description": "Is content of type HTML", - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": null - } }, - "required": ["messageId", "subject", "content"] - } + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "identityId", + "description": "Identity ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] } - } - } - } - }, - "/messaging/messages/email/{messageId}": { - "patch": { - "summary": "Update email", - "operationId": "messagingUpdateEmail", - "tags": ["messaging"], - "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "responses": { - "200": { - "description": "Message", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/message" - } - } - } - } }, - "x-appwrite": { - "method": "updateEmail", - "weight": 388, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-email.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" + "\/account\/jwts": { + "post": { + "summary": "Create 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" + } + } + } } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "subject": { - "type": "string", - "description": "Email Subject.", - "x-example": "" - }, - "content": { - "type": "string", - "description": "Email Content.", - "x-example": "" - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false - }, - "html": { - "type": "boolean", - "description": "Is content of type HTML", - "x-example": false - }, - "cc": { - "type": "array", - "description": "Array of target IDs to be added as CC.", - "x-example": null, - "items": { - "type": "string" - } - }, - "bcc": { - "type": "array", - "description": "Array of target IDs to be added as BCC.", - "x-example": null, - "items": { - "type": "string" - } - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": null - }, - "attachments": { - "type": "array", - "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as :.", - "x-example": null, - "items": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/messaging/messages/push": { - "post": { - "summary": "Create push notification", - "operationId": "messagingCreatePush", - "tags": ["messaging"], - "description": "Create a new push notification.", - "responses": { - "201": { - "description": "Message", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/message" - } - } - } - } - }, - "x-appwrite": { - "method": "createPush", - "weight": 383, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-push.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-push.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "" - }, - "title": { - "type": "string", - "description": "Title for push notification.", - "x-example": "" - }, - "body": { - "type": "string", - "description": "Body for push notification.", - "x-example": "<BODY>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "data": { - "type": "object", - "description": "Additional key-value pair data for push notification.", - "x-example": "{}" - }, - "action": { - "type": "string", - "description": "Action for push notification.", - "x-example": "<ACTION>" - }, - "image": { - "type": "string", - "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", - "x-example": "[ID1:ID2]" - }, - "icon": { - "type": "string", - "description": "Icon for push notification. Available only for Android and Web Platform.", - "x-example": "<ICON>" - }, - "sound": { - "type": "string", - "description": "Sound for push notification. Available only for Android and iOS Platform.", - "x-example": "<SOUND>" - }, - "color": { - "type": "string", - "description": "Color for push notification. Available only for Android Platform.", - "x-example": "<COLOR>" - }, - "tag": { - "type": "string", - "description": "Tag for push notification. Available only for Android Platform.", - "x-example": "<TAG>" - }, - "badge": { - "type": "integer", - "description": "Badge for push notification. Available only for iOS Platform.", - "x-example": null - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": null - }, - "contentAvailable": { - "type": "boolean", - "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", - "x-example": false - }, - "critical": { - "type": "boolean", - "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", - "x-example": false - }, - "priority": { - "type": "string", - "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", - "x-example": "normal", - "enum": ["normal", "high"], - "x-enum-name": "MessagePriority", - "x-enum-keys": [] - } }, - "required": ["messageId"] - } - } - } - } - } - }, - "/messaging/messages/push/{messageId}": { - "patch": { - "summary": "Update push notification", - "operationId": "messagingUpdatePush", - "tags": ["messaging"], - "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "responses": { - "200": { - "description": "Message", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/message" - } - } - } - } - }, - "x-appwrite": { - "method": "updatePush", - "weight": 390, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-push.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-push.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MESSAGE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" + "x-appwrite": { + "method": "createJWT", + "weight": 29, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-j-w-t.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" + }, + "security": [ + { + "Project": [] } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "x-example": null, - "items": { - "type": "string" + ] + } + }, + "\/account\/logs": { + "get": { + "summary": "List logs", + "operationId": "accountListLogs", + "tags": [ + "account" + ], + "description": "Get the list of latest security activity logs for the currently logged in user. 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" + } + } + } } - }, - "title": { - "type": "string", - "description": "Title for push notification.", - "x-example": "<TITLE>" - }, - "body": { - "type": "string", - "description": "Body for push notification.", - "x-example": "<BODY>" - }, - "data": { - "type": "object", - "description": "Additional Data for push notification.", - "x-example": "{}" - }, - "action": { - "type": "string", - "description": "Action for push notification.", - "x-example": "<ACTION>" - }, - "image": { - "type": "string", - "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", - "x-example": "[ID1:ID2]" - }, - "icon": { - "type": "string", - "description": "Icon for push notification. Available only for Android and Web platforms.", - "x-example": "<ICON>" - }, - "sound": { - "type": "string", - "description": "Sound for push notification. Available only for Android and iOS platforms.", - "x-example": "<SOUND>" - }, - "color": { - "type": "string", - "description": "Color for push notification. Available only for Android platforms.", - "x-example": "<COLOR>" - }, - "tag": { - "type": "string", - "description": "Tag for push notification. Available only for Android platforms.", - "x-example": "<TAG>" - }, - "badge": { - "type": "integer", - "description": "Badge for push notification. Available only for iOS platforms.", - "x-example": null - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": null - }, - "contentAvailable": { - "type": "boolean", - "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", - "x-example": false - }, - "critical": { - "type": "boolean", - "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", - "x-example": false - }, - "priority": { - "type": "string", - "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", - "x-example": "normal", - "enum": ["normal", "high"], - "x-enum-name": "MessagePriority", - "x-enum-keys": [] - } - } - } - } - } - } - } - }, - "/messaging/messages/sms": { - "post": { - "summary": "Create SMS", - "operationId": "messagingCreateSms", - "tags": ["messaging"], - "description": "Create a new SMS message.", - "responses": { - "201": { - "description": "Message", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/message" - } - } - } - } - }, - "x-appwrite": { - "method": "createSms", - "weight": 382, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-sms.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-sms.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<MESSAGE_ID>" - }, - "content": { - "type": "string", - "description": "SMS Content.", - "x-example": "<CONTENT>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" + }, + "x-appwrite": { + "method": "listLogs", + "weight": 31, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/list-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "x-example": null, - "items": { - "type": "string" + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" } - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": null - } - }, - "required": ["messageId", "content"] - } + ] } - } - } - } - }, - "/messaging/messages/sms/{messageId}": { - "patch": { - "summary": "Update SMS", - "operationId": "messagingUpdateSms", - "tags": ["messaging"], - "description": "Update an SMS message by its unique ID.\n", - "responses": { - "200": { - "description": "Message", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/message" - } - } - } - } }, - "x-appwrite": { - "method": "updateSms", - "weight": 389, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-sms.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-sms.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MESSAGE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" + "\/account\/mfa": { + "patch": { + "summary": "Update MFA", + "operationId": "accountUpdateMFA", + "tags": [ + "account" + ], + "description": "Enable or disable MFA on an account.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" + }, + "x-appwrite": { + "method": "updateMFA", + "weight": 44, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-m-f-a.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "x-example": null, - "items": { - "type": "string" + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] } - }, - "content": { - "type": "string", - "description": "Email Content.", - "x-example": "<CONTENT>" - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": null - } - } - } - } - } - } - } - }, - "/messaging/messages/{messageId}": { - "get": { - "summary": "Get message", - "operationId": "messagingGetMessage", - "tags": ["messaging"], - "description": "Get a message by its unique ID.\n", - "responses": { - "200": { - "description": "Message", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/message" - } - } - } - } - }, - "x-appwrite": { - "method": "getMessage", - "weight": 387, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/get-message.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/get-message.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MESSAGE_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete message", - "operationId": "messagingDelete", - "tags": ["messaging"], - "description": "Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "delete", - "weight": 391, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/delete.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/delete-message.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MESSAGE_ID>" - }, - "in": "path" - } - ] - } - }, - "/messaging/messages/{messageId}/logs": { - "get": { - "summary": "List message logs", - "operationId": "messagingListMessageLogs", - "tags": ["messaging"], - "description": "Get the message activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/logList" - } - } - } - } - }, - "x-appwrite": { - "method": "listMessageLogs", - "weight": 385, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-message-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-message-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MESSAGE_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/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "/messaging/messages/{messageId}/targets": { - "get": { - "summary": "List message targets", - "operationId": "messagingListTargets", - "tags": ["messaging"], - "description": "Get a list of the targets associated with a message.", - "responses": { - "200": { - "description": "Target list", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/targetList" - } - } - } - } - }, - "x-appwrite": { - "method": "listTargets", - "weight": 386, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-targets.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-message-targets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MESSAGE_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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "/messaging/providers": { - "get": { - "summary": "List providers", - "operationId": "messagingListProviders", - "tags": ["messaging"], - "description": "Get a list of all providers from the current Appwrite project.", - "responses": { - "200": { - "description": "Provider list", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/providerList" - } - } - } - } - }, - "x-appwrite": { - "method": "listProviders", - "weight": 356, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-providers.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-providers.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "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" - } - ] - } - }, - "/messaging/providers/apns": { - "post": { - "summary": "Create APNS provider", - "operationId": "messagingCreateApnsProvider", - "tags": ["messaging"], - "description": "Create a new Apple Push Notification service provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/provider" - } - } - } - } - }, - "x-appwrite": { - "method": "createApnsProvider", - "weight": 355, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-apns-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-apns-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "authKey": { - "type": "string", - "description": "APNS authentication key.", - "x-example": "<AUTH_KEY>" - }, - "authKeyId": { - "type": "string", - "description": "APNS authentication key ID.", - "x-example": "<AUTH_KEY_ID>" - }, - "teamId": { - "type": "string", - "description": "APNS team ID.", - "x-example": "<TEAM_ID>" - }, - "bundleId": { - "type": "string", - "description": "APNS bundle ID.", - "x-example": "<BUNDLE_ID>" - }, - "sandbox": { - "type": "boolean", - "description": "Use APNS sandbox environment.", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - } - } - } - }, - "/messaging/providers/apns/{providerId}": { - "patch": { - "summary": "Update APNS provider", - "operationId": "messagingUpdateApnsProvider", - "tags": ["messaging"], - "description": "Update a Apple Push Notification service provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/provider" - } - } - } - } - }, - "x-appwrite": { - "method": "updateApnsProvider", - "weight": 368, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-apns-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-apns-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false - }, - "authKey": { - "type": "string", - "description": "APNS authentication key.", - "x-example": "<AUTH_KEY>" - }, - "authKeyId": { - "type": "string", - "description": "APNS authentication key ID.", - "x-example": "<AUTH_KEY_ID>" - }, - "teamId": { - "type": "string", - "description": "APNS team ID.", - "x-example": "<TEAM_ID>" - }, - "bundleId": { - "type": "string", - "description": "APNS bundle ID.", - "x-example": "<BUNDLE_ID>" - }, - "sandbox": { - "type": "boolean", - "description": "Use APNS sandbox environment.", - "x-example": false - } - } - } - } - } - } - } - }, - "/messaging/providers/fcm": { - "post": { - "summary": "Create FCM provider", - "operationId": "messagingCreateFcmProvider", - "tags": ["messaging"], - "description": "Create a new Firebase Cloud Messaging provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/provider" - } - } - } - } - }, - "x-appwrite": { - "method": "createFcmProvider", - "weight": 354, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-fcm-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-fcm-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "serviceAccountJSON": { - "type": "object", - "description": "FCM service account JSON.", - "x-example": "{}" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - } - } - } - }, - "/messaging/providers/fcm/{providerId}": { - "patch": { - "summary": "Update FCM provider", - "operationId": "messagingUpdateFcmProvider", - "tags": ["messaging"], - "description": "Update a Firebase Cloud Messaging provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/provider" - } - } - } - } - }, - "x-appwrite": { - "method": "updateFcmProvider", - "weight": 367, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-fcm-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-fcm-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false - }, - "serviceAccountJSON": { - "type": "object", - "description": "FCM service account JSON.", - "x-example": "{}" - } - } - } - } - } - } - } - }, - "/messaging/providers/mailgun": { - "post": { - "summary": "Create Mailgun provider", - "operationId": "messagingCreateMailgunProvider", - "tags": ["messaging"], - "description": "Create a new Mailgun provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/provider" - } - } - } - } - }, - "x-appwrite": { - "method": "createMailgunProvider", - "weight": 346, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-mailgun-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-mailgun-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Mailgun API Key.", - "x-example": "<API_KEY>" - }, - "domain": { - "type": "string", - "description": "Mailgun Domain.", - "x-example": "<DOMAIN>" - }, - "isEuRegion": { - "type": "boolean", - "description": "Set as EU region.", - "x-example": false - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "x-example": "email@example.com" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well.", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well.", - "x-example": "email@example.com" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - } - } - } - }, - "/messaging/providers/mailgun/{providerId}": { - "patch": { - "summary": "Update Mailgun provider", - "operationId": "messagingUpdateMailgunProvider", - "tags": ["messaging"], - "description": "Update a Mailgun provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/provider" - } - } - } - } - }, - "x-appwrite": { - "method": "updateMailgunProvider", - "weight": 359, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-mailgun-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-mailgun-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Mailgun API Key.", - "x-example": "<API_KEY>" - }, - "domain": { - "type": "string", - "description": "Mailgun Domain.", - "x-example": "<DOMAIN>" - }, - "isEuRegion": { - "type": "boolean", - "description": "Set as EU region.", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "x-example": "email@example.com" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "x-example": "<REPLY_TO_EMAIL>" - } - } - } - } - } - } - } - }, - "/messaging/providers/msg91": { - "post": { - "summary": "Create Msg91 provider", - "operationId": "messagingCreateMsg91Provider", - "tags": ["messaging"], - "description": "Create a new MSG91 provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/provider" - } - } - } - } - }, - "x-appwrite": { - "method": "createMsg91Provider", - "weight": 349, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-msg91provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-msg91-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "templateId": { - "type": "string", - "description": "Msg91 template ID", - "x-example": "<TEMPLATE_ID>" - }, - "senderId": { - "type": "string", - "description": "Msg91 sender ID.", - "x-example": "<SENDER_ID>" - }, - "authKey": { - "type": "string", - "description": "Msg91 auth key.", - "x-example": "<AUTH_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - } - } - } - }, - "/messaging/providers/msg91/{providerId}": { - "patch": { - "summary": "Update Msg91 provider", - "operationId": "messagingUpdateMsg91Provider", - "tags": ["messaging"], - "description": "Update a MSG91 provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/provider" - } - } - } - } - }, - "x-appwrite": { - "method": "updateMsg91Provider", - "weight": 362, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-msg91provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-msg91-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false - }, - "templateId": { - "type": "string", - "description": "Msg91 template ID.", - "x-example": "<TEMPLATE_ID>" - }, - "senderId": { - "type": "string", - "description": "Msg91 sender ID.", - "x-example": "<SENDER_ID>" - }, - "authKey": { - "type": "string", - "description": "Msg91 auth key.", - "x-example": "<AUTH_KEY>" - } - } - } - } - } - } - } - }, - "/messaging/providers/sendgrid": { - "post": { - "summary": "Create Sendgrid provider", - "operationId": "messagingCreateSendgridProvider", - "tags": ["messaging"], - "description": "Create a new Sendgrid provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/provider" - } - } - } - } - }, - "x-appwrite": { - "method": "createSendgridProvider", - "weight": 347, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-sendgrid-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-sendgrid-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Sendgrid API key.", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "x-example": "email@example.com" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "x-example": "email@example.com" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - } - } - } - }, - "/messaging/providers/sendgrid/{providerId}": { - "patch": { - "summary": "Update Sendgrid provider", - "operationId": "messagingUpdateSendgridProvider", - "tags": ["messaging"], - "description": "Update a Sendgrid provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/provider" - } - } - } - } - }, - "x-appwrite": { - "method": "updateSendgridProvider", - "weight": 360, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-sendgrid-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-sendgrid-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false - }, - "apiKey": { - "type": "string", - "description": "Sendgrid API key.", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "x-example": "email@example.com" - }, - "replyToName": { - "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "x-example": "<REPLY_TO_EMAIL>" - } - } - } - } - } - } - } - }, - "/messaging/providers/smtp": { - "post": { - "summary": "Create SMTP provider", - "operationId": "messagingCreateSmtpProvider", - "tags": ["messaging"], - "description": "Create a new SMTP provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/provider" - } - } - } - } - }, - "x-appwrite": { - "method": "createSmtpProvider", - "weight": 348, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-smtp-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-smtp-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "host": { - "type": "string", - "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465\"`. Hosts will be tried in order.", - "x-example": "<HOST>" - }, - "port": { - "type": "integer", - "description": "The default SMTP server port.", - "x-example": 1 - }, - "username": { - "type": "string", - "description": "Authentication username.", - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "Authentication password.", - "x-example": "<PASSWORD>" - }, - "encryption": { - "type": "string", - "description": "Encryption type. Can be omitted, 'ssl', or 'tls'", - "x-example": "none", - "enum": ["none", "ssl", "tls"], - "x-enum-name": "SmtpEncryption", - "x-enum-keys": [] - }, - "autoTLS": { - "type": "boolean", - "description": "Enable SMTP AutoTLS feature.", - "x-example": false - }, - "mailer": { - "type": "string", - "description": "The value to use for the X-Mailer header.", - "x-example": "<MAILER>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "x-example": "email@example.com" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "x-example": "email@example.com" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false - } - }, - "required": ["providerId", "name", "host"] - } - } - } - } - } - }, - "/messaging/providers/smtp/{providerId}": { - "patch": { - "summary": "Update SMTP provider", - "operationId": "messagingUpdateSmtpProvider", - "tags": ["messaging"], - "description": "Update a SMTP provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/provider" - } - } - } - } - }, - "x-appwrite": { - "method": "updateSmtpProvider", - "weight": 361, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-smtp-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-smtp-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "host": { - "type": "string", - "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465\"`. Hosts will be tried in order.", - "x-example": "<HOST>" - }, - "port": { - "type": "integer", - "description": "SMTP port.", - "x-example": 1 - }, - "username": { - "type": "string", - "description": "Authentication username.", - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "Authentication password.", - "x-example": "<PASSWORD>" - }, - "encryption": { - "type": "string", - "description": "Encryption type. Can be 'ssl' or 'tls'", - "x-example": "none", - "enum": ["none", "ssl", "tls"], - "x-enum-name": "SmtpEncryption", - "x-enum-keys": [] - }, - "autoTLS": { - "type": "boolean", - "description": "Enable SMTP AutoTLS feature.", - "x-example": false - }, - "mailer": { - "type": "string", - "description": "The value to use for the X-Mailer header.", - "x-example": "<MAILER>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "x-example": "email@example.com" - }, - "replyToName": { - "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "x-example": "<REPLY_TO_EMAIL>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false - } - } - } - } - } - } - } - }, - "/messaging/providers/telesign": { - "post": { - "summary": "Create Telesign provider", - "operationId": "messagingCreateTelesignProvider", - "tags": ["messaging"], - "description": "Create a new Telesign provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/provider" - } - } - } - } - }, - "x-appwrite": { - "method": "createTelesignProvider", - "weight": 350, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-telesign-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-telesign-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100" - }, - "customerId": { - "type": "string", - "description": "Telesign customer ID.", - "x-example": "<CUSTOMER_ID>" - }, - "apiKey": { - "type": "string", - "description": "Telesign API key.", - "x-example": "<API_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - } - } - } - }, - "/messaging/providers/telesign/{providerId}": { - "patch": { - "summary": "Update Telesign provider", - "operationId": "messagingUpdateTelesignProvider", - "tags": ["messaging"], - "description": "Update a Telesign provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/provider" - } - } - } - } - }, - "x-appwrite": { - "method": "updateTelesignProvider", - "weight": 363, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-telesign-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-telesign-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false - }, - "customerId": { - "type": "string", - "description": "Telesign customer ID.", - "x-example": "<CUSTOMER_ID>" - }, - "apiKey": { - "type": "string", - "description": "Telesign API key.", - "x-example": "<API_KEY>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "x-example": "<FROM>" - } - } - } - } - } - } - } - }, - "/messaging/providers/textmagic": { - "post": { - "summary": "Create Textmagic provider", - "operationId": "messagingCreateTextmagicProvider", - "tags": ["messaging"], - "description": "Create a new Textmagic provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/provider" - } - } - } - } - }, - "x-appwrite": { - "method": "createTextmagicProvider", - "weight": 351, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-textmagic-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-textmagic-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100" - }, - "username": { - "type": "string", - "description": "Textmagic username.", - "x-example": "<USERNAME>" - }, - "apiKey": { - "type": "string", - "description": "Textmagic apiKey.", - "x-example": "<API_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - } - } - } - }, - "/messaging/providers/textmagic/{providerId}": { - "patch": { - "summary": "Update Textmagic provider", - "operationId": "messagingUpdateTextmagicProvider", - "tags": ["messaging"], - "description": "Update a Textmagic provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/provider" - } - } - } - } - }, - "x-appwrite": { - "method": "updateTextmagicProvider", - "weight": 364, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-textmagic-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-textmagic-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false - }, - "username": { - "type": "string", - "description": "Textmagic username.", - "x-example": "<USERNAME>" - }, - "apiKey": { - "type": "string", - "description": "Textmagic apiKey.", - "x-example": "<API_KEY>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "x-example": "<FROM>" - } - } - } - } - } - } - } - }, - "/messaging/providers/twilio": { - "post": { - "summary": "Create Twilio provider", - "operationId": "messagingCreateTwilioProvider", - "tags": ["messaging"], - "description": "Create a new Twilio provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/provider" - } - } - } - } - }, - "x-appwrite": { - "method": "createTwilioProvider", - "weight": 352, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-twilio-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-twilio-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100" - }, - "accountSid": { - "type": "string", - "description": "Twilio account secret ID.", - "x-example": "<ACCOUNT_SID>" - }, - "authToken": { - "type": "string", - "description": "Twilio authentication token.", - "x-example": "<AUTH_TOKEN>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - } - } - } - }, - "/messaging/providers/twilio/{providerId}": { - "patch": { - "summary": "Update Twilio provider", - "operationId": "messagingUpdateTwilioProvider", - "tags": ["messaging"], - "description": "Update a Twilio provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/provider" - } - } - } - } - }, - "x-appwrite": { - "method": "updateTwilioProvider", - "weight": 365, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-twilio-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-twilio-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false - }, - "accountSid": { - "type": "string", - "description": "Twilio account secret ID.", - "x-example": "<ACCOUNT_SID>" - }, - "authToken": { - "type": "string", - "description": "Twilio authentication token.", - "x-example": "<AUTH_TOKEN>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "x-example": "<FROM>" - } - } - } - } - } - } - } - }, - "/messaging/providers/vonage": { - "post": { - "summary": "Create Vonage provider", - "operationId": "messagingCreateVonageProvider", - "tags": ["messaging"], - "description": "Create a new Vonage provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/provider" - } - } - } - } - }, - "x-appwrite": { - "method": "createVonageProvider", - "weight": 353, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-vonage-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-vonage-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100" - }, - "apiKey": { - "type": "string", - "description": "Vonage API key.", - "x-example": "<API_KEY>" - }, - "apiSecret": { - "type": "string", - "description": "Vonage API secret.", - "x-example": "<API_SECRET>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - } - } - } - }, - "/messaging/providers/vonage/{providerId}": { - "patch": { - "summary": "Update Vonage provider", - "operationId": "messagingUpdateVonageProvider", - "tags": ["messaging"], - "description": "Update a Vonage provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/provider" - } - } - } - } - }, - "x-appwrite": { - "method": "updateVonageProvider", - "weight": 366, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-vonage-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-vonage-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false - }, - "apiKey": { - "type": "string", - "description": "Vonage API key.", - "x-example": "<API_KEY>" - }, - "apiSecret": { - "type": "string", - "description": "Vonage API secret.", - "x-example": "<API_SECRET>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "x-example": "<FROM>" - } - } - } - } - } - } - } - }, - "/messaging/providers/{providerId}": { - "get": { - "summary": "Get provider", - "operationId": "messagingGetProvider", - "tags": ["messaging"], - "description": "Get a provider by its unique ID.\n", - "responses": { - "200": { - "description": "Provider", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/provider" - } - } - } - } - }, - "x-appwrite": { - "method": "getProvider", - "weight": 358, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/get-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/get-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete provider", - "operationId": "messagingDeleteProvider", - "tags": ["messaging"], - "description": "Delete a provider by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteProvider", - "weight": 369, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/delete-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/delete-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ] - } - }, - "/messaging/providers/{providerId}/logs": { - "get": { - "summary": "List provider logs", - "operationId": "messagingListProviderLogs", - "tags": ["messaging"], - "description": "Get the provider activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/logList" - } - } - } - } - }, - "x-appwrite": { - "method": "listProviderLogs", - "weight": 357, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-provider-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-provider-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_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/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "/messaging/subscribers/{subscriberId}/logs": { - "get": { - "summary": "List subscriber logs", - "operationId": "messagingListSubscriberLogs", - "tags": ["messaging"], - "description": "Get the subscriber activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/logList" - } - } - } - } - }, - "x-appwrite": { - "method": "listSubscriberLogs", - "weight": 378, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-subscriber-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-subscriber-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SUBSCRIBER_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/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "/messaging/topics": { - "get": { - "summary": "List topics", - "operationId": "messagingListTopics", - "tags": ["messaging"], - "description": "Get a list of all topics from the current Appwrite project.", - "responses": { - "200": { - "description": "Topic list", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/topicList" - } - } - } - } - }, - "x-appwrite": { - "method": "listTopics", - "weight": 371, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-topics.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-topics.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "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" - } - ] - }, - "post": { - "summary": "Create topic", - "operationId": "messagingCreateTopic", - "tags": ["messaging"], - "description": "Create a new topic.", - "responses": { - "201": { - "description": "Topic", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/topic" - } - } - } - } - }, - "x-appwrite": { - "method": "createTopic", - "weight": 370, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-topic.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "topicId": { - "type": "string", - "description": "Topic ID. Choose a custom Topic ID or a new Topic ID.", - "x-example": "<TOPIC_ID>" - }, - "name": { - "type": "string", - "description": "Topic Name.", - "x-example": "<NAME>" - }, - "subscribe": { - "type": "array", - "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "x-example": "[\"any\"]", - "items": { - "type": "string" + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "mfa": { + "type": "boolean", + "description": "Enable or disable MFA.", + "x-example": false + } + }, + "required": [ + "mfa" + ] + } + } } - } - }, - "required": ["topicId", "name"] - } - } - } - } - } - }, - "/messaging/topics/{topicId}": { - "get": { - "summary": "Get topic", - "operationId": "messagingGetTopic", - "tags": ["messaging"], - "description": "Get a topic by its unique ID.\n", - "responses": { - "200": { - "description": "Topic", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/topic" } - } } - } }, - "x-appwrite": { - "method": "getTopic", - "weight": 373, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/get-topic.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/get-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update topic", - "operationId": "messagingUpdateTopic", - "tags": ["messaging"], - "description": "Update a topic by its unique ID.\n", - "responses": { - "200": { - "description": "Topic", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/topic" - } - } - } - } - }, - "x-appwrite": { - "method": "updateTopic", - "weight": 374, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-topic.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Topic Name.", - "x-example": "<NAME>" - }, - "subscribe": { - "type": "array", - "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "x-example": "[\"any\"]", - "items": { - "type": "string" + "\/account\/mfa\/authenticators\/{type}": { + "post": { + "summary": "Create authenticator", + "operationId": "accountCreateMfaAuthenticator", + "tags": [ + "account" + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "responses": { + "200": { + "description": "MFAType", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaType" + } + } + } } - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete topic", - "operationId": "messagingDeleteTopic", - "tags": ["messaging"], - "description": "Delete a topic by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteTopic", - "weight": 375, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/delete-topic.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/delete-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - } - ] - } - }, - "/messaging/topics/{topicId}/logs": { - "get": { - "summary": "List topic logs", - "operationId": "messagingListTopicLogs", - "tags": ["messaging"], - "description": "Get the topic activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/logList" - } - } - } - } - }, - "x-appwrite": { - "method": "listTopicLogs", - "weight": 372, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-topic-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-topic-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_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/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "/messaging/topics/{topicId}/subscribers": { - "get": { - "summary": "List subscribers", - "operationId": "messagingListSubscribers", - "tags": ["messaging"], - "description": "Get a list of all subscribers from the current Appwrite project.", - "responses": { - "200": { - "description": "Subscriber list", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/subscriberList" - } - } - } - } - }, - "x-appwrite": { - "method": "listSubscribers", - "weight": 377, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-subscribers.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-subscribers.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "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" - } - ] - }, - "post": { - "summary": "Create subscriber", - "operationId": "messagingCreateSubscriber", - "tags": ["messaging"], - "description": "Create a new subscriber.", - "responses": { - "201": { - "description": "Subscriber", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/subscriber" - } - } - } - } - }, - "x-appwrite": { - "method": "createSubscriber", - "weight": 376, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-subscriber.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", - "platforms": ["server", "client", "console", "server"], - "packaging": false, - "auth": { - "Project": [], - "JWT": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Session": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID to subscribe to.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "subscriberId": { - "type": "string", - "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", - "x-example": "<SUBSCRIBER_ID>" - }, - "targetId": { - "type": "string", - "description": "Target ID. The target ID to link to the specified Topic ID.", - "x-example": "<TARGET_ID>" - } }, - "required": ["subscriberId", "targetId"] - } - } - } - } - } - }, - "/messaging/topics/{topicId}/subscribers/{subscriberId}": { - "get": { - "summary": "Get subscriber", - "operationId": "messagingGetSubscriber", - "tags": ["messaging"], - "description": "Get a subscriber by its unique ID.\n", - "responses": { - "200": { - "description": "Subscriber", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/subscriber" - } - } - } - } - }, - "x-appwrite": { - "method": "getSubscriber", - "weight": 379, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/get-subscriber.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/get-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - }, - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SUBSCRIBER_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete subscriber", - "operationId": "messagingDeleteSubscriber", - "tags": ["messaging"], - "description": "Delete a subscriber by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteSubscriber", - "weight": 380, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/delete-subscriber.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/delete-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", - "platforms": ["server", "client", "console", "server"], - "packaging": false, - "auth": { - "Project": [], - "JWT": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Session": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - }, - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SUBSCRIBER_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": 203, - "cookies": false, - "type": "", - "deprecated": false, - "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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "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" - } - ] - }, - "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": 202, - "cookies": false, - "type": "", - "deprecated": false, - "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 a custom ID or generate a random ID with `ID.unique()`. Valid 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>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" + "x-appwrite": { + "method": "createMfaAuthenticator", + "weight": 46, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-mfa-authenticator.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] } - }, - "fileSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", - "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" + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] } - }, - "compression": { - "type": "string", - "description": "Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled", - "x-example": "none", - "enum": ["none", "gzip", "zstd"], - "x-enum-name": null, - "x-enum-keys": [] - }, - "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"] - } - } - } - } - } - }, - "/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": 204, - "cookies": false, - "type": "", - "deprecated": false, - "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": 205, - "cookies": false, - "type": "", - "deprecated": false, - "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>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator. Must be `totp`", + "required": true, + "schema": { + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [] + }, + "in": "path" } - }, - "fileSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", - "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" + ] + }, + "put": { + "summary": "Verify authenticator", + "operationId": "accountUpdateMfaAuthenticator", + "tags": [ + "account" + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } } - }, - "compression": { - "type": "string", - "description": "Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled", - "x-example": "none", - "enum": ["none", "gzip", "zstd"], - "x-enum-name": null, - "x-enum-keys": [] - }, - "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"] - } - } - } - } - }, - "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": 206, - "cookies": false, - "type": "", - "deprecated": false, - "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.", - "responses": { - "200": { - "description": "Files List", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/fileList" - } - } - } - } - }, - "x-appwrite": { - "method": "listFiles", - "weight": 208, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "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" - } - ] - }, - "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](https://appwrite.io/docs/server/storage#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": 207, - "cookies": false, - "type": "upload", - "deprecated": false, - "demo": "storage/create-file.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/create-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}", - "scope": "files.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/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 a custom ID or generate a random ID with `ID.unique()`. Valid 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. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).", - "x-example": null - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" + "x-appwrite": { + "method": "updateMfaAuthenticator", + "weight": 47, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-mfa-authenticator.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] } - } }, - "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": 209, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/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": 214, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "storage/update-file.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/update-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "files.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/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": { - "name": { - "type": "string", - "description": "Name of the file", - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission string. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] } - } - } - } - } - } - } - }, - "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": 215, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "storage/delete-file.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/delete-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "files.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/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": 211, - "cookies": false, - "type": "location", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/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": 210, - "cookies": false, - "type": "location", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/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", - "enum": [ - "center", - "top-left", - "top", - "top-right", - "left", - "right", - "bottom-left", - "bottom", - "bottom-right" - ], - "x-enum-name": "ImageGravity", - "x-enum-keys": [], - "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", - "enum": ["jpg", "jpeg", "gif", "png", "webp", "heic", "avif"], - "x-enum-name": "ImageFormat", - "x-enum-keys": [], - "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": 212, - "cookies": false, - "type": "location", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/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.", - "responses": { - "200": { - "description": "Teams List", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/teamList" - } - } - } - } - }, - "x-appwrite": { - "method": "list", - "weight": 219, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "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" - } - ] - }, - "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": 218, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "teamId": { - "type": "string", - "description": "Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.", - "x-example": null, - "items": { - "type": "string" + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "schema": { + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [] + }, + "in": "path" } - } - }, - "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": 220, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update name", - "operationId": "teamsUpdateName", - "tags": ["teams"], - "description": "Update the team's name by its unique ID.", - "responses": { - "200": { - "description": "Team", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/team" - } - } - } - } - }, - "x-appwrite": { - "method": "updateName", - "weight": 222, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "teams/update-name.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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": 224, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - } - ] - } - }, - "/teams/{teamId}/memberships": { - "get": { - "summary": "List team memberships", - "operationId": "teamsListMemberships", - "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. Hide sensitive attributes from the response by toggling membership privacy in the Console.", - "responses": { - "200": { - "description": "Memberships List", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/membershipList" - } - } - } - } - }, - "x-appwrite": { - "method": "listMemberships", - "weight": 226, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "teams/list-memberships.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/list-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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "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" - } - ] - }, - "post": { - "summary": "Create team membership", - "operationId": "teamsCreateMembership", - "tags": ["teams"], - "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) 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) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", - "responses": { - "201": { - "description": "Membership", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/membership" - } - } - } - } - }, - "x-appwrite": { - "method": "createMembership", - "weight": 225, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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" - }, - "userId": { - "type": "string", - "description": "ID of the user to be added to a team.", - "x-example": "<USER_ID>" - }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100" - }, - "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](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.", - "x-example": null, - "items": { - "type": "string" + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "otp": { + "type": "string", + "description": "Valid verification token.", + "x-example": "<OTP>" + } + }, + "required": [ + "otp" + ] + } + } } - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. 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": ["roles"] - } - } - } - } - } - }, - "/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. Hide sensitive attributes from the response by toggling membership privacy in the Console.", - "responses": { - "200": { - "description": "Membership", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/membership" } - } - } - } - }, - "x-appwrite": { - "method": "getMembership", - "weight": 227, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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", - "operationId": "teamsUpdateMembership", - "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](https://appwrite.io/docs/permissions).\n", - "responses": { - "200": { - "description": "Membership", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/membership" - } - } - } - } - }, - "x-appwrite": { - "method": "updateMembership", - "weight": 228, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "teams/update-membership.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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" + "delete": { + "summary": "Delete authenticator", + "operationId": "accountDeleteMfaAuthenticator", + "tags": [ + "account" + ], + "description": "Delete an authenticator for a user by ID.", + "responses": { + "204": { + "description": "No content" } - } }, - "required": ["roles"] - } + "x-appwrite": { + "method": "deleteMfaAuthenticator", + "weight": 51, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/delete-mfa-authenticator.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "schema": { + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [] + }, + "in": "path" + } + ] } - } - } - }, - "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": 230, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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" + "\/account\/mfa\/challenge": { + "post": { + "summary": "Create MFA challenge", + "operationId": "accountCreateMfaChallenge", + "tags": [ + "account" + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "responses": { + "201": { + "description": "MFA Challenge", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaChallenge" + } + } + } + } + }, + "x-appwrite": { + "method": "createMfaChallenge", + "weight": 52, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-mfa-challenge.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "factor": { + "type": "string", + "description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.", + "x-example": "email", + "enum": [ + "email", + "phone", + "totp", + "recoverycode" + ], + "x-enum-name": "AuthenticationFactor", + "x-enum-keys": [] + } + }, + "required": [ + "factor" + ] + } + } + } + } + }, + "put": { + "summary": "Create MFA challenge (confirmation)", + "operationId": "accountUpdateMfaChallenge", + "tags": [ + "account" + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "responses": { + "200": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "x-appwrite": { + "method": "updateMfaChallenge", + "weight": 53, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-mfa-challenge.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},challengeId:{param-challengeId}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "challengeId": { + "type": "string", + "description": "ID of the challenge.", + "x-example": "<CHALLENGE_ID>" + }, + "otp": { + "type": "string", + "description": "Valid verification token.", + "x-example": "<OTP>" + } + }, + "required": [ + "challengeId", + "otp" + ] + } + } + } } - } } - } }, - "x-appwrite": { - "method": "updateMembershipStatus", - "weight": 229, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } + "\/account\/mfa\/factors": { + "get": { + "summary": "List factors", + "operationId": "accountListMfaFactors", + "tags": [ + "account" + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "responses": { + "200": { + "description": "MFAFactors", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaFactors" + } + } + } + } + }, + "x-appwrite": { + "method": "listMfaFactors", + "weight": 45, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/list-mfa-factors.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" + "\/account\/mfa\/recovery-codes": { + "get": { + "summary": "Get MFA recovery codes", + "operationId": "accountGetMfaRecoveryCodes", + "tags": [ + "account" + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "x-appwrite": { + "method": "getMfaRecoveryCodes", + "weight": 50, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/get-mfa-recovery-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] }, - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MEMBERSHIP_ID>" + "post": { + "summary": "Create MFA recovery codes", + "operationId": "accountCreateMfaRecoveryCodes", + "tags": [ + "account" + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "responses": { + "201": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "x-appwrite": { + "method": "createMfaRecoveryCodes", + "weight": 48, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-mfa-recovery-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { + "patch": { + "summary": "Regenerate MFA recovery codes", + "operationId": "accountUpdateMfaRecoveryCodes", + "tags": [ + "account" + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "x-appwrite": { + "method": "updateMfaRecoveryCodes", + "weight": 49, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-mfa-recovery-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/name": { + "patch": { + "summary": "Update 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": 32, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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 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": 33, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-password.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "New user password. Must be at least 8 chars.", + "x-example": null + }, + "oldPassword": { + "type": "string", + "description": "Current user password. Must be at least 8 chars.", + "x-example": "password" + } + }, + "required": [ + "password" + ] + } + } + } + } + } + }, + "\/account\/phone": { + "patch": { + "summary": "Update phone", + "operationId": "accountUpdatePhone", + "tags": [ + "account" + ], + "description": "Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createPhoneVerification) endpoint to send a confirmation SMS.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "x-appwrite": { + "method": "updatePhone", + "weight": 35, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-phone.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "x-example": "password" + } + }, + "required": [ + "phone", + "password" + ] + } + } + } + } + } + }, + "\/account\/prefs": { + "get": { + "summary": "Get account preferences", + "operationId": "accountGetPrefs", + "tags": [ + "account" + ], + "description": "Get the preferences as a key-value object for the currently logged in user.", + "responses": { + "200": { + "description": "Preferences", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/preferences" + } + } + } + } + }, + "x-appwrite": { + "method": "getPrefs", + "weight": 30, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "patch": { + "summary": "Update 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": 36, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateRecovery) 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": 38, + "cookies": false, + "type": "", + "deprecated": false, + "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}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) 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": 39, + "cookies": false, + "type": "", + "deprecated": false, + "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": "sessions.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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 between 8 and 256 chars.", + "x-example": null + } + }, + "required": [ + "userId", + "secret", + "password" + ] + } + } + } + } + } + }, + "\/account\/sessions": { + "get": { + "summary": "List sessions", + "operationId": "accountListSessions", + "tags": [ + "account" + ], + "description": "Get the list of active sessions across different devices for the currently logged in user.", + "responses": { + "200": { + "description": "Sessions List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/sessionList" + } + } + } + } + }, + "x-appwrite": { + "method": "listSessions", + "weight": 11, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/list-sessions.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "delete": { + "summary": "Delete 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": 12, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateEmail) or create an [OAuth2 session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#CreateOAuth2Session).", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "x-appwrite": { + "method": "createAnonymousSession", + "weight": 17, + "cookies": false, + "type": "", + "deprecated": false, + "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": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ] + } + }, + "\/account\/sessions\/email": { + "post": { + "summary": "Create email password session", + "operationId": "accountCreateEmailPasswordSession", + "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.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "x-appwrite": { + "method": "createEmailPasswordSession", + "weight": 16, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-email-password-session.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},email:{param-email}", + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "x-example": "password" + } + }, + "required": [ + "email", + "password" + ] + } + } + } + } + } + }, + "\/account\/sessions\/magic-url": { + "put": { + "summary": "Update magic URL session", + "operationId": "accountUpdateMagicURLSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "x-appwrite": { + "method": "updateMagicURLSession", + "weight": 26, + "cookies": false, + "type": "", + "deprecated": true, + "demo": "account\/update-magic-u-r-l-session.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/account\/sessions\/phone": { + "put": { + "summary": "Update phone session", + "operationId": "accountUpdatePhoneSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "x-appwrite": { + "method": "updatePhoneSession", + "weight": 27, + "cookies": false, + "type": "", + "deprecated": true, + "demo": "account\/update-phone-session.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/account\/sessions\/token": { + "post": { + "summary": "Create session", + "operationId": "accountCreateSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "x-appwrite": { + "method": "createSession", + "weight": 18, + "cookies": false, + "type": "", + "deprecated": false, + "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": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + }, + "secret": { + "type": "string", + "description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.", + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/account\/sessions\/{sessionId}": { + "get": { + "summary": "Get session", + "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": 13, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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", + "operationId": "accountUpdateSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.", + "responses": { + "200": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "x-appwrite": { + "method": "updateSession", + "weight": 15, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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 session", + "operationId": "accountDeleteSession", + "tags": [ + "account" + ], + "description": "Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#deleteSessions) instead.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteSession", + "weight": 14, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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 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": 37, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/tokens\/email": { + "post": { + "summary": "Create email token (OTP)", + "operationId": "accountCreateEmailToken", + "tags": [ + "account" + ], + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "x-appwrite": { + "method": "createEmailToken", + "weight": 25, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-email-token.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},email:{param-email}", + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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" + }, + "phrase": { + "type": "boolean", + "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", + "x-example": false + } + }, + "required": [ + "userId", + "email" + ] + } + } + } + } + } + }, + "\/account\/tokens\/magic-url": { + "post": { + "summary": "Create magic URL token", + "operationId": "accountCreateMagicURLToken", + "tags": [ + "account" + ], + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. 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 [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "x-appwrite": { + "method": "createMagicURLToken", + "weight": 24, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-magic-u-r-l-token.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", + "rate-limit": 60, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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" + }, + "phrase": { + "type": "boolean", + "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", + "x-example": false + } + }, + "required": [ + "userId", + "email" + ] + } + } + } + } + } + }, + "\/account\/tokens\/oauth2\/{provider}": { + "get": { + "summary": "Create OAuth2 token", + "operationId": "accountCreateOAuth2Token", + "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 authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "301": { + "description": "File" + } + }, + "x-appwrite": { + "method": "createOAuth2Token", + "weight": 23, + "cookies": false, + "type": "webAuth", + "deprecated": false, + "demo": "account\/create-o-auth2token.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "provider", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", + "required": true, + "schema": { + "type": "string", + "x-example": "amazon", + "enum": [ + "amazon", + "apple", + "auth0", + "authentik", + "autodesk", + "bitbucket", + "bitly", + "box", + "dailymotion", + "discord", + "disqus", + "dropbox", + "etsy", + "facebook", + "github", + "gitlab", + "google", + "linkedin", + "microsoft", + "notion", + "oidc", + "okta", + "paypal", + "paypalSandbox", + "podio", + "salesforce", + "slack", + "spotify", + "stripe", + "tradeshift", + "tradeshiftBox", + "twitch", + "wordpress", + "yahoo", + "yammer", + "yandex", + "zoho", + "zoom", + "mock" + ], + "x-enum-name": "OAuthProvider", + "x-enum-keys": [] + }, + "in": "path" + }, + { + "name": "success", + "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's 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's 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 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/account\/tokens\/phone": { + "post": { + "summary": "Create phone token", + "operationId": "accountCreatePhoneToken", + "tags": [ + "account" + ], + "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "x-appwrite": { + "method": "createPhoneToken", + "weight": 28, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-phone-token.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},phone:{param-phone}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100" + } + }, + "required": [ + "userId", + "phone" + ] + } + } + } + } + } + }, + "\/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](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). 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": 40, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-verification.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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": 41, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-verification.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "public", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/account\/verification\/phone": { + "post": { + "summary": "Create phone verification", + "operationId": "accountCreatePhoneVerification", + "tags": [ + "account" + ], + "description": "Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "x-appwrite": { + "method": "createPhoneVerification", + "weight": 42, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-phone-verification.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},userId:{userId}", + "url:{url},ip:{ip}" + ], + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "put": { + "summary": "Update phone verification (confirmation)", + "operationId": "accountUpdatePhoneVerification", + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.", + "responses": { + "200": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "x-appwrite": { + "method": "updatePhoneVerification", + "weight": 43, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-phone-verification.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "userId:{param-userId}", + "scope": "public", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) 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": 60, + "cookies": false, + "type": "location", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Browser Code.", + "required": true, + "schema": { + "type": "string", + "x-example": "aa", + "enum": [ + "aa", + "an", + "ch", + "ci", + "cm", + "cr", + "ff", + "sf", + "mf", + "ps", + "oi", + "om", + "op", + "on" + ], + "x-enum-name": "Browser", + "x-enum-keys": [ + "Avant Browser", + "Android WebView Beta", + "Google Chrome", + "Google Chrome (iOS)", + "Google Chrome (Mobile)", + "Chromium", + "Mozilla Firefox", + "Safari", + "Mobile Safari", + "Microsoft Edge", + "Microsoft Edge (iOS)", + "Opera Mini", + "Opera", + "Opera (Next)" + ] + }, + "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": 59, + "cookies": false, + "type": "location", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.", + "required": true, + "schema": { + "type": "string", + "x-example": "amex", + "enum": [ + "amex", + "argencard", + "cabal", + "cencosud", + "diners", + "discover", + "elo", + "hipercard", + "jcb", + "mastercard", + "naranja", + "targeta-shopping", + "union-china-pay", + "visa", + "mir", + "maestro" + ], + "x-enum-name": "CreditCard", + "x-enum-keys": [ + "American Express", + "Argencard", + "Cabal", + "Cencosud", + "Diners Club", + "Discover", + "Elo", + "Hipercard", + "JCB", + "Mastercard", + "Naranja", + "Tarjeta Shopping", + "Union China Pay", + "Visa", + "MIR", + "Maestro" + ] + }, + "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\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image" + } + }, + "x-appwrite": { + "method": "getFavicon", + "weight": 63, + "cookies": false, + "type": "location", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\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": 61, + "cookies": false, + "type": "location", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Country Code. ISO Alpha-2 country code format.", + "required": true, + "schema": { + "type": "string", + "x-example": "af", + "enum": [ + "af", + "ao", + "al", + "ad", + "ae", + "ar", + "am", + "ag", + "au", + "at", + "az", + "bi", + "be", + "bj", + "bf", + "bd", + "bg", + "bh", + "bs", + "ba", + "by", + "bz", + "bo", + "br", + "bb", + "bn", + "bt", + "bw", + "cf", + "ca", + "ch", + "cl", + "cn", + "ci", + "cm", + "cd", + "cg", + "co", + "km", + "cv", + "cr", + "cu", + "cy", + "cz", + "de", + "dj", + "dm", + "dk", + "do", + "dz", + "ec", + "eg", + "er", + "es", + "ee", + "et", + "fi", + "fj", + "fr", + "fm", + "ga", + "gb", + "ge", + "gh", + "gn", + "gm", + "gw", + "gq", + "gr", + "gd", + "gt", + "gy", + "hn", + "hr", + "ht", + "hu", + "id", + "in", + "ie", + "ir", + "iq", + "is", + "il", + "it", + "jm", + "jo", + "jp", + "kz", + "ke", + "kg", + "kh", + "ki", + "kn", + "kr", + "kw", + "la", + "lb", + "lr", + "ly", + "lc", + "li", + "lk", + "ls", + "lt", + "lu", + "lv", + "ma", + "mc", + "md", + "mg", + "mv", + "mx", + "mh", + "mk", + "ml", + "mt", + "mm", + "me", + "mn", + "mz", + "mr", + "mu", + "mw", + "my", + "na", + "ne", + "ng", + "ni", + "nl", + "no", + "np", + "nr", + "nz", + "om", + "pk", + "pa", + "pe", + "ph", + "pw", + "pg", + "pl", + "pf", + "kp", + "pt", + "py", + "qa", + "ro", + "ru", + "rw", + "sa", + "sd", + "sn", + "sg", + "sb", + "sl", + "sv", + "sm", + "so", + "rs", + "ss", + "st", + "sr", + "sk", + "si", + "se", + "sz", + "sc", + "sy", + "td", + "tg", + "th", + "tj", + "tm", + "tl", + "to", + "tt", + "tn", + "tr", + "tv", + "tz", + "ug", + "ua", + "uy", + "us", + "uz", + "va", + "vc", + "ve", + "vn", + "vu", + "ws", + "ye", + "za", + "zm", + "zw" + ], + "x-enum-name": "Flag", + "x-enum-keys": [ + "Afghanistan", + "Angola", + "Albania", + "Andorra", + "United Arab Emirates", + "Argentina", + "Armenia", + "Antigua and Barbuda", + "Australia", + "Austria", + "Azerbaijan", + "Burundi", + "Belgium", + "Benin", + "Burkina Faso", + "Bangladesh", + "Bulgaria", + "Bahrain", + "Bahamas", + "Bosnia and Herzegovina", + "Belarus", + "Belize", + "Bolivia", + "Brazil", + "Barbados", + "Brunei Darussalam", + "Bhutan", + "Botswana", + "Central African Republic", + "Canada", + "Switzerland", + "Chile", + "China", + "C\u00f4te d'Ivoire", + "Cameroon", + "Democratic Republic of the Congo", + "Republic of the Congo", + "Colombia", + "Comoros", + "Cape Verde", + "Costa Rica", + "Cuba", + "Cyprus", + "Czech Republic", + "Germany", + "Djibouti", + "Dominica", + "Denmark", + "Dominican Republic", + "Algeria", + "Ecuador", + "Egypt", + "Eritrea", + "Spain", + "Estonia", + "Ethiopia", + "Finland", + "Fiji", + "France", + "Micronesia (Federated States of)", + "Gabon", + "United Kingdom", + "Georgia", + "Ghana", + "Guinea", + "Gambia", + "Guinea-Bissau", + "Equatorial Guinea", + "Greece", + "Grenada", + "Guatemala", + "Guyana", + "Honduras", + "Croatia", + "Haiti", + "Hungary", + "Indonesia", + "India", + "Ireland", + "Iran (Islamic Republic of)", + "Iraq", + "Iceland", + "Israel", + "Italy", + "Jamaica", + "Jordan", + "Japan", + "Kazakhstan", + "Kenya", + "Kyrgyzstan", + "Cambodia", + "Kiribati", + "Saint Kitts and Nevis", + "South Korea", + "Kuwait", + "Lao People's Democratic Republic", + "Lebanon", + "Liberia", + "Libya", + "Saint Lucia", + "Liechtenstein", + "Sri Lanka", + "Lesotho", + "Lithuania", + "Luxembourg", + "Latvia", + "Morocco", + "Monaco", + "Moldova", + "Madagascar", + "Maldives", + "Mexico", + "Marshall Islands", + "North Macedonia", + "Mali", + "Malta", + "Myanmar", + "Montenegro", + "Mongolia", + "Mozambique", + "Mauritania", + "Mauritius", + "Malawi", + "Malaysia", + "Namibia", + "Niger", + "Nigeria", + "Nicaragua", + "Netherlands", + "Norway", + "Nepal", + "Nauru", + "New Zealand", + "Oman", + "Pakistan", + "Panama", + "Peru", + "Philippines", + "Palau", + "Papua New Guinea", + "Poland", + "French Polynesia", + "North Korea", + "Portugal", + "Paraguay", + "Qatar", + "Romania", + "Russia", + "Rwanda", + "Saudi Arabia", + "Sudan", + "Senegal", + "Singapore", + "Solomon Islands", + "Sierra Leone", + "El Salvador", + "San Marino", + "Somalia", + "Serbia", + "South Sudan", + "Sao Tome and Principe", + "Suriname", + "Slovakia", + "Slovenia", + "Sweden", + "Eswatini", + "Seychelles", + "Syria", + "Chad", + "Togo", + "Thailand", + "Tajikistan", + "Turkmenistan", + "Timor-Leste", + "Tonga", + "Trinidad and Tobago", + "Tunisia", + "Turkey", + "Tuvalu", + "Tanzania", + "Uganda", + "Ukraine", + "Uruguay", + "United States", + "Uzbekistan", + "Vatican City", + "Saint Vincent and the Grenadines", + "Venezuela", + "Vietnam", + "Vanuatu", + "Samoa", + "Yemen", + "South Africa", + "Zambia", + "Zimbabwe" + ] + }, + "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\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image" + } + }, + "x-appwrite": { + "method": "getImage", + "weight": 62, + "cookies": false, + "type": "location", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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": 65, + "cookies": false, + "type": "location", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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": "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": 64, + "cookies": false, + "type": "location", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "text", + "description": "Plain text to be converted to QR code image.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEXT>" + }, + "in": "query" + }, + { + "name": "size", + "description": "QR code size. Pass an integer between 1 to 1000. Defaults to 400.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 400 + }, + "in": "query" + }, + { + "name": "margin", + "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 1 + }, + "in": "query" + }, + { + "name": "download", + "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": false + }, + "in": "query" + } + ] + } + }, + "\/databases": { + "get": { + "summary": "List databases", + "operationId": "databasesList", + "tags": [ + "databases" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseList" + } + } + } + } + }, + "x-appwrite": { + "method": "list", + "weight": 70, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "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" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "databasesCreate", + "tags": [ + "databases" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "x-appwrite": { + "method": "create", + "weight": 69, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<DATABASE_ID>" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "databasesGet", + "tags": [ + "databases" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "x-appwrite": { + "method": "get", + "weight": 71, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "databasesUpdate", + "tags": [ + "databases" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "x-appwrite": { + "method": "update", + "weight": 73, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "databasesDelete", + "tags": [ + "databases" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "weight": 74, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections": { + "get": { + "summary": "List collections", + "operationId": "databasesListCollections", + "tags": [ + "databases" + ], + "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Collections List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collectionList" + } + } + } + } + }, + "x-appwrite": { + "method": "listCollections", + "weight": 76, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/list-collections.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "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" + } + ] + }, + "post": { + "summary": "Create collection", + "operationId": "databasesCreateCollection", + "tags": [ + "databases" + ], + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collection" + } + } + } + } + }, + "x-appwrite": { + "method": "createCollection", + "weight": 75, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "collectionId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "collectionId", + "name" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}": { + "get": { + "summary": "Get collection", + "operationId": "databasesGetCollection", + "tags": [ + "databases" + ], + "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": 77, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/get-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update collection", + "operationId": "databasesUpdateCollection", + "tags": [ + "databases" + ], + "description": "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": "", + "deprecated": false, + "demo": "databases\/update-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete collection", + "operationId": "databasesDeleteCollection", + "tags": [ + "databases" + ], + "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": "", + "deprecated": false, + "demo": "databases\/delete-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes": { + "get": { + "summary": "List attributes", + "operationId": "databasesListAttributes", + "tags": [ + "databases" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Attributes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeList" + } + } + } + } + }, + "x-appwrite": { + "method": "listAttributes", + "weight": 91, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/list-attributes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean": { + "post": { + "summary": "Create boolean attribute", + "operationId": "databasesCreateBooleanAttribute", + "tags": [ + "databases" + ], + "description": "Create a boolean attribute.\n", + "responses": { + "202": { + "description": "AttributeBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeBoolean" + } + } + } + } + }, + "x-appwrite": { + "method": "createBooleanAttribute", + "weight": 88, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-boolean-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean\/{key}": { + "patch": { + "summary": "Update boolean attribute", + "operationId": "databasesUpdateBooleanAttribute", + "tags": [ + "databases" + ], + "description": "Update a boolean attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeBoolean" + } + } + } + } + }, + "x-appwrite": { + "method": "updateBooleanAttribute", + "weight": 100, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-boolean-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "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, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime": { + "post": { + "summary": "Create datetime attribute", + "operationId": "databasesCreateDatetimeAttribute", + "tags": [ + "databases" + ], + "description": "Create a date time attribute according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "AttributeDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeDatetime" + } + } + } + } + }, + "x-appwrite": { + "method": "createDatetimeAttribute", + "weight": 89, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-datetime-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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 the attribute in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime attribute", + "operationId": "databasesUpdateDatetimeAttribute", + "tags": [ + "databases" + ], + "description": "Update a date time attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeDatetime" + } + } + } + } + }, + "x-appwrite": { + "method": "updateDatetimeAttribute", + "weight": 101, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-datetime-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "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, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email": { + "post": { + "summary": "Create email attribute", + "operationId": "databasesCreateEmailAttribute", + "tags": [ + "databases" + ], + "description": "Create an email attribute.\n", + "responses": { + "202": { + "description": "AttributeEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeEmail" + } + } + } + } + }, + "x-appwrite": { + "method": "createEmailAttribute", + "weight": 82, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-email-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email\/{key}": { + "patch": { + "summary": "Update email attribute", + "operationId": "databasesUpdateEmailAttribute", + "tags": [ + "databases" + ], + "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeEmail" + } + } + } + } + }, + "x-appwrite": { + "method": "updateEmailAttribute", + "weight": 94, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-email-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "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", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum": { + "post": { + "summary": "Create enum attribute", + "operationId": "databasesCreateEnumAttribute", + "tags": [ + "databases" + ], + "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "responses": { + "202": { + "description": "AttributeEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeEnum" + } + } + } + } + }, + "x-appwrite": { + "method": "createEnumAttribute", + "weight": 83, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-enum-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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 255 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "<DEFAULT>" + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum\/{key}": { + "patch": { + "summary": "Update enum attribute", + "operationId": "databasesUpdateEnumAttribute", + "tags": [ + "databases" + ], + "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeEnum" + } + } + } + } + }, + "x-appwrite": { + "method": "updateEnumAttribute", + "weight": 95, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-enum-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "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 255 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>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float": { + "post": { + "summary": "Create float attribute", + "operationId": "databasesCreateFloatAttribute", + "tags": [ + "databases" + ], + "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "AttributeFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeFloat" + } + } + } + } + }, + "x-appwrite": { + "method": "createFloatAttribute", + "weight": 87, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-float-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value to enforce on new documents", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value to enforce on new documents", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float\/{key}": { + "patch": { + "summary": "Update float attribute", + "operationId": "databasesUpdateFloatAttribute", + "tags": [ + "databases" + ], + "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeFloat" + } + } + } + } + }, + "x-appwrite": { + "method": "updateFloatAttribute", + "weight": 99, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-float-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "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, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null + } + }, + "required": [ + "required", + "min", + "max", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer": { + "post": { + "summary": "Create integer attribute", + "operationId": "databasesCreateIntegerAttribute", + "tags": [ + "databases" + ], + "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "AttributeInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeInteger" + } + } + } + } + }, + "x-appwrite": { + "method": "createIntegerAttribute", + "weight": 86, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-integer-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce on new documents", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce on new documents", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer\/{key}": { + "patch": { + "summary": "Update integer attribute", + "operationId": "databasesUpdateIntegerAttribute", + "tags": [ + "databases" + ], + "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeInteger" + } + } + } + } + }, + "x-appwrite": { + "method": "updateIntegerAttribute", + "weight": 98, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-integer-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "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, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null + } + }, + "required": [ + "required", + "min", + "max", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip": { + "post": { + "summary": "Create IP address attribute", + "operationId": "databasesCreateIpAttribute", + "tags": [ + "databases" + ], + "description": "Create IP address attribute.\n", + "responses": { + "202": { + "description": "AttributeIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeIp" + } + } + } + } + }, + "x-appwrite": { + "method": "createIpAttribute", + "weight": 84, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-ip-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip\/{key}": { + "patch": { + "summary": "Update IP address attribute", + "operationId": "databasesUpdateIpAttribute", + "tags": [ + "databases" + ], + "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeIp" + } + } + } + } + }, + "x-appwrite": { + "method": "updateIpAttribute", + "weight": 96, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-ip-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "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, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship": { + "post": { + "summary": "Create relationship attribute", + "operationId": "databasesCreateRelationshipAttribute", + "tags": [ + "databases" + ], + "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", + "responses": { + "202": { + "description": "AttributeRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeRelationship" + } + } + } + } + }, + "x-appwrite": { + "method": "createRelationshipAttribute", + "weight": 90, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-relationship-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "relatedCollectionId": { + "type": "string", + "description": "Related Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "x-example": "<RELATED_COLLECTION_ID>" + }, + "type": { + "type": "string", + "description": "Relation type", + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "x-example": false + }, + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Attribute Key.", + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedCollectionId", + "type" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string": { + "post": { + "summary": "Create string attribute", + "operationId": "databasesCreateStringAttribute", + "tags": [ + "databases" + ], + "description": "Create a string attribute.\n", + "responses": { + "202": { + "description": "AttributeString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeString" + } + } + } + } + }, + "x-appwrite": { + "method": "createStringAttribute", + "weight": 81, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-string-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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 + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string\/{key}": { + "patch": { + "summary": "Update string attribute", + "operationId": "databasesUpdateStringAttribute", + "tags": [ + "databases" + ], + "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeString" + } + } + } + } + }, + "x-appwrite": { + "method": "updateStringAttribute", + "weight": 93, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-string-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "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>", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string attribute.", + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url": { + "post": { + "summary": "Create URL attribute", + "operationId": "databasesCreateUrlAttribute", + "tags": [ + "databases" + ], + "description": "Create a URL attribute.\n", + "responses": { + "202": { + "description": "AttributeURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeUrl" + } + } + } + } + }, + "x-appwrite": { + "method": "createUrlAttribute", + "weight": 85, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-url-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url\/{key}": { + "patch": { + "summary": "Update URL attribute", + "operationId": "databasesUpdateUrlAttribute", + "tags": [ + "databases" + ], + "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeUrl" + } + } + } + } + }, + "x-appwrite": { + "method": "updateUrlAttribute", + "weight": 97, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-url-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "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", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}": { + "get": { + "summary": "Get attribute", + "operationId": "databasesGetAttribute", + "tags": [ + "databases" + ], + "description": "Get attribute by ID.", + "responses": { + "200": { + "description": "AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeRelationship, 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\/attributeDatetime" + }, + { + "$ref": "#\/components\/schemas\/attributeRelationship" + }, + { + "$ref": "#\/components\/schemas\/attributeString" + } + ] + } + } + } + } + }, + "x-appwrite": { + "method": "getAttribute", + "weight": 92, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/get-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete attribute", + "operationId": "databasesDeleteAttribute", + "tags": [ + "databases" + ], + "description": "Deletes an attribute.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteAttribute", + "weight": 103, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}\/relationship": { + "patch": { + "summary": "Update relationship attribute", + "operationId": "databasesUpdateRelationshipAttribute", + "tags": [ + "databases" + ], + "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", + "responses": { + "200": { + "description": "AttributeRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeRelationship" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRelationshipAttribute", + "weight": 102, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-relationship-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "databasesListDocuments", + "tags": [ + "databases" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "x-appwrite": { + "method": "listDocuments", + "weight": 109, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/list-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "databasesCreateDocument", + "tags": [ + "databases" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "x-appwrite": { + "method": "createDocument", + "weight": 108, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). 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 a custom ID or generate a random ID with `ID.unique()`. Valid 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": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + }, + "required": [ + "documentId", + "data" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "databasesGetDocument", + "tags": [ + "databases" + ], + "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": 110, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/get-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "patch": { + "summary": "Update document", + "operationId": "databasesUpdateDocument", + "tags": [ + "databases" + ], + "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": 112, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete document", + "operationId": "databasesDeleteDocument", + "tags": [ + "databases" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteDocument", + "weight": 113, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "databasesListIndexes", + "tags": [ + "databases" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/indexList" + } + } + } + } + }, + "x-appwrite": { + "method": "listIndexes", + "weight": 105, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "databasesCreateIndex", + "tags": [ + "databases" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/index" + } + } + } + } + }, + "x-appwrite": { + "method": "createIndex", + "weight": 104, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "IndexType", + "x-enum-keys": [] + }, + "attributes": { + "type": "array", + "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "key", + "type", + "attributes" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "databasesGetIndex", + "tags": [ + "databases" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/index" + } + } + } + } + }, + "x-appwrite": { + "method": "getIndex", + "weight": 106, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "databasesDeleteIndex", + "tags": [ + "databases" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteIndex", + "weight": 107, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": 289, + "cookies": false, + "type": "", + "deprecated": false, + "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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "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" + } + ] + }, + "post": { + "summary": "Create function", + "operationId": "functionsCreate", + "tags": [ + "functions" + ], + "description": "Create a new function. You can pass a list of [permissions](https:\/\/appwrite.io\/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": 288, + "cookies": false, + "type": "", + "deprecated": false, + "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 a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + }, + "runtime": { + "type": "string", + "description": "Execution runtime.", + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-ml-3.11", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "go-1.23", + "static-1", + "flutter-3.24" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "execute": { + "type": "array", + "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + }, + "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 + }, + "enabled": { + "type": "boolean", + "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project.", + "x-example": false + }, + "entrypoint": { + "type": "string", + "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", + "x-example": "<ENTRYPOINT>" + }, + "commands": { + "type": "string", + "description": "Build Commands.", + "x-example": "<COMMANDS>" + }, + "scopes": { + "type": "array", + "description": "List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.", + "x-example": null, + "items": { + "type": "string" + } + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", + "x-example": "<INSTALLATION_ID>" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the function.", + "x-example": "<PROVIDER_REPOSITORY_ID>" + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the function.", + "x-example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function code in the linked repo.", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "templateRepository": { + "type": "string", + "description": "Repository name of the template.", + "x-example": "<TEMPLATE_REPOSITORY>" + }, + "templateOwner": { + "type": "string", + "description": "The name of the owner of the template.", + "x-example": "<TEMPLATE_OWNER>" + }, + "templateRootDirectory": { + "type": "string", + "description": "Path to function code in the template repo.", + "x-example": "<TEMPLATE_ROOT_DIRECTORY>" + }, + "templateVersion": { + "type": "string", + "description": "Version (tag) for the repo linked to the function template.", + "x-example": "<TEMPLATE_VERSION>" + }, + "specification": { + "type": "string", + "description": "Runtime specification for the function and builds.", + "x-example": null + } + }, + "required": [ + "functionId", + "name", + "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": 290, + "cookies": false, + "type": "", + "deprecated": false, + "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\/specifications": { + "get": { + "summary": "List available function runtime specifications", + "operationId": "functionsListSpecifications", + "tags": [ + "functions" + ], + "description": "List allowed function specifications for this instance.\n", + "responses": { + "200": { + "description": "Specifications List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/specificationList" + } + } + } + } + }, + "x-appwrite": { + "method": "listSpecifications", + "weight": 291, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/list-specifications.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "server", + "console" + ], + "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": 292, + "cookies": false, + "type": "", + "deprecated": false, + "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": 295, + "cookies": false, + "type": "", + "deprecated": false, + "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>" + }, + "runtime": { + "type": "string", + "description": "Execution runtime.", + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-ml-3.11", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "go-1.23", + "static-1", + "flutter-3.24" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "execute": { + "type": "array", + "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + }, + "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 + }, + "enabled": { + "type": "boolean", + "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project.", + "x-example": false + }, + "entrypoint": { + "type": "string", + "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", + "x-example": "<ENTRYPOINT>" + }, + "commands": { + "type": "string", + "description": "Build Commands.", + "x-example": "<COMMANDS>" + }, + "scopes": { + "type": "array", + "description": "List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.", + "x-example": null, + "items": { + "type": "string" + } + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Controle System) deployment.", + "x-example": "<INSTALLATION_ID>" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the function", + "x-example": "<PROVIDER_REPOSITORY_ID>", + "x-nullable": true + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the function", + "x-example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function code in the linked repo.", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "specification": { + "type": "string", + "description": "Runtime specification for the function and builds.", + "x-example": null + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "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": 298, + "cookies": false, + "type": "", + "deprecated": false, + "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": 300, + "cookies": false, + "type": "", + "deprecated": false, + "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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: size, buildId, activate, entrypoint, commands, type, size", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "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" + } + ] + }, + "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](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "x-appwrite": { + "method": "createDeployment", + "weight": 299, + "cookies": false, + "type": "upload", + "deprecated": false, + "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>" + }, + "commands": { + "type": "string", + "description": "Build Commands.", + "x-example": "<COMMANDS>" + }, + "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": [ + "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": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "x-appwrite": { + "method": "getDeployment", + "weight": 301, + "cookies": false, + "type": "", + "deprecated": false, + "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 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": 297, + "cookies": false, + "type": "", + "deprecated": false, + "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": 302, + "cookies": false, + "type": "", + "deprecated": false, + "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}\/build": { + "post": { + "summary": "Rebuild deployment", + "operationId": "functionsCreateBuild", + "tags": [ + "functions" + ], + "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "createBuild", + "weight": 303, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/create-build.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-build.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" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "buildId": { + "type": "string", + "description": "Build unique ID.", + "x-example": "<BUILD_ID>" + } + } + } + } + } + } + }, + "patch": { + "summary": "Cancel deployment", + "operationId": "functionsUpdateDeploymentBuild", + "tags": [ + "functions" + ], + "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", + "responses": { + "200": { + "description": "Build", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/build" + } + } + } + } + }, + "x-appwrite": { + "method": "updateDeploymentBuild", + "weight": 304, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/update-deployment-build.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-deployment-build.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}\/download": { + "get": { + "summary": "Download deployment", + "operationId": "functionsGetDeploymentDownload", + "tags": [ + "functions" + ], + "description": "Get a Deployment's contents by its unique ID. This endpoint supports range requests for partial or streaming file download.", + "responses": { + "200": { + "description": "File" + } + }, + "x-appwrite": { + "method": "getDeploymentDownload", + "weight": 296, + "cookies": false, + "type": "location", + "deprecated": false, + "demo": "functions\/get-deployment-download.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "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" + } + ] + } + }, + "\/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.", + "responses": { + "200": { + "description": "Executions List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/executionList" + } + } + } + } + }, + "x-appwrite": { + "method": "listExecutions", + "weight": 306, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_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\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "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" + } + ] + }, + "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": { + "multipart\/form-data": { + "schema": { + "$ref": "#\/components\/schemas\/execution" + } + } + } + } + }, + "x-appwrite": { + "method": "createExecution", + "weight": 305, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/create-execution.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "execution.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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": { + "body": { + "type": "string", + "description": "HTTP body of execution. Default value is empty string.", + "x-example": "<BODY>" + }, + "async": { + "type": "boolean", + "description": "Execute code in the background. Default value is false.", + "x-example": false + }, + "path": { + "type": "string", + "description": "HTTP path of execution. Path can include query params. Default value is \/", + "x-example": "<PATH>" + }, + "method": { + "type": "string", + "description": "HTTP method of execution. Default value is GET.", + "x-example": "GET", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS" + ], + "x-enum-name": "ExecutionMethod", + "x-enum-keys": [] + }, + "headers": { + "type": "string", + "description": "HTTP headers of execution. Defaults to empty.", + "x-example": null + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/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": 307, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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" + } + ] + }, + "delete": { + "summary": "Delete execution", + "operationId": "functionsDeleteExecution", + "tags": [ + "functions" + ], + "description": "Delete a function execution by its unique ID.\n", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteExecution", + "weight": 308, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/delete-execution.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "execution.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": "executionId", + "description": "Execution ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<EXECUTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}\/variables": { + "get": { + "summary": "List variables", + "operationId": "functionsListVariables", + "tags": [ + "functions" + ], + "description": "Get a list of all variables of a specific function.", + "responses": { + "200": { + "description": "Variables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variableList" + } + } + } + } + }, + "x-appwrite": { + "method": "listVariables", + "weight": 310, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/list-variables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-variables.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 unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + } + ] + }, + "post": { + "summary": "Create variable", + "operationId": "functionsCreateVariable", + "tags": [ + "functions" + ], + "description": "Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", + "responses": { + "201": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "x-appwrite": { + "method": "createVariable", + "weight": 309, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/create-variable.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-variable.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 unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "x-example": "<VALUE>" + } + }, + "required": [ + "key", + "value" + ] + } + } + } + } + } + }, + "\/functions\/{functionId}\/variables\/{variableId}": { + "get": { + "summary": "Get variable", + "operationId": "functionsGetVariable", + "tags": [ + "functions" + ], + "description": "Get a variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "x-appwrite": { + "method": "getVariable", + "weight": 311, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/get-variable.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-variable.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 unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<VARIABLE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update variable", + "operationId": "functionsUpdateVariable", + "tags": [ + "functions" + ], + "description": "Update variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "x-appwrite": { + "method": "updateVariable", + "weight": 312, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/update-variable.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-variable.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 unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<VARIABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "x-example": "<VALUE>" + } + }, + "required": [ + "key" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete variable", + "operationId": "functionsDeleteVariable", + "tags": [ + "functions" + ], + "description": "Delete a variable by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteVariable", + "weight": 313, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/delete-variable.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-variable.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 unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<VARIABLE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/graphql": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlQuery", + "tags": [ + "graphql" + ], + "description": "Execute a GraphQL mutation.", + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "x-appwrite": { + "method": "query", + "weight": 331, + "cookies": false, + "type": "graphql", + "deprecated": false, + "demo": "graphql\/query.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", + "platforms": [ + "server", + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/graphql\/mutation": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlMutation", + "tags": [ + "graphql" + ], + "description": "Execute a GraphQL mutation.", + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "x-appwrite": { + "method": "mutation", + "weight": 330, + "cookies": false, + "type": "graphql", + "deprecated": false, + "demo": "graphql\/mutation.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", + "platforms": [ + "server", + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/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": 125, + "cookies": false, + "type": "", + "deprecated": false, + "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": 147, + "cookies": false, + "type": "", + "deprecated": false, + "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 servers are up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthStatus" + } + } + } + } + }, + "x-appwrite": { + "method": "getCache", + "weight": 128, + "cookies": false, + "type": "", + "deprecated": false, + "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\/certificate": { + "get": { + "summary": "Get the SSL certificate for a domain", + "operationId": "healthGetCertificate", + "tags": [ + "health" + ], + "description": "Get the SSL certificate for a domain", + "responses": { + "200": { + "description": "Health Certificate", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthCertificate" + } + } + } + } + }, + "x-appwrite": { + "method": "getCertificate", + "weight": 134, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-certificate.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-certificate.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": [] + } + ], + "parameters": [ + { + "name": "domain", + "description": "string", + "required": false, + "schema": { + "type": "string" + }, + "in": "query" + } + ] + } + }, + "\/health\/db": { + "get": { + "summary": "Get DB", + "operationId": "healthGetDB", + "tags": [ + "health" + ], + "description": "Check the Appwrite database servers are up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthStatus" + } + } + } + } + }, + "x-appwrite": { + "method": "getDB", + "weight": 127, + "cookies": false, + "type": "", + "deprecated": false, + "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\/pubsub": { + "get": { + "summary": "Get pubsub", + "operationId": "healthGetPubSub", + "tags": [ + "health" + ], + "description": "Check the Appwrite pub-sub servers are up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthStatus" + } + } + } + } + }, + "x-appwrite": { + "method": "getPubSub", + "weight": 130, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-pub-sub.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.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": { + "get": { + "summary": "Get queue", + "operationId": "healthGetQueue", + "tags": [ + "health" + ], + "description": "Check the Appwrite queue messaging servers are up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthStatus" + } + } + } + } + }, + "x-appwrite": { + "method": "getQueue", + "weight": 129, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue.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\/builds": { + "get": { + "summary": "Get builds queue", + "operationId": "healthGetQueueBuilds", + "tags": [ + "health" + ], + "description": "Get the number of builds 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": "getQueueBuilds", + "weight": 136, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue-builds.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-builds.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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/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": 135, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/databases": { + "get": { + "summary": "Get databases queue", + "operationId": "healthGetQueueDatabases", + "tags": [ + "health" + ], + "description": "Get the number of database changes 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": "getQueueDatabases", + "weight": 137, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue-databases.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-databases.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": [] + } + ], + "parameters": [ + { + "name": "name", + "description": "Queue name for which to check the queue size", + "required": false, + "schema": { + "type": "string", + "x-example": "<NAME>", + "default": "database_db_main" + }, + "in": "query" + }, + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/deletes": { + "get": { + "summary": "Get deletes queue", + "operationId": "healthGetQueueDeletes", + "tags": [ + "health" + ], + "description": "Get the number of background destructive changes 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": "getQueueDeletes", + "weight": 138, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue-deletes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-deletes.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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/failed\/{name}": { + "get": { + "summary": "Get number of failed queue jobs", + "operationId": "healthGetFailedJobs", + "tags": [ + "health" + ], + "description": "Returns the amount of failed jobs in a given queue.\n", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "x-appwrite": { + "method": "getFailedJobs", + "weight": 148, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-failed-jobs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-failed-queue-jobs.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": [] + } + ], + "parameters": [ + { + "name": "name", + "description": "The name of the queue", + "required": true, + "schema": { + "type": "string", + "x-example": "v1-database", + "enum": [ + "v1-database", + "v1-deletes", + "v1-audits", + "v1-mails", + "v1-functions", + "v1-usage", + "v1-usage-dump", + "v1-webhooks", + "v1-certificates", + "v1-builds", + "v1-messaging", + "v1-migrations" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "in": "path" + }, + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/functions": { + "get": { + "summary": "Get functions queue", + "operationId": "healthGetQueueFunctions", + "tags": [ + "health" + ], + "description": "Get the number of function executions 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": "getQueueFunctions", + "weight": 142, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/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": 133, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/mails": { + "get": { + "summary": "Get mails queue", + "operationId": "healthGetQueueMails", + "tags": [ + "health" + ], + "description": "Get the number of mails 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": "getQueueMails", + "weight": 139, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue-mails.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-mails.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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/messaging": { + "get": { + "summary": "Get messaging queue", + "operationId": "healthGetQueueMessaging", + "tags": [ + "health" + ], + "description": "Get the number of messages 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": "getQueueMessaging", + "weight": 140, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue-messaging.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-messaging.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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/migrations": { + "get": { + "summary": "Get migrations queue", + "operationId": "healthGetQueueMigrations", + "tags": [ + "health" + ], + "description": "Get the number of migrations 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": "getQueueMigrations", + "weight": 141, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue-migrations.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-migrations.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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/usage": { + "get": { + "summary": "Get usage queue", + "operationId": "healthGetQueueUsage", + "tags": [ + "health" + ], + "description": "Get the number of metrics 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": 143, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/usage-dump": { + "get": { + "summary": "Get usage dump queue", + "operationId": "healthGetQueueUsageDump", + "tags": [ + "health" + ], + "description": "Get the number of projects containing metrics 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": "getQueueUsageDump", + "weight": 144, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue-usage-dump.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage-dump.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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/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": 132, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/storage": { + "get": { + "summary": "Get storage", + "operationId": "healthGetStorage", + "tags": [ + "health" + ], + "description": "Check the Appwrite storage device is up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthStatus" + } + } + } + } + }, + "x-appwrite": { + "method": "getStorage", + "weight": 146, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-storage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage.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": 145, + "cookies": false, + "type": "", + "deprecated": false, + "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": 131, + "cookies": false, + "type": "", + "deprecated": false, + "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": 117, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/codes": { + "get": { + "summary": "List locale codes", + "operationId": "localeListCodes", + "tags": [ + "locale" + ], + "description": "List of all locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", + "responses": { + "200": { + "description": "Locale codes list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/localeCodeList" + } + } + } + } + }, + "x-appwrite": { + "method": "listCodes", + "weight": 118, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "locale\/list-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/continents": { + "get": { + "summary": "List continents", + "operationId": "localeListContinents", + "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": "listContinents", + "weight": 122, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "locale\/list-continents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries": { + "get": { + "summary": "List countries", + "operationId": "localeListCountries", + "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": "listCountries", + "weight": 119, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "locale\/list-countries.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries\/eu": { + "get": { + "summary": "List EU countries", + "operationId": "localeListCountriesEU", + "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": "listCountriesEU", + "weight": 120, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "locale\/list-countries-e-u.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries\/phones": { + "get": { + "summary": "List countries phone codes", + "operationId": "localeListCountriesPhones", + "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": "listCountriesPhones", + "weight": 121, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "locale\/list-countries-phones.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/currencies": { + "get": { + "summary": "List currencies", + "operationId": "localeListCurrencies", + "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": "listCurrencies", + "weight": 123, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "locale\/list-currencies.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/languages": { + "get": { + "summary": "List languages", + "operationId": "localeListLanguages", + "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": "listLanguages", + "weight": 124, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "locale\/list-languages.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/messaging\/messages": { + "get": { + "summary": "List messages", + "operationId": "messagingListMessages", + "tags": [ + "messaging" + ], + "description": "Get a list of all messages from the current Appwrite project.", + "responses": { + "200": { + "description": "Message list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/messageList" + } + } + } + } + }, + "x-appwrite": { + "method": "listMessages", + "weight": 384, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-messages.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-messages.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "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" + } + ] + } + }, + "\/messaging\/messages\/email": { + "post": { + "summary": "Create email", + "operationId": "messagingCreateEmail", + "tags": [ + "messaging" + ], + "description": "Create a new email message.", + "responses": { + "201": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "x-appwrite": { + "method": "createEmail", + "weight": 381, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-email.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<MESSAGE_ID>" + }, + "subject": { + "type": "string", + "description": "Email Subject.", + "x-example": "<SUBJECT>" + }, + "content": { + "type": "string", + "description": "Email Content.", + "x-example": "<CONTENT>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "cc": { + "type": "array", + "description": "Array of target IDs to be added as CC.", + "x-example": null, + "items": { + "type": "string" + } + }, + "bcc": { + "type": "array", + "description": "Array of target IDs to be added as BCC.", + "x-example": null, + "items": { + "type": "string" + } + }, + "attachments": { + "type": "array", + "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", + "x-example": null, + "items": { + "type": "string" + } + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false + }, + "html": { + "type": "boolean", + "description": "Is content of type HTML", + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": null + } + }, + "required": [ + "messageId", + "subject", + "content" + ] + } + } + } + } + } + }, + "\/messaging\/messages\/email\/{messageId}": { + "patch": { + "summary": "Update email", + "operationId": "messagingUpdateEmail", + "tags": [ + "messaging" + ], + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "x-appwrite": { + "method": "updateEmail", + "weight": 388, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-email.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MESSAGE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "subject": { + "type": "string", + "description": "Email Subject.", + "x-example": "<SUBJECT>" + }, + "content": { + "type": "string", + "description": "Email Content.", + "x-example": "<CONTENT>" + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false + }, + "html": { + "type": "boolean", + "description": "Is content of type HTML", + "x-example": false + }, + "cc": { + "type": "array", + "description": "Array of target IDs to be added as CC.", + "x-example": null, + "items": { + "type": "string" + } + }, + "bcc": { + "type": "array", + "description": "Array of target IDs to be added as BCC.", + "x-example": null, + "items": { + "type": "string" + } + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": null + }, + "attachments": { + "type": "array", + "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "\/messaging\/messages\/push": { + "post": { + "summary": "Create push notification", + "operationId": "messagingCreatePush", + "tags": [ + "messaging" + ], + "description": "Create a new push notification.", + "responses": { + "201": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "x-appwrite": { + "method": "createPush", + "weight": 383, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-push.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-push.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<MESSAGE_ID>" + }, + "title": { + "type": "string", + "description": "Title for push notification.", + "x-example": "<TITLE>" + }, + "body": { + "type": "string", + "description": "Body for push notification.", + "x-example": "<BODY>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "data": { + "type": "object", + "description": "Additional key-value pair data for push notification.", + "x-example": "{}" + }, + "action": { + "type": "string", + "description": "Action for push notification.", + "x-example": "<ACTION>" + }, + "image": { + "type": "string", + "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", + "x-example": "[ID1:ID2]" + }, + "icon": { + "type": "string", + "description": "Icon for push notification. Available only for Android and Web Platform.", + "x-example": "<ICON>" + }, + "sound": { + "type": "string", + "description": "Sound for push notification. Available only for Android and iOS Platform.", + "x-example": "<SOUND>" + }, + "color": { + "type": "string", + "description": "Color for push notification. Available only for Android Platform.", + "x-example": "<COLOR>" + }, + "tag": { + "type": "string", + "description": "Tag for push notification. Available only for Android Platform.", + "x-example": "<TAG>" + }, + "badge": { + "type": "integer", + "description": "Badge for push notification. Available only for iOS Platform.", + "x-example": null + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": null + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] + } + }, + "required": [ + "messageId" + ] + } + } + } + } + } + }, + "\/messaging\/messages\/push\/{messageId}": { + "patch": { + "summary": "Update push notification", + "operationId": "messagingUpdatePush", + "tags": [ + "messaging" + ], + "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "x-appwrite": { + "method": "updatePush", + "weight": 390, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-push.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-push.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MESSAGE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "title": { + "type": "string", + "description": "Title for push notification.", + "x-example": "<TITLE>" + }, + "body": { + "type": "string", + "description": "Body for push notification.", + "x-example": "<BODY>" + }, + "data": { + "type": "object", + "description": "Additional Data for push notification.", + "x-example": "{}" + }, + "action": { + "type": "string", + "description": "Action for push notification.", + "x-example": "<ACTION>" + }, + "image": { + "type": "string", + "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", + "x-example": "[ID1:ID2]" + }, + "icon": { + "type": "string", + "description": "Icon for push notification. Available only for Android and Web platforms.", + "x-example": "<ICON>" + }, + "sound": { + "type": "string", + "description": "Sound for push notification. Available only for Android and iOS platforms.", + "x-example": "<SOUND>" + }, + "color": { + "type": "string", + "description": "Color for push notification. Available only for Android platforms.", + "x-example": "<COLOR>" + }, + "tag": { + "type": "string", + "description": "Tag for push notification. Available only for Android platforms.", + "x-example": "<TAG>" + }, + "badge": { + "type": "integer", + "description": "Badge for push notification. Available only for iOS platforms.", + "x-example": null + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": null + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] + } + } + } + } + } + } + } + }, + "\/messaging\/messages\/sms": { + "post": { + "summary": "Create SMS", + "operationId": "messagingCreateSms", + "tags": [ + "messaging" + ], + "description": "Create a new SMS message.", + "responses": { + "201": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "x-appwrite": { + "method": "createSms", + "weight": 382, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-sms.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<MESSAGE_ID>" + }, + "content": { + "type": "string", + "description": "SMS Content.", + "x-example": "<CONTENT>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": null + } + }, + "required": [ + "messageId", + "content" + ] + } + } + } + } + } + }, + "\/messaging\/messages\/sms\/{messageId}": { + "patch": { + "summary": "Update SMS", + "operationId": "messagingUpdateSms", + "tags": [ + "messaging" + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "x-appwrite": { + "method": "updateSms", + "weight": 389, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-sms.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MESSAGE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "content": { + "type": "string", + "description": "Email Content.", + "x-example": "<CONTENT>" + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/messaging\/messages\/{messageId}": { + "get": { + "summary": "Get message", + "operationId": "messagingGetMessage", + "tags": [ + "messaging" + ], + "description": "Get a message by its unique ID.\n", + "responses": { + "200": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "x-appwrite": { + "method": "getMessage", + "weight": 387, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/get-message.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-message.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MESSAGE_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete message", + "operationId": "messagingDelete", + "tags": [ + "messaging" + ], + "description": "Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "weight": 391, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-message.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MESSAGE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/messaging\/messages\/{messageId}\/logs": { + "get": { + "summary": "List message logs", + "operationId": "messagingListMessageLogs", + "tags": [ + "messaging" + ], + "description": "Get the message activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "x-appwrite": { + "method": "listMessageLogs", + "weight": 385, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-message-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MESSAGE_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\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/messaging\/messages\/{messageId}\/targets": { + "get": { + "summary": "List message targets", + "operationId": "messagingListTargets", + "tags": [ + "messaging" + ], + "description": "Get a list of the targets associated with a message.", + "responses": { + "200": { + "description": "Target list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/targetList" + } + } + } + } + }, + "x-appwrite": { + "method": "listTargets", + "weight": 386, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-targets.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-targets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MESSAGE_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\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/messaging\/providers": { + "get": { + "summary": "List providers", + "operationId": "messagingListProviders", + "tags": [ + "messaging" + ], + "description": "Get a list of all providers from the current Appwrite project.", + "responses": { + "200": { + "description": "Provider list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/providerList" + } + } + } + } + }, + "x-appwrite": { + "method": "listProviders", + "weight": 356, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-providers.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-providers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "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" + } + ] + } + }, + "\/messaging\/providers\/apns": { + "post": { + "summary": "Create APNS provider", + "operationId": "messagingCreateApnsProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Apple Push Notification service provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "x-appwrite": { + "method": "createApnsProvider", + "weight": 355, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-apns-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-apns-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "authKey": { + "type": "string", + "description": "APNS authentication key.", + "x-example": "<AUTH_KEY>" + }, + "authKeyId": { + "type": "string", + "description": "APNS authentication key ID.", + "x-example": "<AUTH_KEY_ID>" + }, + "teamId": { + "type": "string", + "description": "APNS team ID.", + "x-example": "<TEAM_ID>" + }, + "bundleId": { + "type": "string", + "description": "APNS bundle ID.", + "x-example": "<BUNDLE_ID>" + }, + "sandbox": { + "type": "boolean", + "description": "Use APNS sandbox environment.", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/apns\/{providerId}": { + "patch": { + "summary": "Update APNS provider", + "operationId": "messagingUpdateApnsProvider", + "tags": [ + "messaging" + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "x-appwrite": { + "method": "updateApnsProvider", + "weight": 368, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-apns-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-apns-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false + }, + "authKey": { + "type": "string", + "description": "APNS authentication key.", + "x-example": "<AUTH_KEY>" + }, + "authKeyId": { + "type": "string", + "description": "APNS authentication key ID.", + "x-example": "<AUTH_KEY_ID>" + }, + "teamId": { + "type": "string", + "description": "APNS team ID.", + "x-example": "<TEAM_ID>" + }, + "bundleId": { + "type": "string", + "description": "APNS bundle ID.", + "x-example": "<BUNDLE_ID>" + }, + "sandbox": { + "type": "boolean", + "description": "Use APNS sandbox environment.", + "x-example": false + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/fcm": { + "post": { + "summary": "Create FCM provider", + "operationId": "messagingCreateFcmProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "x-appwrite": { + "method": "createFcmProvider", + "weight": 354, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-fcm-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-fcm-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "serviceAccountJSON": { + "type": "object", + "description": "FCM service account JSON.", + "x-example": "{}" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/fcm\/{providerId}": { + "patch": { + "summary": "Update FCM provider", + "operationId": "messagingUpdateFcmProvider", + "tags": [ + "messaging" + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "x-appwrite": { + "method": "updateFcmProvider", + "weight": 367, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-fcm-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-fcm-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false + }, + "serviceAccountJSON": { + "type": "object", + "description": "FCM service account JSON.", + "x-example": "{}" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/mailgun": { + "post": { + "summary": "Create Mailgun provider", + "operationId": "messagingCreateMailgunProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Mailgun provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "x-appwrite": { + "method": "createMailgunProvider", + "weight": 346, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-mailgun-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-mailgun-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Mailgun API Key.", + "x-example": "<API_KEY>" + }, + "domain": { + "type": "string", + "description": "Mailgun Domain.", + "x-example": "<DOMAIN>" + }, + "isEuRegion": { + "type": "boolean", + "description": "Set as EU region.", + "x-example": false + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "x-example": "email@example.com" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well.", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well.", + "x-example": "email@example.com" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/mailgun\/{providerId}": { + "patch": { + "summary": "Update Mailgun provider", + "operationId": "messagingUpdateMailgunProvider", + "tags": [ + "messaging" + ], + "description": "Update a Mailgun provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "x-appwrite": { + "method": "updateMailgunProvider", + "weight": 359, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-mailgun-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-mailgun-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Mailgun API Key.", + "x-example": "<API_KEY>" + }, + "domain": { + "type": "string", + "description": "Mailgun Domain.", + "x-example": "<DOMAIN>" + }, + "isEuRegion": { + "type": "boolean", + "description": "Set as EU region.", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "x-example": "email@example.com" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "x-example": "<REPLY_TO_EMAIL>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/msg91": { + "post": { + "summary": "Create Msg91 provider", + "operationId": "messagingCreateMsg91Provider", + "tags": [ + "messaging" + ], + "description": "Create a new MSG91 provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "x-appwrite": { + "method": "createMsg91Provider", + "weight": 349, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-msg91provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "templateId": { + "type": "string", + "description": "Msg91 template ID", + "x-example": "<TEMPLATE_ID>" + }, + "senderId": { + "type": "string", + "description": "Msg91 sender ID.", + "x-example": "<SENDER_ID>" + }, + "authKey": { + "type": "string", + "description": "Msg91 auth key.", + "x-example": "<AUTH_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/msg91\/{providerId}": { + "patch": { + "summary": "Update Msg91 provider", + "operationId": "messagingUpdateMsg91Provider", + "tags": [ + "messaging" + ], + "description": "Update a MSG91 provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "x-appwrite": { + "method": "updateMsg91Provider", + "weight": 362, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-msg91provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false + }, + "templateId": { + "type": "string", + "description": "Msg91 template ID.", + "x-example": "<TEMPLATE_ID>" + }, + "senderId": { + "type": "string", + "description": "Msg91 sender ID.", + "x-example": "<SENDER_ID>" + }, + "authKey": { + "type": "string", + "description": "Msg91 auth key.", + "x-example": "<AUTH_KEY>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/sendgrid": { + "post": { + "summary": "Create Sendgrid provider", + "operationId": "messagingCreateSendgridProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Sendgrid provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "x-appwrite": { + "method": "createSendgridProvider", + "weight": 347, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-sendgrid-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Sendgrid API key.", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "x-example": "email@example.com" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "x-example": "email@example.com" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/sendgrid\/{providerId}": { + "patch": { + "summary": "Update Sendgrid provider", + "operationId": "messagingUpdateSendgridProvider", + "tags": [ + "messaging" + ], + "description": "Update a Sendgrid provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "x-appwrite": { + "method": "updateSendgridProvider", + "weight": 360, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-sendgrid-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false + }, + "apiKey": { + "type": "string", + "description": "Sendgrid API key.", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "x-example": "email@example.com" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "x-example": "<REPLY_TO_EMAIL>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/smtp": { + "post": { + "summary": "Create SMTP provider", + "operationId": "messagingCreateSmtpProvider", + "tags": [ + "messaging" + ], + "description": "Create a new SMTP provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "x-appwrite": { + "method": "createSmtpProvider", + "weight": 348, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-smtp-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-smtp-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "host": { + "type": "string", + "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", + "x-example": "<HOST>" + }, + "port": { + "type": "integer", + "description": "The default SMTP server port.", + "x-example": 1 + }, + "username": { + "type": "string", + "description": "Authentication username.", + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "Authentication password.", + "x-example": "<PASSWORD>" + }, + "encryption": { + "type": "string", + "description": "Encryption type. Can be omitted, 'ssl', or 'tls'", + "x-example": "none", + "enum": [ + "none", + "ssl", + "tls" + ], + "x-enum-name": "SmtpEncryption", + "x-enum-keys": [] + }, + "autoTLS": { + "type": "boolean", + "description": "Enable SMTP AutoTLS feature.", + "x-example": false + }, + "mailer": { + "type": "string", + "description": "The value to use for the X-Mailer header.", + "x-example": "<MAILER>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "x-example": "email@example.com" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "x-example": "email@example.com" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false + } + }, + "required": [ + "providerId", + "name", + "host" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/smtp\/{providerId}": { + "patch": { + "summary": "Update SMTP provider", + "operationId": "messagingUpdateSmtpProvider", + "tags": [ + "messaging" + ], + "description": "Update a SMTP provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "x-appwrite": { + "method": "updateSmtpProvider", + "weight": 361, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-smtp-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-smtp-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "host": { + "type": "string", + "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", + "x-example": "<HOST>" + }, + "port": { + "type": "integer", + "description": "SMTP port.", + "x-example": 1 + }, + "username": { + "type": "string", + "description": "Authentication username.", + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "Authentication password.", + "x-example": "<PASSWORD>" + }, + "encryption": { + "type": "string", + "description": "Encryption type. Can be 'ssl' or 'tls'", + "x-example": "none", + "enum": [ + "none", + "ssl", + "tls" + ], + "x-enum-name": "SmtpEncryption", + "x-enum-keys": [] + }, + "autoTLS": { + "type": "boolean", + "description": "Enable SMTP AutoTLS feature.", + "x-example": false + }, + "mailer": { + "type": "string", + "description": "The value to use for the X-Mailer header.", + "x-example": "<MAILER>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "x-example": "email@example.com" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "x-example": "<REPLY_TO_EMAIL>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/telesign": { + "post": { + "summary": "Create Telesign provider", + "operationId": "messagingCreateTelesignProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Telesign provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "x-appwrite": { + "method": "createTelesignProvider", + "weight": 350, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-telesign-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-telesign-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100" + }, + "customerId": { + "type": "string", + "description": "Telesign customer ID.", + "x-example": "<CUSTOMER_ID>" + }, + "apiKey": { + "type": "string", + "description": "Telesign API key.", + "x-example": "<API_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/telesign\/{providerId}": { + "patch": { + "summary": "Update Telesign provider", + "operationId": "messagingUpdateTelesignProvider", + "tags": [ + "messaging" + ], + "description": "Update a Telesign provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "x-appwrite": { + "method": "updateTelesignProvider", + "weight": 363, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-telesign-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-telesign-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false + }, + "customerId": { + "type": "string", + "description": "Telesign customer ID.", + "x-example": "<CUSTOMER_ID>" + }, + "apiKey": { + "type": "string", + "description": "Telesign API key.", + "x-example": "<API_KEY>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "x-example": "<FROM>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/textmagic": { + "post": { + "summary": "Create Textmagic provider", + "operationId": "messagingCreateTextmagicProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Textmagic provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "x-appwrite": { + "method": "createTextmagicProvider", + "weight": 351, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-textmagic-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-textmagic-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100" + }, + "username": { + "type": "string", + "description": "Textmagic username.", + "x-example": "<USERNAME>" + }, + "apiKey": { + "type": "string", + "description": "Textmagic apiKey.", + "x-example": "<API_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/textmagic\/{providerId}": { + "patch": { + "summary": "Update Textmagic provider", + "operationId": "messagingUpdateTextmagicProvider", + "tags": [ + "messaging" + ], + "description": "Update a Textmagic provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "x-appwrite": { + "method": "updateTextmagicProvider", + "weight": 364, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-textmagic-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-textmagic-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false + }, + "username": { + "type": "string", + "description": "Textmagic username.", + "x-example": "<USERNAME>" + }, + "apiKey": { + "type": "string", + "description": "Textmagic apiKey.", + "x-example": "<API_KEY>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "x-example": "<FROM>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/twilio": { + "post": { + "summary": "Create Twilio provider", + "operationId": "messagingCreateTwilioProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Twilio provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "x-appwrite": { + "method": "createTwilioProvider", + "weight": 352, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-twilio-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-twilio-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100" + }, + "accountSid": { + "type": "string", + "description": "Twilio account secret ID.", + "x-example": "<ACCOUNT_SID>" + }, + "authToken": { + "type": "string", + "description": "Twilio authentication token.", + "x-example": "<AUTH_TOKEN>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/twilio\/{providerId}": { + "patch": { + "summary": "Update Twilio provider", + "operationId": "messagingUpdateTwilioProvider", + "tags": [ + "messaging" + ], + "description": "Update a Twilio provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "x-appwrite": { + "method": "updateTwilioProvider", + "weight": 365, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-twilio-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-twilio-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false + }, + "accountSid": { + "type": "string", + "description": "Twilio account secret ID.", + "x-example": "<ACCOUNT_SID>" + }, + "authToken": { + "type": "string", + "description": "Twilio authentication token.", + "x-example": "<AUTH_TOKEN>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "x-example": "<FROM>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/vonage": { + "post": { + "summary": "Create Vonage provider", + "operationId": "messagingCreateVonageProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Vonage provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "x-appwrite": { + "method": "createVonageProvider", + "weight": 353, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-vonage-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-vonage-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100" + }, + "apiKey": { + "type": "string", + "description": "Vonage API key.", + "x-example": "<API_KEY>" + }, + "apiSecret": { + "type": "string", + "description": "Vonage API secret.", + "x-example": "<API_SECRET>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/vonage\/{providerId}": { + "patch": { + "summary": "Update Vonage provider", + "operationId": "messagingUpdateVonageProvider", + "tags": [ + "messaging" + ], + "description": "Update a Vonage provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "x-appwrite": { + "method": "updateVonageProvider", + "weight": 366, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-vonage-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-vonage-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false + }, + "apiKey": { + "type": "string", + "description": "Vonage API key.", + "x-example": "<API_KEY>" + }, + "apiSecret": { + "type": "string", + "description": "Vonage API secret.", + "x-example": "<API_SECRET>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "x-example": "<FROM>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/{providerId}": { + "get": { + "summary": "Get provider", + "operationId": "messagingGetProvider", + "tags": [ + "messaging" + ], + "description": "Get a provider by its unique ID.\n", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "x-appwrite": { + "method": "getProvider", + "weight": 358, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/get-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete provider", + "operationId": "messagingDeleteProvider", + "tags": [ + "messaging" + ], + "description": "Delete a provider by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteProvider", + "weight": 369, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/delete-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ] + } + }, + "\/messaging\/providers\/{providerId}\/logs": { + "get": { + "summary": "List provider logs", + "operationId": "messagingListProviderLogs", + "tags": [ + "messaging" + ], + "description": "Get the provider activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "x-appwrite": { + "method": "listProviderLogs", + "weight": 357, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-provider-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-provider-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_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\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/messaging\/subscribers\/{subscriberId}\/logs": { + "get": { + "summary": "List subscriber logs", + "operationId": "messagingListSubscriberLogs", + "tags": [ + "messaging" + ], + "description": "Get the subscriber activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "x-appwrite": { + "method": "listSubscriberLogs", + "weight": 378, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-subscriber-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscriber-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SUBSCRIBER_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\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/messaging\/topics": { + "get": { + "summary": "List topics", + "operationId": "messagingListTopics", + "tags": [ + "messaging" + ], + "description": "Get a list of all topics from the current Appwrite project.", + "responses": { + "200": { + "description": "Topic list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/topicList" + } + } + } + } + }, + "x-appwrite": { + "method": "listTopics", + "weight": 371, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-topics.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topics.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "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" + } + ] + }, + "post": { + "summary": "Create topic", + "operationId": "messagingCreateTopic", + "tags": [ + "messaging" + ], + "description": "Create a new topic.", + "responses": { + "201": { + "description": "Topic", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/topic" + } + } + } + } + }, + "x-appwrite": { + "method": "createTopic", + "weight": 370, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-topic.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "topicId": { + "type": "string", + "description": "Topic ID. Choose a custom Topic ID or a new Topic ID.", + "x-example": "<TOPIC_ID>" + }, + "name": { + "type": "string", + "description": "Topic Name.", + "x-example": "<NAME>" + }, + "subscribe": { + "type": "array", + "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + } + }, + "required": [ + "topicId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/topics\/{topicId}": { + "get": { + "summary": "Get topic", + "operationId": "messagingGetTopic", + "tags": [ + "messaging" + ], + "description": "Get a topic by its unique ID.\n", + "responses": { + "200": { + "description": "Topic", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/topic" + } + } + } + } + }, + "x-appwrite": { + "method": "getTopic", + "weight": 373, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/get-topic.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update topic", + "operationId": "messagingUpdateTopic", + "tags": [ + "messaging" + ], + "description": "Update a topic by its unique ID.\n", + "responses": { + "200": { + "description": "Topic", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/topic" + } + } + } + } + }, + "x-appwrite": { + "method": "updateTopic", + "weight": 374, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-topic.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Topic Name.", + "x-example": "<NAME>" + }, + "subscribe": { + "type": "array", + "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete topic", + "operationId": "messagingDeleteTopic", + "tags": [ + "messaging" + ], + "description": "Delete a topic by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteTopic", + "weight": 375, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/delete-topic.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_ID>" + }, + "in": "path" + } + ] + } + }, + "\/messaging\/topics\/{topicId}\/logs": { + "get": { + "summary": "List topic logs", + "operationId": "messagingListTopicLogs", + "tags": [ + "messaging" + ], + "description": "Get the topic activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "x-appwrite": { + "method": "listTopicLogs", + "weight": 372, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-topic-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topic-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_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\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/messaging\/topics\/{topicId}\/subscribers": { + "get": { + "summary": "List subscribers", + "operationId": "messagingListSubscribers", + "tags": [ + "messaging" + ], + "description": "Get a list of all subscribers from the current Appwrite project.", + "responses": { + "200": { + "description": "Subscriber list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/subscriberList" + } + } + } + } + }, + "x-appwrite": { + "method": "listSubscribers", + "weight": 377, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-subscribers.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_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\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "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" + } + ] + }, + "post": { + "summary": "Create subscriber", + "operationId": "messagingCreateSubscriber", + "tags": [ + "messaging" + ], + "description": "Create a new subscriber.", + "responses": { + "201": { + "description": "Subscriber", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/subscriber" + } + } + } + } + }, + "x-appwrite": { + "method": "createSubscriber", + "weight": 376, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-subscriber.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.write", + "platforms": [ + "server", + "client", + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "JWT": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Session": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID to subscribe to.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "subscriberId": { + "type": "string", + "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", + "x-example": "<SUBSCRIBER_ID>" + }, + "targetId": { + "type": "string", + "description": "Target ID. The target ID to link to the specified Topic ID.", + "x-example": "<TARGET_ID>" + } + }, + "required": [ + "subscriberId", + "targetId" + ] + } + } + } + } + } + }, + "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { + "get": { + "summary": "Get subscriber", + "operationId": "messagingGetSubscriber", + "tags": [ + "messaging" + ], + "description": "Get a subscriber by its unique ID.\n", + "responses": { + "200": { + "description": "Subscriber", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/subscriber" + } + } + } + } + }, + "x-appwrite": { + "method": "getSubscriber", + "weight": 379, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/get-subscriber.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_ID>" + }, + "in": "path" + }, + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SUBSCRIBER_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete subscriber", + "operationId": "messagingDeleteSubscriber", + "tags": [ + "messaging" + ], + "description": "Delete a subscriber by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteSubscriber", + "weight": 380, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/delete-subscriber.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.write", + "platforms": [ + "server", + "client", + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "JWT": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Session": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_ID>" + }, + "in": "path" + }, + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SUBSCRIBER_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": 203, + "cookies": false, + "type": "", + "deprecated": false, + "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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "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" + } + ] + }, + "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": 202, + "cookies": false, + "type": "", + "deprecated": false, + "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 a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "fileSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", + "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" + } + }, + "compression": { + "type": "string", + "description": "Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", + "x-example": "none", + "enum": [ + "none", + "gzip", + "zstd" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "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" + ] + } + } + } + } + } + }, + "\/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": 204, + "cookies": false, + "type": "", + "deprecated": false, + "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": 205, + "cookies": false, + "type": "", + "deprecated": false, + "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>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "fileSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", + "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" + } + }, + "compression": { + "type": "string", + "description": "Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", + "x-example": "none", + "enum": [ + "none", + "gzip", + "zstd" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "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" + ] + } + } + } + } + }, + "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": 206, + "cookies": false, + "type": "", + "deprecated": false, + "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.", + "responses": { + "200": { + "description": "Files List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/fileList" + } + } + } + } + }, + "x-appwrite": { + "method": "listFiles", + "weight": 208, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_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\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "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" + } + ] + }, + "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](https:\/\/appwrite.io\/docs\/server\/storage#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": 207, + "cookies": false, + "type": "upload", + "deprecated": false, + "demo": "storage\/create-file.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}", + "scope": "files.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/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 a custom ID or generate a random ID with `ID.unique()`. Valid 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. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https:\/\/appwrite.io\/docs\/products\/storage\/upload-download#input-file).", + "x-example": null + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "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": 209, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/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": 214, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "storage\/update-file.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "files.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/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": { + "name": { + "type": "string", + "description": "Name of the file", + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission string. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "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": 215, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "storage\/delete-file.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "files.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/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": 211, + "cookies": false, + "type": "location", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/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": 210, + "cookies": false, + "type": "location", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/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", + "enum": [ + "center", + "top-left", + "top", + "top-right", + "left", + "right", + "bottom-left", + "bottom", + "bottom-right" + ], + "x-enum-name": "ImageGravity", + "x-enum-keys": [], + "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", + "enum": [ + "jpg", + "jpeg", + "gif", + "png", + "webp", + "heic", + "avif" + ], + "x-enum-name": "ImageFormat", + "x-enum-keys": [], + "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": 212, + "cookies": false, + "type": "location", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/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.", + "responses": { + "200": { + "description": "Teams List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/teamList" + } + } + } + } + }, + "x-appwrite": { + "method": "list", + "weight": 219, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "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" + } + ] + }, + "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": 218, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "teamId": { + "type": "string", + "description": "Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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](https:\/\/appwrite.io\/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": 220, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update name", + "operationId": "teamsUpdateName", + "tags": [ + "teams" + ], + "description": "Update the team's name by its unique ID.", + "responses": { + "200": { + "description": "Team", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/team" + } + } + } + } + }, + "x-appwrite": { + "method": "updateName", + "weight": 222, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "teams\/update-name.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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": 224, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + } + ] + } + }, + "\/teams\/{teamId}\/memberships": { + "get": { + "summary": "List team memberships", + "operationId": "teamsListMemberships", + "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. Hide sensitive attributes from the response by toggling membership privacy in the Console.", + "responses": { + "200": { + "description": "Memberships List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membershipList" + } + } + } + } + }, + "x-appwrite": { + "method": "listMemberships", + "weight": 226, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "teams\/list-memberships.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_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\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "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" + } + ] + }, + "post": { + "summary": "Create team membership", + "operationId": "teamsCreateMembership", + "tags": [ + "teams" + ], + "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) 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) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", + "responses": { + "201": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "x-appwrite": { + "method": "createMembership", + "weight": 225, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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" + }, + "userId": { + "type": "string", + "description": "ID of the user to be added to a team.", + "x-example": "<USER_ID>" + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100" + }, + "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](https:\/\/appwrite.io\/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. This parameter is not required when an API key is supplied. 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": [ + "roles" + ] + } + } + } + } + } + }, + "\/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. Hide sensitive attributes from the response by toggling membership privacy in the Console.", + "responses": { + "200": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "x-appwrite": { + "method": "getMembership", + "weight": 227, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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", + "operationId": "teamsUpdateMembership", + "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](https:\/\/appwrite.io\/docs\/permissions).\n", + "responses": { + "200": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "x-appwrite": { + "method": "updateMembership", + "weight": 228, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "teams\/update-membership.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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": 230, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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": 229, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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" + ] + } + } + } + } + } + }, + "\/teams\/{teamId}\/prefs": { + "get": { + "summary": "Get team preferences", + "operationId": "teamsGetPrefs", + "tags": [ + "teams" + ], + "description": "Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getPrefs).", + "responses": { + "200": { + "description": "Preferences", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/preferences" + } + } + } + } + }, + "x-appwrite": { + "method": "getPrefs", + "weight": 221, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "teams\/get-prefs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update preferences", + "operationId": "teamsUpdatePrefs", + "tags": [ + "teams" + ], + "description": "Update the team's 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 an error if exceeded.", + "responses": { + "200": { + "description": "Preferences", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/preferences" + } + } + } + } + }, + "x-appwrite": { + "method": "updatePrefs", + "weight": 223, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "teams\/update-prefs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "x-example": "{}" + } + }, + "required": [ + "prefs" + ] + } + } + } + } + } + }, + "\/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": 241, + "cookies": false, + "type": "", + "deprecated": false, + "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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "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" + } + ] + }, + "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": 232, + "cookies": false, + "type": "", + "deprecated": false, + "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 a custom ID or generate a random ID with `ID.unique()`. Valid 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" + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100" + }, + "password": { + "type": "string", + "description": "Plain text user password. Must be at least 8 chars.", + "x-example": null + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId" + ] + } + } + } + } + } + }, + "\/users\/argon2": { + "post": { + "summary": "Create user with Argon2 password", + "operationId": "usersCreateArgon2User", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "x-appwrite": { + "method": "createArgon2User", + "weight": 235, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-argon2user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using Argon2.", + "x-example": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } + } + } + }, + "\/users\/bcrypt": { + "post": { + "summary": "Create user with bcrypt password", + "operationId": "usersCreateBcryptUser", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "x-appwrite": { + "method": "createBcryptUser", + "weight": 233, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-bcrypt-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using Bcrypt.", + "x-example": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } + } + } + }, + "\/users\/identities": { + "get": { + "summary": "List identities", + "operationId": "usersListIdentities", + "tags": [ + "users" + ], + "description": "Get identities for all users.", + "responses": { + "200": { + "description": "Identities List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/identityList" + } + } + } + } + }, + "x-appwrite": { + "method": "listIdentities", + "weight": 249, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/list-identities.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-identities.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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "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" + } + ] + } + }, + "\/users\/identities\/{identityId}": { + "delete": { + "summary": "Delete identity", + "operationId": "usersDeleteIdentity", + "tags": [ + "users" + ], + "description": "Delete an identity by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteIdentity", + "weight": 272, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/delete-identity.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-identity.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": "identityId", + "description": "Identity ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<IDENTITY_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/md5": { + "post": { + "summary": "Create user with MD5 password", + "operationId": "usersCreateMD5User", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "x-appwrite": { + "method": "createMD5User", + "weight": 234, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-m-d5user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using MD5.", + "x-example": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } + } + } + }, + "\/users\/phpass": { + "post": { + "summary": "Create user with PHPass password", + "operationId": "usersCreatePHPassUser", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "x-appwrite": { + "method": "createPHPassUser", + "weight": 237, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-p-h-pass-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-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 a custom ID or pass the string `ID.unique()`to auto generate it. Valid 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 hashed using PHPass.", + "x-example": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } + } + } + }, + "\/users\/scrypt": { + "post": { + "summary": "Create user with Scrypt password", + "operationId": "usersCreateScryptUser", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "x-appwrite": { + "method": "createScryptUser", + "weight": 238, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-scrypt-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using Scrypt.", + "x-example": "password" + }, + "passwordSalt": { + "type": "string", + "description": "Optional salt used to hash password.", + "x-example": "<PASSWORD_SALT>" + }, + "passwordCpu": { + "type": "integer", + "description": "Optional CPU cost used to hash password.", + "x-example": null + }, + "passwordMemory": { + "type": "integer", + "description": "Optional memory cost used to hash password.", + "x-example": null + }, + "passwordParallel": { + "type": "integer", + "description": "Optional parallelization cost used to hash password.", + "x-example": null + }, + "passwordLength": { + "type": "integer", + "description": "Optional hash length used to hash password.", + "x-example": null + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password", + "passwordSalt", + "passwordCpu", + "passwordMemory", + "passwordParallel", + "passwordLength" + ] + } + } + } + } + } + }, + "\/users\/scrypt-modified": { + "post": { + "summary": "Create user with Scrypt modified password", + "operationId": "usersCreateScryptModifiedUser", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "x-appwrite": { + "method": "createScryptModifiedUser", + "weight": 239, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-scrypt-modified-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using Scrypt Modified.", + "x-example": "password" + }, + "passwordSalt": { + "type": "string", + "description": "Salt used to hash password.", + "x-example": "<PASSWORD_SALT>" + }, + "passwordSaltSeparator": { + "type": "string", + "description": "Salt separator used to hash password.", + "x-example": "<PASSWORD_SALT_SEPARATOR>" + }, + "passwordSignerKey": { + "type": "string", + "description": "Signer key used to hash password.", + "x-example": "<PASSWORD_SIGNER_KEY>" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password", + "passwordSalt", + "passwordSaltSeparator", + "passwordSignerKey" + ] + } + } + } + } + } + }, + "\/users\/sha": { + "post": { + "summary": "Create user with SHA password", + "operationId": "usersCreateSHAUser", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "x-appwrite": { + "method": "createSHAUser", + "weight": 236, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-s-h-a-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using SHA.", + "x-example": "password" + }, + "passwordVersion": { + "type": "string", + "description": "Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'", + "x-example": "sha1", + "enum": [ + "sha1", + "sha224", + "sha256", + "sha384", + "sha512\/224", + "sha512\/256", + "sha512", + "sha3-224", + "sha3-256", + "sha3-384", + "sha3-512" + ], + "x-enum-name": "PasswordHash", + "x-enum-keys": [] + }, + "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": 242, + "cookies": false, + "type": "", + "deprecated": false, + "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](https:\/\/appwrite.io\/docs\/server\/users#usersUpdateStatus) endpoint instead.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "weight": 270, + "cookies": false, + "type": "", + "deprecated": false, + "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": 255, + "cookies": false, + "type": "", + "deprecated": false, + "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}\/jwts": { + "post": { + "summary": "Create user JWT", + "operationId": "usersCreateJWT", + "tags": [ + "users" + ], + "description": "Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.", + "responses": { + "201": { + "description": "JWT", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/jwt" + } + } + } + } + }, + "x-appwrite": { + "method": "createJWT", + "weight": 273, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-j-w-t.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.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": { + "sessionId": { + "type": "string", + "description": "Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session.", + "x-example": "<SESSION_ID>" + }, + "duration": { + "type": "integer", + "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", + "x-example": 0 + } + } + } + } + } + } + } + }, + "\/users\/{userId}\/labels": { + "put": { + "summary": "Update user labels", + "operationId": "usersUpdateLabels", + "tags": [ + "users" + ], + "description": "Update the user labels by its unique ID. \n\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "x-appwrite": { + "method": "updateLabels", + "weight": 251, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/update-labels.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-labels.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": { + "labels": { + "type": "array", + "description": "Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "labels" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/logs": { + "get": { + "summary": "List user logs", + "operationId": "usersListLogs", + "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": "listLogs", + "weight": 247, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/list-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/users\/{userId}\/memberships": { + "get": { + "summary": "List user memberships", + "operationId": "usersListMemberships", + "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": "listMemberships", + "weight": 246, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/list-memberships.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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}\/mfa": { + "patch": { + "summary": "Update MFA", + "operationId": "usersUpdateMfa", + "tags": [ + "users" + ], + "description": "Enable or disable MFA on a user account.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "x-appwrite": { + "method": "updateMfa", + "weight": 260, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/update-mfa.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-mfa.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": { + "mfa": { + "type": "boolean", + "description": "Enable or disable MFA.", + "x-example": false + } + }, + "required": [ + "mfa" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/mfa\/authenticators\/{type}": { + "delete": { + "summary": "Delete authenticator", + "operationId": "usersDeleteMfaAuthenticator", + "tags": [ + "users" + ], + "description": "Delete an authenticator app.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteMfaAuthenticator", + "weight": 265, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/delete-mfa-authenticator.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-mfa-authenticator.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": "type", + "description": "Type of authenticator.", + "required": true, + "schema": { + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [] + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/mfa\/factors": { + "get": { + "summary": "List factors", + "operationId": "usersListMfaFactors", + "tags": [ + "users" + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "responses": { + "200": { + "description": "MFAFactors", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaFactors" + } + } + } + } + }, + "x-appwrite": { + "method": "listMfaFactors", + "weight": 261, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/list-mfa-factors.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-mfa-factors.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}\/mfa\/recovery-codes": { + "get": { + "summary": "Get MFA recovery codes", + "operationId": "usersGetMfaRecoveryCodes", + "tags": [ + "users" + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "x-appwrite": { + "method": "getMfaRecoveryCodes", + "weight": 262, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/get-mfa-recovery-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-mfa-recovery-codes.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" + } + ] + }, + "put": { + "summary": "Regenerate MFA recovery codes", + "operationId": "usersUpdateMfaRecoveryCodes", + "tags": [ + "users" + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "x-appwrite": { + "method": "updateMfaRecoveryCodes", + "weight": 264, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/update-mfa-recovery-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-mfa-recovery-codes.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" + } + ] + }, + "patch": { + "summary": "Create MFA recovery codes", + "operationId": "usersCreateMfaRecoveryCodes", + "tags": [ + "users" + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "responses": { + "201": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "x-appwrite": { + "method": "createMfaRecoveryCodes", + "weight": 263, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-mfa-recovery-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-mfa-recovery-codes.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}\/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": 253, + "cookies": false, + "type": "", + "deprecated": false, + "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": 254, + "cookies": false, + "type": "", + "deprecated": false, + "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": null + } + }, + "required": [ + "password" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/phone": { + "patch": { + "summary": "Update phone", + "operationId": "usersUpdatePhone", + "tags": [ + "users" + ], + "description": "Update the user phone by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "x-appwrite": { + "method": "updatePhone", + "weight": 256, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/update-phone.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "User phone number.", + "x-example": "+12065550100" + } + }, + "required": [ + "number" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/prefs": { + "get": { + "summary": "Get user preferences", + "operationId": "usersGetPrefs", + "tags": [ + "users" + ], + "description": "Get the user preferences by its unique ID.", + "responses": { + "200": { + "description": "Preferences", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/preferences" + } + } + } + } + }, + "x-appwrite": { + "method": "getPrefs", + "weight": 243, + "cookies": false, + "type": "", + "deprecated": false, + "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": 258, + "cookies": false, + "type": "", + "deprecated": false, + "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": "List user sessions", + "operationId": "usersListSessions", + "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": "listSessions", + "weight": 245, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/list-sessions.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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" + } + ] + }, + "post": { + "summary": "Create session", + "operationId": "usersCreateSession", + "tags": [ + "users" + ], + "description": "Creates a session for a user. Returns an immediately usable session object.\n\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "x-appwrite": { + "method": "createSession", + "weight": 266, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-session.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-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. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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, + "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": 269, + "cookies": false, + "type": "", + "deprecated": false, + "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": 268, + "cookies": false, + "type": "", + "deprecated": false, + "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": 250, + "cookies": false, + "type": "", + "deprecated": false, + "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}\/targets": { + "get": { + "summary": "List user targets", + "operationId": "usersListTargets", + "tags": [ + "users" + ], + "description": "List the messaging targets that are associated with a user.", + "responses": { + "200": { + "description": "Target list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/targetList" + } + } + } + } + }, + "x-appwrite": { + "method": "listTargets", + "weight": 248, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/list-targets.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-targets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.read", + "platforms": [ + "server", + "console" + ], + "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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create user target", + "operationId": "usersCreateTarget", + "tags": [ + "users" + ], + "description": "Create a messaging target.", + "responses": { + "201": { + "description": "Target", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/target" + } + } + } + } + }, + "x-appwrite": { + "method": "createTarget", + "weight": 240, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-target.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "server", + "console" + ], + "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": { + "targetId": { + "type": "string", + "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<TARGET_ID>" + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email", + "enum": [ + "email", + "sms", + "push" + ], + "x-enum-name": "MessagingProviderType", + "x-enum-keys": [] + }, + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "x-example": "<IDENTIFIER>" + }, + "providerId": { + "type": "string", + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", + "x-example": "<NAME>" + } + }, + "required": [ + "targetId", + "providerType", + "identifier" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/targets\/{targetId}": { + "get": { + "summary": "Get user target", + "operationId": "usersGetTarget", + "tags": [ + "users" + ], + "description": "Get a user's push notification target by ID.", + "responses": { + "200": { + "description": "Target", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/target" + } + } + } + } + }, + "x-appwrite": { + "method": "getTarget", + "weight": 244, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/get-target.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.read", + "platforms": [ + "server", + "console" + ], + "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": "targetId", + "description": "Target ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TARGET_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update user target", + "operationId": "usersUpdateTarget", + "tags": [ + "users" + ], + "description": "Update a messaging target.", + "responses": { + "200": { + "description": "Target", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/target" + } + } + } + } + }, + "x-appwrite": { + "method": "updateTarget", + "weight": 259, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/update-target.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "server", + "console" + ], + "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": "targetId", + "description": "Target ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TARGET_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "x-example": "<IDENTIFIER>" + }, + "providerId": { + "type": "string", + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", + "x-example": "<NAME>" + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete user target", + "operationId": "usersDeleteTarget", + "tags": [ + "users" + ], + "description": "Delete a messaging target.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteTarget", + "weight": 271, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/delete-target.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "server", + "console" + ], + "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": "targetId", + "description": "Target ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TARGET_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/tokens": { + "post": { + "summary": "Create token", + "operationId": "usersCreateToken", + "tags": [ + "users" + ], + "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\n", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "x-appwrite": { + "method": "createToken", + "weight": 267, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-token.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-token.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": { + "length": { + "type": "integer", + "description": "Token length in characters. The default length is 6 characters", + "x-example": 4 + }, + "expire": { + "type": "integer", + "description": "Token expiration period in seconds. The default expiration is 15 minutes.", + "x-example": 60 + } + } + } + } + } + } + } + }, + "\/users\/{userId}\/verification": { + "patch": { + "summary": "Update email verification", + "operationId": "usersUpdateEmailVerification", + "tags": [ + "users" + ], + "description": "Update the user email verification status by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "x-appwrite": { + "method": "updateEmailVerification", + "weight": 257, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/update-email-verification.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "emailVerification": { + "type": "boolean", + "description": "User email verification status.", + "x-example": false + } + }, + "required": [ + "emailVerification" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/verification\/phone": { + "patch": { + "summary": "Update phone verification", + "operationId": "usersUpdatePhoneVerification", + "tags": [ + "users" + ], + "description": "Update the user phone verification status by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "x-appwrite": { + "method": "updatePhoneVerification", + "weight": 252, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/update-phone-verification.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "phoneVerification": { + "type": "boolean", + "description": "User phone verification status.", + "x-example": false + } + }, + "required": [ + "phoneVerification" + ] + } + } + } + } + } + } + }, + "tags": [ + { + "name": "account", + "description": "The Account service allows you to authenticate and manage a user account.", + "x-globalAttributes": [] + }, + { + "name": "avatars", + "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.", + "x-globalAttributes": [] + }, + { + "name": "databases", + "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents", + "x-globalAttributes": [ + "databaseId" + ] + }, + { + "name": "locale", + "description": "The Locale service allows you to customize your app based on your users' location.", + "x-globalAttributes": [] + }, + { + "name": "health", + "description": "The Health service allows you to both validate and monitor your Appwrite server's health.", + "x-globalAttributes": [] + }, + { + "name": "projects", + "description": "The Project service allows you to manage all the projects in your Appwrite server.", + "x-globalAttributes": [] + }, + { + "name": "project", + "description": "The Project service allows you to manage all the projects in your Appwrite server.", + "x-globalAttributes": [] + }, + { + "name": "storage", + "description": "The Storage service allows you to manage your project files.", + "x-globalAttributes": [] + }, + { + "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", + "x-globalAttributes": [] + }, + { + "name": "users", + "description": "The Users service allows you to manage your project users.", + "x-globalAttributes": [] + }, + { + "name": "functions", + "description": "The Functions Service allows you view, create and manage your Cloud Functions.", + "x-globalAttributes": [] + }, + { + "name": "proxy", + "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration.", + "x-globalAttributes": [] + }, + { + "name": "graphql", + "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL.", + "x-globalAttributes": [] + }, + { + "name": "console", + "description": "The Console service allows you to interact with console relevant informations.", + "x-globalAttributes": [] + }, + { + "name": "migrations", + "description": "The Migrations service allows you to migrate third-party data to your Appwrite project.", + "x-globalAttributes": [] + }, + { + "name": "messaging", + "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.).", + "x-globalAttributes": [] + } + ], + "components": { + "schemas": { + "any": { + "description": "Any", + "type": "object", + "additionalProperties": true + }, + "error": { + "description": "Error", "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"] - } - } - } - } - } - }, - "/teams/{teamId}/prefs": { - "get": { - "summary": "Get team preferences", - "operationId": "teamsGetPrefs", - "tags": ["teams"], - "description": "Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs).", - "responses": { - "200": { - "description": "Preferences", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/preferences" - } - } - } - } - }, - "x-appwrite": { - "method": "getPrefs", - "weight": 221, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "teams/get-prefs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/get-team-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update preferences", - "operationId": "teamsUpdatePrefs", - "tags": ["teams"], - "description": "Update the team's 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 an error if exceeded.", - "responses": { - "200": { - "description": "Preferences", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/preferences" - } - } - } - } - }, - "x-appwrite": { - "method": "updatePrefs", - "weight": 223, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "teams/update-prefs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "x-example": "{}" - } - }, - "required": ["prefs"] - } - } - } - } - } - }, - "/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": 241, - "cookies": false, - "type": "", - "deprecated": false, - "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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "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" - } - ] - }, - "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": 232, - "cookies": false, - "type": "", - "deprecated": false, - "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 a custom ID or generate a random ID with `ID.unique()`. Valid 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" - }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100" - }, - "password": { - "type": "string", - "description": "Plain text user password. Must be at least 8 chars.", - "x-example": null - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": ["userId"] - } - } - } - } - } - }, - "/users/argon2": { - "post": { - "summary": "Create user with Argon2 password", - "operationId": "usersCreateArgon2User", - "tags": ["users"], - "description": "Create a new user. Password provided must be hashed with the [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user" - } - } - } - } - }, - "x-appwrite": { - "method": "createArgon2User", - "weight": 235, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-argon2user.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-argon2-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using Argon2.", - "x-example": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": ["userId", "email", "password"] - } - } - } - } - } - }, - "/users/bcrypt": { - "post": { - "summary": "Create user with bcrypt password", - "operationId": "usersCreateBcryptUser", - "tags": ["users"], - "description": "Create a new user. Password provided must be hashed with the [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user" - } - } - } - } - }, - "x-appwrite": { - "method": "createBcryptUser", - "weight": 233, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-bcrypt-user.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-bcrypt-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using Bcrypt.", - "x-example": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": ["userId", "email", "password"] - } - } - } - } - } - }, - "/users/identities": { - "get": { - "summary": "List identities", - "operationId": "usersListIdentities", - "tags": ["users"], - "description": "Get identities for all users.", - "responses": { - "200": { - "description": "Identities List", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/identityList" - } - } - } - } - }, - "x-appwrite": { - "method": "listIdentities", - "weight": 249, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/list-identities.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/list-identities.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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "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" - } - ] - } - }, - "/users/identities/{identityId}": { - "delete": { - "summary": "Delete identity", - "operationId": "usersDeleteIdentity", - "tags": ["users"], - "description": "Delete an identity by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteIdentity", - "weight": 272, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/delete-identity.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/delete-identity.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": "identityId", - "description": "Identity ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<IDENTITY_ID>" - }, - "in": "path" - } - ] - } - }, - "/users/md5": { - "post": { - "summary": "Create user with MD5 password", - "operationId": "usersCreateMD5User", - "tags": ["users"], - "description": "Create a new user. Password provided must be hashed with the [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user" - } - } - } - } - }, - "x-appwrite": { - "method": "createMD5User", - "weight": 234, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-m-d5user.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-md5-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using MD5.", - "x-example": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": ["userId", "email", "password"] - } - } - } - } - } - }, - "/users/phpass": { - "post": { - "summary": "Create user with PHPass password", - "operationId": "usersCreatePHPassUser", - "tags": ["users"], - "description": "Create a new user. Password provided must be hashed with the [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user" - } - } - } - } - }, - "x-appwrite": { - "method": "createPHPassUser", - "weight": 237, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-p-h-pass-user.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-phpass-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 a custom ID or pass the string `ID.unique()`to auto generate it. Valid 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 hashed using PHPass.", - "x-example": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": ["userId", "email", "password"] - } - } - } - } - } - }, - "/users/scrypt": { - "post": { - "summary": "Create user with Scrypt password", - "operationId": "usersCreateScryptUser", - "tags": ["users"], - "description": "Create a new user. Password provided must be hashed with the [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user" - } - } - } - } - }, - "x-appwrite": { - "method": "createScryptUser", - "weight": 238, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-scrypt-user.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-scrypt-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using Scrypt.", - "x-example": "password" - }, - "passwordSalt": { - "type": "string", - "description": "Optional salt used to hash password.", - "x-example": "<PASSWORD_SALT>" - }, - "passwordCpu": { - "type": "integer", - "description": "Optional CPU cost used to hash password.", - "x-example": null - }, - "passwordMemory": { - "type": "integer", - "description": "Optional memory cost used to hash password.", - "x-example": null - }, - "passwordParallel": { - "type": "integer", - "description": "Optional parallelization cost used to hash password.", - "x-example": null - }, - "passwordLength": { - "type": "integer", - "description": "Optional hash length used to hash password.", - "x-example": null - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } + "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": [ - "userId", - "email", - "password", - "passwordSalt", - "passwordCpu", - "passwordMemory", - "passwordParallel", - "passwordLength" + "message", + "code", + "type", + "version" ] - } - } - } - } - } - }, - "/users/scrypt-modified": { - "post": { - "summary": "Create user with Scrypt modified password", - "operationId": "usersCreateScryptModifiedUser", - "tags": ["users"], - "description": "Create a new user. Password provided must be hashed with the [Scrypt Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user" - } - } - } - } - }, - "x-appwrite": { - "method": "createScryptModifiedUser", - "weight": 239, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-scrypt-modified-user.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-scrypt-modified-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": { + }, + "documentList": { + "description": "Documents List", "type": "object", "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using Scrypt Modified.", - "x-example": "password" - }, - "passwordSalt": { - "type": "string", - "description": "Salt used to hash password.", - "x-example": "<PASSWORD_SALT>" - }, - "passwordSaltSeparator": { - "type": "string", - "description": "Salt separator used to hash password.", - "x-example": "<PASSWORD_SALT_SEPARATOR>" - }, - "passwordSignerKey": { - "type": "string", - "description": "Signer key used to hash password.", - "x-example": "<PASSWORD_SIGNER_KEY>" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } + "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": [ - "userId", - "email", - "password", - "passwordSalt", - "passwordSaltSeparator", - "passwordSignerKey" + "total", + "documents" ] - } - } - } - } - } - }, - "/users/sha": { - "post": { - "summary": "Create user with SHA password", - "operationId": "usersCreateSHAUser", - "tags": ["users"], - "description": "Create a new user. Password provided must be hashed with the [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user" - } - } - } - } - }, - "x-appwrite": { - "method": "createSHAUser", - "weight": 236, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-s-h-a-user.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-sha-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": { + }, + "collectionList": { + "description": "Collections List", "type": "object", "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using SHA.", - "x-example": "password" - }, - "passwordVersion": { - "type": "string", - "description": "Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512/224', 'sha512/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'", - "x-example": "sha1", - "enum": [ - "sha1", - "sha224", - "sha256", - "sha384", - "sha512/224", - "sha512/256", - "sha512", - "sha3-224", - "sha3-256", - "sha3-384", - "sha3-512" - ], - "x-enum-name": "PasswordHash", - "x-enum-keys": [] - }, - "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": 242, - "cookies": false, - "type": "", - "deprecated": false, - "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](https://appwrite.io/docs/server/users#usersUpdateStatus) endpoint instead.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "delete", - "weight": 270, - "cookies": false, - "type": "", - "deprecated": false, - "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": 255, - "cookies": false, - "type": "", - "deprecated": false, - "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}/jwts": { - "post": { - "summary": "Create user JWT", - "operationId": "usersCreateJWT", - "tags": ["users"], - "description": "Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.", - "responses": { - "201": { - "description": "JWT", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/jwt" - } - } - } - } - }, - "x-appwrite": { - "method": "createJWT", - "weight": 273, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-j-w-t.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-user-jwt.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": { - "sessionId": { - "type": "string", - "description": "Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session.", - "x-example": "<SESSION_ID>" - }, - "duration": { - "type": "integer", - "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", - "x-example": 0 - } - } - } - } - } - } - } - }, - "/users/{userId}/labels": { - "put": { - "summary": "Update user labels", - "operationId": "usersUpdateLabels", - "tags": ["users"], - "description": "Update the user labels by its unique ID. \n\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info.", - "responses": { - "200": { - "description": "User", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user" - } - } - } - } - }, - "x-appwrite": { - "method": "updateLabels", - "weight": 251, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/update-labels.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-labels.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": { - "labels": { - "type": "array", - "description": "Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", - "x-example": null, - "items": { - "type": "string" + "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": ["labels"] - } - } - } - } - } - }, - "/users/{userId}/logs": { - "get": { - "summary": "List user logs", - "operationId": "usersListLogs", - "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": "listLogs", - "weight": 247, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/list-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/list-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>" + "required": [ + "total", + "collections" + ] }, - "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/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "/users/{userId}/memberships": { - "get": { - "summary": "List user memberships", - "operationId": "usersListMemberships", - "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": "listMemberships", - "weight": 246, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/list-memberships.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/list-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}/mfa": { - "patch": { - "summary": "Update MFA", - "operationId": "usersUpdateMfa", - "tags": ["users"], - "description": "Enable or disable MFA on a user account.", - "responses": { - "200": { - "description": "User", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user" - } - } - } - } - }, - "x-appwrite": { - "method": "updateMfa", - "weight": 260, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/update-mfa.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-mfa.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": { + "databaseList": { + "description": "Databases List", "type": "object", "properties": { - "mfa": { - "type": "boolean", - "description": "Enable or disable MFA.", - "x-example": false - } + "total": { + "type": "integer", + "description": "Total number of databases documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "databases": { + "type": "array", + "description": "List of databases.", + "items": { + "$ref": "#\/components\/schemas\/database" + }, + "x-example": "" + } }, - "required": ["mfa"] - } - } - } - } - } - }, - "/users/{userId}/mfa/authenticators/{type}": { - "delete": { - "summary": "Delete authenticator", - "operationId": "usersDeleteMfaAuthenticator", - "tags": ["users"], - "description": "Delete an authenticator app.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteMfaAuthenticator", - "weight": 265, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/delete-mfa-authenticator.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/delete-mfa-authenticator.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>" + "required": [ + "total", + "databases" + ] }, - "in": "path" - }, - { - "name": "type", - "description": "Type of authenticator.", - "required": true, - "schema": { - "type": "string", - "x-example": "totp", - "enum": ["totp"], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [] - }, - "in": "path" - } - ] - } - }, - "/users/{userId}/mfa/factors": { - "get": { - "summary": "List factors", - "operationId": "usersListMfaFactors", - "tags": ["users"], - "description": "List the factors available on the account to be used as a MFA challange.", - "responses": { - "200": { - "description": "MFAFactors", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/mfaFactors" - } - } - } - } - }, - "x-appwrite": { - "method": "listMfaFactors", - "weight": 261, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/list-mfa-factors.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/list-mfa-factors.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}/mfa/recovery-codes": { - "get": { - "summary": "Get MFA recovery codes", - "operationId": "usersGetMfaRecoveryCodes", - "tags": ["users"], - "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/mfaRecoveryCodes" - } - } - } - } - }, - "x-appwrite": { - "method": "getMfaRecoveryCodes", - "weight": 262, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/get-mfa-recovery-codes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/get-mfa-recovery-codes.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" - } - ] - }, - "put": { - "summary": "Regenerate MFA recovery codes", - "operationId": "usersUpdateMfaRecoveryCodes", - "tags": ["users"], - "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/mfaRecoveryCodes" - } - } - } - } - }, - "x-appwrite": { - "method": "updateMfaRecoveryCodes", - "weight": 264, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/update-mfa-recovery-codes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-mfa-recovery-codes.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" - } - ] - }, - "patch": { - "summary": "Create MFA recovery codes", - "operationId": "usersCreateMfaRecoveryCodes", - "tags": ["users"], - "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method by client SDK.", - "responses": { - "201": { - "description": "MFA Recovery Codes", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/mfaRecoveryCodes" - } - } - } - } - }, - "x-appwrite": { - "method": "createMfaRecoveryCodes", - "weight": 263, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-mfa-recovery-codes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-mfa-recovery-codes.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}/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": 253, - "cookies": false, - "type": "", - "deprecated": false, - "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": { + "indexList": { + "description": "Indexes List", "type": "object", "properties": { - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } + "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": ["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": 254, - "cookies": false, - "type": "", - "deprecated": false, - "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>" + "required": [ + "total", + "indexes" + ] }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { + "userList": { + "description": "Users List", "type": "object", "properties": { - "password": { - "type": "string", - "description": "New user password. Must be at least 8 chars.", - "x-example": null - } + "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": ["password"] - } - } - } - } - } - }, - "/users/{userId}/phone": { - "patch": { - "summary": "Update phone", - "operationId": "usersUpdatePhone", - "tags": ["users"], - "description": "Update the user phone by its unique ID.", - "responses": { - "200": { - "description": "User", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user" - } - } - } - } - }, - "x-appwrite": { - "method": "updatePhone", - "weight": 256, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/update-phone.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" + "required": [ + "total", + "users" + ] }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { + "sessionList": { + "description": "Sessions List", "type": "object", "properties": { - "number": { - "type": "string", - "description": "User phone number.", - "x-example": "+12065550100" - } + "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": ["number"] - } - } - } - } - } - }, - "/users/{userId}/prefs": { - "get": { - "summary": "Get user preferences", - "operationId": "usersGetPrefs", - "tags": ["users"], - "description": "Get the user preferences by its unique ID.", - "responses": { - "200": { - "description": "Preferences", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/preferences" - } - } - } - } - }, - "x-appwrite": { - "method": "getPrefs", - "weight": 243, - "cookies": false, - "type": "", - "deprecated": false, - "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>" + "required": [ + "total", + "sessions" + ] }, - "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": 258, - "cookies": false, - "type": "", - "deprecated": false, - "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": { + "identityList": { + "description": "Identities List", "type": "object", "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "x-example": "{}" - } + "total": { + "type": "integer", + "description": "Total number of identities documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "identities": { + "type": "array", + "description": "List of identities.", + "items": { + "$ref": "#\/components\/schemas\/identity" + }, + "x-example": "" + } }, - "required": ["prefs"] - } - } - } - } - } - }, - "/users/{userId}/sessions": { - "get": { - "summary": "List user sessions", - "operationId": "usersListSessions", - "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": "listSessions", - "weight": 245, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/list-sessions.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/list-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>" + "required": [ + "total", + "identities" + ] }, - "in": "path" - } - ] - }, - "post": { - "summary": "Create session", - "operationId": "usersCreateSession", - "tags": ["users"], - "description": "Creates a session for a user. Returns an immediately usable session object.\n\nIf you want to generate a token for a custom authentication flow, use the [POST /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken) endpoint.", - "responses": { - "201": { - "description": "Session", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/session" - } - } - } - } - }, - "x-appwrite": { - "method": "createSession", - "weight": 266, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-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. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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, - "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": 269, - "cookies": false, - "type": "", - "deprecated": false, - "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": 268, - "cookies": false, - "type": "", - "deprecated": false, - "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": 250, - "cookies": false, - "type": "", - "deprecated": false, - "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": { + "logList": { + "description": "Logs List", "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 - } + "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": ["status"] - } - } - } - } - } - }, - "/users/{userId}/targets": { - "get": { - "summary": "List user targets", - "operationId": "usersListTargets", - "tags": ["users"], - "description": "List the messaging targets that are associated with a user.", - "responses": { - "200": { - "description": "Target list", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/targetList" - } - } - } - } - }, - "x-appwrite": { - "method": "listTargets", - "weight": 248, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/list-targets.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/list-user-targets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", - "platforms": ["server", "console"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" + "required": [ + "total", + "logs" + ] }, - "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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create user target", - "operationId": "usersCreateTarget", - "tags": ["users"], - "description": "Create a messaging target.", - "responses": { - "201": { - "description": "Target", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/target" - } - } - } - } - }, - "x-appwrite": { - "method": "createTarget", - "weight": 240, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-target.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": ["server", "console"], - "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": { + "fileList": { + "description": "Files List", "type": "object", "properties": { - "targetId": { - "type": "string", - "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<TARGET_ID>" - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email", - "enum": ["email", "sms", "push"], - "x-enum-name": "MessagingProviderType", - "x-enum-keys": [] - }, - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "x-example": "<IDENTIFIER>" - }, - "providerId": { - "type": "string", - "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", - "x-example": "<NAME>" - } + "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": ["targetId", "providerType", "identifier"] - } - } - } - } - } - }, - "/users/{userId}/targets/{targetId}": { - "get": { - "summary": "Get user target", - "operationId": "usersGetTarget", - "tags": ["users"], - "description": "Get a user's push notification target by ID.", - "responses": { - "200": { - "description": "Target", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/target" - } - } - } - } - }, - "x-appwrite": { - "method": "getTarget", - "weight": 244, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/get-target.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/get-user-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", - "platforms": ["server", "console"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" + "required": [ + "total", + "files" + ] }, - "in": "path" - }, - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TARGET_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update user target", - "operationId": "usersUpdateTarget", - "tags": ["users"], - "description": "Update a messaging target.", - "responses": { - "200": { - "description": "Target", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/target" - } - } - } - } - }, - "x-appwrite": { - "method": "updateTarget", - "weight": 259, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/update-target.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": ["server", "console"], - "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": "targetId", - "description": "Target ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TARGET_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { + "bucketList": { + "description": "Buckets List", "type": "object", "properties": { - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "x-example": "<IDENTIFIER>" - }, - "providerId": { - "type": "string", - "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", - "x-example": "<NAME>" - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete user target", - "operationId": "usersDeleteTarget", - "tags": ["users"], - "description": "Delete a messaging target.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteTarget", - "weight": 271, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/delete-target.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/delete-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": ["server", "console"], - "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": "targetId", - "description": "Target ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TARGET_ID>" - }, - "in": "path" - } - ] - } - }, - "/users/{userId}/tokens": { - "post": { - "summary": "Create token", - "operationId": "usersCreateToken", - "tags": ["users"], - "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT /account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process.\n", - "responses": { - "201": { - "description": "Token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/token" - } - } - } - } - }, - "x-appwrite": { - "method": "createToken", - "weight": 267, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-token.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-token.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": { - "length": { - "type": "integer", - "description": "Token length in characters. The default length is 6 characters", - "x-example": 4 - }, - "expire": { - "type": "integer", - "description": "Token expiration period in seconds. The default expiration is 15 minutes.", - "x-example": 60 - } - } - } - } - } - } - } - }, - "/users/{userId}/verification": { - "patch": { - "summary": "Update email verification", - "operationId": "usersUpdateEmailVerification", - "tags": ["users"], - "description": "Update the user email verification status by its unique ID.", - "responses": { - "200": { - "description": "User", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user" - } - } - } - } - }, - "x-appwrite": { - "method": "updateEmailVerification", - "weight": 257, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/update-email-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-email-verification.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "emailVerification": { - "type": "boolean", - "description": "User email verification status.", - "x-example": false - } + "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": ["emailVerification"] - } - } - } - } - } - }, - "/users/{userId}/verification/phone": { - "patch": { - "summary": "Update phone verification", - "operationId": "usersUpdatePhoneVerification", - "tags": ["users"], - "description": "Update the user phone verification status by its unique ID.", - "responses": { - "200": { - "description": "User", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user" - } - } - } - } - }, - "x-appwrite": { - "method": "updatePhoneVerification", - "weight": 252, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/update-phone-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-phone-verification.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" + "required": [ + "total", + "buckets" + ] }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { + "teamList": { + "description": "Teams List", "type": "object", "properties": { - "phoneVerification": { - "type": "boolean", - "description": "User phone verification status.", - "x-example": false - } + "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": ["phoneVerification"] - } + "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" + ] + }, + "variableList": { + "description": "Variables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of variables documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "variables": { + "type": "array", + "description": "List of variables.", + "items": { + "$ref": "#\/components\/schemas\/variable" + }, + "x-example": "" + } + }, + "required": [ + "total", + "variables" + ] + }, + "localeCodeList": { + "description": "Locale codes list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of localeCodes documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "localeCodes": { + "type": "array", + "description": "List of localeCodes.", + "items": { + "$ref": "#\/components\/schemas\/localeCode" + }, + "x-example": "" + } + }, + "required": [ + "total", + "localeCodes" + ] + }, + "providerList": { + "description": "Provider list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of providers documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "providers": { + "type": "array", + "description": "List of providers.", + "items": { + "$ref": "#\/components\/schemas\/provider" + }, + "x-example": "" + } + }, + "required": [ + "total", + "providers" + ] + }, + "messageList": { + "description": "Message list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of messages documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "messages": { + "type": "array", + "description": "List of messages.", + "items": { + "$ref": "#\/components\/schemas\/message" + }, + "x-example": "" + } + }, + "required": [ + "total", + "messages" + ] + }, + "topicList": { + "description": "Topic list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of topics documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "topics": { + "type": "array", + "description": "List of topics.", + "items": { + "$ref": "#\/components\/schemas\/topic" + }, + "x-example": "" + } + }, + "required": [ + "total", + "topics" + ] + }, + "subscriberList": { + "description": "Subscriber list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of subscribers documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "subscribers": { + "type": "array", + "description": "List of subscribers.", + "items": { + "$ref": "#\/components\/schemas\/subscriber" + }, + "x-example": "" + } + }, + "required": [ + "total", + "subscribers" + ] + }, + "targetList": { + "description": "Target list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of targets documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "targets": { + "type": "array", + "description": "List of targets.", + "items": { + "$ref": "#\/components\/schemas\/target" + }, + "x-example": "" + } + }, + "required": [ + "total", + "targets" + ] + }, + "specificationList": { + "description": "Specifications List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of specifications documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "specifications": { + "type": "array", + "description": "List of specifications.", + "items": { + "$ref": "#\/components\/schemas\/specification" + }, + "x-example": "" + } + }, + "required": [ + "total", + "specifications" + ] + }, + "database": { + "description": "Database", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Database name.", + "x-example": "My Database" + }, + "$createdAt": { + "type": "string", + "description": "Database creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Database update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "enabled": { + "type": "boolean", + "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + } + }, + "required": [ + "$id", + "name", + "$createdAt", + "$updatedAt", + "enabled" + ] + }, + "collection": { + "description": "Collection", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Collection creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Collection update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Collection name.", + "x-example": "My Collection" + }, + "enabled": { + "type": "boolean", + "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "documentSecurity": { + "type": "boolean", + "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "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\/attributeDatetime" + }, + { + "$ref": "#\/components\/schemas\/attributeRelationship" + }, + { + "$ref": "#\/components\/schemas\/attributeString" + } + ] + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Collection indexes.", + "items": { + "$ref": "#\/components\/schemas\/index" + }, + "x-example": {} + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "documentSecurity", + "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\/attributeDatetime" + }, + { + "$ref": "#\/components\/schemas\/attributeRelationship" + }, + { + "$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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt", + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt", + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt", + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt", + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "attributeDatetime": { + "description": "AttributeDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "attributeRelationship": { + "description": "AttributeRelationship", + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedCollection": { + "type": "string", + "description": "The ID of the related collection.", + "x-example": "collection" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedCollection", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ] + }, + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "attributes": { + "type": "array", + "description": "Index attributes.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "attributes", + "$createdAt", + "$updatedAt" + ] + }, + "document": { + "description": "Document", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Document ID.", + "x-example": "5e5ea5c16897e" + }, + "$collectionId": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Document creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Document update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Document permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$collectionId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, + "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": "string", + "description": "Log creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "osCode": { + "type": "string", + "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", + "x-example": "Mac" + }, + "osName": { + "type": "string", + "description": "Operating system name.", + "x-example": "Mac" + }, + "osVersion": { + "type": "string", + "description": "Operating system version.", + "x-example": "Mac" + }, + "clientType": { + "type": "string", + "description": "Client type.", + "x-example": "browser" + }, + "clientCode": { + "type": "string", + "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", + "x-example": "CM" + }, + "clientName": { + "type": "string", + "description": "Client name.", + "x-example": "Chrome Mobile iOS" + }, + "clientVersion": { + "type": "string", + "description": "Client version.", + "x-example": "84.0" + }, + "clientEngine": { + "type": "string", + "description": "Client engine name.", + "x-example": "WebKit" + }, + "clientEngineVersion": { + "type": "string", + "description": "Client engine name.", + "x-example": "605.1.15" + }, + "deviceName": { + "type": "string", + "description": "Device name.", + "x-example": "smartphone" + }, + "deviceBrand": { + "type": "string", + "description": "Device brand name.", + "x-example": "Google" + }, + "deviceModel": { + "type": "string", + "description": "Device model name.", + "x-example": "Nexus 5" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + } + }, + "required": [ + "event", + "userId", + "userEmail", + "userName", + "mode", + "ip", + "time", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName" + ] + }, + "user": { + "description": "User", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "User creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "User update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "User name.", + "x-example": "John Doe" + }, + "password": { + "type": "string", + "description": "Hashed user password.", + "x-example": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "nullable": true + }, + "hash": { + "type": "string", + "description": "Password hashing algorithm.", + "x-example": "argon2", + "nullable": true + }, + "hashOptions": { + "type": "object", + "description": "Password hashing algorithm configuration.", + "x-example": {}, + "items": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/algoArgon2" + }, + { + "$ref": "#\/components\/schemas\/algoScrypt" + }, + { + "$ref": "#\/components\/schemas\/algoScryptModified" + }, + { + "$ref": "#\/components\/schemas\/algoBcrypt" + }, + { + "$ref": "#\/components\/schemas\/algoPhpass" + }, + { + "$ref": "#\/components\/schemas\/algoSha" + }, + { + "$ref": "#\/components\/schemas\/algoMd5" + } + ] + }, + "nullable": true + }, + "registration": { + "type": "string", + "description": "User registration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "status": { + "type": "boolean", + "description": "User status. Pass `true` for enabled and `false` for disabled.", + "x-example": true + }, + "labels": { + "type": "array", + "description": "Labels for the user.", + "items": { + "type": "string" + }, + "x-example": [ + "vip" + ] + }, + "passwordUpdate": { + "type": "string", + "description": "Password update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "email": { + "type": "string", + "description": "User email address.", + "x-example": "john@appwrite.io" + }, + "phone": { + "type": "string", + "description": "User phone number in E.164 format.", + "x-example": "+4930901820" + }, + "emailVerification": { + "type": "boolean", + "description": "Email verification status.", + "x-example": true + }, + "phoneVerification": { + "type": "boolean", + "description": "Phone verification status.", + "x-example": true + }, + "mfa": { + "type": "boolean", + "description": "Multi factor authentication 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" + } + }, + "targets": { + "type": "array", + "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.", + "items": { + "$ref": "#\/components\/schemas\/target" + }, + "x-example": [] + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "registration", + "status", + "labels", + "passwordUpdate", + "email", + "phone", + "emailVerification", + "phoneVerification", + "mfa", + "prefs", + "targets", + "accessedAt" + ] + }, + "algoMd5": { + "description": "AlgoMD5", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "md5" + } + }, + "required": [ + "type" + ] + }, + "algoSha": { + "description": "AlgoSHA", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "sha" + } + }, + "required": [ + "type" + ] + }, + "algoPhpass": { + "description": "AlgoPHPass", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "phpass" + } + }, + "required": [ + "type" + ] + }, + "algoBcrypt": { + "description": "AlgoBcrypt", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "bcrypt" + } + }, + "required": [ + "type" + ] + }, + "algoScrypt": { + "description": "AlgoScrypt", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "scrypt" + }, + "costCpu": { + "type": "integer", + "description": "CPU complexity of computed hash.", + "x-example": 8, + "format": "int32" + }, + "costMemory": { + "type": "integer", + "description": "Memory complexity of computed hash.", + "x-example": 14, + "format": "int32" + }, + "costParallel": { + "type": "integer", + "description": "Parallelization of computed hash.", + "x-example": 1, + "format": "int32" + }, + "length": { + "type": "integer", + "description": "Length used to compute hash.", + "x-example": 64, + "format": "int32" + } + }, + "required": [ + "type", + "costCpu", + "costMemory", + "costParallel", + "length" + ] + }, + "algoScryptModified": { + "description": "AlgoScryptModified", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "scryptMod" + }, + "salt": { + "type": "string", + "description": "Salt used to compute hash.", + "x-example": "UxLMreBr6tYyjQ==" + }, + "saltSeparator": { + "type": "string", + "description": "Separator used to compute hash.", + "x-example": "Bw==" + }, + "signerKey": { + "type": "string", + "description": "Key used to compute hash.", + "x-example": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } + }, + "required": [ + "type", + "salt", + "saltSeparator", + "signerKey" + ] + }, + "algoArgon2": { + "description": "AlgoArgon2", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "argon2" + }, + "memoryCost": { + "type": "integer", + "description": "Memory used to compute hash.", + "x-example": 65536, + "format": "int32" + }, + "timeCost": { + "type": "integer", + "description": "Amount of time consumed to compute hash", + "x-example": 4, + "format": "int32" + }, + "threads": { + "type": "integer", + "description": "Number of threads used to compute hash.", + "x-example": 3, + "format": "int32" + } + }, + "required": [ + "type", + "memoryCost", + "timeCost", + "threads" + ] + }, + "preferences": { + "description": "Preferences", + "type": "object", + "additionalProperties": true + }, + "session": { + "description": "Session", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Session ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Session creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Session update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5bb8c16897e" + }, + "expire": { + "type": "string", + "description": "Session expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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": "string", + "description": "The date of when the access token expires in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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 + }, + "factors": { + "type": "array", + "description": "Returns a list of active session factors.", + "items": { + "type": "string" + }, + "x-example": [ + "email" + ] + }, + "secret": { + "type": "string", + "description": "Secret used to authenticate the user. Only included if the request was made with an API key", + "x-example": "5e5bb8c16897e" + }, + "mfaUpdatedAt": { + "type": "string", + "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "expire", + "provider", + "providerUid", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken", + "ip", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName", + "current", + "factors", + "secret", + "mfaUpdatedAt" + ] + }, + "identity": { + "description": "Identity", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Identity ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Identity creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Identity update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5bb8c16897e" + }, + "provider": { + "type": "string", + "description": "Identity Provider.", + "x-example": "email" + }, + "providerUid": { + "type": "string", + "description": "ID of the User in the Identity Provider.", + "x-example": "5e5bb8c16897e" + }, + "providerEmail": { + "type": "string", + "description": "Email of the User in the Identity Provider.", + "x-example": "user@example.com" + }, + "providerAccessToken": { + "type": "string", + "description": "Identity Provider Access Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "providerAccessTokenExpiry": { + "type": "string", + "description": "The date of when the access token expires in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "providerRefreshToken": { + "type": "string", + "description": "Identity Provider Refresh Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "provider", + "providerUid", + "providerEmail", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken" + ] + }, + "token": { + "description": "Token", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "phrase": { + "type": "string", + "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.", + "x-example": "Golden Fox" + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "secret", + "expire", + "phrase" + ] + }, + "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 European 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" + ] + }, + "localeCode": { + "description": "LocaleCode", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes)", + "x-example": "en-us" + }, + "name": { + "type": "string", + "description": "Locale name", + "x-example": "US" + } + }, + "required": [ + "code", + "name" + ] + }, + "file": { + "description": "File", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "File ID.", + "x-example": "5e5ea5c16897e" + }, + "bucketId": { + "type": "string", + "description": "Bucket ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "File creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "File update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "File permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "name": { + "type": "string", + "description": "File name.", + "x-example": "Pink.png" + }, + "signature": { + "type": "string", + "description": "File MD5 signature.", + "x-example": "5d529fd02b544198ae075bd57c1762bb" + }, + "mimeType": { + "type": "string", + "description": "File mime type.", + "x-example": "image\/png" + }, + "sizeOriginal": { + "type": "integer", + "description": "File original size in bytes.", + "x-example": 17890, + "format": "int32" + }, + "chunksTotal": { + "type": "integer", + "description": "Total number of chunks available", + "x-example": 17890, + "format": "int32" + }, + "chunksUploaded": { + "type": "integer", + "description": "Total number of chunks uploaded", + "x-example": 17890, + "format": "int32" + } + }, + "required": [ + "$id", + "bucketId", + "$createdAt", + "$updatedAt", + "$permissions", + "name", + "signature", + "mimeType", + "sizeOriginal", + "chunksTotal", + "chunksUploaded" + ] + }, + "bucket": { + "description": "Bucket", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Bucket ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Bucket creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Bucket update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Bucket permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "fileSecurity": { + "type": "boolean", + "description": "Whether file-level security is enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "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" + ] + }, + "compression": { + "type": "string", + "description": "Compression algorithm choosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", + "x-example": "gzip" + }, + "encryption": { + "type": "boolean", + "description": "Bucket is encrypted.", + "x-example": false + }, + "antivirus": { + "type": "boolean", + "description": "Virus scanning is enabled.", + "x-example": false + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "fileSecurity", + "name", + "enabled", + "maximumFileSize", + "allowedFileExtensions", + "compression", + "encryption", + "antivirus" + ] + }, + "team": { + "description": "Team", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Team creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Team update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Team name.", + "x-example": "VIP" + }, + "total": { + "type": "integer", + "description": "Total number of team members.", + "x-example": 7, + "format": "int32" + }, + "prefs": { + "type": "object", + "description": "Team preferences as a key-value object", + "x-example": { + "theme": "pink", + "timezone": "UTC" + }, + "items": { + "$ref": "#\/components\/schemas\/preferences" + } + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "total", + "prefs" + ] + }, + "membership": { + "description": "Membership", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Membership ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Membership creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Membership update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" + }, + "userName": { + "type": "string", + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "John Doe" + }, + "userEmail": { + "type": "string", + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", + "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": "string", + "description": "Date, the user has been invited to join the team in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "joined": { + "type": "string", + "description": "Date, the user has accepted the invitation to join the team in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "confirm": { + "type": "boolean", + "description": "User confirmation status, true if the user has joined the team or false otherwise.", + "x-example": false + }, + "mfa": { + "type": "boolean", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", + "x-example": false + }, + "roles": { + "type": "array", + "description": "User list of roles", + "items": { + "type": "string" + }, + "x-example": [ + "owner" + ] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "userName", + "userEmail", + "teamId", + "teamName", + "invited", + "joined", + "confirm", + "mfa", + "roles" + ] + }, + "function": { + "description": "Function", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Function creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Function update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "execute": { + "type": "array", + "description": "Execution permissions.", + "items": { + "type": "string" + }, + "x-example": "users" + }, + "name": { + "type": "string", + "description": "Function name.", + "x-example": "My Function" + }, + "enabled": { + "type": "boolean", + "description": "Function enabled.", + "x-example": false + }, + "live": { + "type": "boolean", + "description": "Is the function deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the function to update it with the latest configuration.", + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project.", + "x-example": false + }, + "runtime": { + "type": "string", + "description": "Function execution runtime.", + "x-example": "python-3.8" + }, + "deployment": { + "type": "string", + "description": "Function's active deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { + "type": "string" + }, + "x-example": "users.read" + }, + "vars": { + "type": "array", + "description": "Function variables.", + "items": { + "$ref": "#\/components\/schemas\/variable" + }, + "x-example": [] + }, + "events": { + "type": "array", + "description": "Function trigger events.", + "items": { + "type": "string" + }, + "x-example": "account.create" + }, + "schedule": { + "type": "string", + "description": "Function execution schedule in CRON format.", + "x-example": "5 4 * * *" + }, + "timeout": { + "type": "integer", + "description": "Function execution timeout in seconds.", + "x-example": 300, + "format": "int32" + }, + "entrypoint": { + "type": "string", + "description": "The entrypoint file used to execute the deployment.", + "x-example": "index.js" + }, + "commands": { + "type": "string", + "description": "The build command used to build the deployment.", + "x-example": "npm install" + }, + "version": { + "type": "string", + "description": "Version of Open Runtimes used for the function.", + "x-example": "v2" + }, + "installationId": { + "type": "string", + "description": "Function VCS (Version Control System) installation id.", + "x-example": "6m40at4ejk5h2u9s1hboo" + }, + "providerRepositoryId": { + "type": "string", + "description": "VCS (Version Control System) Repository ID", + "x-example": "appwrite" + }, + "providerBranch": { + "type": "string", + "description": "VCS (Version Control System) branch name", + "x-example": "main" + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function in VCS (Version Control System) repository", + "x-example": "functions\/helloWorld" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", + "x-example": false + }, + "specification": { + "type": "string", + "description": "Machine specification for builds and executions.", + "x-example": "s-1vcpu-512mb" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "execute", + "name", + "enabled", + "live", + "logging", + "runtime", + "deployment", + "scopes", + "vars", + "events", + "schedule", + "timeout", + "entrypoint", + "commands", + "version", + "installationId", + "providerRepositoryId", + "providerBranch", + "providerRootDirectory", + "providerSilentMode", + "specification" + ] + }, + "runtime": { + "description": "Runtime", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Runtime ID.", + "x-example": "python-3.8" + }, + "key": { + "type": "string", + "description": "Parent runtime key.", + "x-example": "python" + }, + "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", + "key", + "name", + "version", + "base", + "image", + "logo", + "supports" + ] + }, + "deployment": { + "description": "Deployment", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Deployment update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "type": { + "type": "string", + "description": "Type of deployment.", + "x-example": "vcs" + }, + "resourceId": { + "type": "string", + "description": "Resource ID.", + "x-example": "5e5ea6g16897e" + }, + "resourceType": { + "type": "string", + "description": "Resource type.", + "x-example": "functions" + }, + "entrypoint": { + "type": "string", + "description": "The entrypoint file to use to execute the deployment code.", + "x-example": "index.js" + }, + "size": { + "type": "integer", + "description": "The code size in bytes.", + "x-example": 128, + "format": "int32" + }, + "buildSize": { + "type": "integer", + "description": "The build output 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. Possible values are \"processing\", \"building\", \"waiting\", \"ready\", and \"failed\".", + "x-example": "ready" + }, + "buildLogs": { + "type": "string", + "description": "The build logs.", + "x-example": "Compiling source files..." + }, + "buildTime": { + "type": "integer", + "description": "The current build time in seconds.", + "x-example": 128, + "format": "int32" + }, + "providerRepositoryName": { + "type": "string", + "description": "The name of the vcs provider repository", + "x-example": "database" + }, + "providerRepositoryOwner": { + "type": "string", + "description": "The name of the vcs provider repository owner", + "x-example": "utopia" + }, + "providerRepositoryUrl": { + "type": "string", + "description": "The url of the vcs provider repository", + "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" + }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, + "providerCommitHash": { + "type": "string", + "description": "The commit hash of the vcs commit", + "x-example": "7c3f25d" + }, + "providerCommitAuthorUrl": { + "type": "string", + "description": "The url of vcs commit author", + "x-example": "https:\/\/github.com\/vermakhushboo" + }, + "providerCommitAuthor": { + "type": "string", + "description": "The name of vcs commit author", + "x-example": "Khushboo Verma" + }, + "providerCommitMessage": { + "type": "string", + "description": "The commit message", + "x-example": "Update index.js" + }, + "providerCommitUrl": { + "type": "string", + "description": "The url of the vcs commit", + "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" + }, + "providerBranchUrl": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "type", + "resourceId", + "resourceType", + "entrypoint", + "size", + "buildSize", + "buildId", + "activate", + "status", + "buildLogs", + "buildTime", + "providerRepositoryName", + "providerRepositoryOwner", + "providerRepositoryUrl", + "providerBranch", + "providerCommitHash", + "providerCommitAuthorUrl", + "providerCommitAuthor", + "providerCommitMessage", + "providerCommitUrl", + "providerBranchUrl" + ] + }, + "execution": { + "description": "Execution", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Execution ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Execution creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Execution upate date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Execution roles.", + "items": { + "type": "string" + }, + "x-example": [ + "any" + ] + }, + "functionId": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea6g16897e" + }, + "trigger": { + "type": "string", + "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", + "x-example": "http" + }, + "status": { + "type": "string", + "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", + "x-example": "processing" + }, + "requestMethod": { + "type": "string", + "description": "HTTP request method type.", + "x-example": "GET" + }, + "requestPath": { + "type": "string", + "description": "HTTP request path and query.", + "x-example": "\/articles?id=5" + }, + "requestHeaders": { + "type": "array", + "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "items": { + "$ref": "#\/components\/schemas\/headers" + }, + "x-example": [ + { + "Content-Type": "application\/json" + } + ] + }, + "responseStatusCode": { + "type": "integer", + "description": "HTTP response status code.", + "x-example": 200, + "format": "int32" + }, + "responseBody": { + "type": "string", + "description": "HTTP response body. This will return empty unless execution is created as synchronous.", + "x-example": "" + }, + "responseHeaders": { + "type": "array", + "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "items": { + "$ref": "#\/components\/schemas\/headers" + }, + "x-example": [ + { + "Content-Type": "application\/json" + } + ] + }, + "logs": { + "type": "string", + "description": "Function logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "errors": { + "type": "string", + "description": "Function errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "duration": { + "type": "number", + "description": "Function execution duration in seconds.", + "x-example": 0.4, + "format": "double" + }, + "scheduledAt": { + "type": "string", + "description": "The scheduled time for execution. If left empty, execution will be queued immediately.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "functionId", + "trigger", + "status", + "requestMethod", + "requestPath", + "requestHeaders", + "responseStatusCode", + "responseBody", + "responseHeaders", + "logs", + "errors", + "duration" + ] + }, + "build": { + "description": "Build", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Build ID.", + "x-example": "5e5ea5c16897e" + }, + "deploymentId": { + "type": "string", + "description": "The deployment that created this build.", + "x-example": "5e5ea5c16897e" + }, + "status": { + "type": "string", + "description": "The build status. There are a few different types and each one means something different. \\nFailed - The deployment build has failed. More details can usually be found in buildStderr\\nReady - The deployment build was successful and the deployment is ready to be deployed\\nProcessing - The deployment is currently waiting to have a build triggered\\nBuilding - The deployment is currently being built", + "x-example": "ready" + }, + "stdout": { + "type": "string", + "description": "The stdout of the build.", + "x-example": "" + }, + "stderr": { + "type": "string", + "description": "The stderr of the build.", + "x-example": "" + }, + "startTime": { + "type": "string", + "description": "The deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "endTime": { + "type": "string", + "description": "The time the build was finished in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "duration": { + "type": "integer", + "description": "The build duration in seconds.", + "x-example": 0, + "format": "int32" + }, + "size": { + "type": "integer", + "description": "The code size in bytes.", + "x-example": 128, + "format": "int32" + } + }, + "required": [ + "$id", + "deploymentId", + "status", + "stdout", + "stderr", + "startTime", + "endTime", + "duration", + "size" + ] + }, + "variable": { + "description": "Variable", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Variable ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Variable creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Variable creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "key": { + "type": "string", + "description": "Variable key.", + "x-example": "API_KEY" + }, + "value": { + "type": "string", + "description": "Variable value.", + "x-example": "myPa$$word1" + }, + "resourceType": { + "type": "string", + "description": "Service to which the variable belongs. Possible values are \"project\", \"function\"", + "x-example": "function" + }, + "resourceId": { + "type": "string", + "description": "ID of resource to which the variable belongs. If resourceType is \"project\", it is empty. If resourceType is \"function\", it is ID of the function.", + "x-example": "myAwesomeFunction" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "value", + "resourceType", + "resourceId" + ] + }, + "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": { + "name": { + "type": "string", + "description": "Name of the service.", + "x-example": "database" + }, + "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": [ + "name", + "ping", + "status" + ] + }, + "healthCertificate": { + "description": "Health Certificate", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Certificate name", + "x-example": "\/CN=www.google.com" + }, + "subjectSN": { + "type": "string", + "description": "Subject SN", + "x-example": "" + }, + "issuerOrganisation": { + "type": "string", + "description": "Issuer organisation", + "x-example": "" + }, + "validFrom": { + "type": "string", + "description": "Valid from", + "x-example": "1704200998" + }, + "validTo": { + "type": "string", + "description": "Valid to", + "x-example": "1711458597" + }, + "signatureTypeSN": { + "type": "string", + "description": "Signature type SN", + "x-example": "RSA-SHA256" + } + }, + "required": [ + "name", + "subjectSN", + "issuerOrganisation", + "validFrom", + "validTo", + "signatureTypeSN" + ] + }, + "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" + ] + }, + "headers": { + "description": "Headers", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Header name.", + "x-example": "Content-Type" + }, + "value": { + "type": "string", + "description": "Header value.", + "x-example": "application\/json" + } + }, + "required": [ + "name", + "value" + ] + }, + "specification": { + "description": "Specification", + "type": "object", + "properties": { + "memory": { + "type": "integer", + "description": "Memory size in MB.", + "x-example": 512, + "format": "int32" + }, + "cpus": { + "type": "number", + "description": "Number of CPUs.", + "x-example": 1, + "format": "double" + }, + "enabled": { + "type": "boolean", + "description": "Is size enabled.", + "x-example": true + }, + "slug": { + "type": "string", + "description": "Size slug.", + "x-example": "s-1vcpu-512mb" + } + }, + "required": [ + "memory", + "cpus", + "enabled", + "slug" + ] + }, + "mfaChallenge": { + "description": "MFA Challenge", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c168bb8" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "expire" + ] + }, + "mfaRecoveryCodes": { + "description": "MFA Recovery Codes", + "type": "object", + "properties": { + "recoveryCodes": { + "type": "array", + "description": "Recovery codes.", + "items": { + "type": "string" + }, + "x-example": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } + }, + "required": [ + "recoveryCodes" + ] + }, + "mfaType": { + "description": "MFAType", + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "Secret token used for TOTP factor.", + "x-example": true + }, + "uri": { + "type": "string", + "description": "URI for authenticator apps.", + "x-example": true + } + }, + "required": [ + "secret", + "uri" + ] + }, + "mfaFactors": { + "description": "MFAFactors", + "type": "object", + "properties": { + "totp": { + "type": "boolean", + "description": "Can TOTP be used for MFA challenge for this account.", + "x-example": true + }, + "phone": { + "type": "boolean", + "description": "Can phone (SMS) be used for MFA challenge for this account.", + "x-example": true + }, + "email": { + "type": "boolean", + "description": "Can email be used for MFA challenge for this account.", + "x-example": true + }, + "recoveryCode": { + "type": "boolean", + "description": "Can recovery code be used for MFA challenge for this account.", + "x-example": true + } + }, + "required": [ + "totp", + "phone", + "email", + "recoveryCode" + ] + }, + "provider": { + "description": "Provider", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Provider ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Provider creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Provider update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "The name for the provider instance.", + "x-example": "Mailgun" + }, + "provider": { + "type": "string", + "description": "The name of the provider service.", + "x-example": "mailgun" + }, + "enabled": { + "type": "boolean", + "description": "Is provider enabled?", + "x-example": true + }, + "type": { + "type": "string", + "description": "Type of provider.", + "x-example": "sms" + }, + "credentials": { + "type": "object", + "description": "Provider credentials.", + "x-example": { + "key": "123456789" + } + }, + "options": { + "type": "object", + "description": "Provider options.", + "x-example": { + "from": "sender-email@mydomain" + }, + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "provider", + "enabled", + "type", + "credentials" + ] + }, + "message": { + "description": "Message", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Message ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Message creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Message update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "providerType": { + "type": "string", + "description": "Message provider type.", + "x-example": "email" + }, + "topics": { + "type": "array", + "description": "Topic IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "users": { + "type": "array", + "description": "User IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "targets": { + "type": "array", + "description": "Target IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "scheduledAt": { + "type": "string", + "description": "The scheduled time for message.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "deliveredAt": { + "type": "string", + "description": "The time when the message was delivered.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "deliveryErrors": { + "type": "array", + "description": "Delivery errors if any.", + "items": { + "type": "string" + }, + "x-example": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "nullable": true + }, + "deliveredTotal": { + "type": "integer", + "description": "Number of recipients the message was delivered to.", + "x-example": 1, + "format": "int32" + }, + "data": { + "type": "object", + "description": "Data of the message.", + "x-example": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + } + }, + "status": { + "type": "string", + "description": "Status of delivery.", + "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "providerType", + "topics", + "users", + "targets", + "deliveredTotal", + "data", + "status" + ] + }, + "topic": { + "description": "Topic", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Topic ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Topic creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Topic update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "The name of the topic.", + "x-example": "events" + }, + "emailTotal": { + "type": "integer", + "description": "Total count of email subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "smsTotal": { + "type": "integer", + "description": "Total count of SMS subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "pushTotal": { + "type": "integer", + "description": "Total count of push subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "subscribe": { + "type": "array", + "description": "Subscribe permissions.", + "items": { + "type": "string" + }, + "x-example": "users" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "emailTotal", + "smsTotal", + "pushTotal", + "subscribe" + ] + }, + "subscriber": { + "description": "Subscriber", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Subscriber ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Subscriber creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Subscriber update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "targetId": { + "type": "string", + "description": "Target ID.", + "x-example": "259125845563242502" + }, + "target": { + "type": "object", + "description": "Target.", + "x-example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "items": { + "$ref": "#\/components\/schemas\/target" + } + }, + "userId": { + "type": "string", + "description": "Topic ID.", + "x-example": "5e5ea5c16897e" + }, + "userName": { + "type": "string", + "description": "User Name.", + "x-example": "Aegon Targaryen" + }, + "topicId": { + "type": "string", + "description": "Topic ID.", + "x-example": "259125845563242502" + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "targetId", + "target", + "userId", + "userName", + "topicId", + "providerType" + ] + }, + "target": { + "description": "Target", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Target ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Target creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Target update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Target Name.", + "x-example": "Apple iPhone 12" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "259125845563242502" + }, + "providerId": { + "type": "string", + "description": "Provider ID.", + "x-example": "259125845563242502", + "nullable": true + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" + }, + "identifier": { + "type": "string", + "description": "The target identifier.", + "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "userId", + "providerType", + "identifier", + "expired" + ] + } + }, + "securitySchemes": { + "Project": { + "type": "apiKey", + "name": "X-Appwrite-Project", + "description": "Your project ID", + "in": "header", + "x-appwrite": { + "demo": "<YOUR_PROJECT_ID>" + } + }, + "Key": { + "type": "apiKey", + "name": "X-Appwrite-Key", + "description": "Your secret API key", + "in": "header", + "x-appwrite": { + "demo": "<YOUR_API_KEY>" + } + }, + "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" + } + }, + "Session": { + "type": "apiKey", + "name": "X-Appwrite-Session", + "description": "The user session to authenticate with", + "in": "header" + }, + "ForwardedUserAgent": { + "type": "apiKey", + "name": "X-Forwarded-User-Agent", + "description": "The user agent string of the client that made the request", + "in": "header" } - } } - } + }, + "externalDocs": { + "description": "Full API docs, specs and tutorials", + "url": "https:\/\/appwrite.io\/docs" } - }, - "tags": [ - { - "name": "account", - "description": "The Account service allows you to authenticate and manage a user account.", - "x-globalAttributes": [] - }, - { - "name": "avatars", - "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.", - "x-globalAttributes": [] - }, - { - "name": "databases", - "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents", - "x-globalAttributes": ["databaseId"] - }, - { - "name": "locale", - "description": "The Locale service allows you to customize your app based on your users' location.", - "x-globalAttributes": [] - }, - { - "name": "health", - "description": "The Health service allows you to both validate and monitor your Appwrite server's health.", - "x-globalAttributes": [] - }, - { - "name": "projects", - "description": "The Project service allows you to manage all the projects in your Appwrite server.", - "x-globalAttributes": [] - }, - { - "name": "project", - "description": "The Project service allows you to manage all the projects in your Appwrite server.", - "x-globalAttributes": [] - }, - { - "name": "storage", - "description": "The Storage service allows you to manage your project files.", - "x-globalAttributes": [] - }, - { - "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", - "x-globalAttributes": [] - }, - { - "name": "users", - "description": "The Users service allows you to manage your project users.", - "x-globalAttributes": [] - }, - { - "name": "functions", - "description": "The Functions Service allows you view, create and manage your Cloud Functions.", - "x-globalAttributes": [] - }, - { - "name": "proxy", - "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration.", - "x-globalAttributes": [] - }, - { - "name": "graphql", - "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL.", - "x-globalAttributes": [] - }, - { - "name": "console", - "description": "The Console service allows you to interact with console relevant informations.", - "x-globalAttributes": [] - }, - { - "name": "migrations", - "description": "The Migrations service allows you to migrate third-party data to your Appwrite project.", - "x-globalAttributes": [] - }, - { - "name": "messaging", - "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.).", - "x-globalAttributes": [] - } - ], - "components": { - "schemas": { - "any": { - "description": "Any", - "type": "object", - "additionalProperties": true - }, - "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"] - }, - "databaseList": { - "description": "Databases List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of databases documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "databases": { - "type": "array", - "description": "List of databases.", - "items": { - "$ref": "#/components/schemas/database" - }, - "x-example": "" - } - }, - "required": ["total", "databases"] - }, - "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"] - }, - "identityList": { - "description": "Identities List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of identities documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "identities": { - "type": "array", - "description": "List of identities.", - "items": { - "$ref": "#/components/schemas/identity" - }, - "x-example": "" - } - }, - "required": ["total", "identities"] - }, - "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"] - }, - "variableList": { - "description": "Variables List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of variables documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "variables": { - "type": "array", - "description": "List of variables.", - "items": { - "$ref": "#/components/schemas/variable" - }, - "x-example": "" - } - }, - "required": ["total", "variables"] - }, - "localeCodeList": { - "description": "Locale codes list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "localeCodes": { - "type": "array", - "description": "List of localeCodes.", - "items": { - "$ref": "#/components/schemas/localeCode" - }, - "x-example": "" - } - }, - "required": ["total", "localeCodes"] - }, - "providerList": { - "description": "Provider list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of providers documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "providers": { - "type": "array", - "description": "List of providers.", - "items": { - "$ref": "#/components/schemas/provider" - }, - "x-example": "" - } - }, - "required": ["total", "providers"] - }, - "messageList": { - "description": "Message list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of messages documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "messages": { - "type": "array", - "description": "List of messages.", - "items": { - "$ref": "#/components/schemas/message" - }, - "x-example": "" - } - }, - "required": ["total", "messages"] - }, - "topicList": { - "description": "Topic list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of topics documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "topics": { - "type": "array", - "description": "List of topics.", - "items": { - "$ref": "#/components/schemas/topic" - }, - "x-example": "" - } - }, - "required": ["total", "topics"] - }, - "subscriberList": { - "description": "Subscriber list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of subscribers documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "subscribers": { - "type": "array", - "description": "List of subscribers.", - "items": { - "$ref": "#/components/schemas/subscriber" - }, - "x-example": "" - } - }, - "required": ["total", "subscribers"] - }, - "targetList": { - "description": "Target list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of targets documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "targets": { - "type": "array", - "description": "List of targets.", - "items": { - "$ref": "#/components/schemas/target" - }, - "x-example": "" - } - }, - "required": ["total", "targets"] - }, - "specificationList": { - "description": "Specifications List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of specifications documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "specifications": { - "type": "array", - "description": "List of specifications.", - "items": { - "$ref": "#/components/schemas/specification" - }, - "x-example": "" - } - }, - "required": ["total", "specifications"] - }, - "database": { - "description": "Database", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Database name.", - "x-example": "My Database" - }, - "$createdAt": { - "type": "string", - "description": "Database creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Database update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "enabled": { - "type": "boolean", - "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - } - }, - "required": ["$id", "name", "$createdAt", "$updatedAt", "enabled"] - }, - "collection": { - "description": "Collection", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Collection creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Collection update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Collection permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "items": { - "type": "string" - }, - "x-example": ["read(\"any\")"] - }, - "databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Collection name.", - "x-example": "My Collection" - }, - "enabled": { - "type": "boolean", - "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - }, - "documentSecurity": { - "type": "boolean", - "description": "Whether document-level permissions are enabled. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "x-example": true - }, - "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/attributeDatetime" - }, - { - "$ref": "#/components/schemas/attributeRelationship" - }, - { - "$ref": "#/components/schemas/attributeString" - } - ] - }, - "x-example": {} - }, - "indexes": { - "type": "array", - "description": "Collection indexes.", - "items": { - "$ref": "#/components/schemas/index" - }, - "x-example": {} - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "databaseId", - "name", - "enabled", - "documentSecurity", - "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/attributeDatetime" - }, - { - "$ref": "#/components/schemas/attributeRelationship" - }, - { - "$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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt", - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt" - ] - }, - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt" - ] - }, - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt" - ] - }, - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt", - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt", - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt", - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ] - }, - "attributeDatetime": { - "description": "AttributeDatetime", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "birthDay" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "datetime" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "ISO 8601 format.", - "x-example": "datetime" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Only null is optional", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ] - }, - "attributeRelationship": { - "description": "AttributeRelationship", - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "relatedCollection": { - "type": "string", - "description": "The ID of the related collection.", - "x-example": "collection" - }, - "relationType": { - "type": "string", - "description": "The type of the relationship.", - "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" - }, - "twoWay": { - "type": "boolean", - "description": "Is the relationship two-way?", - "x-example": false - }, - "twoWayKey": { - "type": "string", - "description": "The key of the two-way relationship.", - "x-example": "string" - }, - "onDelete": { - "type": "string", - "description": "How deleting the parent document will propagate to child documents.", - "x-example": "restrict|cascade|setNull" - }, - "side": { - "type": "string", - "description": "Whether this is the parent or child side of the relationship", - "x-example": "parent|child" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "relatedCollection", - "relationType", - "twoWay", - "twoWayKey", - "onDelete", - "side" - ] - }, - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an index.", - "x-example": "string" - }, - "attributes": { - "type": "array", - "description": "Index attributes.", - "items": { - "type": "string" - }, - "x-example": [] - }, - "orders": { - "type": "array", - "description": "Index orders.", - "items": { - "type": "string" - }, - "x-example": [], - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Index creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Index update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "attributes", - "$createdAt", - "$updatedAt" - ] - }, - "document": { - "description": "Document", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Document ID.", - "x-example": "5e5ea5c16897e" - }, - "$collectionId": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c15117e" - }, - "$databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c15117e" - }, - "$createdAt": { - "type": "string", - "description": "Document creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Document update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Document permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "items": { - "type": "string" - }, - "x-example": ["read(\"any\")"] - } - }, - "additionalProperties": true, - "required": [ - "$id", - "$collectionId", - "$databaseId", - "$createdAt", - "$updatedAt", - "$permissions" - ] - }, - "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": "string", - "description": "Log creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "osCode": { - "type": "string", - "description": "Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).", - "x-example": "Mac" - }, - "osName": { - "type": "string", - "description": "Operating system name.", - "x-example": "Mac" - }, - "osVersion": { - "type": "string", - "description": "Operating system version.", - "x-example": "Mac" - }, - "clientType": { - "type": "string", - "description": "Client type.", - "x-example": "browser" - }, - "clientCode": { - "type": "string", - "description": "Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).", - "x-example": "CM" - }, - "clientName": { - "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" - }, - "clientVersion": { - "type": "string", - "description": "Client version.", - "x-example": "84.0" - }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" - }, - "clientEngineVersion": { - "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" - }, - "deviceName": { - "type": "string", - "description": "Device name.", - "x-example": "smartphone" - }, - "deviceBrand": { - "type": "string", - "description": "Device brand name.", - "x-example": "Google" - }, - "deviceModel": { - "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": [ - "event", - "userId", - "userEmail", - "userName", - "mode", - "ip", - "time", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName" - ] - }, - "user": { - "description": "User", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "User creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "User update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "User name.", - "x-example": "John Doe" - }, - "password": { - "type": "string", - "description": "Hashed user password.", - "x-example": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L/4LdgrVRXxE", - "nullable": true - }, - "hash": { - "type": "string", - "description": "Password hashing algorithm.", - "x-example": "argon2", - "nullable": true - }, - "hashOptions": { - "type": "object", - "description": "Password hashing algorithm configuration.", - "x-example": {}, - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/algoArgon2" - }, - { - "$ref": "#/components/schemas/algoScrypt" - }, - { - "$ref": "#/components/schemas/algoScryptModified" - }, - { - "$ref": "#/components/schemas/algoBcrypt" - }, - { - "$ref": "#/components/schemas/algoPhpass" - }, - { - "$ref": "#/components/schemas/algoSha" - }, - { - "$ref": "#/components/schemas/algoMd5" - } - ] - }, - "nullable": true - }, - "registration": { - "type": "string", - "description": "User registration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "status": { - "type": "boolean", - "description": "User status. Pass `true` for enabled and `false` for disabled.", - "x-example": true - }, - "labels": { - "type": "array", - "description": "Labels for the user.", - "items": { - "type": "string" - }, - "x-example": ["vip"] - }, - "passwordUpdate": { - "type": "string", - "description": "Password update time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "email": { - "type": "string", - "description": "User email address.", - "x-example": "john@appwrite.io" - }, - "phone": { - "type": "string", - "description": "User phone number in E.164 format.", - "x-example": "+4930901820" - }, - "emailVerification": { - "type": "boolean", - "description": "Email verification status.", - "x-example": true - }, - "phoneVerification": { - "type": "boolean", - "description": "Phone verification status.", - "x-example": true - }, - "mfa": { - "type": "boolean", - "description": "Multi factor authentication 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" - } - }, - "targets": { - "type": "array", - "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.", - "items": { - "$ref": "#/components/schemas/target" - }, - "x-example": [] - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "registration", - "status", - "labels", - "passwordUpdate", - "email", - "phone", - "emailVerification", - "phoneVerification", - "mfa", - "prefs", - "targets", - "accessedAt" - ] - }, - "algoMd5": { - "description": "AlgoMD5", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "md5" - } - }, - "required": ["type"] - }, - "algoSha": { - "description": "AlgoSHA", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "sha" - } - }, - "required": ["type"] - }, - "algoPhpass": { - "description": "AlgoPHPass", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "phpass" - } - }, - "required": ["type"] - }, - "algoBcrypt": { - "description": "AlgoBcrypt", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "bcrypt" - } - }, - "required": ["type"] - }, - "algoScrypt": { - "description": "AlgoScrypt", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "scrypt" - }, - "costCpu": { - "type": "integer", - "description": "CPU complexity of computed hash.", - "x-example": 8, - "format": "int32" - }, - "costMemory": { - "type": "integer", - "description": "Memory complexity of computed hash.", - "x-example": 14, - "format": "int32" - }, - "costParallel": { - "type": "integer", - "description": "Parallelization of computed hash.", - "x-example": 1, - "format": "int32" - }, - "length": { - "type": "integer", - "description": "Length used to compute hash.", - "x-example": 64, - "format": "int32" - } - }, - "required": ["type", "costCpu", "costMemory", "costParallel", "length"] - }, - "algoScryptModified": { - "description": "AlgoScryptModified", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "scryptMod" - }, - "salt": { - "type": "string", - "description": "Salt used to compute hash.", - "x-example": "UxLMreBr6tYyjQ==" - }, - "saltSeparator": { - "type": "string", - "description": "Separator used to compute hash.", - "x-example": "Bw==" - }, - "signerKey": { - "type": "string", - "description": "Key used to compute hash.", - "x-example": "XyEKE9RcTDeLEsL/RjwPDBv/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" - } - }, - "required": ["type", "salt", "saltSeparator", "signerKey"] - }, - "algoArgon2": { - "description": "AlgoArgon2", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "argon2" - }, - "memoryCost": { - "type": "integer", - "description": "Memory used to compute hash.", - "x-example": 65536, - "format": "int32" - }, - "timeCost": { - "type": "integer", - "description": "Amount of time consumed to compute hash", - "x-example": 4, - "format": "int32" - }, - "threads": { - "type": "integer", - "description": "Number of threads used to compute hash.", - "x-example": 3, - "format": "int32" - } - }, - "required": ["type", "memoryCost", "timeCost", "threads"] - }, - "preferences": { - "description": "Preferences", - "type": "object", - "additionalProperties": true - }, - "session": { - "description": "Session", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Session ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Session creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Session update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" - }, - "expire": { - "type": "string", - "description": "Session expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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": "string", - "description": "The date of when the access token expires in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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 - }, - "factors": { - "type": "array", - "description": "Returns a list of active session factors.", - "items": { - "type": "string" - }, - "x-example": ["email"] - }, - "secret": { - "type": "string", - "description": "Secret used to authenticate the user. Only included if the request was made with an API key", - "x-example": "5e5bb8c16897e" - }, - "mfaUpdatedAt": { - "type": "string", - "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "expire", - "provider", - "providerUid", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken", - "ip", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName", - "current", - "factors", - "secret", - "mfaUpdatedAt" - ] - }, - "identity": { - "description": "Identity", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Identity ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Identity creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Identity update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" - }, - "provider": { - "type": "string", - "description": "Identity Provider.", - "x-example": "email" - }, - "providerUid": { - "type": "string", - "description": "ID of the User in the Identity Provider.", - "x-example": "5e5bb8c16897e" - }, - "providerEmail": { - "type": "string", - "description": "Email of the User in the Identity Provider.", - "x-example": "user@example.com" - }, - "providerAccessToken": { - "type": "string", - "description": "Identity Provider Access Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "providerAccessTokenExpiry": { - "type": "string", - "description": "The date of when the access token expires in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerRefreshToken": { - "type": "string", - "description": "Identity Provider Refresh Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "provider", - "providerUid", - "providerEmail", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken" - ] - }, - "token": { - "description": "Token", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "phrase": { - "type": "string", - "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.", - "x-example": "Golden Fox" - } - }, - "required": [ - "$id", - "$createdAt", - "userId", - "secret", - "expire", - "phrase" - ] - }, - "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 European 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" - ] - }, - "localeCode": { - "description": "LocaleCode", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)", - "x-example": "en-us" - }, - "name": { - "type": "string", - "description": "Locale name", - "x-example": "US" - } - }, - "required": ["code", "name"] - }, - "file": { - "description": "File", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "File ID.", - "x-example": "5e5ea5c16897e" - }, - "bucketId": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "File creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "File update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "File permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "items": { - "type": "string" - }, - "x-example": ["read(\"any\")"] - }, - "name": { - "type": "string", - "description": "File name.", - "x-example": "Pink.png" - }, - "signature": { - "type": "string", - "description": "File MD5 signature.", - "x-example": "5d529fd02b544198ae075bd57c1762bb" - }, - "mimeType": { - "type": "string", - "description": "File mime type.", - "x-example": "image/png" - }, - "sizeOriginal": { - "type": "integer", - "description": "File original size in bytes.", - "x-example": 17890, - "format": "int32" - }, - "chunksTotal": { - "type": "integer", - "description": "Total number of chunks available", - "x-example": 17890, - "format": "int32" - }, - "chunksUploaded": { - "type": "integer", - "description": "Total number of chunks uploaded", - "x-example": 17890, - "format": "int32" - } - }, - "required": [ - "$id", - "bucketId", - "$createdAt", - "$updatedAt", - "$permissions", - "name", - "signature", - "mimeType", - "sizeOriginal", - "chunksTotal", - "chunksUploaded" - ] - }, - "bucket": { - "description": "Bucket", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Bucket creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Bucket update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Bucket permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "items": { - "type": "string" - }, - "x-example": ["read(\"any\")"] - }, - "fileSecurity": { - "type": "boolean", - "description": "Whether file-level security is enabled. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "x-example": true - }, - "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"] - }, - "compression": { - "type": "string", - "description": "Compression algorithm choosen for compression. Will be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd).", - "x-example": "gzip" - }, - "encryption": { - "type": "boolean", - "description": "Bucket is encrypted.", - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Virus scanning is enabled.", - "x-example": false - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "fileSecurity", - "name", - "enabled", - "maximumFileSize", - "allowedFileExtensions", - "compression", - "encryption", - "antivirus" - ] - }, - "team": { - "description": "Team", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Team creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Team update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "total": { - "type": "integer", - "description": "Total number of team members.", - "x-example": 7, - "format": "int32" - }, - "prefs": { - "type": "object", - "description": "Team preferences as a key-value object", - "x-example": { - "theme": "pink", - "timezone": "UTC" - }, - "items": { - "$ref": "#/components/schemas/preferences" - } - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "total", - "prefs" - ] - }, - "membership": { - "description": "Membership", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Membership ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Membership creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Membership update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "userName": { - "type": "string", - "description": "User name. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "John Doe" - }, - "userEmail": { - "type": "string", - "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", - "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": "string", - "description": "Date, the user has been invited to join the team in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "joined": { - "type": "string", - "description": "Date, the user has accepted the invitation to join the team in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "confirm": { - "type": "boolean", - "description": "User confirmation status, true if the user has joined the team or false otherwise.", - "x-example": false - }, - "mfa": { - "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", - "x-example": false - }, - "roles": { - "type": "array", - "description": "User list of roles", - "items": { - "type": "string" - }, - "x-example": ["owner"] - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "userName", - "userEmail", - "teamId", - "teamName", - "invited", - "joined", - "confirm", - "mfa", - "roles" - ] - }, - "function": { - "description": "Function", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Function creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Function update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "execute": { - "type": "array", - "description": "Execution permissions.", - "items": { - "type": "string" - }, - "x-example": "users" - }, - "name": { - "type": "string", - "description": "Function name.", - "x-example": "My Function" - }, - "enabled": { - "type": "boolean", - "description": "Function enabled.", - "x-example": false - }, - "live": { - "type": "boolean", - "description": "Is the function deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the function to update it with the latest configuration.", - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project.", - "x-example": false - }, - "runtime": { - "type": "string", - "description": "Function execution runtime.", - "x-example": "python-3.8" - }, - "deployment": { - "type": "string", - "description": "Function's active deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "scopes": { - "type": "array", - "description": "Allowed permission scopes.", - "items": { - "type": "string" - }, - "x-example": "users.read" - }, - "vars": { - "type": "array", - "description": "Function variables.", - "items": { - "$ref": "#/components/schemas/variable" - }, - "x-example": [] - }, - "events": { - "type": "array", - "description": "Function trigger events.", - "items": { - "type": "string" - }, - "x-example": "account.create" - }, - "schedule": { - "type": "string", - "description": "Function execution schedule in CRON format.", - "x-example": "5 4 * * *" - }, - "timeout": { - "type": "integer", - "description": "Function execution timeout in seconds.", - "x-example": 300, - "format": "int32" - }, - "entrypoint": { - "type": "string", - "description": "The entrypoint file used to execute the deployment.", - "x-example": "index.js" - }, - "commands": { - "type": "string", - "description": "The build command used to build the deployment.", - "x-example": "npm install" - }, - "version": { - "type": "string", - "description": "Version of Open Runtimes used for the function.", - "x-example": "v2" - }, - "installationId": { - "type": "string", - "description": "Function VCS (Version Control System) installation id.", - "x-example": "6m40at4ejk5h2u9s1hboo" - }, - "providerRepositoryId": { - "type": "string", - "description": "VCS (Version Control System) Repository ID", - "x-example": "appwrite" - }, - "providerBranch": { - "type": "string", - "description": "VCS (Version Control System) branch name", - "x-example": "main" - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function in VCS (Version Control System) repository", - "x-example": "functions/helloWorld" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", - "x-example": false - }, - "specification": { - "type": "string", - "description": "Machine specification for builds and executions.", - "x-example": "s-1vcpu-512mb" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "execute", - "name", - "enabled", - "live", - "logging", - "runtime", - "deployment", - "scopes", - "vars", - "events", - "schedule", - "timeout", - "entrypoint", - "commands", - "version", - "installationId", - "providerRepositoryId", - "providerBranch", - "providerRootDirectory", - "providerSilentMode", - "specification" - ] - }, - "runtime": { - "description": "Runtime", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Runtime ID.", - "x-example": "python-3.8" - }, - "key": { - "type": "string", - "description": "Parent runtime key.", - "x-example": "python" - }, - "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", - "key", - "name", - "version", - "base", - "image", - "logo", - "supports" - ] - }, - "deployment": { - "description": "Deployment", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Deployment update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "type": { - "type": "string", - "description": "Type of deployment.", - "x-example": "vcs" - }, - "resourceId": { - "type": "string", - "description": "Resource ID.", - "x-example": "5e5ea6g16897e" - }, - "resourceType": { - "type": "string", - "description": "Resource type.", - "x-example": "functions" - }, - "entrypoint": { - "type": "string", - "description": "The entrypoint file to use to execute the deployment code.", - "x-example": "index.js" - }, - "size": { - "type": "integer", - "description": "The code size in bytes.", - "x-example": 128, - "format": "int32" - }, - "buildSize": { - "type": "integer", - "description": "The build output 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. Possible values are \"processing\", \"building\", \"waiting\", \"ready\", and \"failed\".", - "x-example": "ready" - }, - "buildLogs": { - "type": "string", - "description": "The build logs.", - "x-example": "Compiling source files..." - }, - "buildTime": { - "type": "integer", - "description": "The current build time in seconds.", - "x-example": 128, - "format": "int32" - }, - "providerRepositoryName": { - "type": "string", - "description": "The name of the vcs provider repository", - "x-example": "database" - }, - "providerRepositoryOwner": { - "type": "string", - "description": "The name of the vcs provider repository owner", - "x-example": "utopia" - }, - "providerRepositoryUrl": { - "type": "string", - "description": "The url of the vcs provider repository", - "x-example": "https://github.com/vermakhushboo/g4-node-function" - }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, - "providerCommitHash": { - "type": "string", - "description": "The commit hash of the vcs commit", - "x-example": "7c3f25d" - }, - "providerCommitAuthorUrl": { - "type": "string", - "description": "The url of vcs commit author", - "x-example": "https://github.com/vermakhushboo" - }, - "providerCommitAuthor": { - "type": "string", - "description": "The name of vcs commit author", - "x-example": "Khushboo Verma" - }, - "providerCommitMessage": { - "type": "string", - "description": "The commit message", - "x-example": "Update index.js" - }, - "providerCommitUrl": { - "type": "string", - "description": "The url of the vcs commit", - "x-example": "https://github.com/vermakhushboo/g4-node-function/commit/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" - }, - "providerBranchUrl": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "https://github.com/vermakhushboo/appwrite/tree/0.7.x" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "type", - "resourceId", - "resourceType", - "entrypoint", - "size", - "buildSize", - "buildId", - "activate", - "status", - "buildLogs", - "buildTime", - "providerRepositoryName", - "providerRepositoryOwner", - "providerRepositoryUrl", - "providerBranch", - "providerCommitHash", - "providerCommitAuthorUrl", - "providerCommitAuthor", - "providerCommitMessage", - "providerCommitUrl", - "providerBranchUrl" - ] - }, - "execution": { - "description": "Execution", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Execution ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Execution creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Execution upate date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Execution roles.", - "items": { - "type": "string" - }, - "x-example": ["any"] - }, - "functionId": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea6g16897e" - }, - "trigger": { - "type": "string", - "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" - }, - "status": { - "type": "string", - "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" - }, - "requestMethod": { - "type": "string", - "description": "HTTP request method type.", - "x-example": "GET" - }, - "requestPath": { - "type": "string", - "description": "HTTP request path and query.", - "x-example": "/articles?id=5" - }, - "requestHeaders": { - "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", - "items": { - "$ref": "#/components/schemas/headers" - }, - "x-example": [ - { - "Content-Type": "application/json" - } - ] - }, - "responseStatusCode": { - "type": "integer", - "description": "HTTP response status code.", - "x-example": 200, - "format": "int32" - }, - "responseBody": { - "type": "string", - "description": "HTTP response body. This will return empty unless execution is created as synchronous.", - "x-example": "" - }, - "responseHeaders": { - "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", - "items": { - "$ref": "#/components/schemas/headers" - }, - "x-example": [ - { - "Content-Type": "application/json" - } - ] - }, - "logs": { - "type": "string", - "description": "Function logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "errors": { - "type": "string", - "description": "Function errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "duration": { - "type": "number", - "description": "Function execution duration in seconds.", - "x-example": 0.4, - "format": "double" - }, - "scheduledAt": { - "type": "string", - "description": "The scheduled time for execution. If left empty, execution will be queued immediately.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "functionId", - "trigger", - "status", - "requestMethod", - "requestPath", - "requestHeaders", - "responseStatusCode", - "responseBody", - "responseHeaders", - "logs", - "errors", - "duration" - ] - }, - "build": { - "description": "Build", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Build ID.", - "x-example": "5e5ea5c16897e" - }, - "deploymentId": { - "type": "string", - "description": "The deployment that created this build.", - "x-example": "5e5ea5c16897e" - }, - "status": { - "type": "string", - "description": "The build status. There are a few different types and each one means something different. \\nFailed - The deployment build has failed. More details can usually be found in buildStderr\\nReady - The deployment build was successful and the deployment is ready to be deployed\\nProcessing - The deployment is currently waiting to have a build triggered\\nBuilding - The deployment is currently being built", - "x-example": "ready" - }, - "stdout": { - "type": "string", - "description": "The stdout of the build.", - "x-example": "" - }, - "stderr": { - "type": "string", - "description": "The stderr of the build.", - "x-example": "" - }, - "startTime": { - "type": "string", - "description": "The deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "endTime": { - "type": "string", - "description": "The time the build was finished in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "duration": { - "type": "integer", - "description": "The build duration in seconds.", - "x-example": 0, - "format": "int32" - }, - "size": { - "type": "integer", - "description": "The code size in bytes.", - "x-example": 128, - "format": "int32" - } - }, - "required": [ - "$id", - "deploymentId", - "status", - "stdout", - "stderr", - "startTime", - "endTime", - "duration", - "size" - ] - }, - "variable": { - "description": "Variable", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Variable ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Variable creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Variable creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "key": { - "type": "string", - "description": "Variable key.", - "x-example": "API_KEY" - }, - "value": { - "type": "string", - "description": "Variable value.", - "x-example": "myPa$$word1" - }, - "resourceType": { - "type": "string", - "description": "Service to which the variable belongs. Possible values are \"project\", \"function\"", - "x-example": "function" - }, - "resourceId": { - "type": "string", - "description": "ID of resource to which the variable belongs. If resourceType is \"project\", it is empty. If resourceType is \"function\", it is ID of the function.", - "x-example": "myAwesomeFunction" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "key", - "value", - "resourceType", - "resourceId" - ] - }, - "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": { - "name": { - "type": "string", - "description": "Name of the service.", - "x-example": "database" - }, - "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": ["name", "ping", "status"] - }, - "healthCertificate": { - "description": "Health Certificate", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Certificate name", - "x-example": "/CN=www.google.com" - }, - "subjectSN": { - "type": "string", - "description": "Subject SN", - "x-example": "" - }, - "issuerOrganisation": { - "type": "string", - "description": "Issuer organisation", - "x-example": "" - }, - "validFrom": { - "type": "string", - "description": "Valid from", - "x-example": "1704200998" - }, - "validTo": { - "type": "string", - "description": "Valid to", - "x-example": "1711458597" - }, - "signatureTypeSN": { - "type": "string", - "description": "Signature type SN", - "x-example": "RSA-SHA256" - } - }, - "required": [ - "name", - "subjectSN", - "issuerOrganisation", - "validFrom", - "validTo", - "signatureTypeSN" - ] - }, - "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"] - }, - "headers": { - "description": "Headers", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Header name.", - "x-example": "Content-Type" - }, - "value": { - "type": "string", - "description": "Header value.", - "x-example": "application/json" - } - }, - "required": ["name", "value"] - }, - "specification": { - "description": "Specification", - "type": "object", - "properties": { - "memory": { - "type": "integer", - "description": "Memory size in MB.", - "x-example": 512, - "format": "int32" - }, - "cpus": { - "type": "number", - "description": "Number of CPUs.", - "x-example": 1, - "format": "double" - }, - "enabled": { - "type": "boolean", - "description": "Is size enabled.", - "x-example": true - }, - "slug": { - "type": "string", - "description": "Size slug.", - "x-example": "s-1vcpu-512mb" - } - }, - "required": ["memory", "cpus", "enabled", "slug"] - }, - "mfaChallenge": { - "description": "MFA Challenge", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" - }, - "expire": { - "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": ["$id", "$createdAt", "userId", "expire"] - }, - "mfaRecoveryCodes": { - "description": "MFA Recovery Codes", - "type": "object", - "properties": { - "recoveryCodes": { - "type": "array", - "description": "Recovery codes.", - "items": { - "type": "string" - }, - "x-example": ["a3kf0-s0cl2", "s0co1-as98s"] - } - }, - "required": ["recoveryCodes"] - }, - "mfaType": { - "description": "MFAType", - "type": "object", - "properties": { - "secret": { - "type": "string", - "description": "Secret token used for TOTP factor.", - "x-example": true - }, - "uri": { - "type": "string", - "description": "URI for authenticator apps.", - "x-example": true - } - }, - "required": ["secret", "uri"] - }, - "mfaFactors": { - "description": "MFAFactors", - "type": "object", - "properties": { - "totp": { - "type": "boolean", - "description": "Can TOTP be used for MFA challenge for this account.", - "x-example": true - }, - "phone": { - "type": "boolean", - "description": "Can phone (SMS) be used for MFA challenge for this account.", - "x-example": true - }, - "email": { - "type": "boolean", - "description": "Can email be used for MFA challenge for this account.", - "x-example": true - }, - "recoveryCode": { - "type": "boolean", - "description": "Can recovery code be used for MFA challenge for this account.", - "x-example": true - } - }, - "required": ["totp", "phone", "email", "recoveryCode"] - }, - "provider": { - "description": "Provider", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Provider ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Provider creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Provider update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "The name for the provider instance.", - "x-example": "Mailgun" - }, - "provider": { - "type": "string", - "description": "The name of the provider service.", - "x-example": "mailgun" - }, - "enabled": { - "type": "boolean", - "description": "Is provider enabled?", - "x-example": true - }, - "type": { - "type": "string", - "description": "Type of provider.", - "x-example": "sms" - }, - "credentials": { - "type": "object", - "description": "Provider credentials.", - "x-example": { - "key": "123456789" - } - }, - "options": { - "type": "object", - "description": "Provider options.", - "x-example": { - "from": "sender-email@mydomain" - }, - "nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "provider", - "enabled", - "type", - "credentials" - ] - }, - "message": { - "description": "Message", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Message ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Message creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Message update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerType": { - "type": "string", - "description": "Message provider type.", - "x-example": "email" - }, - "topics": { - "type": "array", - "description": "Topic IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": ["5e5ea5c16897e"] - }, - "users": { - "type": "array", - "description": "User IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": ["5e5ea5c16897e"] - }, - "targets": { - "type": "array", - "description": "Target IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": ["5e5ea5c16897e"] - }, - "scheduledAt": { - "type": "string", - "description": "The scheduled time for message.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true - }, - "deliveredAt": { - "type": "string", - "description": "The time when the message was delivered.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true - }, - "deliveryErrors": { - "type": "array", - "description": "Delivery errors if any.", - "items": { - "type": "string" - }, - "x-example": [ - "Failed to send message to target 5e5ea5c16897e: Credentials not valid." - ], - "nullable": true - }, - "deliveredTotal": { - "type": "integer", - "description": "Number of recipients the message was delivered to.", - "x-example": 1, - "format": "int32" - }, - "data": { - "type": "object", - "description": "Data of the message.", - "x-example": { - "subject": "Welcome to Appwrite", - "content": "Hi there, welcome to Appwrite family." - } - }, - "status": { - "type": "string", - "description": "Status of delivery.", - "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "providerType", - "topics", - "users", - "targets", - "deliveredTotal", - "data", - "status" - ] - }, - "topic": { - "description": "Topic", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Topic ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Topic creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Topic update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "The name of the topic.", - "x-example": "events" - }, - "emailTotal": { - "type": "integer", - "description": "Total count of email subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" - }, - "smsTotal": { - "type": "integer", - "description": "Total count of SMS subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" - }, - "pushTotal": { - "type": "integer", - "description": "Total count of push subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" - }, - "subscribe": { - "type": "array", - "description": "Subscribe permissions.", - "items": { - "type": "string" - }, - "x-example": "users" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "emailTotal", - "smsTotal", - "pushTotal", - "subscribe" - ] - }, - "subscriber": { - "description": "Subscriber", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Subscriber ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Subscriber creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Subscriber update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "targetId": { - "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" - }, - "target": { - "type": "object", - "description": "Target.", - "x-example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "providerId": "259125845563242502", - "name": "ageon-app-email", - "identifier": "random-mail@email.org", - "userId": "5e5ea5c16897e" - }, - "items": { - "$ref": "#/components/schemas/target" - } - }, - "userId": { - "type": "string", - "description": "Topic ID.", - "x-example": "5e5ea5c16897e" - }, - "userName": { - "type": "string", - "description": "User Name.", - "x-example": "Aegon Targaryen" - }, - "topicId": { - "type": "string", - "description": "Topic ID.", - "x-example": "259125845563242502" - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "targetId", - "target", - "userId", - "userName", - "topicId", - "providerType" - ] - }, - "target": { - "description": "Target", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Target creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Target update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Target Name.", - "x-example": "Apple iPhone 12" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "259125845563242502" - }, - "providerId": { - "type": "string", - "description": "Provider ID.", - "x-example": "259125845563242502", - "nullable": true - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" - }, - "identifier": { - "type": "string", - "description": "The target identifier.", - "x-example": "token" - }, - "expired": { - "type": "boolean", - "description": "Is the target expired.", - "x-example": false - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "userId", - "providerType", - "identifier", - "expired" - ] - } - }, - "securitySchemes": { - "Project": { - "type": "apiKey", - "name": "X-Appwrite-Project", - "description": "Your project ID", - "in": "header", - "x-appwrite": { - "demo": "<YOUR_PROJECT_ID>" - } - }, - "Key": { - "type": "apiKey", - "name": "X-Appwrite-Key", - "description": "Your secret API key", - "in": "header", - "x-appwrite": { - "demo": "<YOUR_API_KEY>" - } - }, - "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" - } - }, - "Session": { - "type": "apiKey", - "name": "X-Appwrite-Session", - "description": "The user session to authenticate with", - "in": "header" - }, - "ForwardedUserAgent": { - "type": "apiKey", - "name": "X-Forwarded-User-Agent", - "description": "The user agent string of the client that made the request", - "in": "header" - } - } - }, - "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-1.6.x-client.json b/app/config/specs/swagger2-1.6.x-client.json index 77025ec042..c0980c44ce 100644 --- a/app/config/specs/swagger2-1.6.x-client.json +++ b/app/config/specs/swagger2-1.6.x-client.json @@ -102,9 +102,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -155,9 +152,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -248,9 +242,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -330,9 +321,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/identities", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -394,9 +382,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -459,9 +444,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -512,9 +494,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -581,9 +560,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -656,9 +632,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -724,9 +697,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -805,9 +775,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -875,9 +842,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -922,14 +886,19 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "account" ], "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } } }, "x-appwrite": { @@ -949,9 +918,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1031,9 +997,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1086,9 +1049,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1139,9 +1099,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1192,9 +1149,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1247,9 +1201,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1322,9 +1273,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1403,9 +1351,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1485,9 +1430,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1538,9 +1480,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1616,9 +1555,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1696,9 +1632,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1785,9 +1718,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1833,9 +1763,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1888,9 +1815,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1941,9 +1865,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2021,9 +1942,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2098,9 +2016,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2236,9 +2151,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2316,9 +2228,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2396,9 +2305,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "{sessionId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2459,9 +2365,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2517,9 +2420,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2582,9 +2482,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2611,7 +2508,7 @@ "tags": [ "account" ], - "description": "", + "description": "Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.", "responses": { "201": { "description": "Target", @@ -2627,7 +2524,7 @@ "type": "", "deprecated": false, "demo": "account\/create-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -2636,9 +2533,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2697,7 +2591,7 @@ "tags": [ "account" ], - "description": "", + "description": "Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.", "responses": { "200": { "description": "Target", @@ -2713,7 +2607,7 @@ "type": "", "deprecated": false, "demo": "account\/update-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -2722,9 +2616,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2770,13 +2661,11 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "account" ], - "description": "", + "description": "Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.", "responses": { "204": { "description": "No content" @@ -2789,7 +2678,7 @@ "type": "", "deprecated": false, "demo": "account\/delete-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -2798,9 +2687,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2862,9 +2748,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2951,9 +2834,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3040,9 +2920,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3181,9 +3058,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3261,9 +3135,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3334,9 +3205,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3419,9 +3287,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3472,9 +3337,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3555,9 +3417,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3684,9 +3543,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3817,9 +3673,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3884,9 +3737,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4375,9 +4225,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4462,9 +4309,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4557,9 +4401,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4652,9 +4493,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4736,9 +4574,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4844,9 +4679,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4936,9 +4768,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5035,9 +4864,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5117,9 +4943,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5202,9 +5025,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5323,9 +5143,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5397,9 +5214,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5473,9 +5287,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5549,9 +5360,6 @@ "server" ], "packaging": false, - "offline-model": "\/localed", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5605,9 +5413,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/localeCode", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5661,9 +5466,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/continents", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -5717,9 +5519,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -5773,9 +5572,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/eu", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -5829,9 +5625,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/phones", - "offline-key": "", - "offline-response-key": "countryCode", "auth": { "Project": [] } @@ -5885,9 +5678,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/currencies", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -5941,9 +5731,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/languages", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -5998,9 +5785,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6056,9 +5840,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "messaging" ], @@ -6087,9 +5869,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6161,9 +5940,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6246,9 +6022,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6340,9 +6113,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6412,9 +6182,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6503,9 +6270,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6577,9 +6341,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6651,9 +6412,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6802,6 +6560,7 @@ "gif", "png", "webp", + "heic", "avif" ], "x-enum-name": "ImageFormat", @@ -6852,9 +6611,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6926,9 +6682,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7003,9 +6756,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7097,9 +6847,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7161,9 +6908,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7238,9 +6982,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7304,9 +7045,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7389,9 +7127,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7506,9 +7241,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "{membershipId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7578,9 +7310,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7666,9 +7395,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7739,9 +7465,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7837,9 +7560,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7900,9 +7620,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } diff --git a/app/config/specs/swagger2-1.6.x-console.json b/app/config/specs/swagger2-1.6.x-console.json index aa3b69eb4f..94b0d55199 100644 --- a/app/config/specs/swagger2-1.6.x-console.json +++ b/app/config/specs/swagger2-1.6.x-console.json @@ -114,9 +114,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -166,9 +163,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -251,9 +245,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -304,9 +295,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -385,9 +373,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/identities", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -448,9 +433,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -512,9 +494,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -565,9 +544,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -633,9 +609,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -707,9 +680,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -774,9 +744,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -854,9 +821,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -923,9 +887,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -970,14 +931,19 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "account" ], "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } } }, "x-appwrite": { @@ -997,9 +963,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1078,9 +1041,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1132,9 +1092,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1184,9 +1141,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1236,9 +1190,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1290,9 +1241,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1364,9 +1312,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1444,9 +1389,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1525,9 +1467,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1577,9 +1516,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1654,9 +1590,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1733,9 +1666,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1821,9 +1751,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1868,9 +1795,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1922,9 +1846,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1975,9 +1896,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2055,9 +1973,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2132,9 +2047,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2270,9 +2182,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2350,9 +2259,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2430,9 +2336,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "{sessionId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2492,9 +2395,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2549,9 +2449,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2613,9 +2510,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2641,7 +2535,7 @@ "tags": [ "account" ], - "description": "", + "description": "Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.", "responses": { "201": { "description": "Target", @@ -2657,7 +2551,7 @@ "type": "", "deprecated": false, "demo": "account\/create-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -2666,9 +2560,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2726,7 +2617,7 @@ "tags": [ "account" ], - "description": "", + "description": "Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.", "responses": { "200": { "description": "Target", @@ -2742,7 +2633,7 @@ "type": "", "deprecated": false, "demo": "account\/update-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -2751,9 +2642,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2798,13 +2686,11 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "account" ], - "description": "", + "description": "Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.", "responses": { "204": { "description": "No content" @@ -2817,7 +2703,7 @@ "type": "", "deprecated": false, "demo": "account\/delete-push-target.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -2826,9 +2712,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2889,9 +2772,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2978,9 +2858,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3067,9 +2944,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3208,9 +3082,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3288,9 +3159,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3360,9 +3228,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3444,9 +3309,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3496,9 +3358,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3578,9 +3437,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3707,9 +3563,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3840,9 +3693,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -3907,9 +3757,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4398,9 +4245,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4485,9 +4329,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4580,9 +4421,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4648,7 +4486,7 @@ "tags": [ "assistant" ], - "description": "", + "description": "Send a prompt to the AI assistant and receive a response. This endpoint allows you to interact with Appwrite's AI assistant by sending questions or prompts and receiving helpful responses in real-time through a server-sent events stream. ", "responses": { "200": { "description": "File", @@ -4673,9 +4511,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4745,9 +4580,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4797,9 +4629,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4871,9 +4700,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -4932,7 +4758,7 @@ "tags": [ "databases" ], - "description": "", + "description": "Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { "200": { "description": "UsageDatabases", @@ -4948,7 +4774,7 @@ "type": "", "deprecated": false, "demo": "databases\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -4957,9 +4783,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5031,9 +4854,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5092,9 +4912,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5172,9 +4989,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5235,9 +5049,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5317,9 +5128,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5426,9 +5234,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5495,9 +5300,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5598,9 +5400,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5669,9 +5468,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5752,9 +5548,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5829,7 +5622,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -5858,9 +5653,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -5968,9 +5760,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6045,7 +5834,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -6074,9 +5865,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6184,9 +5972,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6261,7 +6046,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -6290,9 +6077,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6400,9 +6184,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6487,7 +6268,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -6516,9 +6299,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6636,9 +6416,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6725,7 +6502,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -6754,9 +6533,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6878,9 +6654,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -6967,7 +6740,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -6996,9 +6771,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7120,9 +6892,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7197,7 +6966,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -7226,9 +6997,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7336,9 +7104,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7471,9 +7236,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7561,7 +7323,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -7590,9 +7354,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7706,9 +7467,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7783,7 +7541,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -7812,9 +7572,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -7953,9 +7710,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8024,9 +7778,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8071,7 +7822,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -8100,9 +7853,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8208,9 +7958,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8292,9 +8039,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8400,9 +8144,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8492,9 +8233,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8591,9 +8329,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8671,9 +8406,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8761,9 +8493,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8842,9 +8571,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -8964,9 +8690,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9035,9 +8758,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9113,9 +8833,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9170,7 +8887,7 @@ "tags": [ "databases" ], - "description": "", + "description": "Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { "200": { "description": "UsageCollection", @@ -9186,7 +8903,7 @@ "type": "", "deprecated": false, "demo": "databases\/get-collection-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9195,9 +8912,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9285,9 +8999,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9334,7 +9045,7 @@ "tags": [ "databases" ], - "description": "", + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { "200": { "description": "UsageDatabase", @@ -9350,7 +9061,7 @@ "type": "", "deprecated": false, "demo": "databases\/get-database-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9359,9 +9070,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9441,9 +9149,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9515,9 +9220,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9788,9 +9490,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9842,9 +9541,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9895,9 +9591,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -9993,9 +9686,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10030,7 +9720,7 @@ "tags": [ "functions" ], - "description": "", + "description": "Get usage metrics and statistics for a for all functions. View statistics including total functions, deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "responses": { "200": { "description": "UsageFunctions", @@ -10046,7 +9736,7 @@ "type": "", "deprecated": false, "demo": "functions\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-functions-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10055,9 +9745,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10129,9 +9816,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10190,9 +9874,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10433,9 +10114,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10496,9 +10174,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10578,9 +10253,6 @@ "server" ], "packaging": true, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10672,9 +10344,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10741,9 +10410,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10805,9 +10471,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10845,11 +10508,13 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "functions" ], - "description": "", + "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "responses": { "204": { "description": "No content" @@ -10862,7 +10527,7 @@ "type": "", "deprecated": false, "demo": "functions\/create-build.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-build.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10871,9 +10536,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -10930,7 +10592,7 @@ "tags": [ "functions" ], - "description": "", + "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "responses": { "200": { "description": "Build", @@ -10946,7 +10608,7 @@ "type": "", "deprecated": false, "demo": "functions\/update-deployment-build.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-deployment-build.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10955,9 +10617,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11027,9 +10686,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11101,9 +10757,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11186,9 +10839,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11307,9 +10957,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11372,9 +11019,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11418,7 +11062,7 @@ "tags": [ "functions" ], - "description": "", + "description": "Get usage metrics and statistics for a for a specific function. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "responses": { "200": { "description": "UsageFunction", @@ -11434,7 +11078,7 @@ "type": "", "deprecated": false, "demo": "functions\/get-function-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11443,9 +11087,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11525,9 +11166,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11586,9 +11224,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11674,9 +11309,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11743,9 +11375,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11831,9 +11460,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11904,9 +11530,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -11980,9 +11603,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12054,9 +11674,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12107,9 +11724,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12160,9 +11774,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12213,9 +11824,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12275,9 +11883,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12328,9 +11933,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12381,9 +11983,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12434,9 +12033,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12498,9 +12094,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12562,9 +12155,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12635,9 +12225,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12699,9 +12286,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12787,9 +12371,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12851,9 +12432,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12915,9 +12493,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -12979,9 +12554,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13043,9 +12615,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13107,9 +12676,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13171,9 +12737,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13235,9 +12798,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13299,9 +12859,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13352,9 +12909,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13405,9 +12959,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13460,9 +13011,6 @@ "server" ], "packaging": false, - "offline-model": "\/localed", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13516,9 +13064,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/localeCode", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13572,9 +13117,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/continents", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -13628,9 +13170,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -13684,9 +13223,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/eu", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -13740,9 +13276,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/phones", - "offline-key": "", - "offline-response-key": "countryCode", "auth": { "Project": [] } @@ -13796,9 +13329,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/currencies", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -13852,9 +13382,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/languages", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [] } @@ -13907,9 +13434,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -13984,9 +13508,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14144,9 +13665,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14301,9 +13819,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14498,9 +14013,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14694,9 +14206,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14788,7 +14297,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", @@ -14804,7 +14313,7 @@ "type": "", "deprecated": false, "demo": "messaging\/update-sms.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -14814,9 +14323,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14932,9 +14438,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -14962,9 +14465,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "messaging" ], @@ -14991,9 +14492,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15055,9 +14553,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15131,9 +14626,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15207,9 +14699,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15284,9 +14773,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15401,9 +14887,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15516,9 +14999,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15609,9 +15089,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15700,9 +15177,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15829,9 +15303,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -15956,9 +15427,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16061,9 +15529,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16164,9 +15629,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16281,9 +15743,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16396,9 +15855,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16557,9 +16013,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16715,9 +16168,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16820,9 +16270,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -16923,9 +16370,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17028,9 +16472,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17131,9 +16572,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17236,9 +16674,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17339,9 +16774,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17444,9 +16876,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17547,9 +16976,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17577,9 +17003,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "messaging" ], @@ -17606,9 +17030,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17670,9 +17091,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17746,9 +17164,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17822,9 +17237,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17897,9 +17309,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -17989,9 +17398,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18051,9 +17457,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18105,9 +17508,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "messaging" ], @@ -18134,9 +17535,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18198,9 +17596,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18274,9 +17669,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18359,9 +17751,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18449,9 +17838,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18487,9 +17873,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "messaging" ], @@ -18518,9 +17902,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18565,7 +17946,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.", "responses": { "200": { "description": "Migrations List", @@ -18590,9 +17971,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18640,7 +18018,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project. ", "responses": { "202": { "description": "Migration", @@ -18665,9 +18043,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18736,7 +18111,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", "responses": { "200": { "description": "Migration Report", @@ -18761,9 +18136,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18826,7 +18198,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project. ", "responses": { "202": { "description": "Migration", @@ -18851,9 +18223,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18908,7 +18277,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", "responses": { "200": { "description": "Migration Report", @@ -18933,9 +18302,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -18981,7 +18347,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project. ", "responses": { "202": { "description": "Migration", @@ -19006,9 +18372,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19104,7 +18467,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", "responses": { "200": { "description": "Migration Report", @@ -19129,9 +18492,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19226,7 +18586,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project. ", "responses": { "202": { "description": "Migration", @@ -19251,9 +18611,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19342,7 +18699,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", "responses": { "200": { "description": "Migration Report", @@ -19367,9 +18724,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19457,7 +18811,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process. ", "responses": { "200": { "description": "Migration", @@ -19482,9 +18836,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19517,7 +18868,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Retry a failed migration. This endpoint allows you to retry a migration that has previously failed.", "responses": { "202": { "description": "Migration", @@ -19542,9 +18893,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19575,7 +18923,7 @@ "tags": [ "migrations" ], - "description": "", + "description": "Delete a migration by its unique ID. This endpoint allows you to remove a migration from your project's migration history. ", "responses": { "204": { "description": "No content" @@ -19597,9 +18945,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19634,7 +18979,7 @@ "tags": [ "project" ], - "description": "", + "description": "Get comprehensive usage statistics for your project. View metrics including network requests, bandwidth, storage, function executions, database usage, and user activity. Specify a time range with startDate and endDate, and optionally set the data granularity with period (1h or 1d). The response includes both total counts and detailed breakdowns by resource, along with historical data over the specified period.", "responses": { "200": { "description": "UsageProject", @@ -19650,7 +18995,7 @@ "type": "", "deprecated": false, "demo": "project\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/get-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19659,9 +19004,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19745,9 +19087,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19795,9 +19134,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19874,9 +19210,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -19934,9 +19267,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20013,9 +19343,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20050,7 +19377,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a list of all projects. You can use the query params to filter your results. ", "responses": { "200": { "description": "Projects List", @@ -20066,7 +19393,7 @@ "type": "", "deprecated": false, "demo": "projects\/list.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20075,9 +19402,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20123,7 +19447,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Create a new project. You can create a maximum of 100 projects per account. ", "responses": { "201": { "description": "Project", @@ -20139,7 +19463,7 @@ "type": "", "deprecated": false, "demo": "projects\/create.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20148,9 +19472,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20275,7 +19596,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata. ", "responses": { "200": { "description": "Project", @@ -20291,7 +19612,7 @@ "type": "", "deprecated": false, "demo": "projects\/get.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20300,9 +19621,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20335,7 +19653,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a project by its unique ID.", "responses": { "200": { "description": "Project", @@ -20351,7 +19669,7 @@ "type": "", "deprecated": false, "demo": "projects\/update.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20360,9 +19678,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20465,7 +19780,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Delete a project by its unique ID.", "responses": { "204": { "description": "No content" @@ -20478,7 +19793,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20487,9 +19802,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20524,7 +19836,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.", "responses": { "200": { "description": "Project", @@ -20540,7 +19852,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-api-status.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-api-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20549,9 +19861,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20618,7 +19927,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.", "responses": { "200": { "description": "Project", @@ -20634,7 +19943,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-api-status-all.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-api-status-all.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20643,9 +19952,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20698,7 +20004,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update how long sessions created within a project should stay active for.", "responses": { "200": { "description": "Project", @@ -20714,7 +20020,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-duration.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-duration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20723,9 +20029,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20778,7 +20081,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the maximum number of users allowed in this project. Set to 0 for unlimited users. ", "responses": { "200": { "description": "Project", @@ -20794,7 +20097,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-limit.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-limit.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20803,9 +20106,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20858,7 +20158,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions.", "responses": { "200": { "description": "Project", @@ -20874,7 +20174,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-sessions-limit.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-sessions-limit.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20883,9 +20183,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -20938,7 +20235,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update project membership privacy settings. Use this endpoint to control what user information is visible to other team members, such as user name, email, and MFA status. ", "responses": { "200": { "description": "Project", @@ -20954,7 +20251,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-memberships-privacy.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-memberships-privacy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20963,9 +20260,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21032,7 +20326,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the list of mock phone numbers for testing. Use these numbers to bypass SMS verification in development. ", "responses": { "200": { "description": "Project", @@ -21048,7 +20342,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-mock-numbers.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-mock-numbers.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21057,9 +20351,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21115,7 +20406,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don't use common and insecure passwords. ", "responses": { "200": { "description": "Project", @@ -21131,7 +20422,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-password-dictionary.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-password-dictionary.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21140,9 +20431,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21195,7 +20483,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the authentication password history requirement. Use this endpoint to require new passwords to be different than the last X amount of previously used ones.", "responses": { "200": { "description": "Project", @@ -21211,7 +20499,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-password-history.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-password-history.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21220,9 +20508,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21275,7 +20560,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords. ", "responses": { "200": { "description": "Project", @@ -21291,7 +20576,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-personal-data-check.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-personal-data-check.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21300,9 +20585,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21355,7 +20637,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.", "responses": { "200": { "description": "Project", @@ -21371,7 +20653,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-session-alerts.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-session-alerts.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21380,9 +20662,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21435,7 +20714,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the status of a specific authentication method. Use this endpoint to enable or disable different authentication methods such as email, magic urls or sms in your project. ", "responses": { "200": { "description": "Project", @@ -21451,7 +20730,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-auth-status.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21460,9 +20739,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21534,7 +20810,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time. ", "responses": { "201": { "description": "JWT", @@ -21550,7 +20826,7 @@ "type": "", "deprecated": false, "demo": "projects\/create-j-w-t.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-jwt.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21559,9 +20835,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21623,7 +20896,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a list of all API keys from the current project. ", "responses": { "200": { "description": "API Keys List", @@ -21639,7 +20912,7 @@ "type": "", "deprecated": false, "demo": "projects\/list-keys.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-keys.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21648,9 +20921,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21683,7 +20953,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.", "responses": { "201": { "description": "Key", @@ -21699,7 +20969,7 @@ "type": "", "deprecated": false, "demo": "projects\/create-key.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21708,9 +20978,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21779,7 +21046,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it's scopes.", "responses": { "200": { "description": "Key", @@ -21795,7 +21062,7 @@ "type": "", "deprecated": false, "demo": "projects\/get-key.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21804,9 +21071,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21847,7 +21111,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key. ", "responses": { "200": { "description": "Key", @@ -21863,7 +21127,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-key.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21872,9 +21136,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -21947,7 +21208,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls. ", "responses": { "204": { "description": "No content" @@ -21960,7 +21221,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete-key.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21969,9 +21230,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22014,7 +21272,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable\/disable providers. ", "responses": { "200": { "description": "Project", @@ -22030,7 +21288,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-o-auth2.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-oauth2.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22039,9 +21297,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22155,7 +21410,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations. ", "responses": { "200": { "description": "Platforms List", @@ -22171,7 +21426,7 @@ "type": "", "deprecated": false, "demo": "projects\/list-platforms.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-platforms.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22180,9 +21435,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22215,7 +21467,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Create a new platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.", "responses": { "201": { "description": "Platform", @@ -22231,7 +21483,7 @@ "type": "", "deprecated": false, "demo": "projects\/create-platform.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22240,9 +21492,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22339,7 +21588,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations. ", "responses": { "200": { "description": "Platform", @@ -22355,7 +21604,7 @@ "type": "", "deprecated": false, "demo": "projects\/get-platform.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22364,9 +21613,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22407,7 +21653,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a platform by its unique ID. Use this endpoint to update the platform's name, key, platform store ID, or hostname. ", "responses": { "200": { "description": "Platform", @@ -22423,7 +21669,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-platform.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22432,9 +21678,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22509,7 +21752,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project. ", "responses": { "204": { "description": "No content" @@ -22522,7 +21765,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete-platform.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22531,9 +21774,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22576,7 +21816,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the status of a specific service. Use this endpoint to enable or disable a service in your project. ", "responses": { "200": { "description": "Project", @@ -22592,7 +21832,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-service-status.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-service-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22601,9 +21841,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22678,7 +21915,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the status of all services. Use this endpoint to enable or disable all optional services at once. ", "responses": { "200": { "description": "Project", @@ -22694,7 +21931,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-service-status-all.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-service-status-all.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22703,9 +21940,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22758,7 +21992,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails. ", "responses": { "200": { "description": "Project", @@ -22774,7 +22008,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-smtp.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-smtp.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22783,9 +22017,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -22886,11 +22117,13 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "projects" ], - "description": "", + "description": "Send a test email to verify SMTP configuration. ", "responses": { "204": { "description": "No content" @@ -22903,7 +22136,7 @@ "type": "", "deprecated": false, "demo": "projects\/create-smtp-test.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-smtp-test.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22912,9 +22145,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -23027,7 +22257,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the team ID of a project allowing for it to be transferred to another team.", "responses": { "200": { "description": "Project", @@ -23043,7 +22273,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-team.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-team.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23052,9 +22282,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -23107,7 +22334,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details. ", "responses": { "200": { "description": "EmailTemplate", @@ -23123,7 +22350,7 @@ "type": "", "deprecated": false, "demo": "projects\/get-email-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-email-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23132,9 +22359,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -23329,12 +22553,12 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.", "responses": { "200": { - "description": "Project", + "description": "EmailTemplate", "schema": { - "$ref": "#\/definitions\/project" + "$ref": "#\/definitions\/emailTemplate" } } }, @@ -23345,7 +22569,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-email-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-email-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23354,9 +22578,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -23594,7 +22815,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Reset a custom email template to its default value. This endpoint removes any custom content and restores the template to its original state. ", "responses": { "200": { "description": "EmailTemplate", @@ -23610,7 +22831,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete-email-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-email-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23619,9 +22840,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -23818,7 +23036,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a custom SMS template for the specified locale and type returning it's contents.", "responses": { "200": { "description": "SmsTemplate", @@ -23834,7 +23052,7 @@ "type": "", "deprecated": false, "demo": "projects\/get-sms-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-sms-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23843,9 +23061,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24037,7 +23252,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. ", "responses": { "200": { "description": "SmsTemplate", @@ -24053,7 +23268,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-sms-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-sms-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -24062,9 +23277,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24274,7 +23486,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. ", "responses": { "200": { "description": "SmsTemplate", @@ -24290,7 +23502,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete-sms-template.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-sms-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -24299,9 +23511,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24495,7 +23704,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a list of all webhooks belonging to the project. You can use the query params to filter your results. ", "responses": { "200": { "description": "Webhooks List", @@ -24511,7 +23720,7 @@ "type": "", "deprecated": false, "demo": "projects\/list-webhooks.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-webhooks.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -24520,9 +23729,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24555,7 +23761,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur. ", "responses": { "201": { "description": "Webhook", @@ -24571,7 +23777,7 @@ "type": "", "deprecated": false, "demo": "projects\/create-webhook.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-webhook.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -24580,9 +23786,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24677,7 +23880,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. ", "responses": { "200": { "description": "Webhook", @@ -24693,7 +23896,7 @@ "type": "", "deprecated": false, "demo": "projects\/get-webhook.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-webhook.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -24702,9 +23905,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24745,7 +23945,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook. ", "responses": { "200": { "description": "Webhook", @@ -24761,7 +23961,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-webhook.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-webhook.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -24770,9 +23970,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24871,7 +24068,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. ", "responses": { "204": { "description": "No content" @@ -24884,7 +24081,7 @@ "type": "", "deprecated": false, "demo": "projects\/delete-webhook.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-webhook.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -24893,9 +24090,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -24938,7 +24132,7 @@ "tags": [ "projects" ], - "description": "", + "description": "Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook. ", "responses": { "200": { "description": "Webhook", @@ -24954,7 +24148,7 @@ "type": "", "deprecated": false, "demo": "projects\/update-webhook-signature.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-webhook-signature.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -24963,9 +24157,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25033,9 +24224,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25106,9 +24294,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25197,9 +24382,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25252,9 +24434,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25289,7 +24468,7 @@ "tags": [ "proxy" ], - "description": "", + "description": "Retry getting verification process of a proxy rule. This endpoint triggers domain verification by checking DNS records (CNAME) against the configured target domain. If verification is successful, a TLS certificate will be automatically provisioned for the domain.", "responses": { "200": { "description": "Rule", @@ -25305,7 +24484,7 @@ "type": "", "deprecated": false, "demo": "proxy\/update-rule-verification.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/update-rule-verification.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -25314,9 +24493,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25376,9 +24552,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25450,9 +24623,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25591,9 +24761,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25652,9 +24819,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25787,9 +24951,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25852,9 +25013,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -25937,9 +25095,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26031,9 +25186,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26103,9 +25255,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26194,9 +25343,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26268,9 +25414,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26342,9 +25485,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26493,6 +25633,7 @@ "gif", "png", "webp", + "heic", "avif" ], "x-enum-name": "ImageFormat", @@ -26543,9 +25684,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26590,7 +25728,7 @@ "tags": [ "storage" ], - "description": "", + "description": "Get usage metrics and statistics for all buckets in the project. You can view the total number of buckets, files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.\n", "responses": { "200": { "description": "StorageUsage", @@ -26606,7 +25744,7 @@ "type": "", "deprecated": false, "demo": "storage\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -26615,9 +25753,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26664,7 +25799,7 @@ "tags": [ "storage" ], - "description": "", + "description": "Get usage metrics and statistics a specific bucket in the project. You can view the total number of files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.\n", "responses": { "200": { "description": "UsageBuckets", @@ -26680,7 +25815,7 @@ "type": "", "deprecated": false, "demo": "storage\/get-bucket-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -26689,9 +25824,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26773,9 +25905,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26850,9 +25979,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -26944,9 +26070,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27008,9 +26131,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27085,9 +26205,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27149,9 +26266,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27225,9 +26339,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27310,9 +26421,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27427,9 +26535,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "{membershipId}", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27499,9 +26604,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27587,9 +26689,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27660,9 +26759,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27757,9 +26853,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27819,9 +26912,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27900,9 +26990,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -27974,9 +27061,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28071,9 +27155,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28164,9 +27245,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28257,9 +27335,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28328,9 +27403,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28391,9 +27463,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28484,9 +27553,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28577,9 +27643,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28705,9 +27768,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28819,9 +27879,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -28908,7 +27965,7 @@ "tags": [ "users" ], - "description": "", + "description": "Get usage metrics and statistics for all users in the project. You can view the total number of users and sessions. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.\n", "responses": { "200": { "description": "UsageUsers", @@ -28924,7 +27981,7 @@ "type": "", "deprecated": false, "demo": "users\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -28933,9 +27990,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29007,9 +28061,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29063,9 +28114,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29126,9 +28174,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29207,9 +28252,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29291,9 +28333,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29375,9 +28414,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29450,9 +28486,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29513,9 +28546,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29563,19 +28593,14 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "users" ], "description": "Delete an authenticator app.", "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } + "204": { + "description": "No content" } }, "x-appwrite": { @@ -29594,9 +28619,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29670,9 +28692,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29733,9 +28752,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29794,9 +28810,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29855,9 +28868,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29918,9 +28928,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -29999,9 +29006,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30080,9 +29084,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30161,9 +29162,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30222,9 +29220,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30303,9 +29298,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30364,9 +29356,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30420,9 +29409,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30478,9 +29464,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30549,9 +29532,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30631,9 +29611,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30705,9 +29682,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30820,9 +29794,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30890,9 +29861,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -30955,9 +29923,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "users" ], @@ -30984,9 +29950,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31055,9 +30018,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31139,9 +30099,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31220,9 +30177,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31276,7 +30230,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Get a list of GitHub repositories available through your installation. This endpoint returns repositories with their basic information, detected runtime environments, and latest push dates. You can optionally filter repositories using a search term. Each repository's runtime is automatically detected based on its contents and language statistics. The GitHub installation must be properly configured for this endpoint to work.", "responses": { "200": { "description": "Provider Repositories List", @@ -31292,7 +30246,7 @@ "type": "", "deprecated": false, "demo": "vcs\/list-repositories.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repositories.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -31301,9 +30255,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31345,7 +30296,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Create a new GitHub repository through your installation. This endpoint allows you to create either a public or private repository by specifying a name and visibility setting. The repository will be created under your GitHub user account or organization, depending on your installation type. The GitHub installation must be properly configured and have the necessary permissions for repository creation.", "responses": { "200": { "description": "ProviderRepository", @@ -31361,7 +30312,7 @@ "type": "", "deprecated": false, "demo": "vcs\/create-repository.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -31370,9 +30321,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31432,7 +30380,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Get detailed information about a specific GitHub repository from your installation. This endpoint returns repository details including its ID, name, visibility status, organization, and latest push date. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.", "responses": { "200": { "description": "ProviderRepository", @@ -31448,7 +30396,7 @@ "type": "", "deprecated": false, "demo": "vcs\/get-repository.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -31457,9 +30405,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31502,7 +30447,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Get a list of all branches from a GitHub repository in your installation. This endpoint returns the names of all branches in the repository and their total count. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.\n", "responses": { "200": { "description": "Branches List", @@ -31518,7 +30463,7 @@ "type": "", "deprecated": false, "demo": "vcs\/list-repository-branches.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repository-branches.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -31527,9 +30472,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31572,7 +30514,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.\n", "responses": { "200": { "description": "VCS Content List", @@ -31588,7 +30530,7 @@ "type": "", "deprecated": false, "demo": "vcs\/get-repository-contents.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository-contents.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -31597,9 +30539,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31651,7 +30590,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Analyze a GitHub repository to automatically detect the programming language and runtime environment. This endpoint scans the repository's files and language statistics to determine the appropriate runtime settings for your function. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", "responses": { "200": { "description": "Detection", @@ -31667,7 +30606,7 @@ "type": "", "deprecated": false, "demo": "vcs\/create-repository-detection.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository-detection.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -31676,9 +30615,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31730,11 +30666,13 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "vcs" ], - "description": "", + "description": "Authorize and create deployments for a GitHub pull request in your project. This endpoint allows external contributions by creating deployments from pull requests, enabling preview environments for code review. The pull request must be open and not previously authorized. The GitHub installation must be properly configured and have access to both the repository and pull request for this endpoint to work.", "responses": { "204": { "description": "No content" @@ -31747,7 +30685,7 @@ "type": "", "deprecated": false, "demo": "vcs\/update-external-deployments.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/update-external-deployments.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -31756,9 +30694,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31819,7 +30754,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "List all VCS installations configured for the current project. This endpoint returns a list of installations including their provider, organization, and other configuration details.\n", "responses": { "200": { "description": "Installations List", @@ -31844,9 +30779,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31894,7 +30826,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Get a VCS installation by its unique ID. This endpoint returns the installation's details including its provider, organization, and configuration. ", "responses": { "200": { "description": "Installation", @@ -31919,9 +30851,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -31952,7 +30881,7 @@ "tags": [ "vcs" ], - "description": "", + "description": "Delete a VCS installation by its unique ID. This endpoint removes the installation and all its associated repositories from the project.", "responses": { "204": { "description": "No content" @@ -31974,9 +30903,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -37318,6 +36244,18 @@ "x-example": 0, "format": "int32" }, + "databasesReadsTotal": { + "type": "integer", + "description": "Total number of databases reads.", + "x-example": 0, + "format": "int32" + }, + "databasesWritesTotal": { + "type": "integer", + "description": "Total number of databases writes.", + "x-example": 0, + "format": "int32" + }, "databases": { "type": "array", "description": "Aggregated number of databases per period.", @@ -37353,6 +36291,24 @@ "$ref": "#\/definitions\/metric" }, "x-example": [] + }, + "databasesReads": { + "type": "array", + "description": "An array of aggregated number of database reads.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "databasesWrites": { + "type": "array", + "description": "An array of aggregated number of database writes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] } }, "required": [ @@ -37361,10 +36317,14 @@ "collectionsTotal", "documentsTotal", "storageTotal", + "databasesReadsTotal", + "databasesWritesTotal", "databases", "collections", "documents", - "storage" + "storage", + "databasesReads", + "databasesWrites" ] }, "usageDatabase": { @@ -37394,6 +36354,18 @@ "x-example": 0, "format": "int32" }, + "databaseReadsTotal": { + "type": "integer", + "description": "Total number of databases reads.", + "x-example": 0, + "format": "int32" + }, + "databaseWritesTotal": { + "type": "integer", + "description": "Total number of databases writes.", + "x-example": 0, + "format": "int32" + }, "collections": { "type": "array", "description": "Aggregated number of collections per period.", @@ -37420,6 +36392,24 @@ "$ref": "#\/definitions\/metric" }, "x-example": [] + }, + "databaseReads": { + "type": "array", + "description": "An array of aggregated number of database reads.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "databaseWrites": { + "type": "array", + "description": "An array of aggregated number of database writes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] } }, "required": [ @@ -37427,9 +36417,13 @@ "collectionsTotal", "documentsTotal", "storageTotal", + "databaseReadsTotal", + "databaseWritesTotal", "collections", "documents", - "storage" + "storage", + "databaseReads", + "databaseWrites" ] }, "usageCollection": { @@ -38051,6 +37045,18 @@ "x-example": 0, "format": "int32" }, + "databasesReadsTotal": { + "type": "integer", + "description": "Total number of databases reads.", + "x-example": 0, + "format": "int32" + }, + "databasesWritesTotal": { + "type": "integer", + "description": "Total number of databases writes.", + "x-example": 0, + "format": "int32" + }, "requests": { "type": "array", "description": "Aggregated number of requests per period.", @@ -38161,6 +37167,24 @@ "$ref": "#\/definitions\/metricBreakdown" }, "x-example": [] + }, + "databasesReads": { + "type": "array", + "description": "An array of aggregated number of database reads.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "databasesWrites": { + "type": "array", + "description": "An array of aggregated number of database writes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] } }, "required": [ @@ -38176,6 +37200,8 @@ "bucketsTotal", "executionsMbSecondsTotal", "buildsMbSecondsTotal", + "databasesReadsTotal", + "databasesWritesTotal", "requests", "network", "users", @@ -38188,7 +37214,9 @@ "functionsStorageBreakdown", "authPhoneTotal", "authPhoneEstimate", - "authPhoneCountryBreakdown" + "authPhoneCountryBreakdown", + "databasesReads", + "databasesWrites" ] }, "headers": { diff --git a/app/config/specs/swagger2-1.6.x-server.json b/app/config/specs/swagger2-1.6.x-server.json index 9794373e33..e38495629c 100644 --- a/app/config/specs/swagger2-1.6.x-server.json +++ b/app/config/specs/swagger2-1.6.x-server.json @@ -117,9 +117,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -171,9 +168,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -264,9 +258,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -347,9 +338,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/identities", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -412,9 +400,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -478,9 +463,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -531,9 +513,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -601,9 +580,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -677,9 +653,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -746,9 +719,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -828,9 +798,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -899,9 +866,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -946,14 +910,19 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "account" ], "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } } }, "x-appwrite": { @@ -973,9 +942,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1056,9 +1022,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1112,9 +1075,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1166,9 +1126,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1220,9 +1177,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1276,9 +1230,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1352,9 +1303,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1434,9 +1382,6 @@ "server" ], "packaging": false, - "offline-model": "\/account", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1517,9 +1462,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1571,9 +1513,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/prefs", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1650,9 +1589,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1731,9 +1667,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1821,9 +1754,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1870,9 +1800,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -1926,9 +1853,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -1979,9 +1903,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2059,9 +1980,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2139,9 +2057,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2219,9 +2134,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2299,9 +2211,6 @@ "server" ], "packaging": false, - "offline-model": "\/account\/sessions", - "offline-key": "{sessionId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -2363,9 +2272,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -2422,9 +2328,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -2488,9 +2391,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -2544,9 +2444,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2633,9 +2530,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2722,9 +2616,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2863,9 +2754,6 @@ "client" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [] } @@ -2943,9 +2831,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3017,9 +2902,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3103,9 +2985,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3157,9 +3036,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3241,9 +3117,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3372,9 +3245,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3507,9 +3377,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -3576,9 +3443,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -4069,9 +3933,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -4158,9 +4019,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -4255,9 +4113,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -4350,9 +4205,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4425,9 +4277,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4512,9 +4361,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4574,9 +4420,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4655,9 +4498,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4719,9 +4559,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4802,9 +4639,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4912,9 +4746,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -4982,9 +4813,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5086,9 +4914,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5158,9 +4983,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5242,9 +5064,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5320,7 +5139,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -5349,9 +5170,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5460,9 +5278,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5538,7 +5353,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -5567,9 +5384,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5678,9 +5492,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5756,7 +5567,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -5785,9 +5598,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5896,9 +5706,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -5984,7 +5791,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -6013,9 +5822,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6134,9 +5940,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6224,7 +6027,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -6253,9 +6058,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6378,9 +6180,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6468,7 +6267,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -6497,9 +6298,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6622,9 +6420,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6700,7 +6495,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -6729,9 +6526,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6840,9 +6634,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -6976,9 +6767,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7067,7 +6855,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -7096,9 +6886,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7213,9 +7000,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7291,7 +7075,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -7320,9 +7106,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7462,9 +7245,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7534,9 +7314,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7582,7 +7359,9 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "databases" ], @@ -7611,9 +7390,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -7720,9 +7496,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -7806,9 +7579,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -7916,9 +7686,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -8010,9 +7777,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -8111,9 +7875,6 @@ "server" ], "packaging": false, - "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", - "offline-key": "{documentId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -8193,9 +7954,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8275,9 +8033,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8398,9 +8153,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8470,9 +8222,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8549,9 +8298,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8624,9 +8370,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8898,9 +8641,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -8953,9 +8693,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9007,9 +8744,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9069,9 +8803,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9313,9 +9044,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9377,9 +9105,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9460,9 +9185,6 @@ "server" ], "packaging": true, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9555,9 +9277,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9625,9 +9344,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9690,9 +9406,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9731,11 +9444,13 @@ "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "functions" ], - "description": "", + "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "responses": { "204": { "description": "No content" @@ -9748,7 +9463,7 @@ "type": "", "deprecated": false, "demo": "functions\/create-build.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-build.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9757,9 +9472,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9817,7 +9529,7 @@ "tags": [ "functions" ], - "description": "", + "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "responses": { "200": { "description": "Build", @@ -9833,7 +9545,7 @@ "type": "", "deprecated": false, "demo": "functions\/update-deployment-build.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-deployment-build.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9842,9 +9554,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9915,9 +9624,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -9990,9 +9696,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -10077,9 +9780,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -10200,9 +9900,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -10267,9 +9964,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10339,9 +10033,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10401,9 +10092,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10490,9 +10178,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10560,9 +10245,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10649,9 +10331,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10723,9 +10402,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10801,9 +10477,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10877,9 +10550,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10931,9 +10601,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -10985,9 +10652,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11039,9 +10703,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11102,9 +10763,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11156,9 +10814,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11210,9 +10865,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11264,9 +10916,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11329,9 +10978,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11394,9 +11040,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11468,9 +11111,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11533,9 +11173,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11622,9 +11259,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11687,9 +11321,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11752,9 +11383,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11817,9 +11445,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11882,9 +11507,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -11947,9 +11569,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12012,9 +11631,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12077,9 +11693,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12142,9 +11755,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12196,9 +11806,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12250,9 +11857,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12306,9 +11910,6 @@ "server" ], "packaging": false, - "offline-model": "\/localed", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -12364,9 +11965,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/localeCode", - "offline-key": "current", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -12422,9 +12020,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/continents", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [], "Session": [] @@ -12480,9 +12075,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [], "Session": [] @@ -12538,9 +12130,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/eu", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [], "Session": [] @@ -12596,9 +12185,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/countries\/phones", - "offline-key": "", - "offline-response-key": "countryCode", "auth": { "Project": [], "Session": [] @@ -12654,9 +12240,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/currencies", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [], "Session": [] @@ -12712,9 +12295,6 @@ "server" ], "packaging": false, - "offline-model": "\/locale\/languages", - "offline-key": "", - "offline-response-key": "code", "auth": { "Project": [], "Session": [] @@ -12769,9 +12349,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -12847,9 +12424,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13008,9 +12582,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13166,9 +12737,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13364,9 +12932,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13561,9 +13126,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13656,7 +13218,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { "description": "Message", @@ -13672,7 +13234,7 @@ "type": "", "deprecated": false, "demo": "messaging\/update-sms.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13682,9 +13244,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13801,9 +13360,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13832,9 +13388,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "messaging" ], @@ -13861,9 +13415,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -13926,9 +13477,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14003,9 +13551,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14080,9 +13625,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14158,9 +13700,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14276,9 +13815,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14392,9 +13928,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14486,9 +14019,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14578,9 +14108,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14708,9 +14235,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14836,9 +14360,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -14942,9 +14463,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15046,9 +14564,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15164,9 +14679,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15280,9 +14792,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15442,9 +14951,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15601,9 +15107,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15707,9 +15210,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15811,9 +15311,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -15917,9 +15414,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16021,9 +15515,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16127,9 +15618,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16231,9 +15719,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16337,9 +15822,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16441,9 +15923,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16472,9 +15951,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "messaging" ], @@ -16501,9 +15978,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16566,9 +16040,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16643,9 +16114,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16720,9 +16188,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16796,9 +16261,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16889,9 +16351,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -16952,9 +16411,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17007,9 +16463,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "messaging" ], @@ -17036,9 +16490,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17101,9 +16552,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17178,9 +16626,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17264,9 +16709,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "JWT": [] @@ -17356,9 +16798,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17395,9 +16834,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "messaging" ], @@ -17426,9 +16863,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "JWT": [] @@ -17500,9 +16934,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17575,9 +17006,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17717,9 +17145,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17779,9 +17204,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17915,9 +17337,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -17981,9 +17400,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18068,9 +17484,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18164,9 +17577,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18238,9 +17648,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18331,9 +17738,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18407,9 +17811,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18483,9 +17884,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18636,6 +18034,7 @@ "gif", "png", "webp", + "heic", "avif" ], "x-enum-name": "ImageFormat", @@ -18686,9 +18085,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18762,9 +18158,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18841,9 +18234,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -18937,9 +18327,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19003,9 +18390,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams", - "offline-key": "{teamId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19082,9 +18466,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19150,9 +18531,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19237,9 +18615,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19356,9 +18731,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/memberships", - "offline-key": "{membershipId}", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19430,9 +18802,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19520,9 +18889,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19595,9 +18961,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19694,9 +19057,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19758,9 +19118,6 @@ "server" ], "packaging": false, - "offline-model": "\/teams\/{teamId}\/prefs", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Session": [] @@ -19841,9 +19198,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -19916,9 +19270,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20014,9 +19365,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20108,9 +19456,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20202,9 +19547,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20274,9 +19616,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20338,9 +19677,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20432,9 +19768,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20526,9 +19859,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20655,9 +19985,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20770,9 +20097,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20885,9 +20209,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -20942,9 +20263,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21006,9 +20324,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21088,9 +20403,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21173,9 +20485,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21258,9 +20567,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21334,9 +20640,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21398,9 +20701,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21449,19 +20749,14 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "users" ], "description": "Delete an authenticator app.", "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } + "204": { + "description": "No content" } }, "x-appwrite": { @@ -21480,9 +20775,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21557,9 +20849,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21621,9 +20910,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21683,9 +20969,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21745,9 +21028,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21809,9 +21089,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21891,9 +21168,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -21973,9 +21247,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22055,9 +21326,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22117,9 +21385,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22199,9 +21464,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22261,9 +21523,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22318,9 +21577,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22377,9 +21633,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22449,9 +21702,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22532,9 +21782,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22607,9 +21854,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22723,9 +21967,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22794,9 +22035,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22860,9 +22098,7 @@ "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ "users" ], @@ -22889,9 +22125,6 @@ "console" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -22961,9 +22194,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -23046,9 +22276,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] @@ -23128,9 +22355,6 @@ "server" ], "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", "auth": { "Project": [], "Key": [] diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 2fb78d3271..94b0d55199 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -1,34220 +1,38106 @@ { - "swagger": "2.0", - "info": { - "version": "1.6.1", - "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" + "swagger": "2.0", + "info": { + "version": "1.6.1", + "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" + } }, - "license": { - "name": "BSD-3-Clause", - "url": "https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE" - } - }, - "host": "cloud.appwrite.io", - "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": "<YOUR_PROJECT_ID>" - } - }, - "Key": { - "type": "apiKey", - "name": "X-Appwrite-Key", - "description": "Your secret API key", - "in": "header", - "x-appwrite": { - "demo": "<YOUR_API_KEY>" - } - }, - "JWT": { - "type": "apiKey", - "name": "X-Appwrite-JWT", - "description": "Your secret JSON Web Token", - "in": "header", - "x-appwrite": { - "demo": "<YOUR_JWT>" - } - }, - "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 the currently logged in user.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" + "host": "cloud.appwrite.io", + "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": "<YOUR_PROJECT_ID>" } - } }, - "x-appwrite": { - "method": "get", - "weight": 9, - "cookies": false, - "type": "", - "deprecated": false, - "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](https://appwrite.io/docs/references/cloud/client-web/account#createVerification) 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](https://appwrite.io/docs/references/cloud/client-web/account#createEmailSession).", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" + "Key": { + "type": "apiKey", + "name": "X-Appwrite-Key", + "description": "Your secret API key", + "in": "header", + "x-appwrite": { + "demo": "<YOUR_API_KEY>" } - } }, - "x-appwrite": { - "method": "create", - "weight": 8, - "cookies": false, - "type": "", - "deprecated": false, - "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": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } + "JWT": { + "type": "apiKey", + "name": "X-Appwrite-JWT", + "description": "Your secret JSON Web Token", + "in": "header", + "x-appwrite": { + "demo": "<YOUR_JWT>" + } }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + "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 the currently logged in user.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com" + "x-appwrite": { + "method": "get", + "weight": 9, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } }, - "password": { - "type": "string", - "description": "New user password. Must be between 8 and 256 chars.", - "default": null, - "x-example": null - }, - "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 the currently logged in user.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "delete", - "weight": 10, - "cookies": false, - "type": "", - "deprecated": false, - "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": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ] - } - }, - "/account/email": { - "patch": { - "summary": "Update 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": 34, - "cookies": false, - "type": "", - "deprecated": false, - "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/identities": { - "get": { - "summary": "List identities", - "operationId": "accountListIdentities", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Get the list of identities for the currently logged in user.", - "responses": { - "200": { - "description": "Identities List", - "schema": { - "$ref": "#/definitions/identityList" - } - } - }, - "x-appwrite": { - "method": "listIdentities", - "weight": 57, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/list-identities.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/list-identities.md", - "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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "security": [ + { + "Project": [], + "JWT": [] + } + ] }, - "default": [], - "in": "query" - } - ] - } - }, - "/account/identities/{identityId}": { - "delete": { - "summary": "Delete identity", - "operationId": "accountDeleteIdentity", - "consumes": ["application/json"], - "produces": [], - "tags": ["account"], - "description": "Delete an identity by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteIdentity", - "weight": 58, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/delete-identity.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete-identity.md", - "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": "identityId", - "description": "Identity ID.", - "required": true, - "type": "string", - "x-example": "<IDENTITY_ID>", - "in": "path" - } - ] - } - }, - "/account/jwts": { - "post": { - "summary": "Create 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": 29, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-j-w-t.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-jwt.md", - "rate-limit": 100, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ] - } - }, - "/account/logs": { - "get": { - "summary": "List logs", - "operationId": "accountListLogs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Get the list of latest security activity logs for the currently logged in user. 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": "listLogs", - "weight": 31, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/list-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/list-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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "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](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createVerification) 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](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createEmailSession).", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "create", + "weight": 8, + "cookies": false, + "type": "", + "deprecated": false, + "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": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "New user password. Must be between 8 and 256 chars.", + "default": null, + "x-example": null + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] }, - "default": [], - "in": "query" - } - ] - } - }, - "/account/mfa": { - "patch": { - "summary": "Update MFA", - "operationId": "accountUpdateMFA", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Enable or disable MFA on an account.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "updateMFA", - "weight": 44, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-m-f-a.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-mfa.md", - "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": { - "mfa": { - "type": "boolean", - "description": "Enable or disable MFA.", - "default": null, - "x-example": false - } - }, - "required": ["mfa"] - } - } - ] - } - }, - "/account/mfa/authenticators/{type}": { - "post": { - "summary": "Create authenticator", - "operationId": "accountCreateMfaAuthenticator", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method.", - "responses": { - "200": { - "description": "MFAType", - "schema": { - "$ref": "#/definitions/mfaType" - } - } - }, - "x-appwrite": { - "method": "createMfaAuthenticator", - "weight": 46, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-mfa-authenticator.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-mfa-authenticator.md", - "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": "type", - "description": "Type of authenticator. Must be `totp`", - "required": true, - "type": "string", - "x-example": "totp", - "enum": ["totp"], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [], - "in": "path" - } - ] - }, - "put": { - "summary": "Verify authenticator", - "operationId": "accountUpdateMfaAuthenticator", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "updateMfaAuthenticator", - "weight": 47, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-mfa-authenticator.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-mfa-authenticator.md", - "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": "type", - "description": "Type of authenticator.", - "required": true, - "type": "string", - "x-example": "totp", - "enum": ["totp"], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [], - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "otp": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<OTP>" - } - }, - "required": ["otp"] - } - } - ] - }, - "delete": { - "summary": "Delete authenticator", - "operationId": "accountDeleteMfaAuthenticator", - "consumes": ["application/json"], - "produces": [], - "tags": ["account"], - "description": "Delete an authenticator for a user by ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteMfaAuthenticator", - "weight": 51, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/delete-mfa-authenticator.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete-mfa-authenticator.md", - "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": "type", - "description": "Type of authenticator.", - "required": true, - "type": "string", - "x-example": "totp", - "enum": ["totp"], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [], - "in": "path" - } - ] - } - }, - "/account/mfa/challenge": { - "post": { - "summary": "Create MFA challenge", - "operationId": "accountCreateMfaChallenge", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.", - "responses": { - "201": { - "description": "MFA Challenge", - "schema": { - "$ref": "#/definitions/mfaChallenge" - } - } - }, - "x-appwrite": { - "method": "createMfaChallenge", - "weight": 52, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-mfa-challenge.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-mfa-challenge.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "factor": { - "type": "string", - "description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.", - "default": null, - "x-example": "email", - "enum": ["email", "phone", "totp", "recoverycode"], - "x-enum-name": "AuthenticationFactor", - "x-enum-keys": [] - } - }, - "required": ["factor"] - } - } - ] - }, - "put": { - "summary": "Create MFA challenge (confirmation)", - "operationId": "accountUpdateMfaChallenge", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.", - "responses": { - "200": { - "description": "Session", - "schema": { - "$ref": "#/definitions/session" - } - } - }, - "x-appwrite": { - "method": "updateMfaChallenge", - "weight": 53, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-mfa-challenge.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-mfa-challenge.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},challengeId:{param-challengeId}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "challengeId": { - "type": "string", - "description": "ID of the challenge.", - "default": null, - "x-example": "<CHALLENGE_ID>" + "delete": { + "summary": "Delete account", + "operationId": "accountDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "account" + ], + "description": "Delete the currently logged in user.", + "responses": { + "204": { + "description": "No content" + } }, - "otp": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<OTP>" - } - }, - "required": ["challengeId", "otp"] - } - } - ] - } - }, - "/account/mfa/factors": { - "get": { - "summary": "List factors", - "operationId": "accountListMfaFactors", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "List the factors available on the account to be used as a MFA challange.", - "responses": { - "200": { - "description": "MFAFactors", - "schema": { - "$ref": "#/definitions/mfaFactors" - } - } - }, - "x-appwrite": { - "method": "listMfaFactors", - "weight": 45, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/list-mfa-factors.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/list-mfa-factors.md", - "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/mfa/recovery-codes": { - "get": { - "summary": "Get MFA recovery codes", - "operationId": "accountGetMfaRecoveryCodes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#/definitions/mfaRecoveryCodes" - } - } - }, - "x-appwrite": { - "method": "getMfaRecoveryCodes", - "weight": 50, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/get-mfa-recovery-codes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-mfa-recovery-codes.md", - "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 MFA recovery codes", - "operationId": "accountCreateMfaRecoveryCodes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.", - "responses": { - "201": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#/definitions/mfaRecoveryCodes" - } - } - }, - "x-appwrite": { - "method": "createMfaRecoveryCodes", - "weight": 48, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-mfa-recovery-codes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-mfa-recovery-codes.md", - "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": "Regenerate MFA recovery codes", - "operationId": "accountUpdateMfaRecoveryCodes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#/definitions/mfaRecoveryCodes" - } - } - }, - "x-appwrite": { - "method": "updateMfaRecoveryCodes", - "weight": 49, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-mfa-recovery-codes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-mfa-recovery-codes.md", - "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/name": { - "patch": { - "summary": "Update 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": 32, - "cookies": false, - "type": "", - "deprecated": false, - "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 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": 33, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-password.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-password.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": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "password": { - "type": "string", - "description": "New user password. Must be at least 8 chars.", - "default": null, - "x-example": null + "x-appwrite": { + "method": "delete", + "weight": 10, + "cookies": false, + "type": "", + "deprecated": false, + "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": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "oldPassword": { - "type": "string", - "description": "Current user password. Must be at least 8 chars.", - "default": "", - "x-example": "password" - } - }, - "required": ["password"] + "security": [ + { + "Project": [] + } + ] } - } - ] - } - }, - "/account/phone": { - "patch": { - "summary": "Update phone", - "operationId": "accountUpdatePhone", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } }, - "x-appwrite": { - "method": "updatePhone", - "weight": 35, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-phone.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": null, - "x-example": "+12065550100" + "\/account\/email": { + "patch": { + "summary": "Update 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" + } + } }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - } - }, - "required": ["phone", "password"] - } - } - ] - } - }, - "/account/prefs": { - "get": { - "summary": "Get account preferences", - "operationId": "accountGetPrefs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Get the preferences as a key-value object for the currently logged in user.", - "responses": { - "200": { - "description": "Preferences", - "schema": { - "$ref": "#/definitions/preferences" - } - } - }, - "x-appwrite": { - "method": "getPrefs", - "weight": 30, - "cookies": false, - "type": "", - "deprecated": false, - "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 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": 36, - "cookies": false, - "type": "", - "deprecated": false, - "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](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery) 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": 38, - "cookies": false, - "type": "", - "deprecated": false, - "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}", "url:{url},ip:{ip}"], - "scope": "sessions.write", - "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" + "x-appwrite": { + "method": "updateEmail", + "weight": 34, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } }, - "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"] + "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" + ] + } + } + ] } - } - ] - }, - "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](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) 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": 39, - "cookies": false, - "type": "", - "deprecated": false, - "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": "sessions.write", - "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>" + "\/account\/identities": { + "get": { + "summary": "List identities", + "operationId": "accountListIdentities", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the list of identities for the currently logged in user.", + "responses": { + "200": { + "description": "Identities List", + "schema": { + "$ref": "#\/definitions\/identityList" + } + } }, - "secret": { - "type": "string", - "description": "Valid reset token.", - "default": null, - "x-example": "<SECRET>" + "x-appwrite": { + "method": "listIdentities", + "weight": 57, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/list-identities.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "password": { - "type": "string", - "description": "New user password. Must be between 8 and 256 chars.", - "default": null, - "x-example": null - } - }, - "required": ["userId", "secret", "password"] + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] } - } - ] - } - }, - "/account/sessions": { - "get": { - "summary": "List sessions", - "operationId": "accountListSessions", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Get the list of active sessions across different devices for the currently logged in user.", - "responses": { - "200": { - "description": "Sessions List", - "schema": { - "$ref": "#/definitions/sessionList" - } - } }, - "x-appwrite": { - "method": "listSessions", - "weight": 11, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/list-sessions.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/list-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - }, - "delete": { - "summary": "Delete 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": 12, - "cookies": false, - "type": "", - "deprecated": false, - "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](https://appwrite.io/docs/references/cloud/client-web/account#updateEmail) or create an [OAuth2 session](https://appwrite.io/docs/references/cloud/client-web/account#CreateOAuth2Session).", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#/definitions/session" - } - } - }, - "x-appwrite": { - "method": "createAnonymousSession", - "weight": 17, - "cookies": false, - "type": "", - "deprecated": false, - "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": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ] - } - }, - "/account/sessions/email": { - "post": { - "summary": "Create email password session", - "operationId": "accountCreateEmailPasswordSession", - "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.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#/definitions/session" - } - } - }, - "x-appwrite": { - "method": "createEmailPasswordSession", - "weight": 16, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-email-password-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-session-email-password.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},email:{param-email}", - "scope": "sessions.write", - "platforms": ["server", "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" + "\/account\/identities\/{identityId}": { + "delete": { + "summary": "Delete identity", + "operationId": "accountDeleteIdentity", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "account" + ], + "description": "Delete an identity by its unique ID.", + "responses": { + "204": { + "description": "No content" + } }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - } - }, - "required": ["email", "password"] - } - } - ] - } - }, - "/account/sessions/magic-url": { - "put": { - "summary": "Update magic URL session", - "operationId": "accountUpdateMagicURLSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#/definitions/session" - } - } - }, - "x-appwrite": { - "method": "updateMagicURLSession", - "weight": 26, - "cookies": false, - "type": "", - "deprecated": true, - "demo": "account/update-magic-u-r-l-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + "x-appwrite": { + "method": "deleteIdentity", + "weight": 58, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/delete-identity.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": ["userId", "secret"] + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "identityId", + "description": "Identity ID.", + "required": true, + "type": "string", + "x-example": "<IDENTITY_ID>", + "in": "path" + } + ] } - } - ] - } - }, - "/account/sessions/oauth2/{provider}": { - "get": { - "summary": "Create OAuth2 session", - "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\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).\n", - "responses": { - "301": { - "description": "No content" - } }, - "x-appwrite": { - "method": "createOAuth2Session", - "weight": 19, - "cookies": false, - "type": "webAuth", - "deprecated": false, - "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": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } + "\/account\/jwts": { + "post": { + "summary": "Create 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": 29, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-j-w-t.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ] + } }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", - "required": true, - "type": "string", - "x-example": "amazon", - "enum": [ - "amazon", - "apple", - "auth0", - "authentik", - "autodesk", - "bitbucket", - "bitly", - "box", - "dailymotion", - "discord", - "disqus", - "dropbox", - "etsy", - "facebook", - "github", - "gitlab", - "google", - "linkedin", - "microsoft", - "notion", - "oidc", - "okta", - "paypal", - "paypalSandbox", - "podio", - "salesforce", - "slack", - "spotify", - "stripe", - "tradeshift", - "tradeshiftBox", - "twitch", - "wordpress", - "yahoo", - "yammer", - "yandex", - "zoho", - "zoom", - "mock" - ], - "x-enum-name": "OAuthProvider", - "x-enum-keys": [], - "in": "path" - }, - { - "name": "success", - "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's 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's 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 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "\/account\/logs": { + "get": { + "summary": "List logs", + "operationId": "accountListLogs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the list of latest security activity logs for the currently logged in user. 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": "listLogs", + "weight": 31, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/list-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/account\/mfa": { + "patch": { + "summary": "Update MFA", + "operationId": "accountUpdateMFA", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Enable or disable MFA on an account.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "updateMFA", + "weight": 44, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-m-f-a.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", + "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": { + "mfa": { + "type": "boolean", + "description": "Enable or disable MFA.", + "default": null, + "x-example": false + } + }, + "required": [ + "mfa" + ] + } + } + ] + } + }, + "\/account\/mfa\/authenticators\/{type}": { + "post": { + "summary": "Create authenticator", + "operationId": "accountCreateMfaAuthenticator", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "responses": { + "200": { + "description": "MFAType", + "schema": { + "$ref": "#\/definitions\/mfaType" + } + } + }, + "x-appwrite": { + "method": "createMfaAuthenticator", + "weight": 46, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-mfa-authenticator.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", + "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": "type", + "description": "Type of authenticator. Must be `totp`", + "required": true, + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [], + "in": "path" + } + ] }, - "default": [], - "in": "query" - } - ] - } - }, - "/account/sessions/phone": { - "put": { - "summary": "Update phone session", - "operationId": "accountUpdatePhoneSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#/definitions/session" - } - } - }, - "x-appwrite": { - "method": "updatePhoneSession", - "weight": 27, - "cookies": false, - "type": "", - "deprecated": true, - "demo": "account/update-phone-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + "put": { + "summary": "Verify authenticator", + "operationId": "accountUpdateMfaAuthenticator", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": ["userId", "secret"] - } - } - ] - } - }, - "/account/sessions/token": { - "post": { - "summary": "Create session", - "operationId": "accountCreateSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#/definitions/session" - } - } - }, - "x-appwrite": { - "method": "createSession", - "weight": 18, - "cookies": false, - "type": "", - "deprecated": false, - "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": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + "x-appwrite": { + "method": "updateMfaAuthenticator", + "weight": 47, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-mfa-authenticator.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "secret": { - "type": "string", - "description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": ["userId", "secret"] - } - } - ] - } - }, - "/account/sessions/{sessionId}": { - "get": { - "summary": "Get session", - "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": 13, - "cookies": false, - "type": "", - "deprecated": false, - "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", - "operationId": "accountUpdateSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.", - "responses": { - "200": { - "description": "Session", - "schema": { - "$ref": "#/definitions/session" - } - } - }, - "x-appwrite": { - "method": "updateSession", - "weight": 15, - "cookies": false, - "type": "", - "deprecated": false, - "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 session", - "operationId": "accountDeleteSession", - "consumes": ["application/json"], - "produces": [], - "tags": ["account"], - "description": "Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions) instead.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteSession", - "weight": 14, - "cookies": false, - "type": "", - "deprecated": false, - "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 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": 37, - "cookies": false, - "type": "", - "deprecated": false, - "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/targets/push": { - "post": { - "summary": "Create push target", - "operationId": "accountCreatePushTarget", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.", - "responses": { - "201": { - "description": "Target", - "schema": { - "$ref": "#/definitions/target" - } - } - }, - "x-appwrite": { - "method": "createPushTarget", - "weight": 54, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-push-target.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-push-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": ["client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "targetId": { - "type": "string", - "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<TARGET_ID>" - }, - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "default": null, - "x-example": "<IDENTIFIER>" - }, - "providerId": { - "type": "string", - "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", - "default": "", - "x-example": "<PROVIDER_ID>" - } - }, - "required": ["targetId", "identifier"] - } - } - ] - } - }, - "/account/targets/{targetId}/push": { - "put": { - "summary": "Update push target", - "operationId": "accountUpdatePushTarget", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.", - "responses": { - "200": { - "description": "Target", - "schema": { - "$ref": "#/definitions/target" - } - } - }, - "x-appwrite": { - "method": "updatePushTarget", - "weight": 55, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-push-target.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-push-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": ["client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "type": "string", - "x-example": "<TARGET_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "default": null, - "x-example": "<IDENTIFIER>" - } - }, - "required": ["identifier"] - } - } - ] - }, - "delete": { - "summary": "Delete push target", - "operationId": "accountDeletePushTarget", - "consumes": ["application/json"], - "produces": [], - "tags": ["account"], - "description": "Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deletePushTarget", - "weight": 56, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/delete-push-target.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete-push-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": ["client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "type": "string", - "x-example": "<TARGET_ID>", - "in": "path" - } - ] - } - }, - "/account/tokens/email": { - "post": { - "summary": "Create email token (OTP)", - "operationId": "accountCreateEmailToken", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#/definitions/token" - } - } - }, - "x-appwrite": { - "method": "createEmailToken", - "weight": 25, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-email-token.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-token-email.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},email:{param-email}", - "scope": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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" - }, - "phrase": { - "type": "boolean", - "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", - "default": false, - "x-example": false - } - }, - "required": ["userId", "email"] - } - } - ] - } - }, - "/account/tokens/magic-url": { - "post": { - "summary": "Create magic URL token", - "operationId": "accountCreateMagicURLToken", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. 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 [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).\n", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#/definitions/token" - } - } - }, - "x-appwrite": { - "method": "createMagicURLToken", - "weight": 24, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-magic-u-r-l-token.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-token-magic-url.md", - "rate-limit": 60, - "rate-time": 3600, - "rate-key": ["url:{url},email:{param-email}", "url:{url},ip:{ip}"], - "scope": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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" - }, - "phrase": { - "type": "boolean", - "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", - "default": false, - "x-example": false - } - }, - "required": ["userId", "email"] - } - } - ] - } - }, - "/account/tokens/oauth2/{provider}": { - "get": { - "summary": "Create OAuth2 token", - "operationId": "accountCreateOAuth2Token", - "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 authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).", - "responses": { - "301": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "createOAuth2Token", - "weight": 23, - "cookies": false, - "type": "webAuth", - "deprecated": false, - "demo": "account/create-o-auth2token.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-token-oauth2.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", - "required": true, - "type": "string", - "x-example": "amazon", - "enum": [ - "amazon", - "apple", - "auth0", - "authentik", - "autodesk", - "bitbucket", - "bitly", - "box", - "dailymotion", - "discord", - "disqus", - "dropbox", - "etsy", - "facebook", - "github", - "gitlab", - "google", - "linkedin", - "microsoft", - "notion", - "oidc", - "okta", - "paypal", - "paypalSandbox", - "podio", - "salesforce", - "slack", - "spotify", - "stripe", - "tradeshift", - "tradeshiftBox", - "twitch", - "wordpress", - "yahoo", - "yammer", - "yandex", - "zoho", - "zoom", - "mock" - ], - "x-enum-name": "OAuthProvider", - "x-enum-keys": [], - "in": "path" - }, - { - "name": "success", - "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's 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's 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 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [], + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "otp": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<OTP>" + } + }, + "required": [ + "otp" + ] + } + } + ] }, - "default": [], - "in": "query" - } - ] - } - }, - "/account/tokens/phone": { - "post": { - "summary": "Create phone token", - "operationId": "accountCreatePhoneToken", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#/definitions/token" - } - } - }, - "x-appwrite": { - "method": "createPhoneToken", - "weight": 28, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-phone-token.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-token-phone.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": ["url:{url},phone:{param-phone}", "url:{url},ip:{ip}"], - "scope": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + "delete": { + "summary": "Delete authenticator", + "operationId": "accountDeleteMfaAuthenticator", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "account" + ], + "description": "Delete an authenticator for a user by ID.", + "responses": { + "204": { + "description": "No content" + } }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": null, - "x-example": "+12065550100" - } - }, - "required": ["userId", "phone"] - } - } - ] - } - }, - "/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](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). 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": 40, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-email-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": null, - "x-example": "https://example.com" - } - }, - "required": ["url"] - } - } - ] - }, - "put": { - "summary": "Create email verification (confirmation)", - "operationId": "accountUpdateVerification", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", - "responses": { - "200": { - "description": "Token", - "schema": { - "$ref": "#/definitions/token" - } - } - }, - "x-appwrite": { - "method": "updateVerification", - "weight": 41, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-email-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "public", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "<USER_ID>" + "x-appwrite": { + "method": "deleteMfaAuthenticator", + "weight": 51, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/delete-mfa-authenticator.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": ["userId", "secret"] + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [], + "in": "path" + } + ] } - } - ] - } - }, - "/account/verification/phone": { - "post": { - "summary": "Create phone verification", - "operationId": "accountCreatePhoneVerification", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#/definitions/token" - } - } }, - "x-appwrite": { - "method": "createPhoneVerification", - "weight": 42, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-phone-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-phone-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": ["url:{url},userId:{userId}", "url:{url},ip:{ip}"], - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - }, - "put": { - "summary": "Update phone verification (confirmation)", - "operationId": "accountUpdatePhoneVerification", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.", - "responses": { - "200": { - "description": "Token", - "schema": { - "$ref": "#/definitions/token" - } - } - }, - "x-appwrite": { - "method": "updatePhoneVerification", - "weight": 43, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-phone-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-phone-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "userId:{param-userId}", - "scope": "public", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "<USER_ID>" + "\/account\/mfa\/challenge": { + "post": { + "summary": "Create MFA challenge", + "operationId": "accountCreateMfaChallenge", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "responses": { + "201": { + "description": "MFA Challenge", + "schema": { + "$ref": "#\/definitions\/mfaChallenge" + } + } }, - "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](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) 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": 60, - "cookies": false, - "type": "location", - "deprecated": false, - "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", - "enum": [ - "aa", - "an", - "ch", - "ci", - "cm", - "cr", - "ff", - "sf", - "mf", - "ps", - "oi", - "om", - "op", - "on" - ], - "x-enum-name": "Browser", - "x-enum-keys": [ - "Avant Browser", - "Android WebView Beta", - "Google Chrome", - "Google Chrome (iOS)", - "Google Chrome (Mobile)", - "Chromium", - "Mozilla Firefox", - "Safari", - "Mobile Safari", - "Microsoft Edge", - "Microsoft Edge (iOS)", - "Opera Mini", - "Opera", - "Opera (Next)" - ], - "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": 59, - "cookies": false, - "type": "location", - "deprecated": false, - "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, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.", - "required": true, - "type": "string", - "x-example": "amex", - "enum": [ - "amex", - "argencard", - "cabal", - "cencosud", - "diners", - "discover", - "elo", - "hipercard", - "jcb", - "mastercard", - "naranja", - "targeta-shopping", - "union-china-pay", - "visa", - "mir", - "maestro" - ], - "x-enum-name": "CreditCard", - "x-enum-keys": [ - "American Express", - "Argencard", - "Cabal", - "Cencosud", - "Diners Club", - "Discover", - "Elo", - "Hipercard", - "JCB", - "Mastercard", - "Naranja", - "Tarjeta Shopping", - "Union China Pay", - "Visa", - "MIR", - "Maestro" - ], - "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\nThis endpoint does not follow HTTP redirects.", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "x-appwrite": { - "method": "getFavicon", - "weight": 63, - "cookies": false, - "type": "location", - "deprecated": false, - "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. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.\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": 61, - "cookies": false, - "type": "location", - "deprecated": false, - "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", - "enum": [ - "af", - "ao", - "al", - "ad", - "ae", - "ar", - "am", - "ag", - "au", - "at", - "az", - "bi", - "be", - "bj", - "bf", - "bd", - "bg", - "bh", - "bs", - "ba", - "by", - "bz", - "bo", - "br", - "bb", - "bn", - "bt", - "bw", - "cf", - "ca", - "ch", - "cl", - "cn", - "ci", - "cm", - "cd", - "cg", - "co", - "km", - "cv", - "cr", - "cu", - "cy", - "cz", - "de", - "dj", - "dm", - "dk", - "do", - "dz", - "ec", - "eg", - "er", - "es", - "ee", - "et", - "fi", - "fj", - "fr", - "fm", - "ga", - "gb", - "ge", - "gh", - "gn", - "gm", - "gw", - "gq", - "gr", - "gd", - "gt", - "gy", - "hn", - "hr", - "ht", - "hu", - "id", - "in", - "ie", - "ir", - "iq", - "is", - "il", - "it", - "jm", - "jo", - "jp", - "kz", - "ke", - "kg", - "kh", - "ki", - "kn", - "kr", - "kw", - "la", - "lb", - "lr", - "ly", - "lc", - "li", - "lk", - "ls", - "lt", - "lu", - "lv", - "ma", - "mc", - "md", - "mg", - "mv", - "mx", - "mh", - "mk", - "ml", - "mt", - "mm", - "me", - "mn", - "mz", - "mr", - "mu", - "mw", - "my", - "na", - "ne", - "ng", - "ni", - "nl", - "no", - "np", - "nr", - "nz", - "om", - "pk", - "pa", - "pe", - "ph", - "pw", - "pg", - "pl", - "pf", - "kp", - "pt", - "py", - "qa", - "ro", - "ru", - "rw", - "sa", - "sd", - "sn", - "sg", - "sb", - "sl", - "sv", - "sm", - "so", - "rs", - "ss", - "st", - "sr", - "sk", - "si", - "se", - "sz", - "sc", - "sy", - "td", - "tg", - "th", - "tj", - "tm", - "tl", - "to", - "tt", - "tn", - "tr", - "tv", - "tz", - "ug", - "ua", - "uy", - "us", - "uz", - "va", - "vc", - "ve", - "vn", - "vu", - "ws", - "ye", - "za", - "zm", - "zw" - ], - "x-enum-name": "Flag", - "x-enum-keys": [ - "Afghanistan", - "Angola", - "Albania", - "Andorra", - "United Arab Emirates", - "Argentina", - "Armenia", - "Antigua and Barbuda", - "Australia", - "Austria", - "Azerbaijan", - "Burundi", - "Belgium", - "Benin", - "Burkina Faso", - "Bangladesh", - "Bulgaria", - "Bahrain", - "Bahamas", - "Bosnia and Herzegovina", - "Belarus", - "Belize", - "Bolivia", - "Brazil", - "Barbados", - "Brunei Darussalam", - "Bhutan", - "Botswana", - "Central African Republic", - "Canada", - "Switzerland", - "Chile", - "China", - "C\u00f4te d'Ivoire", - "Cameroon", - "Democratic Republic of the Congo", - "Republic of the Congo", - "Colombia", - "Comoros", - "Cape Verde", - "Costa Rica", - "Cuba", - "Cyprus", - "Czech Republic", - "Germany", - "Djibouti", - "Dominica", - "Denmark", - "Dominican Republic", - "Algeria", - "Ecuador", - "Egypt", - "Eritrea", - "Spain", - "Estonia", - "Ethiopia", - "Finland", - "Fiji", - "France", - "Micronesia (Federated States of)", - "Gabon", - "United Kingdom", - "Georgia", - "Ghana", - "Guinea", - "Gambia", - "Guinea-Bissau", - "Equatorial Guinea", - "Greece", - "Grenada", - "Guatemala", - "Guyana", - "Honduras", - "Croatia", - "Haiti", - "Hungary", - "Indonesia", - "India", - "Ireland", - "Iran (Islamic Republic of)", - "Iraq", - "Iceland", - "Israel", - "Italy", - "Jamaica", - "Jordan", - "Japan", - "Kazakhstan", - "Kenya", - "Kyrgyzstan", - "Cambodia", - "Kiribati", - "Saint Kitts and Nevis", - "South Korea", - "Kuwait", - "Lao People's Democratic Republic", - "Lebanon", - "Liberia", - "Libya", - "Saint Lucia", - "Liechtenstein", - "Sri Lanka", - "Lesotho", - "Lithuania", - "Luxembourg", - "Latvia", - "Morocco", - "Monaco", - "Moldova", - "Madagascar", - "Maldives", - "Mexico", - "Marshall Islands", - "North Macedonia", - "Mali", - "Malta", - "Myanmar", - "Montenegro", - "Mongolia", - "Mozambique", - "Mauritania", - "Mauritius", - "Malawi", - "Malaysia", - "Namibia", - "Niger", - "Nigeria", - "Nicaragua", - "Netherlands", - "Norway", - "Nepal", - "Nauru", - "New Zealand", - "Oman", - "Pakistan", - "Panama", - "Peru", - "Philippines", - "Palau", - "Papua New Guinea", - "Poland", - "French Polynesia", - "North Korea", - "Portugal", - "Paraguay", - "Qatar", - "Romania", - "Russia", - "Rwanda", - "Saudi Arabia", - "Sudan", - "Senegal", - "Singapore", - "Solomon Islands", - "Sierra Leone", - "El Salvador", - "San Marino", - "Somalia", - "Serbia", - "South Sudan", - "Sao Tome and Principe", - "Suriname", - "Slovakia", - "Slovenia", - "Sweden", - "Eswatini", - "Seychelles", - "Syria", - "Chad", - "Togo", - "Thailand", - "Tajikistan", - "Turkmenistan", - "Timor-Leste", - "Tonga", - "Trinidad and Tobago", - "Tunisia", - "Turkey", - "Tuvalu", - "Tanzania", - "Uganda", - "Ukraine", - "Uruguay", - "United States", - "Uzbekistan", - "Vatican City", - "Saint Vincent and the Grenadines", - "Venezuela", - "Vietnam", - "Vanuatu", - "Samoa", - "Yemen", - "South Africa", - "Zambia", - "Zimbabwe" - ], - "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\nThis endpoint does not follow HTTP redirects.", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "x-appwrite": { - "method": "getImage", - "weight": 62, - "cookies": false, - "type": "location", - "deprecated": false, - "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": 65, - "cookies": false, - "type": "location", - "deprecated": false, - "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": "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": 64, - "cookies": false, - "type": "location", - "deprecated": false, - "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" - } - ] - } - }, - "/console/assistant": { - "post": { - "summary": "Ask query", - "operationId": "assistantChat", - "consumes": ["application/json"], - "produces": ["text/plain"], - "tags": ["assistant"], - "description": "Send a prompt to the AI assistant and receive a response. This endpoint allows you to interact with Appwrite's AI assistant by sending questions or prompts and receiving helpful responses in real-time through a server-sent events stream. ", - "responses": { - "200": { - "description": "File", - "schema": { - "type": "file" - } - } - }, - "x-appwrite": { - "method": "chat", - "weight": 333, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "assistant/chat.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/assistant/chat.md", - "rate-limit": 15, - "rate-time": 3600, - "rate-key": "userId:{userId}", - "scope": "assistant.read", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "prompt": { - "type": "string", - "description": "Prompt. A string containing questions asked to the AI assistant.", - "default": null, - "x-example": "<PROMPT>" - } - }, - "required": ["prompt"] - } - } - ] - } - }, - "/console/variables": { - "get": { - "summary": "Get variables", - "operationId": "consoleVariables", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["console"], - "description": "Get all Environment Variables that are relevant for the console.", - "responses": { - "200": { - "description": "Console Variables", - "schema": { - "$ref": "#/definitions/consoleVariables" - } - } - }, - "x-appwrite": { - "method": "variables", - "weight": 332, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "console/variables.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/console/variables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ] - } - }, - "/databases": { - "get": { - "summary": "List databases", - "operationId": "databasesList", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Databases List", - "schema": { - "$ref": "#/definitions/databaseList" - } - } - }, - "x-appwrite": { - "method": "list", - "weight": 70, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/list.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "x-appwrite": { + "method": "createMfaChallenge", + "weight": 52, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-mfa-challenge.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "factor": { + "type": "string", + "description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.", + "default": null, + "x-example": "email", + "enum": [ + "email", + "phone", + "totp", + "recoverycode" + ], + "x-enum-name": "AuthenticationFactor", + "x-enum-keys": [] + } + }, + "required": [ + "factor" + ] + } + } + ] }, - "default": [], - "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" - } - ] - }, - "post": { - "summary": "Create database", - "operationId": "databasesCreate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create a new Database.\n", - "responses": { - "201": { - "description": "Database", - "schema": { - "$ref": "#/definitions/database" - } - } - }, - "x-appwrite": { - "method": "create", - "weight": 69, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "databaseId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<DATABASE_ID>" + "put": { + "summary": "Create MFA challenge (confirmation)", + "operationId": "accountUpdateMfaChallenge", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "responses": { + "200": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } }, - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" + "x-appwrite": { + "method": "updateMfaChallenge", + "weight": 53, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-mfa-challenge.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},challengeId:{param-challengeId}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "enabled": { - "type": "boolean", - "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": ["databaseId", "name"] + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "challengeId": { + "type": "string", + "description": "ID of the challenge.", + "default": null, + "x-example": "<CHALLENGE_ID>" + }, + "otp": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<OTP>" + } + }, + "required": [ + "challengeId", + "otp" + ] + } + } + ] } - } - ] - } - }, - "/databases/usage": { - "get": { - "summary": "Get databases usage stats", - "operationId": "databasesGetUsage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageDatabases", - "schema": { - "$ref": "#/definitions/usageDatabases" - } - } }, - "x-appwrite": { - "method": "getUsage", - "weight": 114, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/get-usage.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/get-usage.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": "range", - "description": "`Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": ["24h", "30d", "90d"], - "x-enum-name": "DatabaseUsageRange", - "x-enum-keys": ["Twenty Four Hours", "Thirty Days", "Ninety Days"], - "default": "30d", - "in": "query" - } - ] - } - }, - "/databases/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "databasesGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", - "responses": { - "200": { - "description": "Database", - "schema": { - "$ref": "#/definitions/database" - } - } - }, - "x-appwrite": { - "method": "get", - "weight": 71, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/get.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update database", - "operationId": "databasesUpdate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update a database by its unique ID.", - "responses": { - "200": { - "description": "Database", - "schema": { - "$ref": "#/definitions/database" - } - } - }, - "x-appwrite": { - "method": "update", - "weight": 73, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" + "\/account\/mfa\/factors": { + "get": { + "summary": "List factors", + "operationId": "accountListMfaFactors", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "responses": { + "200": { + "description": "MFAFactors", + "schema": { + "$ref": "#\/definitions\/mfaFactors" + } + } }, - "enabled": { - "type": "boolean", - "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": ["name"] + "x-appwrite": { + "method": "listMfaFactors", + "weight": 45, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/list-mfa-factors.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] } - } - ] - }, - "delete": { - "summary": "Delete database", - "operationId": "databasesDelete", - "consumes": ["application/json"], - "produces": [], - "tags": ["databases"], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", - "responses": { - "204": { - "description": "No content" - } }, - "x-appwrite": { - "method": "delete", - "weight": 74, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/delete.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - } - ] - } - }, - "/databases/{databaseId}/collections": { - "get": { - "summary": "List collections", - "operationId": "databasesListCollections", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Collections List", - "schema": { - "$ref": "#/definitions/collectionList" - } - } - }, - "x-appwrite": { - "method": "listCollections", - "weight": 76, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/list-collections.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/list-collections.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "\/account\/mfa\/recovery-codes": { + "get": { + "summary": "Get MFA recovery codes", + "operationId": "accountGetMfaRecoveryCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "x-appwrite": { + "method": "getMfaRecoveryCodes", + "weight": 50, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/get-mfa-recovery-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] }, - "default": [], - "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" - } - ] - }, - "post": { - "summary": "Create collection", - "operationId": "databasesCreateCollection", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Collection", - "schema": { - "$ref": "#/definitions/collection" - } - } - }, - "x-appwrite": { - "method": "createCollection", - "weight": 75, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-collection.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "collectionId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + "post": { + "summary": "Create MFA recovery codes", + "operationId": "accountCreateMfaRecoveryCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "responses": { + "201": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } }, - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" + "x-appwrite": { + "method": "createMfaRecoveryCodes", + "weight": 48, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-mfa-recovery-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": ["collectionId", "name"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}": { - "get": { - "summary": "Get collection", - "operationId": "databasesGetCollection", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "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": 77, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/get-collection.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/get-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update collection", - "operationId": "databasesUpdateCollection", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update a collection by its unique ID.", - "responses": { - "200": { - "description": "Collection", - "schema": { - "$ref": "#/definitions/collection" - } - } - }, - "x-appwrite": { - "method": "updateCollection", - "weight": 79, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-collection.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": ["name"] - } - } - ] - }, - "delete": { - "summary": "Delete collection", - "operationId": "databasesDeleteCollection", - "consumes": ["application/json"], - "produces": [], - "tags": ["databases"], - "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": "", - "deprecated": false, - "demo": "databases/delete-collection.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/delete-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes": { - "get": { - "summary": "List attributes", - "operationId": "databasesListAttributes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "List attributes in the collection.", - "responses": { - "200": { - "description": "Attributes List", - "schema": { - "$ref": "#/definitions/attributeList" - } - } - }, - "x-appwrite": { - "method": "listAttributes", - "weight": 91, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/list-attributes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/list-attributes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "security": [ + { + "Project": [], + "JWT": [] + } + ] }, - "default": [], - "in": "query" - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/boolean": { - "post": { - "summary": "Create boolean attribute", - "operationId": "databasesCreateBooleanAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create a boolean attribute.\n", - "responses": { - "202": { - "description": "AttributeBoolean", - "schema": { - "$ref": "#/definitions/attributeBoolean" + "patch": { + "summary": "Regenerate MFA recovery codes", + "operationId": "accountUpdateMfaRecoveryCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "x-appwrite": { + "method": "updateMfaRecoveryCodes", + "weight": 49, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-mfa-recovery-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] } - } }, - "x-appwrite": { - "method": "createBooleanAttribute", - "weight": 88, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-boolean-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-boolean-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "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 + "\/account\/name": { + "patch": { + "summary": "Update 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" + } + } }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false + "x-appwrite": { + "method": "updateName", + "weight": 32, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } }, - "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"] + "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" + ] + } + } + ] } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key}": { - "patch": { - "summary": "Update boolean attribute", - "operationId": "databasesUpdateBooleanAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update a boolean attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributeBoolean", - "schema": { - "$ref": "#/definitions/attributeBoolean" + }, + "\/account\/password": { + "patch": { + "summary": "Update 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": 33, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-password.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.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": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "New user password. Must be at least 8 chars.", + "default": null, + "x-example": null + }, + "oldPassword": { + "type": "string", + "description": "Current user password. Must be at least 8 chars.", + "default": "", + "x-example": "password" + } + }, + "required": [ + "password" + ] + } + } + ] } - } }, - "x-appwrite": { - "method": "updateBooleanAttribute", - "weight": 100, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-boolean-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-boolean-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false + "\/account\/phone": { + "patch": { + "summary": "Update phone", + "operationId": "accountUpdatePhone", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createPhoneVerification) endpoint to send a confirmation SMS.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } }, - "default": { - "type": "boolean", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": false, - "x-nullable": true + "x-appwrite": { + "method": "updatePhone", + "weight": 35, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-phone.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null - } - }, - "required": ["required", "default"] + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": null, + "x-example": "+12065550100" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + } + }, + "required": [ + "phone", + "password" + ] + } + } + ] } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/datetime": { - "post": { - "summary": "Create datetime attribute", - "operationId": "databasesCreateDatetimeAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create a date time attribute according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "AttributeDatetime", - "schema": { - "$ref": "#/definitions/attributeDatetime" - } - } }, - "x-appwrite": { - "method": "createDatetimeAttribute", - "weight": 89, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-datetime-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-datetime-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "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 the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key}": { - "patch": { - "summary": "Update dateTime attribute", - "operationId": "databasesUpdateDatetimeAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update a date time attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributeDatetime", - "schema": { - "$ref": "#/definitions/attributeDatetime" - } - } - }, - "x-appwrite": { - "method": "updateDatetimeAttribute", - "weight": 101, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-datetime-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-datetime-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "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, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null - } - }, - "required": ["required", "default"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/email": { - "post": { - "summary": "Create email attribute", - "operationId": "databasesCreateEmailAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create an email attribute.\n", - "responses": { - "202": { - "description": "AttributeEmail", - "schema": { - "$ref": "#/definitions/attributeEmail" - } - } - }, - "x-appwrite": { - "method": "createEmailAttribute", - "weight": 82, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-email-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-email-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "email@example.com" - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/email/{key}": { - "patch": { - "summary": "Update email attribute", - "operationId": "databasesUpdateEmailAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeEmail", - "schema": { - "$ref": "#/definitions/attributeEmail" - } - } - }, - "x-appwrite": { - "method": "updateEmailAttribute", - "weight": 94, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-email-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-email-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "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", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null - } - }, - "required": ["required", "default"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/enum": { - "post": { - "summary": "Create enum attribute", - "operationId": "databasesCreateEnumAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", - "responses": { - "202": { - "description": "AttributeEnum", - "schema": { - "$ref": "#/definitions/attributeEnum" - } - } - }, - "x-appwrite": { - "method": "createEnumAttribute", - "weight": 83, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-enum-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-attribute-enum.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "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 255 characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>" - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "elements", "required"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key}": { - "patch": { - "summary": "Update enum attribute", - "operationId": "databasesUpdateEnumAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeEnum", - "schema": { - "$ref": "#/definitions/attributeEnum" - } - } - }, - "x-appwrite": { - "method": "updateEnumAttribute", - "weight": 95, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-enum-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-enum-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "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 255 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>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null - } - }, - "required": ["elements", "required", "default"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/float": { - "post": { - "summary": "Create float attribute", - "operationId": "databasesCreateFloatAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "AttributeFloat", - "schema": { - "$ref": "#/definitions/attributeFloat" - } - } - }, - "x-appwrite": { - "method": "createFloatAttribute", - "weight": 87, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-float-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-float-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value to enforce on new documents", - "default": null, - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value to enforce on new documents", - "default": null, - "x-example": null - }, - "default": { - "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/float/{key}": { - "patch": { - "summary": "Update float attribute", - "operationId": "databasesUpdateFloatAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeFloat", - "schema": { - "$ref": "#/definitions/attributeFloat" - } - } - }, - "x-appwrite": { - "method": "updateFloatAttribute", - "weight": 99, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-float-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-float-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "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, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null - } - }, - "required": ["required", "min", "max", "default"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/integer": { - "post": { - "summary": "Create integer attribute", - "operationId": "databasesCreateIntegerAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "AttributeInteger", - "schema": { - "$ref": "#/definitions/attributeInteger" - } - } - }, - "x-appwrite": { - "method": "createIntegerAttribute", - "weight": 86, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-integer-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-integer-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value to enforce on new documents", - "default": null, - "x-example": null - }, - "max": { - "type": "integer", - "description": "Maximum value to enforce on new documents", - "default": null, - "x-example": null - }, - "default": { - "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}": { - "patch": { - "summary": "Update integer attribute", - "operationId": "databasesUpdateIntegerAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeInteger", - "schema": { - "$ref": "#/definitions/attributeInteger" - } - } - }, - "x-appwrite": { - "method": "updateIntegerAttribute", - "weight": 98, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-integer-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-integer-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "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, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null - } - }, - "required": ["required", "min", "max", "default"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/ip": { - "post": { - "summary": "Create IP address attribute", - "operationId": "databasesCreateIpAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create IP address attribute.\n", - "responses": { - "202": { - "description": "AttributeIP", - "schema": { - "$ref": "#/definitions/attributeIp" - } - } - }, - "x-appwrite": { - "method": "createIpAttribute", - "weight": 84, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-ip-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-ip-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key}": { - "patch": { - "summary": "Update IP address attribute", - "operationId": "databasesUpdateIpAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeIP", - "schema": { - "$ref": "#/definitions/attributeIp" - } - } - }, - "x-appwrite": { - "method": "updateIpAttribute", - "weight": 96, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-ip-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-ip-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "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, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null - } - }, - "required": ["required", "default"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/relationship": { - "post": { - "summary": "Create relationship attribute", - "operationId": "databasesCreateRelationshipAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).\n", - "responses": { - "202": { - "description": "AttributeRelationship", - "schema": { - "$ref": "#/definitions/attributeRelationship" - } - } - }, - "x-appwrite": { - "method": "createRelationshipAttribute", - "weight": 90, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-relationship-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-relationship-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "relatedCollectionId": { - "type": "string", - "description": "Related Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "default": null, - "x-example": "<RELATED_COLLECTION_ID>" - }, - "type": { - "type": "string", - "description": "Relation type", - "default": null, - "x-example": "oneToOne", - "enum": ["oneToOne", "manyToOne", "manyToMany", "oneToMany"], - "x-enum-name": "RelationshipType", - "x-enum-keys": [] - }, - "twoWay": { - "type": "boolean", - "description": "Is Two Way?", - "default": false, - "x-example": false - }, - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "twoWayKey": { - "type": "string", - "description": "Two Way Attribute Key.", - "default": null, - "x-example": null - }, - "onDelete": { - "type": "string", - "description": "Constraints option", - "default": "restrict", - "x-example": "cascade", - "enum": ["cascade", "restrict", "setNull"], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": ["relatedCollectionId", "type"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/string": { - "post": { - "summary": "Create string attribute", - "operationId": "databasesCreateStringAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create a string attribute.\n", - "responses": { - "202": { - "description": "AttributeString", - "schema": { - "$ref": "#/definitions/attributeString" - } - } - }, - "x-appwrite": { - "method": "createStringAttribute", - "weight": 81, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-string-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-string-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "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 - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": ["key", "size", "required"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}": { - "patch": { - "summary": "Update string attribute", - "operationId": "databasesUpdateStringAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeString", - "schema": { - "$ref": "#/definitions/attributeString" - } - } - }, - "x-appwrite": { - "method": "updateStringAttribute", - "weight": 93, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-string-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-string-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "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>", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the string attribute.", - "default": null, - "x-example": 1 - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null - } - }, - "required": ["required", "default"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/url": { - "post": { - "summary": "Create URL attribute", - "operationId": "databasesCreateUrlAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create a URL attribute.\n", - "responses": { - "202": { - "description": "AttributeURL", - "schema": { - "$ref": "#/definitions/attributeUrl" - } - } - }, - "x-appwrite": { - "method": "createUrlAttribute", - "weight": 85, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-url-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-url-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "https://example.com" - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}": { - "patch": { - "summary": "Update URL attribute", - "operationId": "databasesUpdateUrlAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeURL", - "schema": { - "$ref": "#/definitions/attributeUrl" - } - } - }, - "x-appwrite": { - "method": "updateUrlAttribute", - "weight": 97, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-url-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-url-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "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", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null - } - }, - "required": ["required", "default"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/{key}": { - "get": { - "summary": "Get attribute", - "operationId": "databasesGetAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Get attribute by ID.", - "responses": { - "200": { - "description": "AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeRelationship, 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/attributeDatetime" - }, - { - "$ref": "#/definitions/attributeRelationship" - }, - { - "$ref": "#/definitions/attributeString" - } - ] - } - } - }, - "x-appwrite": { - "method": "getAttribute", - "weight": 92, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/get-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/get-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete attribute", - "operationId": "databasesDeleteAttribute", - "consumes": ["application/json"], - "produces": [], - "tags": ["databases"], - "description": "Deletes an attribute.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteAttribute", - "weight": 103, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/delete-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/delete-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship": { - "patch": { - "summary": "Update relationship attribute", - "operationId": "databasesUpdateRelationshipAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).\n", - "responses": { - "200": { - "description": "AttributeRelationship", - "schema": { - "$ref": "#/definitions/attributeRelationship" - } - } - }, - "x-appwrite": { - "method": "updateRelationshipAttribute", - "weight": 102, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-relationship-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-relationship-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "onDelete": { - "type": "string", - "description": "Constraints option", - "default": null, - "x-example": "cascade", - "enum": ["cascade", "restrict", "setNull"], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null - } - } - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/documents": { - "get": { - "summary": "List documents", - "operationId": "databasesListDocuments", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Documents List", - "schema": { - "$ref": "#/definitions/documentList" - } - } - }, - "x-appwrite": { - "method": "listDocuments", - "weight": 109, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/list-documents.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "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/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "\/account\/prefs": { + "get": { + "summary": "Get account preferences", + "operationId": "accountGetPrefs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the preferences as a key-value object for the currently logged in user.", + "responses": { + "200": { + "description": "Preferences", + "schema": { + "$ref": "#\/definitions\/preferences" + } + } + }, + "x-appwrite": { + "method": "getPrefs", + "weight": 30, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } + ] }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create document", - "operationId": "databasesCreateDocument", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { - "$ref": "#/definitions/document" - } - } - }, - "x-appwrite": { - "method": "createDocument", - "weight": 108, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). 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 a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + "patch": { + "summary": "Update 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" + } + } }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "default": {}, - "x-example": "{}" + "x-appwrite": { + "method": "updatePrefs", + "weight": 36, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - }, - "required": ["documentId", "data"] + "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" + ] + } + } + ] } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "databasesGetDocument", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "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": 110, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/get-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "\/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](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateRecovery) 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": 38, + "cookies": false, + "type": "", + "deprecated": false, + "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}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "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" + ] + } + } + ] }, - "default": [], - "in": "query" - } - ] - }, - "patch": { - "summary": "Update document", - "operationId": "databasesUpdateDocument", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "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": 112, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", - "default": [], - "x-example": "{}" + "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](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) 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" + } + } }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } + "x-appwrite": { + "method": "updateRecovery", + "weight": 39, + "cookies": false, + "type": "", + "deprecated": false, + "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": "sessions.write", + "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 between 8 and 256 chars.", + "default": null, + "x-example": null + } + }, + "required": [ + "userId", + "secret", + "password" + ] + } + } + ] } - } - ] - }, - "delete": { - "summary": "Delete document", - "operationId": "databasesDeleteDocument", - "consumes": ["application/json"], - "produces": [], - "tags": ["databases"], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" - } }, - "x-appwrite": { - "method": "deleteDocument", - "weight": 113, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/delete-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/logs": { - "get": { - "summary": "List document logs", - "operationId": "databasesListDocumentLogs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Get the document activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#/definitions/logList" - } - } - }, - "x-appwrite": { - "method": "listDocumentLogs", - "weight": 111, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/list-document-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/get-document-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "\/account\/sessions": { + "get": { + "summary": "List sessions", + "operationId": "accountListSessions", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the list of active sessions across different devices for the currently logged in user.", + "responses": { + "200": { + "description": "Sessions List", + "schema": { + "$ref": "#\/definitions\/sessionList" + } + } + }, + "x-appwrite": { + "method": "listSessions", + "weight": 11, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/list-sessions.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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": [] + } + ] }, - "default": [], - "in": "query" - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/indexes": { - "get": { - "summary": "List indexes", - "operationId": "databasesListIndexes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "List indexes in the collection.", - "responses": { - "200": { - "description": "Indexes List", - "schema": { - "$ref": "#/definitions/indexList" + "delete": { + "summary": "Delete 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": 12, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } + ] } - } }, - "x-appwrite": { - "method": "listIndexes", - "weight": 105, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/list-indexes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } + "\/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](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateEmail) or create an [OAuth2 session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#CreateOAuth2Session).", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "x-appwrite": { + "method": "createAnonymousSession", + "weight": 17, + "cookies": false, + "type": "", + "deprecated": false, + "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": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ] + } }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "\/account\/sessions\/email": { + "post": { + "summary": "Create email password session", + "operationId": "accountCreateEmailPasswordSession", + "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.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "x-appwrite": { + "method": "createEmailPasswordSession", + "weight": 16, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-email-password-session.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},email:{param-email}", + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + } + }, + "required": [ + "email", + "password" + ] + } + } + ] + } + }, + "\/account\/sessions\/magic-url": { + "put": { + "summary": "Update magic URL session", + "operationId": "accountUpdateMagicURLSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "x-appwrite": { + "method": "updateMagicURLSession", + "weight": 26, + "cookies": false, + "type": "", + "deprecated": true, + "demo": "account\/update-magic-u-r-l-session.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/account\/sessions\/oauth2\/{provider}": { + "get": { + "summary": "Create OAuth2 session", + "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\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", + "responses": { + "301": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "createOAuth2Session", + "weight": 19, + "cookies": false, + "type": "webAuth", + "deprecated": false, + "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": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "provider", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", + "required": true, + "type": "string", + "x-example": "amazon", + "enum": [ + "amazon", + "apple", + "auth0", + "authentik", + "autodesk", + "bitbucket", + "bitly", + "box", + "dailymotion", + "discord", + "disqus", + "dropbox", + "etsy", + "facebook", + "github", + "gitlab", + "google", + "linkedin", + "microsoft", + "notion", + "oidc", + "okta", + "paypal", + "paypalSandbox", + "podio", + "salesforce", + "slack", + "spotify", + "stripe", + "tradeshift", + "tradeshiftBox", + "twitch", + "wordpress", + "yahoo", + "yammer", + "yandex", + "zoho", + "zoom", + "mock" + ], + "x-enum-name": "OAuthProvider", + "x-enum-keys": [], + "in": "path" + }, + { + "name": "success", + "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's 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's 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 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/account\/sessions\/phone": { + "put": { + "summary": "Update phone session", + "operationId": "accountUpdatePhoneSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "x-appwrite": { + "method": "updatePhoneSession", + "weight": 27, + "cookies": false, + "type": "", + "deprecated": true, + "demo": "account\/update-phone-session.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/account\/sessions\/token": { + "post": { + "summary": "Create session", + "operationId": "accountCreateSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "x-appwrite": { + "method": "createSession", + "weight": 18, + "cookies": false, + "type": "", + "deprecated": false, + "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": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + }, + "secret": { + "type": "string", + "description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/account\/sessions\/{sessionId}": { + "get": { + "summary": "Get session", + "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": 13, + "cookies": false, + "type": "", + "deprecated": false, + "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" + } + ] }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "databasesCreateIndex", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", - "responses": { - "202": { - "description": "Index", - "schema": { - "$ref": "#/definitions/index" - } - } - }, - "x-appwrite": { - "method": "createIndex", - "weight": 104, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-index.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "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 + "patch": { + "summary": "Update session", + "operationId": "accountUpdateSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.", + "responses": { + "200": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } }, - "type": { - "type": "string", - "description": "Index type.", - "default": null, - "x-example": "key", - "enum": ["key", "fulltext", "unique"], - "x-enum-name": "IndexType", - "x-enum-keys": [] + "x-appwrite": { + "method": "updateSession", + "weight": 15, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } }, - "attributes": { - "type": "array", - "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": ["key", "type", "attributes"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/indexes/{key}": { - "get": { - "summary": "Get index", - "operationId": "databasesGetIndex", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "schema": { - "$ref": "#/definitions/index" - } - } - }, - "x-appwrite": { - "method": "getIndex", - "weight": 106, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/get-index.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "databasesDeleteIndex", - "consumes": ["application/json"], - "produces": [], - "tags": ["databases"], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteIndex", - "weight": 107, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/delete-index.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/logs": { - "get": { - "summary": "List collection logs", - "operationId": "databasesListCollectionLogs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "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": "", - "deprecated": false, - "demo": "databases/list-collection-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/get-collection-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "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" + } + ] }, - "default": [], - "in": "query" - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/usage": { - "get": { - "summary": "Get collection usage stats", - "operationId": "databasesGetCollectionUsage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageCollection", - "schema": { - "$ref": "#/definitions/usageCollection" + "delete": { + "summary": "Delete session", + "operationId": "accountDeleteSession", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "account" + ], + "description": "Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#deleteSessions) instead.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteSession", + "weight": 14, + "cookies": false, + "type": "", + "deprecated": false, + "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" + } + ] } - } }, - "x-appwrite": { - "method": "getCollectionUsage", - "weight": 116, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/get-collection-usage.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/get-collection-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": ["24h", "30d", "90d"], - "x-enum-name": "DatabaseUsageRange", - "x-enum-keys": ["Twenty Four Hours", "Thirty Days", "Ninety Days"], - "default": "30d", - "in": "query" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - } - ] - } - }, - "/databases/{databaseId}/logs": { - "get": { - "summary": "List database logs", - "operationId": "databasesListLogs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Get the database activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#/definitions/logList" + "\/account\/status": { + "patch": { + "summary": "Update 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": 37, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } + ] } - } }, - "x-appwrite": { - "method": "listLogs", - "weight": 72, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/list-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/get-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } + "\/account\/targets\/push": { + "post": { + "summary": "Create push target", + "operationId": "accountCreatePushTarget", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.", + "responses": { + "201": { + "description": "Target", + "schema": { + "$ref": "#\/definitions\/target" + } + } + }, + "x-appwrite": { + "method": "createPushTarget", + "weight": 54, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-push-target.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "targetId": { + "type": "string", + "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<TARGET_ID>" + }, + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "default": null, + "x-example": "<IDENTIFIER>" + }, + "providerId": { + "type": "string", + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "default": "", + "x-example": "<PROVIDER_ID>" + } + }, + "required": [ + "targetId", + "identifier" + ] + } + } + ] + } }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_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/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "\/account\/targets\/{targetId}\/push": { + "put": { + "summary": "Update push target", + "operationId": "accountUpdatePushTarget", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.", + "responses": { + "200": { + "description": "Target", + "schema": { + "$ref": "#\/definitions\/target" + } + } + }, + "x-appwrite": { + "method": "updatePushTarget", + "weight": 55, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-push-target.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "type": "string", + "x-example": "<TARGET_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "default": null, + "x-example": "<IDENTIFIER>" + } + }, + "required": [ + "identifier" + ] + } + } + ] }, - "default": [], - "in": "query" - } - ] - } - }, - "/databases/{databaseId}/usage": { - "get": { - "summary": "Get database usage stats", - "operationId": "databasesGetDatabaseUsage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageDatabase", - "schema": { - "$ref": "#/definitions/usageDatabase" + "delete": { + "summary": "Delete push target", + "operationId": "accountDeletePushTarget", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "account" + ], + "description": "Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deletePushTarget", + "weight": 56, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/delete-push-target.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "type": "string", + "x-example": "<TARGET_ID>", + "in": "path" + } + ] } - } }, - "x-appwrite": { - "method": "getDatabaseUsage", - "weight": 115, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/get-database-usage.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/get-database-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "range", - "description": "`Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": ["24h", "30d", "90d"], - "x-enum-name": "DatabaseUsageRange", - "x-enum-keys": ["Twenty Four Hours", "Thirty Days", "Ninety Days"], - "default": "30d", - "in": "query" - } - ] - } - }, - "/functions": { - "get": { - "summary": "List functions", - "operationId": "functionsList", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get a list of all the project's functions. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Functions List", - "schema": { - "$ref": "#/definitions/functionList" + "\/account\/tokens\/email": { + "post": { + "summary": "Create email token (OTP)", + "operationId": "accountCreateEmailToken", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "x-appwrite": { + "method": "createEmailToken", + "weight": 25, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-email-token.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},email:{param-email}", + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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" + }, + "phrase": { + "type": "boolean", + "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", + "default": false, + "x-example": false + } + }, + "required": [ + "userId", + "email" + ] + } + } + ] } - } }, - "x-appwrite": { - "method": "list", - "weight": 289, - "cookies": false, - "type": "", - "deprecated": false, - "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": [] - } + "\/account\/tokens\/magic-url": { + "post": { + "summary": "Create magic URL token", + "operationId": "accountCreateMagicURLToken", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. 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 [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "x-appwrite": { + "method": "createMagicURLToken", + "weight": 24, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-magic-u-r-l-token.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", + "rate-limit": 60, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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" + }, + "phrase": { + "type": "boolean", + "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", + "default": false, + "x-example": false + } + }, + "required": [ + "userId", + "email" + ] + } + } + ] + } }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "\/account\/tokens\/oauth2\/{provider}": { + "get": { + "summary": "Create OAuth2 token", + "operationId": "accountCreateOAuth2Token", + "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 authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "301": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "createOAuth2Token", + "weight": 23, + "cookies": false, + "type": "webAuth", + "deprecated": false, + "demo": "account\/create-o-auth2token.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "provider", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", + "required": true, + "type": "string", + "x-example": "amazon", + "enum": [ + "amazon", + "apple", + "auth0", + "authentik", + "autodesk", + "bitbucket", + "bitly", + "box", + "dailymotion", + "discord", + "disqus", + "dropbox", + "etsy", + "facebook", + "github", + "gitlab", + "google", + "linkedin", + "microsoft", + "notion", + "oidc", + "okta", + "paypal", + "paypalSandbox", + "podio", + "salesforce", + "slack", + "spotify", + "stripe", + "tradeshift", + "tradeshiftBox", + "twitch", + "wordpress", + "yahoo", + "yammer", + "yandex", + "zoho", + "zoom", + "mock" + ], + "x-enum-name": "OAuthProvider", + "x-enum-keys": [], + "in": "path" + }, + { + "name": "success", + "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's 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's 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 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/account\/tokens\/phone": { + "post": { + "summary": "Create phone token", + "operationId": "accountCreatePhoneToken", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "x-appwrite": { + "method": "createPhoneToken", + "weight": 28, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-phone-token.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},phone:{param-phone}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": null, + "x-example": "+12065550100" + } + }, + "required": [ + "userId", + "phone" + ] + } + } + ] + } + }, + "\/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](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). 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": 40, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-verification.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": null, + "x-example": "https:\/\/example.com" + } + }, + "required": [ + "url" + ] + } + } + ] }, - "default": [], - "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" - } - ] - }, - "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](https://appwrite.io/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" + "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": 41, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-verification.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "public", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] } - } }, - "x-appwrite": { - "method": "create", - "weight": 288, - "cookies": false, - "type": "", - "deprecated": false, - "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 a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + "\/account\/verification\/phone": { + "post": { + "summary": "Create phone verification", + "operationId": "accountCreatePhoneVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } }, - "name": { - "type": "string", - "description": "Function name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" + "x-appwrite": { + "method": "createPhoneVerification", + "weight": 42, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-phone-verification.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},userId:{userId}", + "url:{url},ip:{ip}" + ], + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "runtime": { - "type": "string", - "description": "Execution runtime.", - "default": null, - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-ml-3.11", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "go-1.23", - "static-1", - "flutter-3.24" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "execute": { - "type": "array", - "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "default": [], - "x-example": "[\"any\"]", - "items": { - "type": "string" - } - }, - "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 - }, - "enabled": { - "type": "boolean", - "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project.", - "default": true, - "x-example": false - }, - "entrypoint": { - "type": "string", - "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", - "default": "", - "x-example": "<ENTRYPOINT>" - }, - "commands": { - "type": "string", - "description": "Build Commands.", - "default": "", - "x-example": "<COMMANDS>" - }, - "scopes": { - "type": "array", - "description": "List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "installationId": { - "type": "string", - "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", - "default": "", - "x-example": "<INSTALLATION_ID>" - }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the function.", - "default": "", - "x-example": "<PROVIDER_REPOSITORY_ID>" - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the function.", - "default": "", - "x-example": "<PROVIDER_BRANCH>" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", - "default": false, - "x-example": false - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function code in the linked repo.", - "default": "", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - }, - "templateRepository": { - "type": "string", - "description": "Repository name of the template.", - "default": "", - "x-example": "<TEMPLATE_REPOSITORY>" - }, - "templateOwner": { - "type": "string", - "description": "The name of the owner of the template.", - "default": "", - "x-example": "<TEMPLATE_OWNER>" - }, - "templateRootDirectory": { - "type": "string", - "description": "Path to function code in the template repo.", - "default": "", - "x-example": "<TEMPLATE_ROOT_DIRECTORY>" - }, - "templateVersion": { - "type": "string", - "description": "Version (tag) for the repo linked to the function template.", - "default": "", - "x-example": "<TEMPLATE_VERSION>" - }, - "specification": { - "type": "string", - "description": "Runtime specification for the function and builds.", - "default": "s-1vcpu-512mb", - "x-example": null - } - }, - "required": ["functionId", "name", "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": 290, - "cookies": false, - "type": "", - "deprecated": false, - "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/specifications": { - "get": { - "summary": "List available function runtime specifications", - "operationId": "functionsListSpecifications", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "List allowed function specifications for this instance.\n", - "responses": { - "200": { - "description": "Specifications List", - "schema": { - "$ref": "#/definitions/specificationList" - } - } - }, - "x-appwrite": { - "method": "listSpecifications", - "weight": 291, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/list-specifications.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-specifications.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": ["server", "console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "/functions/templates": { - "get": { - "summary": "List function templates", - "operationId": "functionsListTemplates", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "List available function templates. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.", - "responses": { - "200": { - "description": "Function Templates List", - "schema": { - "$ref": "#/definitions/templateFunctionList" - } - } - }, - "x-appwrite": { - "method": "listTemplates", - "weight": 314, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/list-templates.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-templates.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "runtimes", - "description": "List of runtimes allowed for filtering function templates. Maximum of 100 runtimes are allowed.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "security": [ + { + "Project": [], + "JWT": [] + } + ] }, - "default": [], - "in": "query" - }, - { - "name": "useCases", - "description": "List of use cases allowed for filtering function templates. Maximum of 100 use cases are allowed.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "put": { + "summary": "Update phone verification (confirmation)", + "operationId": "accountUpdatePhoneVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.", + "responses": { + "200": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "x-appwrite": { + "method": "updatePhoneVerification", + "weight": 43, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-phone-verification.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "userId:{param-userId}", + "scope": "public", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/avatars\/browsers\/{code}": { + "get": { + "summary": "Get browser icon", + "operationId": "avatarsGetBrowser", + "consumes": [ + "application\/json" + ], + "produces": [ + "image\/png" + ], + "tags": [ + "avatars" + ], + "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) 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": 60, + "cookies": false, + "type": "location", + "deprecated": false, + "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", + "enum": [ + "aa", + "an", + "ch", + "ci", + "cm", + "cr", + "ff", + "sf", + "mf", + "ps", + "oi", + "om", + "op", + "on" + ], + "x-enum-name": "Browser", + "x-enum-keys": [ + "Avant Browser", + "Android WebView Beta", + "Google Chrome", + "Google Chrome (iOS)", + "Google Chrome (Mobile)", + "Chromium", + "Mozilla Firefox", + "Safari", + "Mobile Safari", + "Microsoft Edge", + "Microsoft Edge (iOS)", + "Opera Mini", + "Opera", + "Opera (Next)" + ], + "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": 59, + "cookies": false, + "type": "location", + "deprecated": false, + "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, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.", + "required": true, + "type": "string", + "x-example": "amex", + "enum": [ + "amex", + "argencard", + "cabal", + "cencosud", + "diners", + "discover", + "elo", + "hipercard", + "jcb", + "mastercard", + "naranja", + "targeta-shopping", + "union-china-pay", + "visa", + "mir", + "maestro" + ], + "x-enum-name": "CreditCard", + "x-enum-keys": [ + "American Express", + "Argencard", + "Cabal", + "Cencosud", + "Diners Club", + "Discover", + "Elo", + "Hipercard", + "JCB", + "Mastercard", + "Naranja", + "Tarjeta Shopping", + "Union China Pay", + "Visa", + "MIR", + "Maestro" + ], + "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\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "x-appwrite": { + "method": "getFavicon", + "weight": 63, + "cookies": false, + "type": "location", + "deprecated": false, + "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. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\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": 61, + "cookies": false, + "type": "location", + "deprecated": false, + "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", + "enum": [ + "af", + "ao", + "al", + "ad", + "ae", + "ar", + "am", + "ag", + "au", + "at", + "az", + "bi", + "be", + "bj", + "bf", + "bd", + "bg", + "bh", + "bs", + "ba", + "by", + "bz", + "bo", + "br", + "bb", + "bn", + "bt", + "bw", + "cf", + "ca", + "ch", + "cl", + "cn", + "ci", + "cm", + "cd", + "cg", + "co", + "km", + "cv", + "cr", + "cu", + "cy", + "cz", + "de", + "dj", + "dm", + "dk", + "do", + "dz", + "ec", + "eg", + "er", + "es", + "ee", + "et", + "fi", + "fj", + "fr", + "fm", + "ga", + "gb", + "ge", + "gh", + "gn", + "gm", + "gw", + "gq", + "gr", + "gd", + "gt", + "gy", + "hn", + "hr", + "ht", + "hu", + "id", + "in", + "ie", + "ir", + "iq", + "is", + "il", + "it", + "jm", + "jo", + "jp", + "kz", + "ke", + "kg", + "kh", + "ki", + "kn", + "kr", + "kw", + "la", + "lb", + "lr", + "ly", + "lc", + "li", + "lk", + "ls", + "lt", + "lu", + "lv", + "ma", + "mc", + "md", + "mg", + "mv", + "mx", + "mh", + "mk", + "ml", + "mt", + "mm", + "me", + "mn", + "mz", + "mr", + "mu", + "mw", + "my", + "na", + "ne", + "ng", + "ni", + "nl", + "no", + "np", + "nr", + "nz", + "om", + "pk", + "pa", + "pe", + "ph", + "pw", + "pg", + "pl", + "pf", + "kp", + "pt", + "py", + "qa", + "ro", + "ru", + "rw", + "sa", + "sd", + "sn", + "sg", + "sb", + "sl", + "sv", + "sm", + "so", + "rs", + "ss", + "st", + "sr", + "sk", + "si", + "se", + "sz", + "sc", + "sy", + "td", + "tg", + "th", + "tj", + "tm", + "tl", + "to", + "tt", + "tn", + "tr", + "tv", + "tz", + "ug", + "ua", + "uy", + "us", + "uz", + "va", + "vc", + "ve", + "vn", + "vu", + "ws", + "ye", + "za", + "zm", + "zw" + ], + "x-enum-name": "Flag", + "x-enum-keys": [ + "Afghanistan", + "Angola", + "Albania", + "Andorra", + "United Arab Emirates", + "Argentina", + "Armenia", + "Antigua and Barbuda", + "Australia", + "Austria", + "Azerbaijan", + "Burundi", + "Belgium", + "Benin", + "Burkina Faso", + "Bangladesh", + "Bulgaria", + "Bahrain", + "Bahamas", + "Bosnia and Herzegovina", + "Belarus", + "Belize", + "Bolivia", + "Brazil", + "Barbados", + "Brunei Darussalam", + "Bhutan", + "Botswana", + "Central African Republic", + "Canada", + "Switzerland", + "Chile", + "China", + "C\u00f4te d'Ivoire", + "Cameroon", + "Democratic Republic of the Congo", + "Republic of the Congo", + "Colombia", + "Comoros", + "Cape Verde", + "Costa Rica", + "Cuba", + "Cyprus", + "Czech Republic", + "Germany", + "Djibouti", + "Dominica", + "Denmark", + "Dominican Republic", + "Algeria", + "Ecuador", + "Egypt", + "Eritrea", + "Spain", + "Estonia", + "Ethiopia", + "Finland", + "Fiji", + "France", + "Micronesia (Federated States of)", + "Gabon", + "United Kingdom", + "Georgia", + "Ghana", + "Guinea", + "Gambia", + "Guinea-Bissau", + "Equatorial Guinea", + "Greece", + "Grenada", + "Guatemala", + "Guyana", + "Honduras", + "Croatia", + "Haiti", + "Hungary", + "Indonesia", + "India", + "Ireland", + "Iran (Islamic Republic of)", + "Iraq", + "Iceland", + "Israel", + "Italy", + "Jamaica", + "Jordan", + "Japan", + "Kazakhstan", + "Kenya", + "Kyrgyzstan", + "Cambodia", + "Kiribati", + "Saint Kitts and Nevis", + "South Korea", + "Kuwait", + "Lao People's Democratic Republic", + "Lebanon", + "Liberia", + "Libya", + "Saint Lucia", + "Liechtenstein", + "Sri Lanka", + "Lesotho", + "Lithuania", + "Luxembourg", + "Latvia", + "Morocco", + "Monaco", + "Moldova", + "Madagascar", + "Maldives", + "Mexico", + "Marshall Islands", + "North Macedonia", + "Mali", + "Malta", + "Myanmar", + "Montenegro", + "Mongolia", + "Mozambique", + "Mauritania", + "Mauritius", + "Malawi", + "Malaysia", + "Namibia", + "Niger", + "Nigeria", + "Nicaragua", + "Netherlands", + "Norway", + "Nepal", + "Nauru", + "New Zealand", + "Oman", + "Pakistan", + "Panama", + "Peru", + "Philippines", + "Palau", + "Papua New Guinea", + "Poland", + "French Polynesia", + "North Korea", + "Portugal", + "Paraguay", + "Qatar", + "Romania", + "Russia", + "Rwanda", + "Saudi Arabia", + "Sudan", + "Senegal", + "Singapore", + "Solomon Islands", + "Sierra Leone", + "El Salvador", + "San Marino", + "Somalia", + "Serbia", + "South Sudan", + "Sao Tome and Principe", + "Suriname", + "Slovakia", + "Slovenia", + "Sweden", + "Eswatini", + "Seychelles", + "Syria", + "Chad", + "Togo", + "Thailand", + "Tajikistan", + "Turkmenistan", + "Timor-Leste", + "Tonga", + "Trinidad and Tobago", + "Tunisia", + "Turkey", + "Tuvalu", + "Tanzania", + "Uganda", + "Ukraine", + "Uruguay", + "United States", + "Uzbekistan", + "Vatican City", + "Saint Vincent and the Grenadines", + "Venezuela", + "Vietnam", + "Vanuatu", + "Samoa", + "Yemen", + "South Africa", + "Zambia", + "Zimbabwe" + ], + "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\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "x-appwrite": { + "method": "getImage", + "weight": 62, + "cookies": false, + "type": "location", + "deprecated": false, + "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": 65, + "cookies": false, + "type": "location", + "deprecated": false, + "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": "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": 64, + "cookies": false, + "type": "location", + "deprecated": false, + "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" + } + ] + } + }, + "\/console\/assistant": { + "post": { + "summary": "Ask query", + "operationId": "assistantChat", + "consumes": [ + "application\/json" + ], + "produces": [ + "text\/plain" + ], + "tags": [ + "assistant" + ], + "description": "Send a prompt to the AI assistant and receive a response. This endpoint allows you to interact with Appwrite's AI assistant by sending questions or prompts and receiving helpful responses in real-time through a server-sent events stream. ", + "responses": { + "200": { + "description": "File", + "schema": { + "type": "file" + } + } + }, + "x-appwrite": { + "method": "chat", + "weight": 333, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "assistant\/chat.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/assistant\/chat.md", + "rate-limit": 15, + "rate-time": 3600, + "rate-key": "userId:{userId}", + "scope": "assistant.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "prompt": { + "type": "string", + "description": "Prompt. A string containing questions asked to the AI assistant.", + "default": null, + "x-example": "<PROMPT>" + } + }, + "required": [ + "prompt" + ] + } + } + ] + } + }, + "\/console\/variables": { + "get": { + "summary": "Get variables", + "operationId": "consoleVariables", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "console" + ], + "description": "Get all Environment Variables that are relevant for the console.", + "responses": { + "200": { + "description": "Console Variables", + "schema": { + "$ref": "#\/definitions\/consoleVariables" + } + } + }, + "x-appwrite": { + "method": "variables", + "weight": 332, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "console\/variables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/console\/variables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ] + } + }, + "\/databases": { + "get": { + "summary": "List databases", + "operationId": "databasesList", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "schema": { + "$ref": "#\/definitions\/databaseList" + } + } + }, + "x-appwrite": { + "method": "list", + "weight": 70, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] }, - "default": [], - "in": "query" - }, - { - "name": "limit", - "description": "Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset the list of returned templates. Maximum offset is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - } - ] - } - }, - "/functions/templates/{templateId}": { - "get": { - "summary": "Get function template", - "operationId": "functionsGetTemplate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get a function template using ID. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.", - "responses": { - "200": { - "description": "Template Function", - "schema": { - "$ref": "#/definitions/templateFunction" + "post": { + "summary": "Create database", + "operationId": "databasesCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "x-appwrite": { + "method": "create", + "weight": 69, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<DATABASE_ID>" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + ] } - } }, - "x-appwrite": { - "method": "getTemplate", - "weight": 315, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/get-template.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/get-template.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "templateId", - "description": "Template ID.", - "required": true, - "type": "string", - "x-example": "<TEMPLATE_ID>", - "in": "path" - } - ] - } - }, - "/functions/usage": { - "get": { - "summary": "Get functions usage", - "operationId": "functionsGetUsage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get usage metrics and statistics for a for all functions. View statistics including total functions, deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", - "responses": { - "200": { - "description": "UsageFunctions", - "schema": { - "$ref": "#/definitions/usageFunctions" + "\/databases\/usage": { + "get": { + "summary": "Get databases usage stats", + "operationId": "databasesGetUsage", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageDatabases", + "schema": { + "$ref": "#\/definitions\/usageDatabases" + } + } + }, + "x-appwrite": { + "method": "getUsage", + "weight": 114, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/get-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-usage.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": "range", + "description": "`Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "DatabaseUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] } - } }, - "x-appwrite": { - "method": "getUsage", - "weight": 294, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/get-usage.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/get-functions-usage.md", - "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": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": ["24h", "30d", "90d"], - "x-enum-name": "FunctionUsageRange", - "x-enum-keys": ["Twenty Four Hours", "Thirty Days", "Ninety Days"], - "default": "30d", - "in": "query" - } - ] - } - }, - "/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": 292, - "cookies": false, - "type": "", - "deprecated": false, - "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": 295, - "cookies": false, - "type": "", - "deprecated": false, - "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>" + "\/databases\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "databasesGet", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } }, - "runtime": { - "type": "string", - "description": "Execution runtime.", - "default": "", - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-ml-3.11", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "go-1.23", - "static-1", - "flutter-3.24" - ], - "x-enum-name": null, - "x-enum-keys": [] + "x-appwrite": { + "method": "get", + "weight": 71, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "execute": { - "type": "array", - "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "default": [], - "x-example": "[\"any\"]", - "items": { - "type": "string" - } - }, - "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 - }, - "enabled": { - "type": "boolean", - "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project.", - "default": true, - "x-example": false - }, - "entrypoint": { - "type": "string", - "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", - "default": "", - "x-example": "<ENTRYPOINT>" - }, - "commands": { - "type": "string", - "description": "Build Commands.", - "default": "", - "x-example": "<COMMANDS>" - }, - "scopes": { - "type": "array", - "description": "List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "installationId": { - "type": "string", - "description": "Appwrite Installation ID for VCS (Version Controle System) deployment.", - "default": "", - "x-example": "<INSTALLATION_ID>" - }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the function", - "default": null, - "x-example": "<PROVIDER_REPOSITORY_ID>", - "x-nullable": true - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the function", - "default": "", - "x-example": "<PROVIDER_BRANCH>" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", - "default": false, - "x-example": false - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function code in the linked repo.", - "default": "", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - }, - "specification": { - "type": "string", - "description": "Runtime specification for the function and builds.", - "default": "s-1vcpu-512mb", - "x-example": null - } - }, - "required": ["name"] - } - } - ] - }, - "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": 298, - "cookies": false, - "type": "", - "deprecated": false, - "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": 300, - "cookies": false, - "type": "", - "deprecated": false, - "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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: size, buildId, activate, entrypoint, commands, type, size", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + } + ] }, - "default": [], - "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" - } - ] - }, - "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](https://appwrite.io/docs/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", - "responses": { - "202": { - "description": "Deployment", - "schema": { - "$ref": "#/definitions/deployment" - } - } - }, - "x-appwrite": { - "method": "createDeployment", - "weight": 299, - "cookies": false, - "type": "upload", - "deprecated": false, - "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": false, - "type": "string", - "x-example": "<ENTRYPOINT>", - "in": "formData" - }, - { - "name": "commands", - "description": "Build Commands.", - "required": false, - "type": "string", - "x-example": "<COMMANDS>", - "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": "Deployment", - "schema": { - "$ref": "#/definitions/deployment" - } - } - }, - "x-appwrite": { - "method": "getDeployment", - "weight": 301, - "cookies": false, - "type": "", - "deprecated": false, - "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 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": 297, - "cookies": false, - "type": "", - "deprecated": false, - "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": 302, - "cookies": false, - "type": "", - "deprecated": false, - "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}/build": { - "post": { - "summary": "Rebuild deployment", - "operationId": "functionsCreateBuild", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "createBuild", - "weight": 303, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/create-build.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/create-build.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" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "buildId": { - "type": "string", - "description": "Build unique ID.", - "default": "", - "x-example": "<BUILD_ID>" - } - } - } - } - ] - }, - "patch": { - "summary": "Cancel deployment", - "operationId": "functionsUpdateDeploymentBuild", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", - "responses": { - "200": { - "description": "Build", - "schema": { - "$ref": "#/definitions/build" - } - } - }, - "x-appwrite": { - "method": "updateDeploymentBuild", - "weight": 304, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/update-deployment-build.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/update-deployment-build.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}/download": { - "get": { - "summary": "Download deployment", - "operationId": "functionsGetDeploymentDownload", - "consumes": ["application/json"], - "produces": ["*/*"], - "tags": ["functions"], - "description": "Get a Deployment's contents by its unique ID. This endpoint supports range requests for partial or streaming file download.", - "responses": { - "200": { - "description": "File", - "schema": { - "type": "file" - } - } - }, - "x-appwrite": { - "method": "getDeploymentDownload", - "weight": 296, - "cookies": false, - "type": "location", - "deprecated": false, - "demo": "functions/get-deployment-download.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/get-deployment-download.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": ["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" - } - ] - } - }, - "/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.", - "responses": { - "200": { - "description": "Executions List", - "schema": { - "$ref": "#/definitions/executionList" - } - } - }, - "x-appwrite": { - "method": "listExecutions", - "weight": 306, - "cookies": false, - "type": "", - "deprecated": false, - "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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "put": { + "summary": "Update database", + "operationId": "databasesUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "x-appwrite": { + "method": "update", + "weight": 73, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] }, - "default": [], - "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" - } - ] - }, - "post": { - "summary": "Create execution", - "operationId": "functionsCreateExecution", - "consumes": ["application/json"], - "produces": ["multipart/form-data"], - "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": 305, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/create-execution.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/create-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "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": { - "body": { - "type": "string", - "description": "HTTP body of execution. Default value is empty string.", - "default": "", - "x-example": "<BODY>" + "delete": { + "summary": "Delete database", + "operationId": "databasesDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } }, - "async": { - "type": "boolean", - "description": "Execute code in the background. Default value is false.", - "default": false, - "x-example": false + "x-appwrite": { + "method": "delete", + "weight": 74, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "path": { - "type": "string", - "description": "HTTP path of execution. Path can include query params. Default value is /", - "default": "/", - "x-example": "<PATH>" + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections": { + "get": { + "summary": "List collections", + "operationId": "databasesListCollections", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Collections List", + "schema": { + "$ref": "#\/definitions\/collectionList" + } + } }, - "method": { - "type": "string", - "description": "HTTP method of execution. Default value is GET.", - "default": "POST", - "x-example": "GET", - "enum": ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], - "x-enum-name": "ExecutionMethod", - "x-enum-keys": [] + "x-appwrite": { + "method": "listCollections", + "weight": 76, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/list-collections.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "headers": { - "type": "object", - "description": "HTTP headers of execution. Defaults to empty.", - "default": [], - "x-example": "{}" - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "default": null, - "x-example": null - } - } - } - } - ] - } - }, - "/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": 307, - "cookies": false, - "type": "", - "deprecated": false, - "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" - } - ] - }, - "delete": { - "summary": "Delete execution", - "operationId": "functionsDeleteExecution", - "consumes": ["application/json"], - "produces": [], - "tags": ["functions"], - "description": "Delete a function execution by its unique ID.\n", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteExecution", - "weight": 308, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/delete-execution.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/delete-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "execution.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": "executionId", - "description": "Execution ID.", - "required": true, - "type": "string", - "x-example": "<EXECUTION_ID>", - "in": "path" - } - ] - } - }, - "/functions/{functionId}/usage": { - "get": { - "summary": "Get function usage", - "operationId": "functionsGetFunctionUsage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get usage metrics and statistics for a for a specific function. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", - "responses": { - "200": { - "description": "UsageFunction", - "schema": { - "$ref": "#/definitions/usageFunction" - } - } - }, - "x-appwrite": { - "method": "getFunctionUsage", - "weight": 293, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/get-function-usage.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/get-function-usage.md", - "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", - "enum": ["24h", "30d", "90d"], - "x-enum-name": "FunctionUsageRange", - "x-enum-keys": ["Twenty Four Hours", "Thirty Days", "Ninety Days"], - "default": "30d", - "in": "query" - } - ] - } - }, - "/functions/{functionId}/variables": { - "get": { - "summary": "List variables", - "operationId": "functionsListVariables", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get a list of all variables of a specific function.", - "responses": { - "200": { - "description": "Variables List", - "schema": { - "$ref": "#/definitions/variableList" - } - } - }, - "x-appwrite": { - "method": "listVariables", - "weight": 310, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/list-variables.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-variables.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 unique ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - } - ] - }, - "post": { - "summary": "Create variable", - "operationId": "functionsCreateVariable", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", - "responses": { - "201": { - "description": "Variable", - "schema": { - "$ref": "#/definitions/variable" - } - } - }, - "x-appwrite": { - "method": "createVariable", - "weight": 309, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/create-variable.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/create-variable.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 unique ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "default": null, - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "default": null, - "x-example": "<VALUE>" - } - }, - "required": ["key", "value"] - } - } - ] - } - }, - "/functions/{functionId}/variables/{variableId}": { - "get": { - "summary": "Get variable", - "operationId": "functionsGetVariable", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get a variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "schema": { - "$ref": "#/definitions/variable" - } - } - }, - "x-appwrite": { - "method": "getVariable", - "weight": 311, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/get-variable.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/get-variable.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 unique ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update variable", - "operationId": "functionsUpdateVariable", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Update variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "schema": { - "$ref": "#/definitions/variable" - } - } - }, - "x-appwrite": { - "method": "updateVariable", - "weight": 312, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/update-variable.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/update-variable.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 unique ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "default": null, - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "default": null, - "x-example": "<VALUE>" - } - }, - "required": ["key"] - } - } - ] - }, - "delete": { - "summary": "Delete variable", - "operationId": "functionsDeleteVariable", - "consumes": ["application/json"], - "produces": [], - "tags": ["functions"], - "description": "Delete a variable by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteVariable", - "weight": 313, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/delete-variable.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/delete-variable.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 unique ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - } - ] - } - }, - "/graphql": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlQuery", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["graphql"], - "description": "Execute a GraphQL mutation.", - "responses": { - "200": { - "description": "Any", - "schema": { - "$ref": "#/definitions/any" - } - } - }, - "x-appwrite": { - "method": "query", - "weight": 331, - "cookies": false, - "type": "graphql", - "deprecated": false, - "demo": "graphql/query.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/graphql/post.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", - "platforms": ["server", "client", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "query": { - "type": "object", - "description": "The query or queries to execute.", - "default": {}, - "x-example": "{}" - } - }, - "required": ["query"] - } - } - ] - } - }, - "/graphql/mutation": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlMutation", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["graphql"], - "description": "Execute a GraphQL mutation.", - "responses": { - "200": { - "description": "Any", - "schema": { - "$ref": "#/definitions/any" - } - } - }, - "x-appwrite": { - "method": "mutation", - "weight": 330, - "cookies": false, - "type": "graphql", - "deprecated": false, - "demo": "graphql/mutation.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/graphql/post.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", - "platforms": ["server", "client", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "query": { - "type": "object", - "description": "The query or queries to execute.", - "default": {}, - "x-example": "{}" - } - }, - "required": ["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": 125, - "cookies": false, - "type": "", - "deprecated": false, - "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": 147, - "cookies": false, - "type": "", - "deprecated": false, - "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 servers are up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "schema": { - "$ref": "#/definitions/healthStatus" - } - } - }, - "x-appwrite": { - "method": "getCache", - "weight": 128, - "cookies": false, - "type": "", - "deprecated": false, - "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/certificate": { - "get": { - "summary": "Get the SSL certificate for a domain", - "operationId": "healthGetCertificate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the SSL certificate for a domain", - "responses": { - "200": { - "description": "Health Certificate", - "schema": { - "$ref": "#/definitions/healthCertificate" - } - } - }, - "x-appwrite": { - "method": "getCertificate", - "weight": 134, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-certificate.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-certificate.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": [] - } - ], - "parameters": [ - { - "name": "domain", - "description": "string", - "required": false, - "type": "string", - "in": "query" - } - ] - } - }, - "/health/db": { - "get": { - "summary": "Get DB", - "operationId": "healthGetDB", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Check the Appwrite database servers are up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "schema": { - "$ref": "#/definitions/healthStatus" - } - } - }, - "x-appwrite": { - "method": "getDB", - "weight": 127, - "cookies": false, - "type": "", - "deprecated": false, - "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/pubsub": { - "get": { - "summary": "Get pubsub", - "operationId": "healthGetPubSub", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Check the Appwrite pub-sub servers are up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "schema": { - "$ref": "#/definitions/healthStatus" - } - } - }, - "x-appwrite": { - "method": "getPubSub", - "weight": 130, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-pub-sub.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-pubsub.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": { - "get": { - "summary": "Get queue", - "operationId": "healthGetQueue", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Check the Appwrite queue messaging servers are up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "schema": { - "$ref": "#/definitions/healthStatus" - } - } - }, - "x-appwrite": { - "method": "getQueue", - "weight": 129, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue.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/builds": { - "get": { - "summary": "Get builds queue", - "operationId": "healthGetQueueBuilds", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of builds that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#/definitions/healthQueue" - } - } - }, - "x-appwrite": { - "method": "getQueueBuilds", - "weight": 136, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue-builds.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-builds.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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/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": 135, - "cookies": false, - "type": "", - "deprecated": false, - "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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/health/queue/databases": { - "get": { - "summary": "Get databases queue", - "operationId": "healthGetQueueDatabases", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#/definitions/healthQueue" - } - } - }, - "x-appwrite": { - "method": "getQueueDatabases", - "weight": 137, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue-databases.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-databases.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": [] - } - ], - "parameters": [ - { - "name": "name", - "description": "Queue name for which to check the queue size", - "required": false, - "type": "string", - "x-example": "<NAME>", - "default": "database_db_main", - "in": "query" - }, - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/health/queue/deletes": { - "get": { - "summary": "Get deletes queue", - "operationId": "healthGetQueueDeletes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#/definitions/healthQueue" - } - } - }, - "x-appwrite": { - "method": "getQueueDeletes", - "weight": 138, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue-deletes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-deletes.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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/health/queue/failed/{name}": { - "get": { - "summary": "Get number of failed queue jobs", - "operationId": "healthGetFailedJobs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Returns the amount of failed jobs in a given queue.\n", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#/definitions/healthQueue" - } - } - }, - "x-appwrite": { - "method": "getFailedJobs", - "weight": 148, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-failed-jobs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-failed-queue-jobs.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": [] - } - ], - "parameters": [ - { - "name": "name", - "description": "The name of the queue", - "required": true, - "type": "string", - "x-example": "v1-database", - "enum": [ - "v1-database", - "v1-deletes", - "v1-audits", - "v1-mails", - "v1-functions", - "v1-usage", - "v1-usage-dump", - "v1-webhooks", - "v1-certificates", - "v1-builds", - "v1-messaging", - "v1-migrations" - ], - "x-enum-name": null, - "x-enum-keys": [], - "in": "path" - }, - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/health/queue/functions": { - "get": { - "summary": "Get functions queue", - "operationId": "healthGetQueueFunctions", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#/definitions/healthQueue" - } - } - }, - "x-appwrite": { - "method": "getQueueFunctions", - "weight": 142, - "cookies": false, - "type": "", - "deprecated": false, - "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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/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": 133, - "cookies": false, - "type": "", - "deprecated": false, - "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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/health/queue/mails": { - "get": { - "summary": "Get mails queue", - "operationId": "healthGetQueueMails", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of mails that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#/definitions/healthQueue" - } - } - }, - "x-appwrite": { - "method": "getQueueMails", - "weight": 139, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue-mails.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-mails.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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/health/queue/messaging": { - "get": { - "summary": "Get messaging queue", - "operationId": "healthGetQueueMessaging", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of messages that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#/definitions/healthQueue" - } - } - }, - "x-appwrite": { - "method": "getQueueMessaging", - "weight": 140, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue-messaging.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-messaging.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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/health/queue/migrations": { - "get": { - "summary": "Get migrations queue", - "operationId": "healthGetQueueMigrations", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#/definitions/healthQueue" - } - } - }, - "x-appwrite": { - "method": "getQueueMigrations", - "weight": 141, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue-migrations.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-migrations.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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/health/queue/usage": { - "get": { - "summary": "Get usage queue", - "operationId": "healthGetQueueUsage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of metrics 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": 143, - "cookies": false, - "type": "", - "deprecated": false, - "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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/health/queue/usage-dump": { - "get": { - "summary": "Get usage dump queue", - "operationId": "healthGetQueueUsageDump", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of projects containing metrics that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#/definitions/healthQueue" - } - } - }, - "x-appwrite": { - "method": "getQueueUsageDump", - "weight": 144, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue-usage-dump.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-usage-dump.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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/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": 132, - "cookies": false, - "type": "", - "deprecated": false, - "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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/health/storage": { - "get": { - "summary": "Get storage", - "operationId": "healthGetStorage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Check the Appwrite storage device is up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "schema": { - "$ref": "#/definitions/healthStatus" - } - } - }, - "x-appwrite": { - "method": "getStorage", - "weight": 146, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-storage.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-storage.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": 145, - "cookies": false, - "type": "", - "deprecated": false, - "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": 131, - "cookies": false, - "type": "", - "deprecated": false, - "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": 117, - "cookies": false, - "type": "", - "deprecated": false, - "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/codes": { - "get": { - "summary": "List locale codes", - "operationId": "localeListCodes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["locale"], - "description": "List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).", - "responses": { - "200": { - "description": "Locale codes list", - "schema": { - "$ref": "#/definitions/localeCodeList" - } - } - }, - "x-appwrite": { - "method": "listCodes", - "weight": 118, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "locale/list-codes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/list-locale-codes.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": "localeListContinents", - "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": "listContinents", - "weight": 122, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "locale/list-continents.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/list-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": "localeListCountries", - "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": "listCountries", - "weight": 119, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "locale/list-countries.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/list-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": "localeListCountriesEU", - "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": "listCountriesEU", - "weight": 120, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "locale/list-countries-e-u.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/list-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": "localeListCountriesPhones", - "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": "listCountriesPhones", - "weight": 121, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "locale/list-countries-phones.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/list-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": "localeListCurrencies", - "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": "listCurrencies", - "weight": 123, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "locale/list-currencies.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/list-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": "localeListLanguages", - "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": "listLanguages", - "weight": 124, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "locale/list-languages.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/list-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": [] - } - ] - } - }, - "/messaging/messages": { - "get": { - "summary": "List messages", - "operationId": "messagingListMessages", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get a list of all messages from the current Appwrite project.", - "responses": { - "200": { - "description": "Message list", - "schema": { - "$ref": "#/definitions/messageList" - } - } - }, - "x-appwrite": { - "method": "listMessages", - "weight": 384, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-messages.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-messages.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_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\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] }, - "default": [], - "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" - } - ] - } - }, - "/messaging/messages/email": { - "post": { - "summary": "Create email", - "operationId": "messagingCreateEmail", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new email message.", - "responses": { - "201": { - "description": "Message", - "schema": { - "$ref": "#/definitions/message" + "post": { + "summary": "Create collection", + "operationId": "databasesCreateCollection", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Collection", + "schema": { + "$ref": "#\/definitions\/collection" + } + } + }, + "x-appwrite": { + "method": "createCollection", + "weight": 75, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "collectionId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "collectionId", + "name" + ] + } + } + ] } - } }, - "x-appwrite": { - "method": "createEmail", - "weight": 381, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-email.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<MESSAGE_ID>" - }, - "subject": { - "type": "string", - "description": "Email Subject.", - "default": null, - "x-example": "<SUBJECT>" - }, - "content": { - "type": "string", - "description": "Email Content.", - "default": null, - "x-example": "<CONTENT>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "cc": { - "type": "array", - "description": "Array of target IDs to be added as CC.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "bcc": { - "type": "array", - "description": "Array of target IDs to be added as BCC.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "attachments": { - "type": "array", - "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": false, - "x-example": false - }, - "html": { - "type": "boolean", - "description": "Is content of type HTML", - "default": false, - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": null - } - }, - "required": ["messageId", "subject", "content"] - } - } - ] - } - }, - "/messaging/messages/email/{messageId}": { - "patch": { - "summary": "Update email", - "operationId": "messagingUpdateEmail", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "responses": { - "200": { - "description": "Message", - "schema": { - "$ref": "#/definitions/message" - } - } - }, - "x-appwrite": { - "method": "updateEmail", - "weight": 388, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-email.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "subject": { - "type": "string", - "description": "Email Subject.", - "default": null, - "x-example": "<SUBJECT>" - }, - "content": { - "type": "string", - "description": "Email Content.", - "default": null, - "x-example": "<CONTENT>" - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": null, - "x-example": false - }, - "html": { - "type": "boolean", - "description": "Is content of type HTML", - "default": null, - "x-example": false - }, - "cc": { - "type": "array", - "description": "Array of target IDs to be added as CC.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "bcc": { - "type": "array", - "description": "Array of target IDs to be added as BCC.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": null - }, - "attachments": { - "type": "array", - "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - } - } - } - } - ] - } - }, - "/messaging/messages/push": { - "post": { - "summary": "Create push notification", - "operationId": "messagingCreatePush", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new push notification.", - "responses": { - "201": { - "description": "Message", - "schema": { - "$ref": "#/definitions/message" - } - } - }, - "x-appwrite": { - "method": "createPush", - "weight": 383, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-push.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-push.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<MESSAGE_ID>" - }, - "title": { - "type": "string", - "description": "Title for push notification.", - "default": "", - "x-example": "<TITLE>" - }, - "body": { - "type": "string", - "description": "Body for push notification.", - "default": "", - "x-example": "<BODY>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "data": { - "type": "object", - "description": "Additional key-value pair data for push notification.", - "default": {}, - "x-example": "{}" - }, - "action": { - "type": "string", - "description": "Action for push notification.", - "default": "", - "x-example": "<ACTION>" - }, - "image": { - "type": "string", - "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", - "default": "", - "x-example": "[ID1:ID2]" - }, - "icon": { - "type": "string", - "description": "Icon for push notification. Available only for Android and Web Platform.", - "default": "", - "x-example": "<ICON>" - }, - "sound": { - "type": "string", - "description": "Sound for push notification. Available only for Android and iOS Platform.", - "default": "", - "x-example": "<SOUND>" - }, - "color": { - "type": "string", - "description": "Color for push notification. Available only for Android Platform.", - "default": "", - "x-example": "<COLOR>" - }, - "tag": { - "type": "string", - "description": "Tag for push notification. Available only for Android Platform.", - "default": "", - "x-example": "<TAG>" - }, - "badge": { - "type": "integer", - "description": "Badge for push notification. Available only for iOS Platform.", - "default": -1, - "x-example": null - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": false, - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": null - }, - "contentAvailable": { - "type": "boolean", - "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", - "default": false, - "x-example": false - }, - "critical": { - "type": "boolean", - "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", - "default": false, - "x-example": false - }, - "priority": { - "type": "string", - "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", - "default": "high", - "x-example": "normal", - "enum": ["normal", "high"], - "x-enum-name": "MessagePriority", - "x-enum-keys": [] - } - }, - "required": ["messageId"] - } - } - ] - } - }, - "/messaging/messages/push/{messageId}": { - "patch": { - "summary": "Update push notification", - "operationId": "messagingUpdatePush", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "responses": { - "200": { - "description": "Message", - "schema": { - "$ref": "#/definitions/message" - } - } - }, - "x-appwrite": { - "method": "updatePush", - "weight": 390, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-push.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-push.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "title": { - "type": "string", - "description": "Title for push notification.", - "default": null, - "x-example": "<TITLE>" - }, - "body": { - "type": "string", - "description": "Body for push notification.", - "default": null, - "x-example": "<BODY>" - }, - "data": { - "type": "object", - "description": "Additional Data for push notification.", - "default": {}, - "x-example": "{}" - }, - "action": { - "type": "string", - "description": "Action for push notification.", - "default": null, - "x-example": "<ACTION>" - }, - "image": { - "type": "string", - "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", - "default": null, - "x-example": "[ID1:ID2]" - }, - "icon": { - "type": "string", - "description": "Icon for push notification. Available only for Android and Web platforms.", - "default": null, - "x-example": "<ICON>" - }, - "sound": { - "type": "string", - "description": "Sound for push notification. Available only for Android and iOS platforms.", - "default": null, - "x-example": "<SOUND>" - }, - "color": { - "type": "string", - "description": "Color for push notification. Available only for Android platforms.", - "default": null, - "x-example": "<COLOR>" - }, - "tag": { - "type": "string", - "description": "Tag for push notification. Available only for Android platforms.", - "default": null, - "x-example": "<TAG>" - }, - "badge": { - "type": "integer", - "description": "Badge for push notification. Available only for iOS platforms.", - "default": null, - "x-example": null - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": null, - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": null - }, - "contentAvailable": { - "type": "boolean", - "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", - "default": null, - "x-example": false - }, - "critical": { - "type": "boolean", - "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", - "default": null, - "x-example": false - }, - "priority": { - "type": "string", - "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", - "default": null, - "x-example": "normal", - "enum": ["normal", "high"], - "x-enum-name": "MessagePriority", - "x-enum-keys": [] - } - } - } - } - ] - } - }, - "/messaging/messages/sms": { - "post": { - "summary": "Create SMS", - "operationId": "messagingCreateSms", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new SMS message.", - "responses": { - "201": { - "description": "Message", - "schema": { - "$ref": "#/definitions/message" - } - } - }, - "x-appwrite": { - "method": "createSms", - "weight": 382, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-sms.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-sms.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<MESSAGE_ID>" - }, - "content": { - "type": "string", - "description": "SMS Content.", - "default": null, - "x-example": "<CONTENT>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": false, - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": null - } - }, - "required": ["messageId", "content"] - } - } - ] - } - }, - "/messaging/messages/sms/{messageId}": { - "patch": { - "summary": "Update SMS", - "operationId": "messagingUpdateSms", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update an SMS message by its unique ID.\n", - "responses": { - "200": { - "description": "Message", - "schema": { - "$ref": "#/definitions/message" - } - } - }, - "x-appwrite": { - "method": "updateSms", - "weight": 389, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-sms.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-sms.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "content": { - "type": "string", - "description": "Email Content.", - "default": null, - "x-example": "<CONTENT>" - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": null, - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": null - } - } - } - } - ] - } - }, - "/messaging/messages/{messageId}": { - "get": { - "summary": "Get message", - "operationId": "messagingGetMessage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get a message by its unique ID.\n", - "responses": { - "200": { - "description": "Message", - "schema": { - "$ref": "#/definitions/message" - } - } - }, - "x-appwrite": { - "method": "getMessage", - "weight": 387, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/get-message.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/get-message.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete message", - "operationId": "messagingDelete", - "consumes": ["application/json"], - "produces": [], - "tags": ["messaging"], - "description": "Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "delete", - "weight": 391, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/delete.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/delete-message.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - } - ] - } - }, - "/messaging/messages/{messageId}/logs": { - "get": { - "summary": "List message logs", - "operationId": "messagingListMessageLogs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get the message activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#/definitions/logList" - } - } - }, - "x-appwrite": { - "method": "listMessageLogs", - "weight": 385, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-message-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-message-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_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/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "\/databases\/{databaseId}\/collections\/{collectionId}": { + "get": { + "summary": "Get collection", + "operationId": "databasesGetCollection", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "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": 77, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/get-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + } + ] }, - "default": [], - "in": "query" - } - ] - } - }, - "/messaging/messages/{messageId}/targets": { - "get": { - "summary": "List message targets", - "operationId": "messagingListTargets", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get a list of the targets associated with a message.", - "responses": { - "200": { - "description": "Target list", - "schema": { - "$ref": "#/definitions/targetList" - } - } - }, - "x-appwrite": { - "method": "listTargets", - "weight": 386, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-targets.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-message-targets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "put": { + "summary": "Update collection", + "operationId": "databasesUpdateCollection", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "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": "", + "deprecated": false, + "demo": "databases\/update-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] }, - "default": [], - "in": "query" - } - ] - } - }, - "/messaging/providers": { - "get": { - "summary": "List providers", - "operationId": "messagingListProviders", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get a list of all providers from the current Appwrite project.", - "responses": { - "200": { - "description": "Provider list", - "schema": { - "$ref": "#/definitions/providerList" + "delete": { + "summary": "Delete collection", + "operationId": "databasesDeleteCollection", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "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": "", + "deprecated": false, + "demo": "databases\/delete-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + } + ] } - } }, - "x-appwrite": { - "method": "listProviders", - "weight": 356, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-providers.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-providers.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes": { + "get": { + "summary": "List attributes", + "operationId": "databasesListAttributes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Attributes List", + "schema": { + "$ref": "#\/definitions\/attributeList" + } + } + }, + "x-appwrite": { + "method": "listAttributes", + "weight": 91, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/list-attributes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean": { + "post": { + "summary": "Create boolean attribute", + "operationId": "databasesCreateBooleanAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a boolean attribute.\n", + "responses": { + "202": { + "description": "AttributeBoolean", + "schema": { + "$ref": "#\/definitions\/attributeBoolean" + } + } + }, + "x-appwrite": { + "method": "createBooleanAttribute", + "weight": 88, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-boolean-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean\/{key}": { + "patch": { + "summary": "Update boolean attribute", + "operationId": "databasesUpdateBooleanAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a boolean attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeBoolean", + "schema": { + "$ref": "#\/definitions\/attributeBoolean" + } + } + }, + "x-appwrite": { + "method": "updateBooleanAttribute", + "weight": 100, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-boolean-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "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, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime": { + "post": { + "summary": "Create datetime attribute", + "operationId": "databasesCreateDatetimeAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a date time attribute according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "AttributeDatetime", + "schema": { + "$ref": "#\/definitions\/attributeDatetime" + } + } + }, + "x-appwrite": { + "method": "createDatetimeAttribute", + "weight": 89, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-datetime-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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 the attribute in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime attribute", + "operationId": "databasesUpdateDatetimeAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a date time attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeDatetime", + "schema": { + "$ref": "#\/definitions\/attributeDatetime" + } + } + }, + "x-appwrite": { + "method": "updateDatetimeAttribute", + "weight": 101, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-datetime-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "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, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email": { + "post": { + "summary": "Create email attribute", + "operationId": "databasesCreateEmailAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create an email attribute.\n", + "responses": { + "202": { + "description": "AttributeEmail", + "schema": { + "$ref": "#\/definitions\/attributeEmail" + } + } + }, + "x-appwrite": { + "method": "createEmailAttribute", + "weight": 82, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-email-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email\/{key}": { + "patch": { + "summary": "Update email attribute", + "operationId": "databasesUpdateEmailAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeEmail", + "schema": { + "$ref": "#\/definitions\/attributeEmail" + } + } + }, + "x-appwrite": { + "method": "updateEmailAttribute", + "weight": 94, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-email-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "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", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum": { + "post": { + "summary": "Create enum attribute", + "operationId": "databasesCreateEnumAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "responses": { + "202": { + "description": "AttributeEnum", + "schema": { + "$ref": "#\/definitions\/attributeEnum" + } + } + }, + "x-appwrite": { + "method": "createEnumAttribute", + "weight": 83, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-enum-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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 255 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>" + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum\/{key}": { + "patch": { + "summary": "Update enum attribute", + "operationId": "databasesUpdateEnumAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeEnum", + "schema": { + "$ref": "#\/definitions\/attributeEnum" + } + } + }, + "x-appwrite": { + "method": "updateEnumAttribute", + "weight": 95, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-enum-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "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 255 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>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float": { + "post": { + "summary": "Create float attribute", + "operationId": "databasesCreateFloatAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "AttributeFloat", + "schema": { + "$ref": "#\/definitions\/attributeFloat" + } + } + }, + "x-appwrite": { + "method": "createFloatAttribute", + "weight": 87, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-float-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value to enforce on new documents", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value to enforce on new documents", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float\/{key}": { + "patch": { + "summary": "Update float attribute", + "operationId": "databasesUpdateFloatAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeFloat", + "schema": { + "$ref": "#\/definitions\/attributeFloat" + } + } + }, + "x-appwrite": { + "method": "updateFloatAttribute", + "weight": 99, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-float-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "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, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "min", + "max", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer": { + "post": { + "summary": "Create integer attribute", + "operationId": "databasesCreateIntegerAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "AttributeInteger", + "schema": { + "$ref": "#\/definitions\/attributeInteger" + } + } + }, + "x-appwrite": { + "method": "createIntegerAttribute", + "weight": 86, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-integer-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce on new documents", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce on new documents", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer\/{key}": { + "patch": { + "summary": "Update integer attribute", + "operationId": "databasesUpdateIntegerAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeInteger", + "schema": { + "$ref": "#\/definitions\/attributeInteger" + } + } + }, + "x-appwrite": { + "method": "updateIntegerAttribute", + "weight": 98, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-integer-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "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, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "min", + "max", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip": { + "post": { + "summary": "Create IP address attribute", + "operationId": "databasesCreateIpAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create IP address attribute.\n", + "responses": { + "202": { + "description": "AttributeIP", + "schema": { + "$ref": "#\/definitions\/attributeIp" + } + } + }, + "x-appwrite": { + "method": "createIpAttribute", + "weight": 84, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-ip-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip\/{key}": { + "patch": { + "summary": "Update IP address attribute", + "operationId": "databasesUpdateIpAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeIP", + "schema": { + "$ref": "#\/definitions\/attributeIp" + } + } + }, + "x-appwrite": { + "method": "updateIpAttribute", + "weight": 96, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-ip-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "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, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship": { + "post": { + "summary": "Create relationship attribute", + "operationId": "databasesCreateRelationshipAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", + "responses": { + "202": { + "description": "AttributeRelationship", + "schema": { + "$ref": "#\/definitions\/attributeRelationship" + } + } + }, + "x-appwrite": { + "method": "createRelationshipAttribute", + "weight": 90, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-relationship-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "relatedCollectionId": { + "type": "string", + "description": "Related Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "default": null, + "x-example": "<RELATED_COLLECTION_ID>" + }, + "type": { + "type": "string", + "description": "Relation type", + "default": null, + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "default": false, + "x-example": false + }, + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Attribute Key.", + "default": null, + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": "restrict", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedCollectionId", + "type" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string": { + "post": { + "summary": "Create string attribute", + "operationId": "databasesCreateStringAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a string attribute.\n", + "responses": { + "202": { + "description": "AttributeString", + "schema": { + "$ref": "#\/definitions\/attributeString" + } + } + }, + "x-appwrite": { + "method": "createStringAttribute", + "weight": 81, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-string-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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 + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string\/{key}": { + "patch": { + "summary": "Update string attribute", + "operationId": "databasesUpdateStringAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeString", + "schema": { + "$ref": "#\/definitions\/attributeString" + } + } + }, + "x-appwrite": { + "method": "updateStringAttribute", + "weight": 93, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-string-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "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>", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string attribute.", + "default": null, + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url": { + "post": { + "summary": "Create URL attribute", + "operationId": "databasesCreateUrlAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a URL attribute.\n", + "responses": { + "202": { + "description": "AttributeURL", + "schema": { + "$ref": "#\/definitions\/attributeUrl" + } + } + }, + "x-appwrite": { + "method": "createUrlAttribute", + "weight": 85, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-url-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url\/{key}": { + "patch": { + "summary": "Update URL attribute", + "operationId": "databasesUpdateUrlAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeURL", + "schema": { + "$ref": "#\/definitions\/attributeUrl" + } + } + }, + "x-appwrite": { + "method": "updateUrlAttribute", + "weight": 97, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-url-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "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", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}": { + "get": { + "summary": "Get attribute", + "operationId": "databasesGetAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get attribute by ID.", + "responses": { + "200": { + "description": "AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeRelationship, 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\/attributeDatetime" + }, + { + "$ref": "#\/definitions\/attributeRelationship" + }, + { + "$ref": "#\/definitions\/attributeString" + } + ] + } + } + }, + "x-appwrite": { + "method": "getAttribute", + "weight": 92, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/get-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + } + ] }, - "default": [], - "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" - } - ] - } - }, - "/messaging/providers/apns": { - "post": { - "summary": "Create APNS provider", - "operationId": "messagingCreateApnsProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new Apple Push Notification service provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" + "delete": { + "summary": "Delete attribute", + "operationId": "databasesDeleteAttribute", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "description": "Deletes an attribute.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteAttribute", + "weight": 103, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + } + ] } - } }, - "x-appwrite": { - "method": "createApnsProvider", - "weight": 355, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-apns-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-apns-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}\/relationship": { + "patch": { + "summary": "Update relationship attribute", + "operationId": "databasesUpdateRelationshipAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", + "responses": { + "200": { + "description": "AttributeRelationship", + "schema": { + "$ref": "#\/definitions\/attributeRelationship" + } + } }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" + "x-appwrite": { + "method": "updateRelationshipAttribute", + "weight": 102, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-relationship-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "authKey": { - "type": "string", - "description": "APNS authentication key.", - "default": "", - "x-example": "<AUTH_KEY>" - }, - "authKeyId": { - "type": "string", - "description": "APNS authentication key ID.", - "default": "", - "x-example": "<AUTH_KEY_ID>" - }, - "teamId": { - "type": "string", - "description": "APNS team ID.", - "default": "", - "x-example": "<TEAM_ID>" - }, - "bundleId": { - "type": "string", - "description": "APNS bundle ID.", - "default": "", - "x-example": "<BUNDLE_ID>" - }, - "sandbox": { - "type": "boolean", - "description": "Use APNS sandbox environment.", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - } - }, - "required": ["providerId", "name"] + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": null, + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null + } + } + } + } + ] } - } - ] - } - }, - "/messaging/providers/apns/{providerId}": { - "patch": { - "summary": "Update APNS provider", - "operationId": "messagingUpdateApnsProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a Apple Push Notification service provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } }, - "x-appwrite": { - "method": "updateApnsProvider", - "weight": 368, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-apns-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-apns-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - }, - "authKey": { - "type": "string", - "description": "APNS authentication key.", - "default": "", - "x-example": "<AUTH_KEY>" - }, - "authKeyId": { - "type": "string", - "description": "APNS authentication key ID.", - "default": "", - "x-example": "<AUTH_KEY_ID>" - }, - "teamId": { - "type": "string", - "description": "APNS team ID.", - "default": "", - "x-example": "<TEAM_ID>" - }, - "bundleId": { - "type": "string", - "description": "APNS bundle ID.", - "default": "", - "x-example": "<BUNDLE_ID>" - }, - "sandbox": { - "type": "boolean", - "description": "Use APNS sandbox environment.", - "default": null, - "x-example": false - } - } - } - } - ] - } - }, - "/messaging/providers/fcm": { - "post": { - "summary": "Create FCM provider", - "operationId": "messagingCreateFcmProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new Firebase Cloud Messaging provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "createFcmProvider", - "weight": 354, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-fcm-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-fcm-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "serviceAccountJSON": { - "type": "object", - "description": "FCM service account JSON.", - "default": {}, - "x-example": "{}" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - ] - } - }, - "/messaging/providers/fcm/{providerId}": { - "patch": { - "summary": "Update FCM provider", - "operationId": "messagingUpdateFcmProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a Firebase Cloud Messaging provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "updateFcmProvider", - "weight": 367, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-fcm-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-fcm-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - }, - "serviceAccountJSON": { - "type": "object", - "description": "FCM service account JSON.", - "default": {}, - "x-example": "{}" - } - } - } - } - ] - } - }, - "/messaging/providers/mailgun": { - "post": { - "summary": "Create Mailgun provider", - "operationId": "messagingCreateMailgunProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new Mailgun provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "createMailgunProvider", - "weight": 346, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-mailgun-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-mailgun-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Mailgun API Key.", - "default": "", - "x-example": "<API_KEY>" - }, - "domain": { - "type": "string", - "description": "Mailgun Domain.", - "default": "", - "x-example": "<DOMAIN>" - }, - "isEuRegion": { - "type": "boolean", - "description": "Set as EU region.", - "default": null, - "x-example": false - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well.", - "default": "", - "x-example": "email@example.com" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - ] - } - }, - "/messaging/providers/mailgun/{providerId}": { - "patch": { - "summary": "Update Mailgun provider", - "operationId": "messagingUpdateMailgunProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a Mailgun provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "updateMailgunProvider", - "weight": 359, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-mailgun-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-mailgun-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Mailgun API Key.", - "default": "", - "x-example": "<API_KEY>" - }, - "domain": { - "type": "string", - "description": "Mailgun Domain.", - "default": "", - "x-example": "<DOMAIN>" - }, - "isEuRegion": { - "type": "boolean", - "description": "Set as EU region.", - "default": null, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "default": "", - "x-example": "<REPLY_TO_EMAIL>" - } - } - } - } - ] - } - }, - "/messaging/providers/msg91": { - "post": { - "summary": "Create Msg91 provider", - "operationId": "messagingCreateMsg91Provider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new MSG91 provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "createMsg91Provider", - "weight": 349, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-msg91provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-msg91-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "templateId": { - "type": "string", - "description": "Msg91 template ID", - "default": "", - "x-example": "<TEMPLATE_ID>" - }, - "senderId": { - "type": "string", - "description": "Msg91 sender ID.", - "default": "", - "x-example": "<SENDER_ID>" - }, - "authKey": { - "type": "string", - "description": "Msg91 auth key.", - "default": "", - "x-example": "<AUTH_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - ] - } - }, - "/messaging/providers/msg91/{providerId}": { - "patch": { - "summary": "Update Msg91 provider", - "operationId": "messagingUpdateMsg91Provider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a MSG91 provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "updateMsg91Provider", - "weight": 362, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-msg91provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-msg91-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - }, - "templateId": { - "type": "string", - "description": "Msg91 template ID.", - "default": "", - "x-example": "<TEMPLATE_ID>" - }, - "senderId": { - "type": "string", - "description": "Msg91 sender ID.", - "default": "", - "x-example": "<SENDER_ID>" - }, - "authKey": { - "type": "string", - "description": "Msg91 auth key.", - "default": "", - "x-example": "<AUTH_KEY>" - } - } - } - } - ] - } - }, - "/messaging/providers/sendgrid": { - "post": { - "summary": "Create Sendgrid provider", - "operationId": "messagingCreateSendgridProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new Sendgrid provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "createSendgridProvider", - "weight": 347, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-sendgrid-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-sendgrid-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Sendgrid API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "default": "", - "x-example": "email@example.com" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - ] - } - }, - "/messaging/providers/sendgrid/{providerId}": { - "patch": { - "summary": "Update Sendgrid provider", - "operationId": "messagingUpdateSendgridProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a Sendgrid provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "updateSendgridProvider", - "weight": 360, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-sendgrid-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-sendgrid-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - }, - "apiKey": { - "type": "string", - "description": "Sendgrid API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com" - }, - "replyToName": { - "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "default": "", - "x-example": "<REPLY_TO_EMAIL>" - } - } - } - } - ] - } - }, - "/messaging/providers/smtp": { - "post": { - "summary": "Create SMTP provider", - "operationId": "messagingCreateSmtpProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new SMTP provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "createSmtpProvider", - "weight": 348, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-smtp-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-smtp-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "host": { - "type": "string", - "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465\"`. Hosts will be tried in order.", - "default": null, - "x-example": "<HOST>" - }, - "port": { - "type": "integer", - "description": "The default SMTP server port.", - "default": 587, - "x-example": 1 - }, - "username": { - "type": "string", - "description": "Authentication username.", - "default": "", - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "Authentication password.", - "default": "", - "x-example": "<PASSWORD>" - }, - "encryption": { - "type": "string", - "description": "Encryption type. Can be omitted, 'ssl', or 'tls'", - "default": "", - "x-example": "none", - "enum": ["none", "ssl", "tls"], - "x-enum-name": "SmtpEncryption", - "x-enum-keys": [] - }, - "autoTLS": { - "type": "boolean", - "description": "Enable SMTP AutoTLS feature.", - "default": true, - "x-example": false - }, - "mailer": { - "type": "string", - "description": "The value to use for the X-Mailer header.", - "default": "", - "x-example": "<MAILER>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "default": "", - "x-example": "email@example.com" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - } - }, - "required": ["providerId", "name", "host"] - } - } - ] - } - }, - "/messaging/providers/smtp/{providerId}": { - "patch": { - "summary": "Update SMTP provider", - "operationId": "messagingUpdateSmtpProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a SMTP provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "updateSmtpProvider", - "weight": 361, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-smtp-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-smtp-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "host": { - "type": "string", - "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465\"`. Hosts will be tried in order.", - "default": "", - "x-example": "<HOST>" - }, - "port": { - "type": "integer", - "description": "SMTP port.", - "default": null, - "x-example": 1 - }, - "username": { - "type": "string", - "description": "Authentication username.", - "default": "", - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "Authentication password.", - "default": "", - "x-example": "<PASSWORD>" - }, - "encryption": { - "type": "string", - "description": "Encryption type. Can be 'ssl' or 'tls'", - "default": "", - "x-example": "none", - "enum": ["none", "ssl", "tls"], - "x-enum-name": "SmtpEncryption", - "x-enum-keys": [] - }, - "autoTLS": { - "type": "boolean", - "description": "Enable SMTP AutoTLS feature.", - "default": null, - "x-example": false - }, - "mailer": { - "type": "string", - "description": "The value to use for the X-Mailer header.", - "default": "", - "x-example": "<MAILER>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com" - }, - "replyToName": { - "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "default": "", - "x-example": "<REPLY_TO_EMAIL>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - } - } - } - } - ] - } - }, - "/messaging/providers/telesign": { - "post": { - "summary": "Create Telesign provider", - "operationId": "messagingCreateTelesignProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new Telesign provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "createTelesignProvider", - "weight": 350, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-telesign-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-telesign-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100" - }, - "customerId": { - "type": "string", - "description": "Telesign customer ID.", - "default": "", - "x-example": "<CUSTOMER_ID>" - }, - "apiKey": { - "type": "string", - "description": "Telesign API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - ] - } - }, - "/messaging/providers/telesign/{providerId}": { - "patch": { - "summary": "Update Telesign provider", - "operationId": "messagingUpdateTelesignProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a Telesign provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "updateTelesignProvider", - "weight": 363, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-telesign-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-telesign-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - }, - "customerId": { - "type": "string", - "description": "Telesign customer ID.", - "default": "", - "x-example": "<CUSTOMER_ID>" - }, - "apiKey": { - "type": "string", - "description": "Telesign API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "default": "", - "x-example": "<FROM>" - } - } - } - } - ] - } - }, - "/messaging/providers/textmagic": { - "post": { - "summary": "Create Textmagic provider", - "operationId": "messagingCreateTextmagicProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new Textmagic provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "createTextmagicProvider", - "weight": 351, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-textmagic-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-textmagic-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100" - }, - "username": { - "type": "string", - "description": "Textmagic username.", - "default": "", - "x-example": "<USERNAME>" - }, - "apiKey": { - "type": "string", - "description": "Textmagic apiKey.", - "default": "", - "x-example": "<API_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - ] - } - }, - "/messaging/providers/textmagic/{providerId}": { - "patch": { - "summary": "Update Textmagic provider", - "operationId": "messagingUpdateTextmagicProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a Textmagic provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "updateTextmagicProvider", - "weight": 364, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-textmagic-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-textmagic-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - }, - "username": { - "type": "string", - "description": "Textmagic username.", - "default": "", - "x-example": "<USERNAME>" - }, - "apiKey": { - "type": "string", - "description": "Textmagic apiKey.", - "default": "", - "x-example": "<API_KEY>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "default": "", - "x-example": "<FROM>" - } - } - } - } - ] - } - }, - "/messaging/providers/twilio": { - "post": { - "summary": "Create Twilio provider", - "operationId": "messagingCreateTwilioProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new Twilio provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "createTwilioProvider", - "weight": 352, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-twilio-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-twilio-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100" - }, - "accountSid": { - "type": "string", - "description": "Twilio account secret ID.", - "default": "", - "x-example": "<ACCOUNT_SID>" - }, - "authToken": { - "type": "string", - "description": "Twilio authentication token.", - "default": "", - "x-example": "<AUTH_TOKEN>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - ] - } - }, - "/messaging/providers/twilio/{providerId}": { - "patch": { - "summary": "Update Twilio provider", - "operationId": "messagingUpdateTwilioProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a Twilio provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "updateTwilioProvider", - "weight": 365, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-twilio-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-twilio-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - }, - "accountSid": { - "type": "string", - "description": "Twilio account secret ID.", - "default": "", - "x-example": "<ACCOUNT_SID>" - }, - "authToken": { - "type": "string", - "description": "Twilio authentication token.", - "default": "", - "x-example": "<AUTH_TOKEN>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "default": "", - "x-example": "<FROM>" - } - } - } - } - ] - } - }, - "/messaging/providers/vonage": { - "post": { - "summary": "Create Vonage provider", - "operationId": "messagingCreateVonageProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new Vonage provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "createVonageProvider", - "weight": 353, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-vonage-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-vonage-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100" - }, - "apiKey": { - "type": "string", - "description": "Vonage API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "apiSecret": { - "type": "string", - "description": "Vonage API secret.", - "default": "", - "x-example": "<API_SECRET>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - ] - } - }, - "/messaging/providers/vonage/{providerId}": { - "patch": { - "summary": "Update Vonage provider", - "operationId": "messagingUpdateVonageProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a Vonage provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "updateVonageProvider", - "weight": 366, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-vonage-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-vonage-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - }, - "apiKey": { - "type": "string", - "description": "Vonage API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "apiSecret": { - "type": "string", - "description": "Vonage API secret.", - "default": "", - "x-example": "<API_SECRET>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "default": "", - "x-example": "<FROM>" - } - } - } - } - ] - } - }, - "/messaging/providers/{providerId}": { - "get": { - "summary": "Get provider", - "operationId": "messagingGetProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get a provider by its unique ID.\n", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "getProvider", - "weight": 358, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/get-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/get-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete provider", - "operationId": "messagingDeleteProvider", - "consumes": ["application/json"], - "produces": [], - "tags": ["messaging"], - "description": "Delete a provider by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteProvider", - "weight": 369, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/delete-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/delete-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - } - ] - } - }, - "/messaging/providers/{providerId}/logs": { - "get": { - "summary": "List provider logs", - "operationId": "messagingListProviderLogs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get the provider activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#/definitions/logList" - } - } - }, - "x-appwrite": { - "method": "listProviderLogs", - "weight": 357, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-provider-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-provider-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_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/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "databasesListDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "x-appwrite": { + "method": "listDocuments", + "weight": 109, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/list-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] }, - "default": [], - "in": "query" - } - ] - } - }, - "/messaging/subscribers/{subscriberId}/logs": { - "get": { - "summary": "List subscriber logs", - "operationId": "messagingListSubscriberLogs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get the subscriber activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#/definitions/logList" + "post": { + "summary": "Create document", + "operationId": "databasesCreateDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "x-appwrite": { + "method": "createDocument", + "weight": 108, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). 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 a custom ID or generate a random ID with `ID.unique()`. Valid 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": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + }, + "required": [ + "documentId", + "data" + ] + } + } + ] } - } }, - "x-appwrite": { - "method": "listSubscriberLogs", - "weight": 378, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-subscriber-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-subscriber-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "type": "string", - "x-example": "<SUBSCRIBER_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/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "databasesGetDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "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": 110, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/get-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] }, - "default": [], - "in": "query" - } - ] - } - }, - "/messaging/topics": { - "get": { - "summary": "List topics", - "operationId": "messagingListTopics", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get a list of all topics from the current Appwrite project.", - "responses": { - "200": { - "description": "Topic list", - "schema": { - "$ref": "#/definitions/topicList" - } - } - }, - "x-appwrite": { - "method": "listTopics", - "weight": 371, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-topics.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-topics.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "patch": { + "summary": "Update document", + "operationId": "databasesUpdateDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "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": 112, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] }, - "default": [], - "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" - } - ] - }, - "post": { - "summary": "Create topic", - "operationId": "messagingCreateTopic", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new topic.", - "responses": { - "201": { - "description": "Topic", - "schema": { - "$ref": "#/definitions/topic" - } - } - }, - "x-appwrite": { - "method": "createTopic", - "weight": 370, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-topic.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "topicId": { - "type": "string", - "description": "Topic ID. Choose a custom Topic ID or a new Topic ID.", - "default": null, - "x-example": "<TOPIC_ID>" + "delete": { + "summary": "Delete document", + "operationId": "databasesDeleteDocument", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } }, - "name": { - "type": "string", - "description": "Topic Name.", - "default": null, - "x-example": "<NAME>" + "x-appwrite": { + "method": "deleteDocument", + "weight": 113, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "subscribe": { - "type": "array", - "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "default": ["users"], - "x-example": "[\"any\"]", - "items": { - "type": "string" - } - } - }, - "required": ["topicId", "name"] + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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" + } + ] } - } - ] - } - }, - "/messaging/topics/{topicId}": { - "get": { - "summary": "Get topic", - "operationId": "messagingGetTopic", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get a topic by its unique ID.\n", - "responses": { - "200": { - "description": "Topic", - "schema": { - "$ref": "#/definitions/topic" - } - } }, - "x-appwrite": { - "method": "getTopic", - "weight": 373, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/get-topic.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/get-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update topic", - "operationId": "messagingUpdateTopic", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a topic by its unique ID.\n", - "responses": { - "200": { - "description": "Topic", - "schema": { - "$ref": "#/definitions/topic" - } - } - }, - "x-appwrite": { - "method": "updateTopic", - "weight": 374, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-topic.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Topic Name.", - "default": null, - "x-example": "<NAME>" + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/logs": { + "get": { + "summary": "List document logs", + "operationId": "databasesListDocumentLogs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get the document activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } }, - "subscribe": { - "type": "array", - "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "default": null, - "x-example": "[\"any\"]", - "items": { - "type": "string" - } - } - } + "x-appwrite": { + "method": "listDocumentLogs", + "weight": 111, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/list-document-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] } - } - ] - }, - "delete": { - "summary": "Delete topic", - "operationId": "messagingDeleteTopic", - "consumes": ["application/json"], - "produces": [], - "tags": ["messaging"], - "description": "Delete a topic by its unique ID.", - "responses": { - "204": { - "description": "No content" - } }, - "x-appwrite": { - "method": "deleteTopic", - "weight": 375, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/delete-topic.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/delete-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - } - ] - } - }, - "/messaging/topics/{topicId}/logs": { - "get": { - "summary": "List topic logs", - "operationId": "messagingListTopicLogs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get the topic activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#/definitions/logList" - } - } - }, - "x-appwrite": { - "method": "listTopicLogs", - "weight": 372, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-topic-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-topic-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "type": "string", - "x-example": "<TOPIC_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/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "databasesListIndexes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Indexes List", + "schema": { + "$ref": "#\/definitions\/indexList" + } + } + }, + "x-appwrite": { + "method": "listIndexes", + "weight": 105, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] }, - "default": [], - "in": "query" - } - ] - } - }, - "/messaging/topics/{topicId}/subscribers": { - "get": { - "summary": "List subscribers", - "operationId": "messagingListSubscribers", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get a list of all subscribers from the current Appwrite project.", - "responses": { - "200": { - "description": "Subscriber list", - "schema": { - "$ref": "#/definitions/subscriberList" + "post": { + "summary": "Create index", + "operationId": "databasesCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/index" + } + } + }, + "x-appwrite": { + "method": "createIndex", + "weight": 104, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "IndexType", + "x-enum-keys": [] + }, + "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" + ] + } + } + ] } - } }, - "x-appwrite": { - "method": "listSubscribers", - "weight": 377, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-subscribers.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-subscribers.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "type": "string", - "x-example": "<TOPIC_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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "databasesGetIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/index" + } + } + }, + "x-appwrite": { + "method": "getIndex", + "weight": 106, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] }, - "default": [], - "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" - } - ] - }, - "post": { - "summary": "Create subscriber", - "operationId": "messagingCreateSubscriber", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new subscriber.", - "responses": { - "201": { - "description": "Subscriber", - "schema": { - "$ref": "#/definitions/subscriber" - } - } - }, - "x-appwrite": { - "method": "createSubscriber", - "weight": 376, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-subscriber.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", - "platforms": ["server", "client", "console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID to subscribe to.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "subscriberId": { - "type": "string", - "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", - "default": null, - "x-example": "<SUBSCRIBER_ID>" + "delete": { + "summary": "Delete index", + "operationId": "databasesDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } }, - "targetId": { - "type": "string", - "description": "Target ID. The target ID to link to the specified Topic ID.", - "default": null, - "x-example": "<TARGET_ID>" - } - }, - "required": ["subscriberId", "targetId"] + "x-appwrite": { + "method": "deleteIndex", + "weight": 107, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] } - } - ] - } - }, - "/messaging/topics/{topicId}/subscribers/{subscriberId}": { - "get": { - "summary": "Get subscriber", - "operationId": "messagingGetSubscriber", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get a subscriber by its unique ID.\n", - "responses": { - "200": { - "description": "Subscriber", - "schema": { - "$ref": "#/definitions/subscriber" + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/logs": { + "get": { + "summary": "List collection logs", + "operationId": "databasesListCollectionLogs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "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": "", + "deprecated": false, + "demo": "databases\/list-collection-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] } - } }, - "x-appwrite": { - "method": "getSubscriber", - "weight": 379, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/get-subscriber.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/get-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - }, - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "type": "string", - "x-example": "<SUBSCRIBER_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete subscriber", - "operationId": "messagingDeleteSubscriber", - "consumes": ["application/json"], - "produces": [], - "tags": ["messaging"], - "description": "Delete a subscriber by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteSubscriber", - "weight": 380, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/delete-subscriber.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/delete-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", - "platforms": ["server", "client", "console", "server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - }, - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "type": "string", - "x-example": "<SUBSCRIBER_ID>", - "in": "path" - } - ] - } - }, - "/migrations": { - "get": { - "summary": "List migrations", - "operationId": "migrationsList", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["migrations"], - "description": "List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.", - "responses": { - "200": { - "description": "Migrations List", - "schema": { - "$ref": "#/definitions/migrationList" + "\/databases\/{databaseId}\/collections\/{collectionId}\/usage": { + "get": { + "summary": "Get collection usage stats", + "operationId": "databasesGetCollectionUsage", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageCollection", + "schema": { + "$ref": "#\/definitions\/usageCollection" + } + } + }, + "x-appwrite": { + "method": "getCollectionUsage", + "weight": 116, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/get-collection-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "DatabaseUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + } + ] } - } }, - "x-appwrite": { - "method": "list", - "weight": 338, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "migrations/list.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/migrations/list-migrations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.read", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } + "\/databases\/{databaseId}\/logs": { + "get": { + "summary": "List database logs", + "operationId": "databasesListLogs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get the database activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "x-appwrite": { + "method": "listLogs", + "weight": 72, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/list-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, statusCounters, resourceData, errors", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "\/databases\/{databaseId}\/usage": { + "get": { + "summary": "Get database usage stats", + "operationId": "databasesGetDatabaseUsage", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageDatabase", + "schema": { + "$ref": "#\/definitions\/usageDatabase" + } + } + }, + "x-appwrite": { + "method": "getDatabaseUsage", + "weight": 115, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/get-database-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "range", + "description": "`Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "DatabaseUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/functions": { + "get": { + "summary": "List functions", + "operationId": "functionsList", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a list of all the project's functions. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Functions List", + "schema": { + "$ref": "#\/definitions\/functionList" + } + } + }, + "x-appwrite": { + "method": "list", + "weight": 289, + "cookies": false, + "type": "", + "deprecated": false, + "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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] }, - "default": [], - "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" - } - ] - } - }, - "/migrations/appwrite": { - "post": { - "summary": "Migrate Appwrite data", - "operationId": "migrationsCreateAppwriteMigration", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["migrations"], - "description": "Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project. ", - "responses": { - "202": { - "description": "Migration", - "schema": { - "$ref": "#/definitions/migration" - } - } - }, - "x-appwrite": { - "method": "createAppwriteMigration", - "weight": 334, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "migrations/create-appwrite-migration.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/migrations/migration-appwrite.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "resources": { - "type": "array", - "description": "List of resources to migrate", - "default": null, - "x-example": null, - "items": { - "type": "string" - } + "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](https:\/\/appwrite.io\/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" + } + } }, - "endpoint": { - "type": "string", - "description": "Source's Appwrite Endpoint", - "default": null, - "x-example": "https://example.com" + "x-appwrite": { + "method": "create", + "weight": 288, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } }, - "projectId": { - "type": "string", - "description": "Source's Project ID", - "default": null, - "x-example": "<PROJECT_ID>" + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "functionId": { + "type": "string", + "description": "Function ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + }, + "runtime": { + "type": "string", + "description": "Execution runtime.", + "default": null, + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-ml-3.11", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "go-1.23", + "static-1", + "flutter-3.24" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "execute": { + "type": "array", + "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "default": [], + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + }, + "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 + }, + "enabled": { + "type": "boolean", + "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project.", + "default": true, + "x-example": false + }, + "entrypoint": { + "type": "string", + "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", + "default": "", + "x-example": "<ENTRYPOINT>" + }, + "commands": { + "type": "string", + "description": "Build Commands.", + "default": "", + "x-example": "<COMMANDS>" + }, + "scopes": { + "type": "array", + "description": "List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", + "default": "", + "x-example": "<INSTALLATION_ID>" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the function.", + "default": "", + "x-example": "<PROVIDER_REPOSITORY_ID>" + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the function.", + "default": "", + "x-example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", + "default": false, + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function code in the linked repo.", + "default": "", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "templateRepository": { + "type": "string", + "description": "Repository name of the template.", + "default": "", + "x-example": "<TEMPLATE_REPOSITORY>" + }, + "templateOwner": { + "type": "string", + "description": "The name of the owner of the template.", + "default": "", + "x-example": "<TEMPLATE_OWNER>" + }, + "templateRootDirectory": { + "type": "string", + "description": "Path to function code in the template repo.", + "default": "", + "x-example": "<TEMPLATE_ROOT_DIRECTORY>" + }, + "templateVersion": { + "type": "string", + "description": "Version (tag) for the repo linked to the function template.", + "default": "", + "x-example": "<TEMPLATE_VERSION>" + }, + "specification": { + "type": "string", + "description": "Runtime specification for the function and builds.", + "default": "s-1vcpu-512mb", + "x-example": null + } + }, + "required": [ + "functionId", + "name", + "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" + } + } }, - "apiKey": { - "type": "string", - "description": "Source's API Key", - "default": null, - "x-example": "<API_KEY>" - } - }, - "required": ["resources", "endpoint", "projectId", "apiKey"] + "x-appwrite": { + "method": "listRuntimes", + "weight": 290, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } + ] } - } - ] - } - }, - "/migrations/appwrite/report": { - "get": { - "summary": "Generate a report on Appwrite data", - "operationId": "migrationsGetAppwriteReport", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["migrations"], - "description": "Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", - "responses": { - "200": { - "description": "Migration Report", - "schema": { - "$ref": "#/definitions/migrationReport" + }, + "\/functions\/specifications": { + "get": { + "summary": "List available function runtime specifications", + "operationId": "functionsListSpecifications", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "List allowed function specifications for this instance.\n", + "responses": { + "200": { + "description": "Specifications List", + "schema": { + "$ref": "#\/definitions\/specificationList" + } + } + }, + "x-appwrite": { + "method": "listSpecifications", + "weight": 291, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/list-specifications.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] } - } }, - "x-appwrite": { - "method": "getAppwriteReport", - "weight": 340, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "migrations/get-appwrite-report.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/migrations/migration-appwrite-report.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } + "\/functions\/templates": { + "get": { + "summary": "List function templates", + "operationId": "functionsListTemplates", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "List available function templates. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", + "responses": { + "200": { + "description": "Function Templates List", + "schema": { + "$ref": "#\/definitions\/templateFunctionList" + } + } + }, + "x-appwrite": { + "method": "listTemplates", + "weight": 314, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/list-templates.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-templates.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "runtimes", + "description": "List of runtimes allowed for filtering function templates. Maximum of 100 runtimes are allowed.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "useCases", + "description": "List of use cases allowed for filtering function templates. Maximum of 100 use cases are allowed.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "limit", + "description": "Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset the list of returned templates. Maximum offset is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + } + ] + } }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "resources", - "description": "List of resources to migrate", - "required": true, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "\/functions\/templates\/{templateId}": { + "get": { + "summary": "Get function template", + "operationId": "functionsGetTemplate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a function template using ID. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", + "responses": { + "200": { + "description": "Template Function", + "schema": { + "$ref": "#\/definitions\/templateFunction" + } + } + }, + "x-appwrite": { + "method": "getTemplate", + "weight": 315, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/get-template.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "templateId", + "description": "Template ID.", + "required": true, + "type": "string", + "x-example": "<TEMPLATE_ID>", + "in": "path" + } + ] + } + }, + "\/functions\/usage": { + "get": { + "summary": "Get functions usage", + "operationId": "functionsGetUsage", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get usage metrics and statistics for a for all functions. View statistics including total functions, deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", + "responses": { + "200": { + "description": "UsageFunctions", + "schema": { + "$ref": "#\/definitions\/usageFunctions" + } + } + }, + "x-appwrite": { + "method": "getUsage", + "weight": 294, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/get-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-functions-usage.md", + "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": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "FunctionUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/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": 292, + "cookies": false, + "type": "", + "deprecated": false, + "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" + } + ] }, - "in": "query" - }, - { - "name": "endpoint", - "description": "Source's Appwrite Endpoint", - "required": true, - "type": "string", - "format": "url", - "x-example": "https://example.com", - "in": "query" - }, - { - "name": "projectID", - "description": "Source's Project ID", - "required": true, - "type": "string", - "x-example": "<PROJECT_ID>", - "in": "query" - }, - { - "name": "key", - "description": "Source's API Key", - "required": true, - "type": "string", - "x-example": "<KEY>", - "in": "query" - } - ] - } - }, - "/migrations/firebase": { - "post": { - "summary": "Migrate Firebase data", - "operationId": "migrationsCreateFirebaseMigration", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["migrations"], - "description": "Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project. ", - "responses": { - "202": { - "description": "Migration", - "schema": { - "$ref": "#/definitions/migration" - } - } - }, - "x-appwrite": { - "method": "createFirebaseMigration", - "weight": 335, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "migrations/create-firebase-migration.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/migrations/migration-firebase.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "resources": { - "type": "array", - "description": "List of resources to migrate", - "default": null, - "x-example": null, - "items": { - "type": "string" - } + "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" + } + } }, - "serviceAccount": { - "type": "string", - "description": "JSON of the Firebase service account credentials", - "default": null, - "x-example": "<SERVICE_ACCOUNT>" - } - }, - "required": ["resources", "serviceAccount"] - } - } - ] - } - }, - "/migrations/firebase/report": { - "get": { - "summary": "Generate a report on Firebase data", - "operationId": "migrationsGetFirebaseReport", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["migrations"], - "description": "Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", - "responses": { - "200": { - "description": "Migration Report", - "schema": { - "$ref": "#/definitions/migrationReport" - } - } - }, - "x-appwrite": { - "method": "getFirebaseReport", - "weight": 341, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "migrations/get-firebase-report.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/migrations/migration-firebase-report.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "resources", - "description": "List of resources to migrate", - "required": true, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "x-appwrite": { + "method": "update", + "weight": 295, + "cookies": false, + "type": "", + "deprecated": false, + "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>" + }, + "runtime": { + "type": "string", + "description": "Execution runtime.", + "default": "", + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-ml-3.11", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "go-1.23", + "static-1", + "flutter-3.24" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "execute": { + "type": "array", + "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "default": [], + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + }, + "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 + }, + "enabled": { + "type": "boolean", + "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project.", + "default": true, + "x-example": false + }, + "entrypoint": { + "type": "string", + "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", + "default": "", + "x-example": "<ENTRYPOINT>" + }, + "commands": { + "type": "string", + "description": "Build Commands.", + "default": "", + "x-example": "<COMMANDS>" + }, + "scopes": { + "type": "array", + "description": "List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Controle System) deployment.", + "default": "", + "x-example": "<INSTALLATION_ID>" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the function", + "default": null, + "x-example": "<PROVIDER_REPOSITORY_ID>", + "x-nullable": true + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the function", + "default": "", + "x-example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", + "default": false, + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function code in the linked repo.", + "default": "", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "specification": { + "type": "string", + "description": "Runtime specification for the function and builds.", + "default": "s-1vcpu-512mb", + "x-example": null + } + }, + "required": [ + "name" + ] + } + } + ] }, - "in": "query" - }, - { - "name": "serviceAccount", - "description": "JSON of the Firebase service account credentials", - "required": true, - "type": "string", - "x-example": "<SERVICE_ACCOUNT>", - "in": "query" - } - ] - } - }, - "/migrations/nhost": { - "post": { - "summary": "Migrate NHost data", - "operationId": "migrationsCreateNHostMigration", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["migrations"], - "description": "Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project. ", - "responses": { - "202": { - "description": "Migration", - "schema": { - "$ref": "#/definitions/migration" + "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": 298, + "cookies": false, + "type": "", + "deprecated": false, + "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" + } + ] } - } }, - "x-appwrite": { - "method": "createNHostMigration", - "weight": 337, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "migrations/create-n-host-migration.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/migrations/migration-nhost.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "resources": { - "type": "array", - "description": "List of resources to migrate", - "default": null, - "x-example": null, - "items": { - "type": "string" - } + "\/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" + } + } }, - "subdomain": { - "type": "string", - "description": "Source's Subdomain", - "default": null, - "x-example": "<SUBDOMAIN>" + "x-appwrite": { + "method": "listDeployments", + "weight": 300, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } }, - "region": { - "type": "string", - "description": "Source's Region", - "default": null, - "x-example": "<REGION>" - }, - "adminSecret": { - "type": "string", - "description": "Source's Admin Secret", - "default": null, - "x-example": "<ADMIN_SECRET>" - }, - "database": { - "type": "string", - "description": "Source's Database Name", - "default": null, - "x-example": "<DATABASE>" - }, - "username": { - "type": "string", - "description": "Source's Database Username", - "default": null, - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "Source's Database Password", - "default": null, - "x-example": "<PASSWORD>" - }, - "port": { - "type": "integer", - "description": "Source's Database Port", - "default": 5432, - "x-example": null - } - }, - "required": [ - "resources", - "subdomain", - "region", - "adminSecret", - "database", - "username", - "password" - ] - } - } - ] - } - }, - "/migrations/nhost/report": { - "get": { - "summary": "Generate a report on NHost Data", - "operationId": "migrationsGetNHostReport", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["migrations"], - "description": "Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", - "responses": { - "200": { - "description": "Migration Report", - "schema": { - "$ref": "#/definitions/migrationReport" - } - } - }, - "x-appwrite": { - "method": "getNHostReport", - "weight": 343, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "migrations/get-n-host-report.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/migrations/migration-nhost-report.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "resources", - "description": "List of resources to migrate.", - "required": true, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_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\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: size, buildId, activate, entrypoint, commands, type, size", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] }, - "in": "query" - }, - { - "name": "subdomain", - "description": "Source's Subdomain.", - "required": true, - "type": "string", - "x-example": "<SUBDOMAIN>", - "in": "query" - }, - { - "name": "region", - "description": "Source's Region.", - "required": true, - "type": "string", - "x-example": "<REGION>", - "in": "query" - }, - { - "name": "adminSecret", - "description": "Source's Admin Secret.", - "required": true, - "type": "string", - "x-example": "<ADMIN_SECRET>", - "in": "query" - }, - { - "name": "database", - "description": "Source's Database Name.", - "required": true, - "type": "string", - "x-example": "<DATABASE>", - "in": "query" - }, - { - "name": "username", - "description": "Source's Database Username.", - "required": true, - "type": "string", - "x-example": "<USERNAME>", - "in": "query" - }, - { - "name": "password", - "description": "Source's Database Password.", - "required": true, - "type": "string", - "x-example": "<PASSWORD>", - "in": "query" - }, - { - "name": "port", - "description": "Source's Database Port.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5432, - "in": "query" - } - ] - } - }, - "/migrations/supabase": { - "post": { - "summary": "Migrate Supabase data", - "operationId": "migrationsCreateSupabaseMigration", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["migrations"], - "description": "Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project. ", - "responses": { - "202": { - "description": "Migration", - "schema": { - "$ref": "#/definitions/migration" + "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](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", + "responses": { + "202": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "x-appwrite": { + "method": "createDeployment", + "weight": 299, + "cookies": false, + "type": "upload", + "deprecated": false, + "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": false, + "type": "string", + "x-example": "<ENTRYPOINT>", + "in": "formData" + }, + { + "name": "commands", + "description": "Build Commands.", + "required": false, + "type": "string", + "x-example": "<COMMANDS>", + "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" + } + ] } - } }, - "x-appwrite": { - "method": "createSupabaseMigration", - "weight": 336, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "migrations/create-supabase-migration.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/migrations/migration-supabase.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "resources": { - "type": "array", - "description": "List of resources to migrate", - "default": null, - "x-example": null, - "items": { - "type": "string" - } + "\/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": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } }, - "endpoint": { - "type": "string", - "description": "Source's Supabase Endpoint", - "default": null, - "x-example": "https://example.com" + "x-appwrite": { + "method": "getDeployment", + "weight": 301, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } }, - "apiKey": { - "type": "string", - "description": "Source's API Key", - "default": null, - "x-example": "<API_KEY>" - }, - "databaseHost": { - "type": "string", - "description": "Source's Database Host", - "default": null, - "x-example": "<DATABASE_HOST>" - }, - "username": { - "type": "string", - "description": "Source's Database Username", - "default": null, - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "Source's Database Password", - "default": null, - "x-example": "<PASSWORD>" - }, - "port": { - "type": "integer", - "description": "Source's Database Port", - "default": 5432, - "x-example": null - } - }, - "required": [ - "resources", - "endpoint", - "apiKey", - "databaseHost", - "username", - "password" - ] - } - } - ] - } - }, - "/migrations/supabase/report": { - "get": { - "summary": "Generate a report on Supabase Data", - "operationId": "migrationsGetSupabaseReport", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["migrations"], - "description": "Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", - "responses": { - "200": { - "description": "Migration Report", - "schema": { - "$ref": "#/definitions/migrationReport" - } - } - }, - "x-appwrite": { - "method": "getSupabaseReport", - "weight": 342, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "migrations/get-supabase-report.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/migrations/migration-supabase-report.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "resources", - "description": "List of resources to migrate", - "required": true, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "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" + } + ] }, - "in": "query" - }, - { - "name": "endpoint", - "description": "Source's Supabase Endpoint.", - "required": true, - "type": "string", - "format": "url", - "x-example": "https://example.com", - "in": "query" - }, - { - "name": "apiKey", - "description": "Source's API Key.", - "required": true, - "type": "string", - "x-example": "<API_KEY>", - "in": "query" - }, - { - "name": "databaseHost", - "description": "Source's Database Host.", - "required": true, - "type": "string", - "x-example": "<DATABASE_HOST>", - "in": "query" - }, - { - "name": "username", - "description": "Source's Database Username.", - "required": true, - "type": "string", - "x-example": "<USERNAME>", - "in": "query" - }, - { - "name": "password", - "description": "Source's Database Password.", - "required": true, - "type": "string", - "x-example": "<PASSWORD>", - "in": "query" - }, - { - "name": "port", - "description": "Source's Database Port.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5432, - "in": "query" - } - ] - } - }, - "/migrations/{migrationId}": { - "get": { - "summary": "Get migration", - "operationId": "migrationsGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["migrations"], - "description": "Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process. ", - "responses": { - "200": { - "description": "Migration", - "schema": { - "$ref": "#/definitions/migration" - } - } - }, - "x-appwrite": { - "method": "get", - "weight": 339, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "migrations/get.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/migrations/get-migration.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.read", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "migrationId", - "description": "Migration unique ID.", - "required": true, - "type": "string", - "x-example": "<MIGRATION_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Retry migration", - "operationId": "migrationsRetry", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["migrations"], - "description": "Retry a failed migration. This endpoint allows you to retry a migration that has previously failed.", - "responses": { - "202": { - "description": "Migration", - "schema": { - "$ref": "#/definitions/migration" - } - } - }, - "x-appwrite": { - "method": "retry", - "weight": 344, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "migrations/retry.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/migrations/retry-migration.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "migrationId", - "description": "Migration unique ID.", - "required": true, - "type": "string", - "x-example": "<MIGRATION_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete migration", - "operationId": "migrationsDelete", - "consumes": ["application/json"], - "produces": [], - "tags": ["migrations"], - "description": "Delete a migration by its unique ID. This endpoint allows you to remove a migration from your project's migration history. ", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "delete", - "weight": 345, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "migrations/delete.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/migrations/delete-migration.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "migrationId", - "description": "Migration ID.", - "required": true, - "type": "string", - "x-example": "<MIGRATION_ID>", - "in": "path" - } - ] - } - }, - "/project/usage": { - "get": { - "summary": "Get project usage stats", - "operationId": "projectGetUsage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["project"], - "description": "Get comprehensive usage statistics for your project. View metrics including network requests, bandwidth, storage, function executions, database usage, and user activity. Specify a time range with startDate and endDate, and optionally set the data granularity with period (1h or 1d). The response includes both total counts and detailed breakdowns by resource, along with historical data over the specified period.", - "responses": { - "200": { - "description": "UsageProject", - "schema": { - "$ref": "#/definitions/usageProject" - } - } - }, - "x-appwrite": { - "method": "getUsage", - "weight": 196, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "project/get-usage.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/project/get-usage.md", - "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": "startDate", - "description": "Starting date for the usage", - "required": true, - "type": "string", - "in": "query" - }, - { - "name": "endDate", - "description": "End date for the usage", - "required": true, - "type": "string", - "in": "query" - }, - { - "name": "period", - "description": "Period used", - "required": false, - "type": "string", - "x-example": "1h", - "enum": ["1h", "1d"], - "x-enum-name": "ProjectUsageRange", - "x-enum-keys": ["One Hour", "One Day"], - "default": "1d", - "in": "query" - } - ] - } - }, - "/project/variables": { - "get": { - "summary": "List variables", - "operationId": "projectListVariables", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["project"], - "description": "Get a list of all project variables. These variables will be accessible in all Appwrite Functions at runtime.", - "responses": { - "200": { - "description": "Variables List", - "schema": { - "$ref": "#/definitions/variableList" - } - } - }, - "x-appwrite": { - "method": "listVariables", - "weight": 198, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "project/list-variables.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/project/list-variables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ] - }, - "post": { - "summary": "Create variable", - "operationId": "projectCreateVariable", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["project"], - "description": "Create a new project variable. This variable will be accessible in all Appwrite Functions at runtime.", - "responses": { - "201": { - "description": "Variable", - "schema": { - "$ref": "#/definitions/variable" - } - } - }, - "x-appwrite": { - "method": "createVariable", - "weight": 197, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "project/create-variable.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/project/create-variable.md", - "rate-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": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "default": null, - "x-example": "<KEY>" + "patch": { + "summary": "Update 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" + } + } }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "default": null, - "x-example": "<VALUE>" - } - }, - "required": ["key", "value"] - } - } - ] - } - }, - "/project/variables/{variableId}": { - "get": { - "summary": "Get variable", - "operationId": "projectGetVariable", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["project"], - "description": "Get a project variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "schema": { - "$ref": "#/definitions/variable" - } - } - }, - "x-appwrite": { - "method": "getVariable", - "weight": 199, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "project/get-variable.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/project/get-variable.md", - "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": "variableId", - "description": "Variable unique ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update variable", - "operationId": "projectUpdateVariable", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["project"], - "description": "Update project variable by its unique ID. This variable will be accessible in all Appwrite Functions at runtime.", - "responses": { - "200": { - "description": "Variable", - "schema": { - "$ref": "#/definitions/variable" - } - } - }, - "x-appwrite": { - "method": "updateVariable", - "weight": 200, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "project/update-variable.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/project/update-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "default": null, - "x-example": "<KEY>" + "x-appwrite": { + "method": "updateDeployment", + "weight": 297, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "default": null, - "x-example": "<VALUE>" - } - }, - "required": ["key"] - } - } - ] - }, - "delete": { - "summary": "Delete variable", - "operationId": "projectDeleteVariable", - "consumes": ["application/json"], - "produces": [], - "tags": ["project"], - "description": "Delete a project variable by its unique ID. ", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteVariable", - "weight": 201, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "project/delete-variable.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/project/delete-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - } - ] - } - }, - "/projects": { - "get": { - "summary": "List projects", - "operationId": "projectsList", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Get a list of all projects. You can use the query params to filter your results. ", - "responses": { - "200": { - "description": "Projects List", - "schema": { - "$ref": "#/definitions/projectList" - } - } - }, - "x-appwrite": { - "method": "list", - "weight": 151, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/list.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/list.md", - "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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "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" + } + ] }, - "default": [], - "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" - } - ] - }, - "post": { - "summary": "Create project", - "operationId": "projectsCreate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Create a new project. You can create a maximum of 100 projects per account. ", - "responses": { - "201": { - "description": "Project", - "schema": { - "$ref": "#/definitions/project" - } - } - }, - "x-appwrite": { - "method": "create", - "weight": 150, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/create.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/create.md", - "rate-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 a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": null + "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" + } }, - "name": { - "type": "string", - "description": "Project name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" + "x-appwrite": { + "method": "deleteDeployment", + "weight": 302, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } }, - "teamId": { - "type": "string", - "description": "Team unique ID.", - "default": null, - "x-example": "<TEAM_ID>" + "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}\/build": { + "post": { + "summary": "Rebuild deployment", + "operationId": "functionsCreateBuild", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", + "responses": { + "204": { + "description": "No content" + } }, - "region": { - "type": "string", - "description": "Project Region.", - "default": "default", - "x-example": "default", - "enum": ["default", "fra"], - "x-enum-name": null, - "x-enum-keys": [] + "x-appwrite": { + "method": "createBuild", + "weight": 303, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/create-build.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-build.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "description": { - "type": "string", - "description": "Project description. Max length: 256 chars.", - "default": "", - "x-example": "<DESCRIPTION>" + "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" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "buildId": { + "type": "string", + "description": "Build unique ID.", + "default": "", + "x-example": "<BUILD_ID>" + } + } + } + } + ] + }, + "patch": { + "summary": "Cancel deployment", + "operationId": "functionsUpdateDeploymentBuild", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", + "responses": { + "200": { + "description": "Build", + "schema": { + "$ref": "#\/definitions\/build" + } + } }, - "logo": { - "type": "string", - "description": "Project logo.", - "default": "", - "x-example": "<LOGO>" + "x-appwrite": { + "method": "updateDeploymentBuild", + "weight": 304, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/update-deployment-build.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-deployment-build.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "url": { - "type": "string", - "description": "Project URL.", - "default": "", - "x-example": "https://example.com" + "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}\/download": { + "get": { + "summary": "Download deployment", + "operationId": "functionsGetDeploymentDownload", + "consumes": [ + "application\/json" + ], + "produces": [ + "*\/*" + ], + "tags": [ + "functions" + ], + "description": "Get a Deployment's contents by its unique ID. This endpoint supports range requests for partial or streaming file download.", + "responses": { + "200": { + "description": "File", + "schema": { + "type": "file" + } + } }, - "legalName": { - "type": "string", - "description": "Project legal Name. Max length: 256 chars.", - "default": "", - "x-example": "<LEGAL_NAME>" + "x-appwrite": { + "method": "getDeploymentDownload", + "weight": 296, + "cookies": false, + "type": "location", + "deprecated": false, + "demo": "functions\/get-deployment-download.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "legalCountry": { - "type": "string", - "description": "Project legal Country. Max length: 256 chars.", - "default": "", - "x-example": "<LEGAL_COUNTRY>" + "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" + } + ] + } + }, + "\/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.", + "responses": { + "200": { + "description": "Executions List", + "schema": { + "$ref": "#\/definitions\/executionList" + } + } }, - "legalState": { - "type": "string", - "description": "Project legal State. Max length: 256 chars.", - "default": "", - "x-example": "<LEGAL_STATE>" + "x-appwrite": { + "method": "listExecutions", + "weight": 306, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } }, - "legalCity": { - "type": "string", - "description": "Project legal City. Max length: 256 chars.", - "default": "", - "x-example": "<LEGAL_CITY>" + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_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\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + }, + "post": { + "summary": "Create execution", + "operationId": "functionsCreateExecution", + "consumes": [ + "application\/json" + ], + "produces": [ + "multipart\/form-data" + ], + "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" + } + } }, - "legalAddress": { - "type": "string", - "description": "Project legal Address. Max length: 256 chars.", - "default": "", - "x-example": "<LEGAL_ADDRESS>" + "x-appwrite": { + "method": "createExecution", + "weight": 305, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/create-execution.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "execution.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "legalTaxId": { - "type": "string", - "description": "Project legal Tax ID. Max length: 256 chars.", - "default": "", - "x-example": "<LEGAL_TAX_ID>" - } - }, - "required": ["projectId", "name", "teamId"] + "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": { + "body": { + "type": "string", + "description": "HTTP body of execution. Default value is empty string.", + "default": "", + "x-example": "<BODY>" + }, + "async": { + "type": "boolean", + "description": "Execute code in the background. Default value is false.", + "default": false, + "x-example": false + }, + "path": { + "type": "string", + "description": "HTTP path of execution. Path can include query params. Default value is \/", + "default": "\/", + "x-example": "<PATH>" + }, + "method": { + "type": "string", + "description": "HTTP method of execution. Default value is GET.", + "default": "POST", + "x-example": "GET", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS" + ], + "x-enum-name": "ExecutionMethod", + "x-enum-keys": [] + }, + "headers": { + "type": "object", + "description": "HTTP headers of execution. Defaults to empty.", + "default": [], + "x-example": "{}" + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", + "default": null, + "x-example": null + } + } + } + } + ] } - } - ] - } - }, - "/projects/{projectId}": { - "get": { - "summary": "Get project", - "operationId": "projectsGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata. ", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#/definitions/project" - } - } }, - "x-appwrite": { - "method": "get", - "weight": 152, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/get.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/get.md", - "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": "Update a project by its unique ID.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#/definitions/project" - } - } - }, - "x-appwrite": { - "method": "update", - "weight": 153, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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>" + "\/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" + } + } }, - "description": { - "type": "string", - "description": "Project description. Max length: 256 chars.", - "default": "", - "x-example": "<DESCRIPTION>" + "x-appwrite": { + "method": "getExecution", + "weight": 307, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } }, - "logo": { - "type": "string", - "description": "Project logo.", - "default": "", - "x-example": "<LOGO>" + "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" + } + ] + }, + "delete": { + "summary": "Delete execution", + "operationId": "functionsDeleteExecution", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "functions" + ], + "description": "Delete a function execution by its unique ID.\n", + "responses": { + "204": { + "description": "No content" + } }, - "url": { - "type": "string", - "description": "Project URL.", - "default": "", - "x-example": "https://example.com" + "x-appwrite": { + "method": "deleteExecution", + "weight": 308, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/delete-execution.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "execution.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "legalName": { - "type": "string", - "description": "Project legal name. Max length: 256 chars.", - "default": "", - "x-example": "<LEGAL_NAME>" + "security": [ + { + "Project": [], + "Key": [] + } + ], + "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": "functionsGetFunctionUsage", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get usage metrics and statistics for a for a specific function. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", + "responses": { + "200": { + "description": "UsageFunction", + "schema": { + "$ref": "#\/definitions\/usageFunction" + } + } }, - "legalCountry": { - "type": "string", - "description": "Project legal country. Max length: 256 chars.", - "default": "", - "x-example": "<LEGAL_COUNTRY>" + "x-appwrite": { + "method": "getFunctionUsage", + "weight": 293, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/get-function-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "legalState": { - "type": "string", - "description": "Project legal state. Max length: 256 chars.", - "default": "", - "x-example": "<LEGAL_STATE>" + "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", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "FunctionUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/functions\/{functionId}\/variables": { + "get": { + "summary": "List variables", + "operationId": "functionsListVariables", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a list of all variables of a specific function.", + "responses": { + "200": { + "description": "Variables List", + "schema": { + "$ref": "#\/definitions\/variableList" + } + } }, - "legalCity": { - "type": "string", - "description": "Project legal city. Max length: 256 chars.", - "default": "", - "x-example": "<LEGAL_CITY>" + "x-appwrite": { + "method": "listVariables", + "weight": 310, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/list-variables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-variables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "legalAddress": { - "type": "string", - "description": "Project legal address. Max length: 256 chars.", - "default": "", - "x-example": "<LEGAL_ADDRESS>" + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + } + ] + }, + "post": { + "summary": "Create variable", + "operationId": "functionsCreateVariable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", + "responses": { + "201": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } }, - "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": "Delete a project by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "delete", - "weight": 170, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/delete.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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" - } - ] - } - }, - "/projects/{projectId}/api": { - "patch": { - "summary": "Update API status", - "operationId": "projectsUpdateApiStatus", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#/definitions/project" - } - } - }, - "x-appwrite": { - "method": "updateApiStatus", - "weight": 157, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update-api-status.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update-api-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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": { - "api": { - "type": "string", - "description": "API name.", - "default": null, - "x-example": "rest", - "enum": ["rest", "graphql", "realtime"], - "x-enum-name": null, - "x-enum-keys": [] + "x-appwrite": { + "method": "createVariable", + "weight": 309, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/create-variable.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "status": { - "type": "boolean", - "description": "API status.", - "default": null, - "x-example": false - } - }, - "required": ["api", "status"] + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "default": null, + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "default": null, + "x-example": "<VALUE>" + } + }, + "required": [ + "key", + "value" + ] + } + } + ] } - } - ] - } - }, - "/projects/{projectId}/api/all": { - "patch": { - "summary": "Update all API status", - "operationId": "projectsUpdateApiStatusAll", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#/definitions/project" - } - } }, - "x-appwrite": { - "method": "updateApiStatusAll", - "weight": 158, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update-api-status-all.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update-api-status-all.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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": { - "status": { - "type": "boolean", - "description": "API status.", - "default": null, - "x-example": false - } - }, - "required": ["status"] - } - } - ] - } - }, - "/projects/{projectId}/auth/duration": { - "patch": { - "summary": "Update project authentication duration", - "operationId": "projectsUpdateAuthDuration", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Update how long sessions created within a project should stay active for.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#/definitions/project" - } - } - }, - "x-appwrite": { - "method": "updateAuthDuration", - "weight": 163, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update-auth-duration.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update-auth-duration.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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": { - "duration": { - "type": "integer", - "description": "Project session length in seconds. Max length: 31536000 seconds.", - "default": null, - "x-example": 0 - } - }, - "required": ["duration"] - } - } - ] - } - }, - "/projects/{projectId}/auth/limit": { - "patch": { - "summary": "Update project users limit", - "operationId": "projectsUpdateAuthLimit", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Update the maximum number of users allowed in this project. Set to 0 for unlimited users. ", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#/definitions/project" - } - } - }, - "x-appwrite": { - "method": "updateAuthLimit", - "weight": 162, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update-auth-limit.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update-auth-limit.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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/max-sessions": { - "patch": { - "summary": "Update project user sessions limit", - "operationId": "projectsUpdateAuthSessionsLimit", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#/definitions/project" - } - } - }, - "x-appwrite": { - "method": "updateAuthSessionsLimit", - "weight": 168, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update-auth-sessions-limit.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update-auth-sessions-limit.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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. Value allowed is between 1-100. Default is 10", - "default": null, - "x-example": 1 - } - }, - "required": ["limit"] - } - } - ] - } - }, - "/projects/{projectId}/auth/memberships-privacy": { - "patch": { - "summary": "Update project memberships privacy attributes", - "operationId": "projectsUpdateMembershipsPrivacy", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Update project membership privacy settings. Use this endpoint to control what user information is visible to other team members, such as user name, email, and MFA status. ", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#/definitions/project" - } - } - }, - "x-appwrite": { - "method": "updateMembershipsPrivacy", - "weight": 161, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update-memberships-privacy.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update-memberships-privacy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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": { - "userName": { - "type": "boolean", - "description": "Set to true to show userName to members of a team.", - "default": null, - "x-example": false + "\/functions\/{functionId}\/variables\/{variableId}": { + "get": { + "summary": "Get variable", + "operationId": "functionsGetVariable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } }, - "userEmail": { - "type": "boolean", - "description": "Set to true to show email to members of a team.", - "default": null, - "x-example": false + "x-appwrite": { + "method": "getVariable", + "weight": 311, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/get-variable.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "mfa": { - "type": "boolean", - "description": "Set to true to show mfa to members of a team.", - "default": null, - "x-example": false - } - }, - "required": ["userName", "userEmail", "mfa"] - } - } - ] - } - }, - "/projects/{projectId}/auth/mock-numbers": { - "patch": { - "summary": "Update the mock numbers for the project", - "operationId": "projectsUpdateMockNumbers", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Update the list of mock phone numbers for testing. Use these numbers to bypass SMS verification in development. ", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#/definitions/project" - } - } - }, - "x-appwrite": { - "method": "updateMockNumbers", - "weight": 169, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update-mock-numbers.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update-mock-numbers.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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": { - "numbers": { - "type": "array", - "description": "An array of mock numbers and their corresponding verification codes (OTPs). Each number should be a valid E.164 formatted phone number. Maximum of 10 numbers are allowed.", - "default": null, - "x-example": null, - "items": { - "type": "object" - } - } - }, - "required": ["numbers"] - } - } - ] - } - }, - "/projects/{projectId}/auth/password-dictionary": { - "patch": { - "summary": "Update authentication password dictionary status. Use this endpoint to enable or disable the dicitonary check for user password", - "operationId": "projectsUpdateAuthPasswordDictionary", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don't use common and insecure passwords. ", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#/definitions/project" - } - } - }, - "x-appwrite": { - "method": "updateAuthPasswordDictionary", - "weight": 166, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update-auth-password-dictionary.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update-auth-password-dictionary.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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": { - "enabled": { - "type": "boolean", - "description": "Set whether or not to enable checking user's password against most commonly used passwords. Default is false.", - "default": null, - "x-example": false - } - }, - "required": ["enabled"] - } - } - ] - } - }, - "/projects/{projectId}/auth/password-history": { - "patch": { - "summary": "Update authentication password history. Use this endpoint to set the number of password history to save and 0 to disable password history.", - "operationId": "projectsUpdateAuthPasswordHistory", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Update the authentication password history requirement. Use this endpoint to require new passwords to be different than the last X amount of previously used ones.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#/definitions/project" - } - } - }, - "x-appwrite": { - "method": "updateAuthPasswordHistory", - "weight": 165, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update-auth-password-history.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update-auth-password-history.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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 passwords to store in user history. User can't choose a new password that is already stored in the password history list. Max number of passwords allowed in history is20. Default value is 0", - "default": null, - "x-example": 0 - } - }, - "required": ["limit"] - } - } - ] - } - }, - "/projects/{projectId}/auth/personal-data": { - "patch": { - "summary": "Enable or disable checking user passwords for similarity with their personal data.", - "operationId": "projectsUpdatePersonalDataCheck", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords. ", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#/definitions/project" - } - } - }, - "x-appwrite": { - "method": "updatePersonalDataCheck", - "weight": 167, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update-personal-data-check.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update-personal-data-check.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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": { - "enabled": { - "type": "boolean", - "description": "Set whether or not to check a password for similarity with personal data. Default is false.", - "default": null, - "x-example": false - } - }, - "required": ["enabled"] - } - } - ] - } - }, - "/projects/{projectId}/auth/session-alerts": { - "patch": { - "summary": "Update project sessions emails", - "operationId": "projectsUpdateSessionAlerts", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#/definitions/project" - } - } - }, - "x-appwrite": { - "method": "updateSessionAlerts", - "weight": 160, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update-session-alerts.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update-session-alerts.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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": { - "alerts": { - "type": "boolean", - "description": "Set to true to enable session emails.", - "default": null, - "x-example": false - } - }, - "required": ["alerts"] - } - } - ] - } - }, - "/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": "Update the status of a specific authentication method. Use this endpoint to enable or disable different authentication methods such as email, magic urls or sms in your project. ", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#/definitions/project" - } - } - }, - "x-appwrite": { - "method": "updateAuthStatus", - "weight": 164, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update-auth-status.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update-auth-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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,email-otp,anonymous,invites,jwt,phone", - "required": true, - "type": "string", - "x-example": "email-password", - "enum": [ - "email-password", - "magic-url", - "email-otp", - "anonymous", - "invites", - "jwt", - "phone" - ], - "x-enum-name": "AuthMethod", - "x-enum-keys": [], - "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}/jwts": { - "post": { - "summary": "Create JWT", - "operationId": "projectsCreateJWT", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time. ", - "responses": { - "201": { - "description": "JWT", - "schema": { - "$ref": "#/definitions/jwt" - } - } - }, - "x-appwrite": { - "method": "createJWT", - "weight": 182, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/create-j-w-t.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/create-jwt.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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": { - "scopes": { - "type": "array", - "description": "List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update variable", + "operationId": "functionsUpdateVariable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Update variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } }, - "duration": { - "type": "integer", - "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", - "default": 900, - "x-example": 0 - } - }, - "required": ["scopes"] - } - } - ] - } - }, - "/projects/{projectId}/keys": { - "get": { - "summary": "List keys", - "operationId": "projectsListKeys", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Get a list of all API keys from the current project. ", - "responses": { - "200": { - "description": "API Keys List", - "schema": { - "$ref": "#/definitions/keyList" - } - } - }, - "x-appwrite": { - "method": "listKeys", - "weight": 178, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/list-keys.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/list-keys.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.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": "Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.", - "responses": { - "201": { - "description": "Key", - "schema": { - "$ref": "#/definitions/key" - } - } - }, - "x-appwrite": { - "method": "createKey", - "weight": 177, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/create-key.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/create-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.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>" + "x-appwrite": { + "method": "updateVariable", + "weight": 312, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/update-variable.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "scopes": { - "type": "array", - "description": "Key scopes list. Maximum of 100 scopes are allowed.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "default": null, + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "default": null, + "x-example": "<VALUE>" + } + }, + "required": [ + "key" + ] + } + } + ] + }, + "delete": { + "summary": "Delete variable", + "operationId": "functionsDeleteVariable", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "functions" + ], + "description": "Delete a variable by its unique ID.", + "responses": { + "204": { + "description": "No content" + } }, - "expire": { - "type": "string", - "description": "Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", - "default": null, - "x-example": null - } - }, - "required": ["name", "scopes"] - } - } - ] - } - }, - "/projects/{projectId}/keys/{keyId}": { - "get": { - "summary": "Get key", - "operationId": "projectsGetKey", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it's scopes.", - "responses": { - "200": { - "description": "Key", - "schema": { - "$ref": "#/definitions/key" - } - } - }, - "x-appwrite": { - "method": "getKey", - "weight": 179, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/get-key.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/get-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.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": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key. ", - "responses": { - "200": { - "description": "Key", - "schema": { - "$ref": "#/definitions/key" - } - } - }, - "x-appwrite": { - "method": "updateKey", - "weight": 180, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update-key.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.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>" + "x-appwrite": { + "method": "deleteVariable", + "weight": 313, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/delete-variable.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "scopes": { - "type": "array", - "description": "Key scopes list. Maximum of 100 events are allowed.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "expire": { - "type": "string", - "description": "Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", - "default": null, - "x-example": null - } - }, - "required": ["name", "scopes"] + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + } + ] } - } - ] - }, - "delete": { - "summary": "Delete key", - "operationId": "projectsDeleteKey", - "consumes": ["application/json"], - "produces": [], - "tags": ["projects"], - "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls. ", - "responses": { - "204": { - "description": "No content" - } }, - "x-appwrite": { - "method": "deleteKey", - "weight": 181, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/delete-key.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/delete-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.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": "Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable/disable providers. ", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#/definitions/project" + "\/graphql": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlQuery", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "graphql" + ], + "description": "Execute a GraphQL mutation.", + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "x-appwrite": { + "method": "query", + "weight": 331, + "cookies": false, + "type": "graphql", + "deprecated": false, + "demo": "graphql\/query.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", + "platforms": [ + "server", + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "query": { + "type": "object", + "description": "The query or queries to execute.", + "default": {}, + "x-example": "{}" + } + }, + "required": [ + "query" + ] + } + } + ] } - } }, - "x-appwrite": { - "method": "updateOAuth2", - "weight": 159, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update-o-auth2.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update-oauth2.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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", - "enum": [ - "amazon", - "apple", - "auth0", - "authentik", - "autodesk", - "bitbucket", - "bitly", - "box", - "dailymotion", - "discord", - "disqus", - "dropbox", - "etsy", - "facebook", - "github", - "gitlab", - "google", - "linkedin", - "microsoft", - "notion", - "oidc", - "okta", - "paypal", - "paypalSandbox", - "podio", - "salesforce", - "slack", - "spotify", - "stripe", - "tradeshift", - "tradeshiftBox", - "twitch", - "wordpress", - "yahoo", - "yammer", - "yandex", - "zoho", - "zoom", - "mock" - ], - "x-enum-name": "OAuthProvider", - "x-enum-keys": [] + "\/graphql\/mutation": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlMutation", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "graphql" + ], + "description": "Execute a GraphQL mutation.", + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } }, - "appId": { - "type": "string", - "description": "Provider app ID. Max length: 256 chars.", - "default": null, - "x-example": "<APP_ID>" + "x-appwrite": { + "method": "mutation", + "weight": 330, + "cookies": false, + "type": "graphql", + "deprecated": false, + "demo": "graphql\/mutation.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", + "platforms": [ + "server", + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } }, - "secret": { - "type": "string", - "description": "Provider secret key. Max length: 512 chars.", - "default": null, - "x-example": "<SECRET>" - }, - "enabled": { - "type": "boolean", - "description": "Provider status. Set to 'false' to disable new session creation.", - "default": null, - "x-example": false - } - }, - "required": ["provider"] + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "query": { + "type": "object", + "description": "The query or queries to execute.", + "default": {}, + "x-example": "{}" + } + }, + "required": [ + "query" + ] + } + } + ] } - } - ] - } - }, - "/projects/{projectId}/platforms": { - "get": { - "summary": "List platforms", - "operationId": "projectsListPlatforms", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations. ", - "responses": { - "200": { - "description": "Platforms List", - "schema": { - "$ref": "#/definitions/platformList" - } - } }, - "x-appwrite": { - "method": "listPlatforms", - "weight": 184, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/list-platforms.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/list-platforms.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.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": "Create a new platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.", - "responses": { - "201": { - "description": "Platform", - "schema": { - "$ref": "#/definitions/platform" - } - } - }, - "x-appwrite": { - "method": "createPlatform", - "weight": 183, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/create-platform.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/create-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.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", - "enum": [ - "web", - "flutter-web", - "flutter-ios", - "flutter-android", - "flutter-linux", - "flutter-macos", - "flutter-windows", - "apple-ios", - "apple-macos", - "apple-watchos", - "apple-tvos", - "android", - "unity", - "react-native-ios", - "react-native-android" - ], - "x-enum-name": "PlatformType", - "x-enum-keys": [] + "\/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" + } + } }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" + "x-appwrite": { + "method": "get", + "weight": 125, + "cookies": false, + "type": "", + "deprecated": false, + "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": { - "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"] + "security": [ + { + "Project": [], + "Key": [] + } + ] } - } - ] - } - }, - "/projects/{projectId}/platforms/{platformId}": { - "get": { - "summary": "Get platform", - "operationId": "projectsGetPlatform", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations. ", - "responses": { - "200": { - "description": "Platform", - "schema": { - "$ref": "#/definitions/platform" - } - } }, - "x-appwrite": { - "method": "getPlatform", - "weight": 185, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/get-platform.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/get-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.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": "Update a platform by its unique ID. Use this endpoint to update the platform's name, key, platform store ID, or hostname. ", - "responses": { - "200": { - "description": "Platform", - "schema": { - "$ref": "#/definitions/platform" - } - } - }, - "x-appwrite": { - "method": "updatePlatform", - "weight": 186, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update-platform.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.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>" + "\/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" + } + } }, - "key": { - "type": "string", - "description": "Package name for android or bundle ID for iOS. Max length: 256 chars.", - "default": "", - "x-example": "<KEY>" + "x-appwrite": { + "method": "getAntivirus", + "weight": 147, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } }, - "store": { - "type": "string", - "description": "App store or Google Play store ID. Max length: 256 chars.", - "default": "", - "x-example": "<STORE>" + "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 servers are up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "schema": { + "$ref": "#\/definitions\/healthStatus" + } + } }, - "hostname": { - "type": "string", - "description": "Platform client URL. Max length: 256 chars.", - "default": "", - "x-example": null - } - }, - "required": ["name"] + "x-appwrite": { + "method": "getCache", + "weight": 128, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } + ] } - } - ] - }, - "delete": { - "summary": "Delete platform", - "operationId": "projectsDeletePlatform", - "consumes": ["application/json"], - "produces": [], - "tags": ["projects"], - "description": "Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project. ", - "responses": { - "204": { - "description": "No content" - } }, - "x-appwrite": { - "method": "deletePlatform", - "weight": 187, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/delete-platform.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/delete-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.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": "Update the status of a specific service. Use this endpoint to enable or disable a service in your project. ", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#/definitions/project" + "\/health\/certificate": { + "get": { + "summary": "Get the SSL certificate for a domain", + "operationId": "healthGetCertificate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the SSL certificate for a domain", + "responses": { + "200": { + "description": "Health Certificate", + "schema": { + "$ref": "#\/definitions\/healthCertificate" + } + } + }, + "x-appwrite": { + "method": "getCertificate", + "weight": 134, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-certificate.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-certificate.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": [] + } + ], + "parameters": [ + { + "name": "domain", + "description": "string", + "required": false, + "type": "string", + "in": "query" + } + ] } - } }, - "x-appwrite": { - "method": "updateServiceStatus", - "weight": 155, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update-service-status.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update-service-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } + "\/health\/db": { + "get": { + "summary": "Get DB", + "operationId": "healthGetDB", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite database servers are up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "schema": { + "$ref": "#\/definitions\/healthStatus" + } + } + }, + "x-appwrite": { + "method": "getDB", + "weight": 127, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } + ] + } }, - "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", - "enum": [ - "account", - "avatars", - "databases", - "locale", - "health", - "storage", - "teams", - "users", - "functions", - "graphql", + "\/health\/pubsub": { + "get": { + "summary": "Get pubsub", + "operationId": "healthGetPubSub", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite pub-sub servers are up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "schema": { + "$ref": "#\/definitions\/healthStatus" + } + } + }, + "x-appwrite": { + "method": "getPubSub", + "weight": 130, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-pub-sub.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.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": { + "get": { + "summary": "Get queue", + "operationId": "healthGetQueue", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite queue messaging servers are up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "schema": { + "$ref": "#\/definitions\/healthStatus" + } + } + }, + "x-appwrite": { + "method": "getQueue", + "weight": 129, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue.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\/builds": { + "get": { + "summary": "Get builds queue", + "operationId": "healthGetQueueBuilds", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of builds that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "x-appwrite": { + "method": "getQueueBuilds", + "weight": 136, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue-builds.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-builds.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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/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": 135, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/databases": { + "get": { + "summary": "Get databases queue", + "operationId": "healthGetQueueDatabases", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "x-appwrite": { + "method": "getQueueDatabases", + "weight": 137, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue-databases.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-databases.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": [] + } + ], + "parameters": [ + { + "name": "name", + "description": "Queue name for which to check the queue size", + "required": false, + "type": "string", + "x-example": "<NAME>", + "default": "database_db_main", + "in": "query" + }, + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/deletes": { + "get": { + "summary": "Get deletes queue", + "operationId": "healthGetQueueDeletes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "x-appwrite": { + "method": "getQueueDeletes", + "weight": 138, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue-deletes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-deletes.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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/failed\/{name}": { + "get": { + "summary": "Get number of failed queue jobs", + "operationId": "healthGetFailedJobs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Returns the amount of failed jobs in a given queue.\n", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "x-appwrite": { + "method": "getFailedJobs", + "weight": 148, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-failed-jobs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-failed-queue-jobs.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": [] + } + ], + "parameters": [ + { + "name": "name", + "description": "The name of the queue", + "required": true, + "type": "string", + "x-example": "v1-database", + "enum": [ + "v1-database", + "v1-deletes", + "v1-audits", + "v1-mails", + "v1-functions", + "v1-usage", + "v1-usage-dump", + "v1-webhooks", + "v1-certificates", + "v1-builds", + "v1-messaging", + "v1-migrations" + ], + "x-enum-name": null, + "x-enum-keys": [], + "in": "path" + }, + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/functions": { + "get": { + "summary": "Get functions queue", + "operationId": "healthGetQueueFunctions", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "x-appwrite": { + "method": "getQueueFunctions", + "weight": 142, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/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": 133, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/mails": { + "get": { + "summary": "Get mails queue", + "operationId": "healthGetQueueMails", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of mails that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "x-appwrite": { + "method": "getQueueMails", + "weight": 139, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue-mails.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-mails.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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/messaging": { + "get": { + "summary": "Get messaging queue", + "operationId": "healthGetQueueMessaging", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of messages that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "x-appwrite": { + "method": "getQueueMessaging", + "weight": 140, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue-messaging.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-messaging.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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/migrations": { + "get": { + "summary": "Get migrations queue", + "operationId": "healthGetQueueMigrations", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "x-appwrite": { + "method": "getQueueMigrations", + "weight": 141, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue-migrations.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-migrations.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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/usage": { + "get": { + "summary": "Get usage queue", + "operationId": "healthGetQueueUsage", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of metrics 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": 143, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/usage-dump": { + "get": { + "summary": "Get usage dump queue", + "operationId": "healthGetQueueUsageDump", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of projects containing metrics that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "x-appwrite": { + "method": "getQueueUsageDump", + "weight": 144, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue-usage-dump.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage-dump.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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/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": 132, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/storage": { + "get": { + "summary": "Get storage", + "operationId": "healthGetStorage", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite storage device is up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "schema": { + "$ref": "#\/definitions\/healthStatus" + } + } + }, + "x-appwrite": { + "method": "getStorage", + "weight": 146, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-storage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage.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": 145, + "cookies": false, + "type": "", + "deprecated": false, + "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": 131, + "cookies": false, + "type": "", + "deprecated": false, + "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": 117, + "cookies": false, + "type": "", + "deprecated": false, + "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\/codes": { + "get": { + "summary": "List locale codes", + "operationId": "localeListCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "List of all locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", + "responses": { + "200": { + "description": "Locale codes list", + "schema": { + "$ref": "#\/definitions\/localeCodeList" + } + } + }, + "x-appwrite": { + "method": "listCodes", + "weight": 118, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "locale\/list-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.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": "localeListContinents", + "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": "listContinents", + "weight": 122, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "locale\/list-continents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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": "localeListCountries", + "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": "listCountries", + "weight": 119, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "locale\/list-countries.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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": "localeListCountriesEU", + "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": "listCountriesEU", + "weight": 120, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "locale\/list-countries-e-u.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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": "localeListCountriesPhones", + "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": "listCountriesPhones", + "weight": 121, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "locale\/list-countries-phones.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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": "localeListCurrencies", + "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": "listCurrencies", + "weight": 123, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "locale\/list-currencies.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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": "localeListLanguages", + "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": "listLanguages", + "weight": 124, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "locale\/list-languages.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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": [] + } + ] + } + }, + "\/messaging\/messages": { + "get": { + "summary": "List messages", + "operationId": "messagingListMessages", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ "messaging" - ], - "x-enum-name": "ApiService", - "x-enum-keys": [] + ], + "description": "Get a list of all messages from the current Appwrite project.", + "responses": { + "200": { + "description": "Message list", + "schema": { + "$ref": "#\/definitions\/messageList" + } + } }, - "status": { - "type": "boolean", - "description": "Service status.", - "default": null, - "x-example": false - } - }, - "required": ["service", "status"] + "x-appwrite": { + "method": "listMessages", + "weight": 384, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-messages.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-messages.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] } - } - ] - } + }, + "\/messaging\/messages\/email": { + "post": { + "summary": "Create email", + "operationId": "messagingCreateEmail", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new email message.", + "responses": { + "201": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "x-appwrite": { + "method": "createEmail", + "weight": 381, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-email.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<MESSAGE_ID>" + }, + "subject": { + "type": "string", + "description": "Email Subject.", + "default": null, + "x-example": "<SUBJECT>" + }, + "content": { + "type": "string", + "description": "Email Content.", + "default": null, + "x-example": "<CONTENT>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "cc": { + "type": "array", + "description": "Array of target IDs to be added as CC.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "bcc": { + "type": "array", + "description": "Array of target IDs to be added as BCC.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "attachments": { + "type": "array", + "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": false, + "x-example": false + }, + "html": { + "type": "boolean", + "description": "Is content of type HTML", + "default": false, + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": null + } + }, + "required": [ + "messageId", + "subject", + "content" + ] + } + } + ] + } + }, + "\/messaging\/messages\/email\/{messageId}": { + "patch": { + "summary": "Update email", + "operationId": "messagingUpdateEmail", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "x-appwrite": { + "method": "updateEmail", + "weight": 388, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-email.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "subject": { + "type": "string", + "description": "Email Subject.", + "default": null, + "x-example": "<SUBJECT>" + }, + "content": { + "type": "string", + "description": "Email Content.", + "default": null, + "x-example": "<CONTENT>" + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": null, + "x-example": false + }, + "html": { + "type": "boolean", + "description": "Is content of type HTML", + "default": null, + "x-example": false + }, + "cc": { + "type": "array", + "description": "Array of target IDs to be added as CC.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "bcc": { + "type": "array", + "description": "Array of target IDs to be added as BCC.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": null + }, + "attachments": { + "type": "array", + "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + } + }, + "\/messaging\/messages\/push": { + "post": { + "summary": "Create push notification", + "operationId": "messagingCreatePush", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new push notification.", + "responses": { + "201": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "x-appwrite": { + "method": "createPush", + "weight": 383, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-push.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-push.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<MESSAGE_ID>" + }, + "title": { + "type": "string", + "description": "Title for push notification.", + "default": "", + "x-example": "<TITLE>" + }, + "body": { + "type": "string", + "description": "Body for push notification.", + "default": "", + "x-example": "<BODY>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "data": { + "type": "object", + "description": "Additional key-value pair data for push notification.", + "default": {}, + "x-example": "{}" + }, + "action": { + "type": "string", + "description": "Action for push notification.", + "default": "", + "x-example": "<ACTION>" + }, + "image": { + "type": "string", + "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", + "default": "", + "x-example": "[ID1:ID2]" + }, + "icon": { + "type": "string", + "description": "Icon for push notification. Available only for Android and Web Platform.", + "default": "", + "x-example": "<ICON>" + }, + "sound": { + "type": "string", + "description": "Sound for push notification. Available only for Android and iOS Platform.", + "default": "", + "x-example": "<SOUND>" + }, + "color": { + "type": "string", + "description": "Color for push notification. Available only for Android Platform.", + "default": "", + "x-example": "<COLOR>" + }, + "tag": { + "type": "string", + "description": "Tag for push notification. Available only for Android Platform.", + "default": "", + "x-example": "<TAG>" + }, + "badge": { + "type": "integer", + "description": "Badge for push notification. Available only for iOS Platform.", + "default": -1, + "x-example": null + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": false, + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": null + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "default": false, + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "default": false, + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", + "default": "high", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] + } + }, + "required": [ + "messageId" + ] + } + } + ] + } + }, + "\/messaging\/messages\/push\/{messageId}": { + "patch": { + "summary": "Update push notification", + "operationId": "messagingUpdatePush", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "x-appwrite": { + "method": "updatePush", + "weight": 390, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-push.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-push.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "title": { + "type": "string", + "description": "Title for push notification.", + "default": null, + "x-example": "<TITLE>" + }, + "body": { + "type": "string", + "description": "Body for push notification.", + "default": null, + "x-example": "<BODY>" + }, + "data": { + "type": "object", + "description": "Additional Data for push notification.", + "default": {}, + "x-example": "{}" + }, + "action": { + "type": "string", + "description": "Action for push notification.", + "default": null, + "x-example": "<ACTION>" + }, + "image": { + "type": "string", + "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", + "default": null, + "x-example": "[ID1:ID2]" + }, + "icon": { + "type": "string", + "description": "Icon for push notification. Available only for Android and Web platforms.", + "default": null, + "x-example": "<ICON>" + }, + "sound": { + "type": "string", + "description": "Sound for push notification. Available only for Android and iOS platforms.", + "default": null, + "x-example": "<SOUND>" + }, + "color": { + "type": "string", + "description": "Color for push notification. Available only for Android platforms.", + "default": null, + "x-example": "<COLOR>" + }, + "tag": { + "type": "string", + "description": "Tag for push notification. Available only for Android platforms.", + "default": null, + "x-example": "<TAG>" + }, + "badge": { + "type": "integer", + "description": "Badge for push notification. Available only for iOS platforms.", + "default": null, + "x-example": null + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": null, + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": null + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "default": null, + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "default": null, + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", + "default": null, + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] + } + } + } + } + ] + } + }, + "\/messaging\/messages\/sms": { + "post": { + "summary": "Create SMS", + "operationId": "messagingCreateSms", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new SMS message.", + "responses": { + "201": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "x-appwrite": { + "method": "createSms", + "weight": 382, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-sms.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<MESSAGE_ID>" + }, + "content": { + "type": "string", + "description": "SMS Content.", + "default": null, + "x-example": "<CONTENT>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": false, + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": null + } + }, + "required": [ + "messageId", + "content" + ] + } + } + ] + } + }, + "\/messaging\/messages\/sms\/{messageId}": { + "patch": { + "summary": "Update SMS", + "operationId": "messagingUpdateSms", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "x-appwrite": { + "method": "updateSms", + "weight": 389, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-sms.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "content": { + "type": "string", + "description": "Email Content.", + "default": null, + "x-example": "<CONTENT>" + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": null, + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/messaging\/messages\/{messageId}": { + "get": { + "summary": "Get message", + "operationId": "messagingGetMessage", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a message by its unique ID.\n", + "responses": { + "200": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "x-appwrite": { + "method": "getMessage", + "weight": 387, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/get-message.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-message.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete message", + "operationId": "messagingDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "messaging" + ], + "description": "Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "weight": 391, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-message.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + } + ] + } + }, + "\/messaging\/messages\/{messageId}\/logs": { + "get": { + "summary": "List message logs", + "operationId": "messagingListMessageLogs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get the message activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "x-appwrite": { + "method": "listMessageLogs", + "weight": 385, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-message-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_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\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/messaging\/messages\/{messageId}\/targets": { + "get": { + "summary": "List message targets", + "operationId": "messagingListTargets", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a list of the targets associated with a message.", + "responses": { + "200": { + "description": "Target list", + "schema": { + "$ref": "#\/definitions\/targetList" + } + } + }, + "x-appwrite": { + "method": "listTargets", + "weight": 386, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-targets.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-targets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_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\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/messaging\/providers": { + "get": { + "summary": "List providers", + "operationId": "messagingListProviders", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a list of all providers from the current Appwrite project.", + "responses": { + "200": { + "description": "Provider list", + "schema": { + "$ref": "#\/definitions\/providerList" + } + } + }, + "x-appwrite": { + "method": "listProviders", + "weight": 356, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-providers.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-providers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + } + }, + "\/messaging\/providers\/apns": { + "post": { + "summary": "Create APNS provider", + "operationId": "messagingCreateApnsProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Apple Push Notification service provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "createApnsProvider", + "weight": 355, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-apns-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-apns-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "authKey": { + "type": "string", + "description": "APNS authentication key.", + "default": "", + "x-example": "<AUTH_KEY>" + }, + "authKeyId": { + "type": "string", + "description": "APNS authentication key ID.", + "default": "", + "x-example": "<AUTH_KEY_ID>" + }, + "teamId": { + "type": "string", + "description": "APNS team ID.", + "default": "", + "x-example": "<TEAM_ID>" + }, + "bundleId": { + "type": "string", + "description": "APNS bundle ID.", + "default": "", + "x-example": "<BUNDLE_ID>" + }, + "sandbox": { + "type": "boolean", + "description": "Use APNS sandbox environment.", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/apns\/{providerId}": { + "patch": { + "summary": "Update APNS provider", + "operationId": "messagingUpdateApnsProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "updateApnsProvider", + "weight": 368, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-apns-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-apns-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + }, + "authKey": { + "type": "string", + "description": "APNS authentication key.", + "default": "", + "x-example": "<AUTH_KEY>" + }, + "authKeyId": { + "type": "string", + "description": "APNS authentication key ID.", + "default": "", + "x-example": "<AUTH_KEY_ID>" + }, + "teamId": { + "type": "string", + "description": "APNS team ID.", + "default": "", + "x-example": "<TEAM_ID>" + }, + "bundleId": { + "type": "string", + "description": "APNS bundle ID.", + "default": "", + "x-example": "<BUNDLE_ID>" + }, + "sandbox": { + "type": "boolean", + "description": "Use APNS sandbox environment.", + "default": null, + "x-example": false + } + } + } + } + ] + } + }, + "\/messaging\/providers\/fcm": { + "post": { + "summary": "Create FCM provider", + "operationId": "messagingCreateFcmProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "createFcmProvider", + "weight": 354, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-fcm-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-fcm-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "serviceAccountJSON": { + "type": "object", + "description": "FCM service account JSON.", + "default": {}, + "x-example": "{}" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/fcm\/{providerId}": { + "patch": { + "summary": "Update FCM provider", + "operationId": "messagingUpdateFcmProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "updateFcmProvider", + "weight": 367, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-fcm-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-fcm-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + }, + "serviceAccountJSON": { + "type": "object", + "description": "FCM service account JSON.", + "default": {}, + "x-example": "{}" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/mailgun": { + "post": { + "summary": "Create Mailgun provider", + "operationId": "messagingCreateMailgunProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Mailgun provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "createMailgunProvider", + "weight": 346, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-mailgun-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-mailgun-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Mailgun API Key.", + "default": "", + "x-example": "<API_KEY>" + }, + "domain": { + "type": "string", + "description": "Mailgun Domain.", + "default": "", + "x-example": "<DOMAIN>" + }, + "isEuRegion": { + "type": "boolean", + "description": "Set as EU region.", + "default": null, + "x-example": false + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well.", + "default": "", + "x-example": "email@example.com" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/mailgun\/{providerId}": { + "patch": { + "summary": "Update Mailgun provider", + "operationId": "messagingUpdateMailgunProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Mailgun provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "updateMailgunProvider", + "weight": 359, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-mailgun-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-mailgun-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Mailgun API Key.", + "default": "", + "x-example": "<API_KEY>" + }, + "domain": { + "type": "string", + "description": "Mailgun Domain.", + "default": "", + "x-example": "<DOMAIN>" + }, + "isEuRegion": { + "type": "boolean", + "description": "Set as EU region.", + "default": null, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/msg91": { + "post": { + "summary": "Create Msg91 provider", + "operationId": "messagingCreateMsg91Provider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new MSG91 provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "createMsg91Provider", + "weight": 349, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-msg91provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "templateId": { + "type": "string", + "description": "Msg91 template ID", + "default": "", + "x-example": "<TEMPLATE_ID>" + }, + "senderId": { + "type": "string", + "description": "Msg91 sender ID.", + "default": "", + "x-example": "<SENDER_ID>" + }, + "authKey": { + "type": "string", + "description": "Msg91 auth key.", + "default": "", + "x-example": "<AUTH_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/msg91\/{providerId}": { + "patch": { + "summary": "Update Msg91 provider", + "operationId": "messagingUpdateMsg91Provider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a MSG91 provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "updateMsg91Provider", + "weight": 362, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-msg91provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + }, + "templateId": { + "type": "string", + "description": "Msg91 template ID.", + "default": "", + "x-example": "<TEMPLATE_ID>" + }, + "senderId": { + "type": "string", + "description": "Msg91 sender ID.", + "default": "", + "x-example": "<SENDER_ID>" + }, + "authKey": { + "type": "string", + "description": "Msg91 auth key.", + "default": "", + "x-example": "<AUTH_KEY>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/sendgrid": { + "post": { + "summary": "Create Sendgrid provider", + "operationId": "messagingCreateSendgridProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Sendgrid provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "createSendgridProvider", + "weight": 347, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-sendgrid-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Sendgrid API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "email@example.com" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/sendgrid\/{providerId}": { + "patch": { + "summary": "Update Sendgrid provider", + "operationId": "messagingUpdateSendgridProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Sendgrid provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "updateSendgridProvider", + "weight": 360, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-sendgrid-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + }, + "apiKey": { + "type": "string", + "description": "Sendgrid API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/smtp": { + "post": { + "summary": "Create SMTP provider", + "operationId": "messagingCreateSmtpProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new SMTP provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "createSmtpProvider", + "weight": 348, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-smtp-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-smtp-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "host": { + "type": "string", + "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", + "default": null, + "x-example": "<HOST>" + }, + "port": { + "type": "integer", + "description": "The default SMTP server port.", + "default": 587, + "x-example": 1 + }, + "username": { + "type": "string", + "description": "Authentication username.", + "default": "", + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "Authentication password.", + "default": "", + "x-example": "<PASSWORD>" + }, + "encryption": { + "type": "string", + "description": "Encryption type. Can be omitted, 'ssl', or 'tls'", + "default": "", + "x-example": "none", + "enum": [ + "none", + "ssl", + "tls" + ], + "x-enum-name": "SmtpEncryption", + "x-enum-keys": [] + }, + "autoTLS": { + "type": "boolean", + "description": "Enable SMTP AutoTLS feature.", + "default": true, + "x-example": false + }, + "mailer": { + "type": "string", + "description": "The value to use for the X-Mailer header.", + "default": "", + "x-example": "<MAILER>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "email@example.com" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + } + }, + "required": [ + "providerId", + "name", + "host" + ] + } + } + ] + } + }, + "\/messaging\/providers\/smtp\/{providerId}": { + "patch": { + "summary": "Update SMTP provider", + "operationId": "messagingUpdateSmtpProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a SMTP provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "updateSmtpProvider", + "weight": 361, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-smtp-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-smtp-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "host": { + "type": "string", + "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", + "default": "", + "x-example": "<HOST>" + }, + "port": { + "type": "integer", + "description": "SMTP port.", + "default": null, + "x-example": 1 + }, + "username": { + "type": "string", + "description": "Authentication username.", + "default": "", + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "Authentication password.", + "default": "", + "x-example": "<PASSWORD>" + }, + "encryption": { + "type": "string", + "description": "Encryption type. Can be 'ssl' or 'tls'", + "default": "", + "x-example": "none", + "enum": [ + "none", + "ssl", + "tls" + ], + "x-enum-name": "SmtpEncryption", + "x-enum-keys": [] + }, + "autoTLS": { + "type": "boolean", + "description": "Enable SMTP AutoTLS feature.", + "default": null, + "x-example": false + }, + "mailer": { + "type": "string", + "description": "The value to use for the X-Mailer header.", + "default": "", + "x-example": "<MAILER>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + } + } + } + } + ] + } + }, + "\/messaging\/providers\/telesign": { + "post": { + "summary": "Create Telesign provider", + "operationId": "messagingCreateTelesignProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Telesign provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "createTelesignProvider", + "weight": 350, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-telesign-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-telesign-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100" + }, + "customerId": { + "type": "string", + "description": "Telesign customer ID.", + "default": "", + "x-example": "<CUSTOMER_ID>" + }, + "apiKey": { + "type": "string", + "description": "Telesign API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/telesign\/{providerId}": { + "patch": { + "summary": "Update Telesign provider", + "operationId": "messagingUpdateTelesignProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Telesign provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "updateTelesignProvider", + "weight": 363, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-telesign-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-telesign-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + }, + "customerId": { + "type": "string", + "description": "Telesign customer ID.", + "default": "", + "x-example": "<CUSTOMER_ID>" + }, + "apiKey": { + "type": "string", + "description": "Telesign API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "default": "", + "x-example": "<FROM>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/textmagic": { + "post": { + "summary": "Create Textmagic provider", + "operationId": "messagingCreateTextmagicProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Textmagic provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "createTextmagicProvider", + "weight": 351, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-textmagic-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-textmagic-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100" + }, + "username": { + "type": "string", + "description": "Textmagic username.", + "default": "", + "x-example": "<USERNAME>" + }, + "apiKey": { + "type": "string", + "description": "Textmagic apiKey.", + "default": "", + "x-example": "<API_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/textmagic\/{providerId}": { + "patch": { + "summary": "Update Textmagic provider", + "operationId": "messagingUpdateTextmagicProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Textmagic provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "updateTextmagicProvider", + "weight": 364, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-textmagic-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-textmagic-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + }, + "username": { + "type": "string", + "description": "Textmagic username.", + "default": "", + "x-example": "<USERNAME>" + }, + "apiKey": { + "type": "string", + "description": "Textmagic apiKey.", + "default": "", + "x-example": "<API_KEY>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "default": "", + "x-example": "<FROM>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/twilio": { + "post": { + "summary": "Create Twilio provider", + "operationId": "messagingCreateTwilioProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Twilio provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "createTwilioProvider", + "weight": 352, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-twilio-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-twilio-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100" + }, + "accountSid": { + "type": "string", + "description": "Twilio account secret ID.", + "default": "", + "x-example": "<ACCOUNT_SID>" + }, + "authToken": { + "type": "string", + "description": "Twilio authentication token.", + "default": "", + "x-example": "<AUTH_TOKEN>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/twilio\/{providerId}": { + "patch": { + "summary": "Update Twilio provider", + "operationId": "messagingUpdateTwilioProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Twilio provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "updateTwilioProvider", + "weight": 365, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-twilio-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-twilio-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + }, + "accountSid": { + "type": "string", + "description": "Twilio account secret ID.", + "default": "", + "x-example": "<ACCOUNT_SID>" + }, + "authToken": { + "type": "string", + "description": "Twilio authentication token.", + "default": "", + "x-example": "<AUTH_TOKEN>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "default": "", + "x-example": "<FROM>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/vonage": { + "post": { + "summary": "Create Vonage provider", + "operationId": "messagingCreateVonageProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Vonage provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "createVonageProvider", + "weight": 353, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-vonage-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-vonage-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100" + }, + "apiKey": { + "type": "string", + "description": "Vonage API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "apiSecret": { + "type": "string", + "description": "Vonage API secret.", + "default": "", + "x-example": "<API_SECRET>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/vonage\/{providerId}": { + "patch": { + "summary": "Update Vonage provider", + "operationId": "messagingUpdateVonageProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Vonage provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "updateVonageProvider", + "weight": 366, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-vonage-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-vonage-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + }, + "apiKey": { + "type": "string", + "description": "Vonage API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "apiSecret": { + "type": "string", + "description": "Vonage API secret.", + "default": "", + "x-example": "<API_SECRET>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "default": "", + "x-example": "<FROM>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/{providerId}": { + "get": { + "summary": "Get provider", + "operationId": "messagingGetProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a provider by its unique ID.\n", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "getProvider", + "weight": 358, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/get-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete provider", + "operationId": "messagingDeleteProvider", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "messaging" + ], + "description": "Delete a provider by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteProvider", + "weight": 369, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/delete-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + } + ] + } + }, + "\/messaging\/providers\/{providerId}\/logs": { + "get": { + "summary": "List provider logs", + "operationId": "messagingListProviderLogs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get the provider activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "x-appwrite": { + "method": "listProviderLogs", + "weight": 357, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-provider-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-provider-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_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\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/messaging\/subscribers\/{subscriberId}\/logs": { + "get": { + "summary": "List subscriber logs", + "operationId": "messagingListSubscriberLogs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get the subscriber activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "x-appwrite": { + "method": "listSubscriberLogs", + "weight": 378, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-subscriber-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscriber-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "type": "string", + "x-example": "<SUBSCRIBER_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\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/messaging\/topics": { + "get": { + "summary": "List topics", + "operationId": "messagingListTopics", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a list of all topics from the current Appwrite project.", + "responses": { + "200": { + "description": "Topic list", + "schema": { + "$ref": "#\/definitions\/topicList" + } + } + }, + "x-appwrite": { + "method": "listTopics", + "weight": 371, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-topics.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topics.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + }, + "post": { + "summary": "Create topic", + "operationId": "messagingCreateTopic", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new topic.", + "responses": { + "201": { + "description": "Topic", + "schema": { + "$ref": "#\/definitions\/topic" + } + } + }, + "x-appwrite": { + "method": "createTopic", + "weight": 370, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-topic.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "topicId": { + "type": "string", + "description": "Topic ID. Choose a custom Topic ID or a new Topic ID.", + "default": null, + "x-example": "<TOPIC_ID>" + }, + "name": { + "type": "string", + "description": "Topic Name.", + "default": null, + "x-example": "<NAME>" + }, + "subscribe": { + "type": "array", + "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "default": [ + "users" + ], + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + } + }, + "required": [ + "topicId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/topics\/{topicId}": { + "get": { + "summary": "Get topic", + "operationId": "messagingGetTopic", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a topic by its unique ID.\n", + "responses": { + "200": { + "description": "Topic", + "schema": { + "$ref": "#\/definitions\/topic" + } + } + }, + "x-appwrite": { + "method": "getTopic", + "weight": 373, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/get-topic.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update topic", + "operationId": "messagingUpdateTopic", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a topic by its unique ID.\n", + "responses": { + "200": { + "description": "Topic", + "schema": { + "$ref": "#\/definitions\/topic" + } + } + }, + "x-appwrite": { + "method": "updateTopic", + "weight": 374, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-topic.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Topic Name.", + "default": null, + "x-example": "<NAME>" + }, + "subscribe": { + "type": "array", + "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "default": null, + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete topic", + "operationId": "messagingDeleteTopic", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "messaging" + ], + "description": "Delete a topic by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteTopic", + "weight": 375, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/delete-topic.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + } + ] + } + }, + "\/messaging\/topics\/{topicId}\/logs": { + "get": { + "summary": "List topic logs", + "operationId": "messagingListTopicLogs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get the topic activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "x-appwrite": { + "method": "listTopicLogs", + "weight": 372, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-topic-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topic-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "type": "string", + "x-example": "<TOPIC_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\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/messaging\/topics\/{topicId}\/subscribers": { + "get": { + "summary": "List subscribers", + "operationId": "messagingListSubscribers", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a list of all subscribers from the current Appwrite project.", + "responses": { + "200": { + "description": "Subscriber list", + "schema": { + "$ref": "#\/definitions\/subscriberList" + } + } + }, + "x-appwrite": { + "method": "listSubscribers", + "weight": 377, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-subscribers.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "type": "string", + "x-example": "<TOPIC_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\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + }, + "post": { + "summary": "Create subscriber", + "operationId": "messagingCreateSubscriber", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new subscriber.", + "responses": { + "201": { + "description": "Subscriber", + "schema": { + "$ref": "#\/definitions\/subscriber" + } + } + }, + "x-appwrite": { + "method": "createSubscriber", + "weight": 376, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-subscriber.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.write", + "platforms": [ + "server", + "client", + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID to subscribe to.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "subscriberId": { + "type": "string", + "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", + "default": null, + "x-example": "<SUBSCRIBER_ID>" + }, + "targetId": { + "type": "string", + "description": "Target ID. The target ID to link to the specified Topic ID.", + "default": null, + "x-example": "<TARGET_ID>" + } + }, + "required": [ + "subscriberId", + "targetId" + ] + } + } + ] + } + }, + "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { + "get": { + "summary": "Get subscriber", + "operationId": "messagingGetSubscriber", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a subscriber by its unique ID.\n", + "responses": { + "200": { + "description": "Subscriber", + "schema": { + "$ref": "#\/definitions\/subscriber" + } + } + }, + "x-appwrite": { + "method": "getSubscriber", + "weight": 379, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/get-subscriber.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + }, + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "type": "string", + "x-example": "<SUBSCRIBER_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete subscriber", + "operationId": "messagingDeleteSubscriber", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "messaging" + ], + "description": "Delete a subscriber by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteSubscriber", + "weight": 380, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/delete-subscriber.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.write", + "platforms": [ + "server", + "client", + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + }, + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "type": "string", + "x-example": "<SUBSCRIBER_ID>", + "in": "path" + } + ] + } + }, + "\/migrations": { + "get": { + "summary": "List migrations", + "operationId": "migrationsList", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.", + "responses": { + "200": { + "description": "Migrations List", + "schema": { + "$ref": "#\/definitions\/migrationList" + } + } + }, + "x-appwrite": { + "method": "list", + "weight": 338, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "migrations\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/list-migrations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, statusCounters, resourceData, errors", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + } + }, + "\/migrations\/appwrite": { + "post": { + "summary": "Migrate Appwrite data", + "operationId": "migrationsCreateAppwriteMigration", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project. ", + "responses": { + "202": { + "description": "Migration", + "schema": { + "$ref": "#\/definitions\/migration" + } + } + }, + "x-appwrite": { + "method": "createAppwriteMigration", + "weight": 334, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "migrations\/create-appwrite-migration.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-appwrite.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "description": "List of resources to migrate", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "endpoint": { + "type": "string", + "description": "Source's Appwrite Endpoint", + "default": null, + "x-example": "https:\/\/example.com" + }, + "projectId": { + "type": "string", + "description": "Source's Project ID", + "default": null, + "x-example": "<PROJECT_ID>" + }, + "apiKey": { + "type": "string", + "description": "Source's API Key", + "default": null, + "x-example": "<API_KEY>" + } + }, + "required": [ + "resources", + "endpoint", + "projectId", + "apiKey" + ] + } + } + ] + } + }, + "\/migrations\/appwrite\/report": { + "get": { + "summary": "Generate a report on Appwrite data", + "operationId": "migrationsGetAppwriteReport", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", + "responses": { + "200": { + "description": "Migration Report", + "schema": { + "$ref": "#\/definitions\/migrationReport" + } + } + }, + "x-appwrite": { + "method": "getAppwriteReport", + "weight": 340, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "migrations\/get-appwrite-report.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-appwrite-report.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "resources", + "description": "List of resources to migrate", + "required": true, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "in": "query" + }, + { + "name": "endpoint", + "description": "Source's Appwrite Endpoint", + "required": true, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "in": "query" + }, + { + "name": "projectID", + "description": "Source's Project ID", + "required": true, + "type": "string", + "x-example": "<PROJECT_ID>", + "in": "query" + }, + { + "name": "key", + "description": "Source's API Key", + "required": true, + "type": "string", + "x-example": "<KEY>", + "in": "query" + } + ] + } + }, + "\/migrations\/firebase": { + "post": { + "summary": "Migrate Firebase data", + "operationId": "migrationsCreateFirebaseMigration", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project. ", + "responses": { + "202": { + "description": "Migration", + "schema": { + "$ref": "#\/definitions\/migration" + } + } + }, + "x-appwrite": { + "method": "createFirebaseMigration", + "weight": 335, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "migrations\/create-firebase-migration.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-firebase.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "description": "List of resources to migrate", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "serviceAccount": { + "type": "string", + "description": "JSON of the Firebase service account credentials", + "default": null, + "x-example": "<SERVICE_ACCOUNT>" + } + }, + "required": [ + "resources", + "serviceAccount" + ] + } + } + ] + } + }, + "\/migrations\/firebase\/report": { + "get": { + "summary": "Generate a report on Firebase data", + "operationId": "migrationsGetFirebaseReport", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", + "responses": { + "200": { + "description": "Migration Report", + "schema": { + "$ref": "#\/definitions\/migrationReport" + } + } + }, + "x-appwrite": { + "method": "getFirebaseReport", + "weight": 341, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "migrations\/get-firebase-report.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-firebase-report.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "resources", + "description": "List of resources to migrate", + "required": true, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "in": "query" + }, + { + "name": "serviceAccount", + "description": "JSON of the Firebase service account credentials", + "required": true, + "type": "string", + "x-example": "<SERVICE_ACCOUNT>", + "in": "query" + } + ] + } + }, + "\/migrations\/nhost": { + "post": { + "summary": "Migrate NHost data", + "operationId": "migrationsCreateNHostMigration", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project. ", + "responses": { + "202": { + "description": "Migration", + "schema": { + "$ref": "#\/definitions\/migration" + } + } + }, + "x-appwrite": { + "method": "createNHostMigration", + "weight": 337, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "migrations\/create-n-host-migration.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-nhost.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "description": "List of resources to migrate", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "subdomain": { + "type": "string", + "description": "Source's Subdomain", + "default": null, + "x-example": "<SUBDOMAIN>" + }, + "region": { + "type": "string", + "description": "Source's Region", + "default": null, + "x-example": "<REGION>" + }, + "adminSecret": { + "type": "string", + "description": "Source's Admin Secret", + "default": null, + "x-example": "<ADMIN_SECRET>" + }, + "database": { + "type": "string", + "description": "Source's Database Name", + "default": null, + "x-example": "<DATABASE>" + }, + "username": { + "type": "string", + "description": "Source's Database Username", + "default": null, + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "Source's Database Password", + "default": null, + "x-example": "<PASSWORD>" + }, + "port": { + "type": "integer", + "description": "Source's Database Port", + "default": 5432, + "x-example": null + } + }, + "required": [ + "resources", + "subdomain", + "region", + "adminSecret", + "database", + "username", + "password" + ] + } + } + ] + } + }, + "\/migrations\/nhost\/report": { + "get": { + "summary": "Generate a report on NHost Data", + "operationId": "migrationsGetNHostReport", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", + "responses": { + "200": { + "description": "Migration Report", + "schema": { + "$ref": "#\/definitions\/migrationReport" + } + } + }, + "x-appwrite": { + "method": "getNHostReport", + "weight": 343, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "migrations\/get-n-host-report.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-nhost-report.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "resources", + "description": "List of resources to migrate.", + "required": true, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "in": "query" + }, + { + "name": "subdomain", + "description": "Source's Subdomain.", + "required": true, + "type": "string", + "x-example": "<SUBDOMAIN>", + "in": "query" + }, + { + "name": "region", + "description": "Source's Region.", + "required": true, + "type": "string", + "x-example": "<REGION>", + "in": "query" + }, + { + "name": "adminSecret", + "description": "Source's Admin Secret.", + "required": true, + "type": "string", + "x-example": "<ADMIN_SECRET>", + "in": "query" + }, + { + "name": "database", + "description": "Source's Database Name.", + "required": true, + "type": "string", + "x-example": "<DATABASE>", + "in": "query" + }, + { + "name": "username", + "description": "Source's Database Username.", + "required": true, + "type": "string", + "x-example": "<USERNAME>", + "in": "query" + }, + { + "name": "password", + "description": "Source's Database Password.", + "required": true, + "type": "string", + "x-example": "<PASSWORD>", + "in": "query" + }, + { + "name": "port", + "description": "Source's Database Port.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5432, + "in": "query" + } + ] + } + }, + "\/migrations\/supabase": { + "post": { + "summary": "Migrate Supabase data", + "operationId": "migrationsCreateSupabaseMigration", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project. ", + "responses": { + "202": { + "description": "Migration", + "schema": { + "$ref": "#\/definitions\/migration" + } + } + }, + "x-appwrite": { + "method": "createSupabaseMigration", + "weight": 336, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "migrations\/create-supabase-migration.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-supabase.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "description": "List of resources to migrate", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "endpoint": { + "type": "string", + "description": "Source's Supabase Endpoint", + "default": null, + "x-example": "https:\/\/example.com" + }, + "apiKey": { + "type": "string", + "description": "Source's API Key", + "default": null, + "x-example": "<API_KEY>" + }, + "databaseHost": { + "type": "string", + "description": "Source's Database Host", + "default": null, + "x-example": "<DATABASE_HOST>" + }, + "username": { + "type": "string", + "description": "Source's Database Username", + "default": null, + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "Source's Database Password", + "default": null, + "x-example": "<PASSWORD>" + }, + "port": { + "type": "integer", + "description": "Source's Database Port", + "default": 5432, + "x-example": null + } + }, + "required": [ + "resources", + "endpoint", + "apiKey", + "databaseHost", + "username", + "password" + ] + } + } + ] + } + }, + "\/migrations\/supabase\/report": { + "get": { + "summary": "Generate a report on Supabase Data", + "operationId": "migrationsGetSupabaseReport", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", + "responses": { + "200": { + "description": "Migration Report", + "schema": { + "$ref": "#\/definitions\/migrationReport" + } + } + }, + "x-appwrite": { + "method": "getSupabaseReport", + "weight": 342, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "migrations\/get-supabase-report.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-supabase-report.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "resources", + "description": "List of resources to migrate", + "required": true, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "in": "query" + }, + { + "name": "endpoint", + "description": "Source's Supabase Endpoint.", + "required": true, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "in": "query" + }, + { + "name": "apiKey", + "description": "Source's API Key.", + "required": true, + "type": "string", + "x-example": "<API_KEY>", + "in": "query" + }, + { + "name": "databaseHost", + "description": "Source's Database Host.", + "required": true, + "type": "string", + "x-example": "<DATABASE_HOST>", + "in": "query" + }, + { + "name": "username", + "description": "Source's Database Username.", + "required": true, + "type": "string", + "x-example": "<USERNAME>", + "in": "query" + }, + { + "name": "password", + "description": "Source's Database Password.", + "required": true, + "type": "string", + "x-example": "<PASSWORD>", + "in": "query" + }, + { + "name": "port", + "description": "Source's Database Port.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5432, + "in": "query" + } + ] + } + }, + "\/migrations\/{migrationId}": { + "get": { + "summary": "Get migration", + "operationId": "migrationsGet", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process. ", + "responses": { + "200": { + "description": "Migration", + "schema": { + "$ref": "#\/definitions\/migration" + } + } + }, + "x-appwrite": { + "method": "get", + "weight": 339, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "migrations\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/get-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "migrationId", + "description": "Migration unique ID.", + "required": true, + "type": "string", + "x-example": "<MIGRATION_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Retry migration", + "operationId": "migrationsRetry", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Retry a failed migration. This endpoint allows you to retry a migration that has previously failed.", + "responses": { + "202": { + "description": "Migration", + "schema": { + "$ref": "#\/definitions\/migration" + } + } + }, + "x-appwrite": { + "method": "retry", + "weight": 344, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "migrations\/retry.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/retry-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "migrationId", + "description": "Migration unique ID.", + "required": true, + "type": "string", + "x-example": "<MIGRATION_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete migration", + "operationId": "migrationsDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "migrations" + ], + "description": "Delete a migration by its unique ID. This endpoint allows you to remove a migration from your project's migration history. ", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "weight": 345, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "migrations\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/delete-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "migrationId", + "description": "Migration ID.", + "required": true, + "type": "string", + "x-example": "<MIGRATION_ID>", + "in": "path" + } + ] + } + }, + "\/project\/usage": { + "get": { + "summary": "Get project usage stats", + "operationId": "projectGetUsage", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get comprehensive usage statistics for your project. View metrics including network requests, bandwidth, storage, function executions, database usage, and user activity. Specify a time range with startDate and endDate, and optionally set the data granularity with period (1h or 1d). The response includes both total counts and detailed breakdowns by resource, along with historical data over the specified period.", + "responses": { + "200": { + "description": "UsageProject", + "schema": { + "$ref": "#\/definitions\/usageProject" + } + } + }, + "x-appwrite": { + "method": "getUsage", + "weight": 196, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "project\/get-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/get-usage.md", + "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": "startDate", + "description": "Starting date for the usage", + "required": true, + "type": "string", + "in": "query" + }, + { + "name": "endDate", + "description": "End date for the usage", + "required": true, + "type": "string", + "in": "query" + }, + { + "name": "period", + "description": "Period used", + "required": false, + "type": "string", + "x-example": "1h", + "enum": [ + "1h", + "1d" + ], + "x-enum-name": "ProjectUsageRange", + "x-enum-keys": [ + "One Hour", + "One Day" + ], + "default": "1d", + "in": "query" + } + ] + } + }, + "\/project\/variables": { + "get": { + "summary": "List variables", + "operationId": "projectListVariables", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a list of all project variables. These variables will be accessible in all Appwrite Functions at runtime.", + "responses": { + "200": { + "description": "Variables List", + "schema": { + "$ref": "#\/definitions\/variableList" + } + } + }, + "x-appwrite": { + "method": "listVariables", + "weight": 198, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "project\/list-variables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/list-variables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ] + }, + "post": { + "summary": "Create variable", + "operationId": "projectCreateVariable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Create a new project variable. This variable will be accessible in all Appwrite Functions at runtime.", + "responses": { + "201": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "x-appwrite": { + "method": "createVariable", + "weight": 197, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "project\/create-variable.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/create-variable.md", + "rate-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": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "default": null, + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "default": null, + "x-example": "<VALUE>" + } + }, + "required": [ + "key", + "value" + ] + } + } + ] + } + }, + "\/project\/variables\/{variableId}": { + "get": { + "summary": "Get variable", + "operationId": "projectGetVariable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a project variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "x-appwrite": { + "method": "getVariable", + "weight": 199, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "project\/get-variable.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/get-variable.md", + "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": "variableId", + "description": "Variable unique ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update variable", + "operationId": "projectUpdateVariable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update project variable by its unique ID. This variable will be accessible in all Appwrite Functions at runtime.", + "responses": { + "200": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "x-appwrite": { + "method": "updateVariable", + "weight": 200, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "project\/update-variable.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/update-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "default": null, + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "default": null, + "x-example": "<VALUE>" + } + }, + "required": [ + "key" + ] + } + } + ] + }, + "delete": { + "summary": "Delete variable", + "operationId": "projectDeleteVariable", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "project" + ], + "description": "Delete a project variable by its unique ID. ", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteVariable", + "weight": 201, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "project\/delete-variable.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/delete-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + } + ] + } + }, + "\/projects": { + "get": { + "summary": "List projects", + "operationId": "projectsList", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Get a list of all projects. You can use the query params to filter your results. ", + "responses": { + "200": { + "description": "Projects List", + "schema": { + "$ref": "#\/definitions\/projectList" + } + } + }, + "x-appwrite": { + "method": "list", + "weight": 151, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list.md", + "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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + }, + "post": { + "summary": "Create project", + "operationId": "projectsCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Create a new project. You can create a maximum of 100 projects per account. ", + "responses": { + "201": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "create", + "weight": 150, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create.md", + "rate-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 a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": null + }, + "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>" + }, + "region": { + "type": "string", + "description": "Project Region.", + "default": "default", + "x-example": "default", + "enum": [ + "default", + "fra" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "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": "Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata. ", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "get", + "weight": 152, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get.md", + "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": "Update a project by its unique ID.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "update", + "weight": 153, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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": "Delete a project by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "weight": 170, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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" + } + ] + } + }, + "\/projects\/{projectId}\/api": { + "patch": { + "summary": "Update API status", + "operationId": "projectsUpdateApiStatus", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateApiStatus", + "weight": 157, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-api-status.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-api-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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": { + "api": { + "type": "string", + "description": "API name.", + "default": null, + "x-example": "rest", + "enum": [ + "rest", + "graphql", + "realtime" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "status": { + "type": "boolean", + "description": "API status.", + "default": null, + "x-example": false + } + }, + "required": [ + "api", + "status" + ] + } + } + ] + } + }, + "\/projects\/{projectId}\/api\/all": { + "patch": { + "summary": "Update all API status", + "operationId": "projectsUpdateApiStatusAll", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateApiStatusAll", + "weight": 158, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-api-status-all.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-api-status-all.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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": { + "status": { + "type": "boolean", + "description": "API status.", + "default": null, + "x-example": false + } + }, + "required": [ + "status" + ] + } + } + ] + } + }, + "\/projects\/{projectId}\/auth\/duration": { + "patch": { + "summary": "Update project authentication duration", + "operationId": "projectsUpdateAuthDuration", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Update how long sessions created within a project should stay active for.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateAuthDuration", + "weight": 163, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-auth-duration.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-duration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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": { + "duration": { + "type": "integer", + "description": "Project session length in seconds. Max length: 31536000 seconds.", + "default": null, + "x-example": 0 + } + }, + "required": [ + "duration" + ] + } + } + ] + } + }, + "\/projects\/{projectId}\/auth\/limit": { + "patch": { + "summary": "Update project users limit", + "operationId": "projectsUpdateAuthLimit", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Update the maximum number of users allowed in this project. Set to 0 for unlimited users. ", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateAuthLimit", + "weight": 162, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-auth-limit.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-limit.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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\/max-sessions": { + "patch": { + "summary": "Update project user sessions limit", + "operationId": "projectsUpdateAuthSessionsLimit", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateAuthSessionsLimit", + "weight": 168, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-auth-sessions-limit.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-sessions-limit.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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. Value allowed is between 1-100. Default is 10", + "default": null, + "x-example": 1 + } + }, + "required": [ + "limit" + ] + } + } + ] + } + }, + "\/projects\/{projectId}\/auth\/memberships-privacy": { + "patch": { + "summary": "Update project memberships privacy attributes", + "operationId": "projectsUpdateMembershipsPrivacy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Update project membership privacy settings. Use this endpoint to control what user information is visible to other team members, such as user name, email, and MFA status. ", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateMembershipsPrivacy", + "weight": 161, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-memberships-privacy.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-memberships-privacy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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": { + "userName": { + "type": "boolean", + "description": "Set to true to show userName to members of a team.", + "default": null, + "x-example": false + }, + "userEmail": { + "type": "boolean", + "description": "Set to true to show email to members of a team.", + "default": null, + "x-example": false + }, + "mfa": { + "type": "boolean", + "description": "Set to true to show mfa to members of a team.", + "default": null, + "x-example": false + } + }, + "required": [ + "userName", + "userEmail", + "mfa" + ] + } + } + ] + } + }, + "\/projects\/{projectId}\/auth\/mock-numbers": { + "patch": { + "summary": "Update the mock numbers for the project", + "operationId": "projectsUpdateMockNumbers", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Update the list of mock phone numbers for testing. Use these numbers to bypass SMS verification in development. ", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateMockNumbers", + "weight": 169, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-mock-numbers.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-mock-numbers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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": { + "numbers": { + "type": "array", + "description": "An array of mock numbers and their corresponding verification codes (OTPs). Each number should be a valid E.164 formatted phone number. Maximum of 10 numbers are allowed.", + "default": null, + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "numbers" + ] + } + } + ] + } + }, + "\/projects\/{projectId}\/auth\/password-dictionary": { + "patch": { + "summary": "Update authentication password dictionary status. Use this endpoint to enable or disable the dicitonary check for user password", + "operationId": "projectsUpdateAuthPasswordDictionary", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don't use common and insecure passwords. ", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateAuthPasswordDictionary", + "weight": 166, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-auth-password-dictionary.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-password-dictionary.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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": { + "enabled": { + "type": "boolean", + "description": "Set whether or not to enable checking user's password against most commonly used passwords. Default is false.", + "default": null, + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + ] + } + }, + "\/projects\/{projectId}\/auth\/password-history": { + "patch": { + "summary": "Update authentication password history. Use this endpoint to set the number of password history to save and 0 to disable password history.", + "operationId": "projectsUpdateAuthPasswordHistory", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Update the authentication password history requirement. Use this endpoint to require new passwords to be different than the last X amount of previously used ones.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateAuthPasswordHistory", + "weight": 165, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-auth-password-history.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-password-history.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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 passwords to store in user history. User can't choose a new password that is already stored in the password history list. Max number of passwords allowed in history is20. Default value is 0", + "default": null, + "x-example": 0 + } + }, + "required": [ + "limit" + ] + } + } + ] + } + }, + "\/projects\/{projectId}\/auth\/personal-data": { + "patch": { + "summary": "Enable or disable checking user passwords for similarity with their personal data.", + "operationId": "projectsUpdatePersonalDataCheck", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords. ", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updatePersonalDataCheck", + "weight": 167, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-personal-data-check.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-personal-data-check.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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": { + "enabled": { + "type": "boolean", + "description": "Set whether or not to check a password for similarity with personal data. Default is false.", + "default": null, + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + ] + } + }, + "\/projects\/{projectId}\/auth\/session-alerts": { + "patch": { + "summary": "Update project sessions emails", + "operationId": "projectsUpdateSessionAlerts", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateSessionAlerts", + "weight": 160, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-session-alerts.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-session-alerts.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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": { + "alerts": { + "type": "boolean", + "description": "Set to true to enable session emails.", + "default": null, + "x-example": false + } + }, + "required": [ + "alerts" + ] + } + } + ] + } + }, + "\/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": "Update the status of a specific authentication method. Use this endpoint to enable or disable different authentication methods such as email, magic urls or sms in your project. ", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateAuthStatus", + "weight": 164, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-auth-status.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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,email-otp,anonymous,invites,jwt,phone", + "required": true, + "type": "string", + "x-example": "email-password", + "enum": [ + "email-password", + "magic-url", + "email-otp", + "anonymous", + "invites", + "jwt", + "phone" + ], + "x-enum-name": "AuthMethod", + "x-enum-keys": [], + "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}\/jwts": { + "post": { + "summary": "Create JWT", + "operationId": "projectsCreateJWT", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time. ", + "responses": { + "201": { + "description": "JWT", + "schema": { + "$ref": "#\/definitions\/jwt" + } + } + }, + "x-appwrite": { + "method": "createJWT", + "weight": 182, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/create-j-w-t.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-jwt.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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": { + "scopes": { + "type": "array", + "description": "List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "duration": { + "type": "integer", + "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", + "default": 900, + "x-example": 0 + } + }, + "required": [ + "scopes" + ] + } + } + ] + } + }, + "\/projects\/{projectId}\/keys": { + "get": { + "summary": "List keys", + "operationId": "projectsListKeys", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Get a list of all API keys from the current project. ", + "responses": { + "200": { + "description": "API Keys List", + "schema": { + "$ref": "#\/definitions\/keyList" + } + } + }, + "x-appwrite": { + "method": "listKeys", + "weight": 178, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/list-keys.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-keys.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.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": "Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.", + "responses": { + "201": { + "description": "Key", + "schema": { + "$ref": "#\/definitions\/key" + } + } + }, + "x-appwrite": { + "method": "createKey", + "weight": 177, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/create-key.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "<PROJECT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Key name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "scopes": { + "type": "array", + "description": "Key scopes list. Maximum of 100 scopes are allowed.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "expire": { + "type": "string", + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", + "default": null, + "x-example": null + } + }, + "required": [ + "name", + "scopes" + ] + } + } + ] + } + }, + "\/projects\/{projectId}\/keys\/{keyId}": { + "get": { + "summary": "Get key", + "operationId": "projectsGetKey", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it's scopes.", + "responses": { + "200": { + "description": "Key", + "schema": { + "$ref": "#\/definitions\/key" + } + } + }, + "x-appwrite": { + "method": "getKey", + "weight": 179, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/get-key.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.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": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key. ", + "responses": { + "200": { + "description": "Key", + "schema": { + "$ref": "#\/definitions\/key" + } + } + }, + "x-appwrite": { + "method": "updateKey", + "weight": 180, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-key.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "<PROJECT_ID>", + "in": "path" + }, + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "type": "string", + "x-example": "<KEY_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Key name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "scopes": { + "type": "array", + "description": "Key scopes list. Maximum of 100 events are allowed.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "expire": { + "type": "string", + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", + "default": null, + "x-example": null + } + }, + "required": [ + "name", + "scopes" + ] + } + } + ] + }, + "delete": { + "summary": "Delete key", + "operationId": "projectsDeleteKey", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "projects" + ], + "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls. ", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteKey", + "weight": 181, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/delete-key.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.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": "Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable\/disable providers. ", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateOAuth2", + "weight": 159, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-o-auth2.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-oauth2.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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", + "enum": [ + "amazon", + "apple", + "auth0", + "authentik", + "autodesk", + "bitbucket", + "bitly", + "box", + "dailymotion", + "discord", + "disqus", + "dropbox", + "etsy", + "facebook", + "github", + "gitlab", + "google", + "linkedin", + "microsoft", + "notion", + "oidc", + "okta", + "paypal", + "paypalSandbox", + "podio", + "salesforce", + "slack", + "spotify", + "stripe", + "tradeshift", + "tradeshiftBox", + "twitch", + "wordpress", + "yahoo", + "yammer", + "yandex", + "zoho", + "zoom", + "mock" + ], + "x-enum-name": "OAuthProvider", + "x-enum-keys": [] + }, + "appId": { + "type": "string", + "description": "Provider app ID. Max length: 256 chars.", + "default": null, + "x-example": "<APP_ID>" + }, + "secret": { + "type": "string", + "description": "Provider secret key. Max length: 512 chars.", + "default": null, + "x-example": "<SECRET>" + }, + "enabled": { + "type": "boolean", + "description": "Provider status. Set to 'false' to disable new session creation.", + "default": null, + "x-example": false + } + }, + "required": [ + "provider" + ] + } + } + ] + } + }, + "\/projects\/{projectId}\/platforms": { + "get": { + "summary": "List platforms", + "operationId": "projectsListPlatforms", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations. ", + "responses": { + "200": { + "description": "Platforms List", + "schema": { + "$ref": "#\/definitions\/platformList" + } + } + }, + "x-appwrite": { + "method": "listPlatforms", + "weight": 184, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/list-platforms.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-platforms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.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": "Create a new platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform", + "schema": { + "$ref": "#\/definitions\/platform" + } + } + }, + "x-appwrite": { + "method": "createPlatform", + "weight": 183, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/create-platform.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.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", + "enum": [ + "web", + "flutter-web", + "flutter-ios", + "flutter-android", + "flutter-linux", + "flutter-macos", + "flutter-windows", + "apple-ios", + "apple-macos", + "apple-watchos", + "apple-tvos", + "android", + "unity", + "react-native-ios", + "react-native-android" + ], + "x-enum-name": "PlatformType", + "x-enum-keys": [] + }, + "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": "Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations. ", + "responses": { + "200": { + "description": "Platform", + "schema": { + "$ref": "#\/definitions\/platform" + } + } + }, + "x-appwrite": { + "method": "getPlatform", + "weight": 185, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/get-platform.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.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": "Update a platform by its unique ID. Use this endpoint to update the platform's name, key, platform store ID, or hostname. ", + "responses": { + "200": { + "description": "Platform", + "schema": { + "$ref": "#\/definitions\/platform" + } + } + }, + "x-appwrite": { + "method": "updatePlatform", + "weight": 186, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-platform.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.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": "Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project. ", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deletePlatform", + "weight": 187, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/delete-platform.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.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": "Update the status of a specific service. Use this endpoint to enable or disable a service in your project. ", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateServiceStatus", + "weight": 155, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-service-status.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-service-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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", + "enum": [ + "account", + "avatars", + "databases", + "locale", + "health", + "storage", + "teams", + "users", + "functions", + "graphql", + "messaging" + ], + "x-enum-name": "ApiService", + "x-enum-keys": [] + }, + "status": { + "type": "boolean", + "description": "Service status.", + "default": null, + "x-example": false + } + }, + "required": [ + "service", + "status" + ] + } + } + ] + } + }, + "\/projects\/{projectId}\/service\/all": { + "patch": { + "summary": "Update all service status", + "operationId": "projectsUpdateServiceStatusAll", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Update the status of all services. Use this endpoint to enable or disable all optional services at once. ", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateServiceStatusAll", + "weight": 156, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-service-status-all.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-service-status-all.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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": { + "status": { + "type": "boolean", + "description": "Service status.", + "default": null, + "x-example": false + } + }, + "required": [ + "status" + ] + } + } + ] + } + }, + "\/projects\/{projectId}\/smtp": { + "patch": { + "summary": "Update SMTP", + "operationId": "projectsUpdateSmtp", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails. ", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateSmtp", + "weight": 188, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-smtp.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-smtp.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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": { + "enabled": { + "type": "boolean", + "description": "Enable custom SMTP service", + "default": null, + "x-example": false + }, + "senderName": { + "type": "string", + "description": "Name of the email sender", + "default": "", + "x-example": "<SENDER_NAME>" + }, + "senderEmail": { + "type": "string", + "description": "Email of the sender", + "default": "", + "x-example": "email@example.com" + }, + "replyTo": { + "type": "string", + "description": "Reply to email", + "default": "", + "x-example": "email@example.com" + }, + "host": { + "type": "string", + "description": "SMTP server host name", + "default": "", + "x-example": null + }, + "port": { + "type": "integer", + "description": "SMTP server port", + "default": 587, + "x-example": null + }, + "username": { + "type": "string", + "description": "SMTP server username", + "default": "", + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "SMTP server password", + "default": "", + "x-example": "<PASSWORD>" + }, + "secure": { + "type": "string", + "description": "Does SMTP server use secure connection", + "default": "", + "x-example": "tls", + "enum": [ + "tls", + "ssl" + ], + "x-enum-name": "SMTPSecure", + "x-enum-keys": [] + } + }, + "required": [ + "enabled" + ] + } + } + ] + } + }, + "\/projects\/{projectId}\/smtp\/tests": { + "post": { + "summary": "Create SMTP test", + "operationId": "projectsCreateSmtpTest", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Send a test email to verify SMTP configuration. ", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "createSmtpTest", + "weight": 189, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/create-smtp-test.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-smtp-test.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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": { + "emails": { + "type": "array", + "description": "Array of emails to send test email to. Maximum of 10 emails are allowed.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "senderName": { + "type": "string", + "description": "Name of the email sender", + "default": null, + "x-example": "<SENDER_NAME>" + }, + "senderEmail": { + "type": "string", + "description": "Email of the sender", + "default": null, + "x-example": "email@example.com" + }, + "replyTo": { + "type": "string", + "description": "Reply to email", + "default": "", + "x-example": "email@example.com" + }, + "host": { + "type": "string", + "description": "SMTP server host name", + "default": null, + "x-example": null + }, + "port": { + "type": "integer", + "description": "SMTP server port", + "default": 587, + "x-example": null + }, + "username": { + "type": "string", + "description": "SMTP server username", + "default": "", + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "SMTP server password", + "default": "", + "x-example": "<PASSWORD>" + }, + "secure": { + "type": "string", + "description": "Does SMTP server use secure connection", + "default": "", + "x-example": "tls", + "enum": [ + "tls", + "ssl" + ], + "x-enum-name": "SMTPSecure", + "x-enum-keys": [] + } + }, + "required": [ + "emails", + "senderName", + "senderEmail", + "host" + ] + } + } + ] + } + }, + "\/projects\/{projectId}\/team": { + "patch": { + "summary": "Update project team", + "operationId": "projectsUpdateTeam", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Update the team ID of a project allowing for it to be transferred to another team.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateTeam", + "weight": 154, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-team.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-team.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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": { + "teamId": { + "type": "string", + "description": "Team ID of the team to transfer project to.", + "default": null, + "x-example": "<TEAM_ID>" + } + }, + "required": [ + "teamId" + ] + } + } + ] + } + }, + "\/projects\/{projectId}\/templates\/email\/{type}\/{locale}": { + "get": { + "summary": "Get custom email template", + "operationId": "projectsGetEmailTemplate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details. ", + "responses": { + "200": { + "description": "EmailTemplate", + "schema": { + "$ref": "#\/definitions\/emailTemplate" + } + } + }, + "x-appwrite": { + "method": "getEmailTemplate", + "weight": 191, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/get-email-template.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-email-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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": "type", + "description": "Template type", + "required": true, + "type": "string", + "x-example": "verification", + "enum": [ + "verification", + "magicsession", + "recovery", + "invitation", + "mfachallenge", + "sessionalert", + "otpsession" + ], + "x-enum-name": "EmailTemplateType", + "x-enum-keys": [], + "in": "path" + }, + { + "name": "locale", + "description": "Template locale", + "required": true, + "type": "string", + "x-example": "af", + "enum": [ + "af", + "ar-ae", + "ar-bh", + "ar-dz", + "ar-eg", + "ar-iq", + "ar-jo", + "ar-kw", + "ar-lb", + "ar-ly", + "ar-ma", + "ar-om", + "ar-qa", + "ar-sa", + "ar-sy", + "ar-tn", + "ar-ye", + "as", + "az", + "be", + "bg", + "bh", + "bn", + "bs", + "ca", + "cs", + "cy", + "da", + "de", + "de-at", + "de-ch", + "de-li", + "de-lu", + "el", + "en", + "en-au", + "en-bz", + "en-ca", + "en-gb", + "en-ie", + "en-jm", + "en-nz", + "en-tt", + "en-us", + "en-za", + "eo", + "es", + "es-ar", + "es-bo", + "es-cl", + "es-co", + "es-cr", + "es-do", + "es-ec", + "es-gt", + "es-hn", + "es-mx", + "es-ni", + "es-pa", + "es-pe", + "es-pr", + "es-py", + "es-sv", + "es-uy", + "es-ve", + "et", + "eu", + "fa", + "fi", + "fo", + "fr", + "fr-be", + "fr-ca", + "fr-ch", + "fr-lu", + "ga", + "gd", + "he", + "hi", + "hr", + "hu", + "id", + "is", + "it", + "it-ch", + "ja", + "ji", + "ko", + "ku", + "lt", + "lv", + "mk", + "ml", + "ms", + "mt", + "nb", + "ne", + "nl", + "nl-be", + "nn", + "no", + "pa", + "pl", + "pt", + "pt-br", + "rm", + "ro", + "ro-md", + "ru", + "ru-md", + "sb", + "sk", + "sl", + "sq", + "sr", + "sv", + "sv-fi", + "th", + "tn", + "tr", + "ts", + "ua", + "ur", + "ve", + "vi", + "xh", + "zh-cn", + "zh-hk", + "zh-sg", + "zh-tw", + "zu" + ], + "x-enum-name": "EmailTemplateLocale", + "x-enum-keys": [], + "in": "path" + } + ] + }, + "patch": { + "summary": "Update custom email templates", + "operationId": "projectsUpdateEmailTemplate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.", + "responses": { + "200": { + "description": "EmailTemplate", + "schema": { + "$ref": "#\/definitions\/emailTemplate" + } + } + }, + "x-appwrite": { + "method": "updateEmailTemplate", + "weight": 193, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-email-template.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-email-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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": "type", + "description": "Template type", + "required": true, + "type": "string", + "x-example": "verification", + "enum": [ + "verification", + "magicsession", + "recovery", + "invitation", + "mfachallenge", + "sessionalert", + "otpsession" + ], + "x-enum-name": "EmailTemplateType", + "x-enum-keys": [], + "in": "path" + }, + { + "name": "locale", + "description": "Template locale", + "required": true, + "type": "string", + "x-example": "af", + "enum": [ + "af", + "ar-ae", + "ar-bh", + "ar-dz", + "ar-eg", + "ar-iq", + "ar-jo", + "ar-kw", + "ar-lb", + "ar-ly", + "ar-ma", + "ar-om", + "ar-qa", + "ar-sa", + "ar-sy", + "ar-tn", + "ar-ye", + "as", + "az", + "be", + "bg", + "bh", + "bn", + "bs", + "ca", + "cs", + "cy", + "da", + "de", + "de-at", + "de-ch", + "de-li", + "de-lu", + "el", + "en", + "en-au", + "en-bz", + "en-ca", + "en-gb", + "en-ie", + "en-jm", + "en-nz", + "en-tt", + "en-us", + "en-za", + "eo", + "es", + "es-ar", + "es-bo", + "es-cl", + "es-co", + "es-cr", + "es-do", + "es-ec", + "es-gt", + "es-hn", + "es-mx", + "es-ni", + "es-pa", + "es-pe", + "es-pr", + "es-py", + "es-sv", + "es-uy", + "es-ve", + "et", + "eu", + "fa", + "fi", + "fo", + "fr", + "fr-be", + "fr-ca", + "fr-ch", + "fr-lu", + "ga", + "gd", + "he", + "hi", + "hr", + "hu", + "id", + "is", + "it", + "it-ch", + "ja", + "ji", + "ko", + "ku", + "lt", + "lv", + "mk", + "ml", + "ms", + "mt", + "nb", + "ne", + "nl", + "nl-be", + "nn", + "no", + "pa", + "pl", + "pt", + "pt-br", + "rm", + "ro", + "ro-md", + "ru", + "ru-md", + "sb", + "sk", + "sl", + "sq", + "sr", + "sv", + "sv-fi", + "th", + "tn", + "tr", + "ts", + "ua", + "ur", + "ve", + "vi", + "xh", + "zh-cn", + "zh-hk", + "zh-sg", + "zh-tw", + "zu" + ], + "x-enum-name": "EmailTemplateLocale", + "x-enum-keys": [], + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "subject": { + "type": "string", + "description": "Email Subject", + "default": null, + "x-example": "<SUBJECT>" + }, + "message": { + "type": "string", + "description": "Template message", + "default": null, + "x-example": "<MESSAGE>" + }, + "senderName": { + "type": "string", + "description": "Name of the email sender", + "default": "", + "x-example": "<SENDER_NAME>" + }, + "senderEmail": { + "type": "string", + "description": "Email of the sender", + "default": "", + "x-example": "email@example.com" + }, + "replyTo": { + "type": "string", + "description": "Reply to email", + "default": "", + "x-example": "email@example.com" + } + }, + "required": [ + "subject", + "message" + ] + } + } + ] + }, + "delete": { + "summary": "Reset custom email template", + "operationId": "projectsDeleteEmailTemplate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Reset a custom email template to its default value. This endpoint removes any custom content and restores the template to its original state. ", + "responses": { + "200": { + "description": "EmailTemplate", + "schema": { + "$ref": "#\/definitions\/emailTemplate" + } + } + }, + "x-appwrite": { + "method": "deleteEmailTemplate", + "weight": 195, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/delete-email-template.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-email-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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": "type", + "description": "Template type", + "required": true, + "type": "string", + "x-example": "verification", + "enum": [ + "verification", + "magicsession", + "recovery", + "invitation", + "mfachallenge", + "sessionalert", + "otpsession" + ], + "x-enum-name": "EmailTemplateType", + "x-enum-keys": [], + "in": "path" + }, + { + "name": "locale", + "description": "Template locale", + "required": true, + "type": "string", + "x-example": "af", + "enum": [ + "af", + "ar-ae", + "ar-bh", + "ar-dz", + "ar-eg", + "ar-iq", + "ar-jo", + "ar-kw", + "ar-lb", + "ar-ly", + "ar-ma", + "ar-om", + "ar-qa", + "ar-sa", + "ar-sy", + "ar-tn", + "ar-ye", + "as", + "az", + "be", + "bg", + "bh", + "bn", + "bs", + "ca", + "cs", + "cy", + "da", + "de", + "de-at", + "de-ch", + "de-li", + "de-lu", + "el", + "en", + "en-au", + "en-bz", + "en-ca", + "en-gb", + "en-ie", + "en-jm", + "en-nz", + "en-tt", + "en-us", + "en-za", + "eo", + "es", + "es-ar", + "es-bo", + "es-cl", + "es-co", + "es-cr", + "es-do", + "es-ec", + "es-gt", + "es-hn", + "es-mx", + "es-ni", + "es-pa", + "es-pe", + "es-pr", + "es-py", + "es-sv", + "es-uy", + "es-ve", + "et", + "eu", + "fa", + "fi", + "fo", + "fr", + "fr-be", + "fr-ca", + "fr-ch", + "fr-lu", + "ga", + "gd", + "he", + "hi", + "hr", + "hu", + "id", + "is", + "it", + "it-ch", + "ja", + "ji", + "ko", + "ku", + "lt", + "lv", + "mk", + "ml", + "ms", + "mt", + "nb", + "ne", + "nl", + "nl-be", + "nn", + "no", + "pa", + "pl", + "pt", + "pt-br", + "rm", + "ro", + "ro-md", + "ru", + "ru-md", + "sb", + "sk", + "sl", + "sq", + "sr", + "sv", + "sv-fi", + "th", + "tn", + "tr", + "ts", + "ua", + "ur", + "ve", + "vi", + "xh", + "zh-cn", + "zh-hk", + "zh-sg", + "zh-tw", + "zu" + ], + "x-enum-name": "EmailTemplateLocale", + "x-enum-keys": [], + "in": "path" + } + ] + } + }, + "\/projects\/{projectId}\/templates\/sms\/{type}\/{locale}": { + "get": { + "summary": "Get custom SMS template", + "operationId": "projectsGetSmsTemplate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Get a custom SMS template for the specified locale and type returning it's contents.", + "responses": { + "200": { + "description": "SmsTemplate", + "schema": { + "$ref": "#\/definitions\/smsTemplate" + } + } + }, + "x-appwrite": { + "method": "getSmsTemplate", + "weight": 190, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/get-sms-template.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-sms-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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": "type", + "description": "Template type", + "required": true, + "type": "string", + "x-example": "verification", + "enum": [ + "verification", + "login", + "invitation", + "mfachallenge" + ], + "x-enum-name": "SmsTemplateType", + "x-enum-keys": [], + "in": "path" + }, + { + "name": "locale", + "description": "Template locale", + "required": true, + "type": "string", + "x-example": "af", + "enum": [ + "af", + "ar-ae", + "ar-bh", + "ar-dz", + "ar-eg", + "ar-iq", + "ar-jo", + "ar-kw", + "ar-lb", + "ar-ly", + "ar-ma", + "ar-om", + "ar-qa", + "ar-sa", + "ar-sy", + "ar-tn", + "ar-ye", + "as", + "az", + "be", + "bg", + "bh", + "bn", + "bs", + "ca", + "cs", + "cy", + "da", + "de", + "de-at", + "de-ch", + "de-li", + "de-lu", + "el", + "en", + "en-au", + "en-bz", + "en-ca", + "en-gb", + "en-ie", + "en-jm", + "en-nz", + "en-tt", + "en-us", + "en-za", + "eo", + "es", + "es-ar", + "es-bo", + "es-cl", + "es-co", + "es-cr", + "es-do", + "es-ec", + "es-gt", + "es-hn", + "es-mx", + "es-ni", + "es-pa", + "es-pe", + "es-pr", + "es-py", + "es-sv", + "es-uy", + "es-ve", + "et", + "eu", + "fa", + "fi", + "fo", + "fr", + "fr-be", + "fr-ca", + "fr-ch", + "fr-lu", + "ga", + "gd", + "he", + "hi", + "hr", + "hu", + "id", + "is", + "it", + "it-ch", + "ja", + "ji", + "ko", + "ku", + "lt", + "lv", + "mk", + "ml", + "ms", + "mt", + "nb", + "ne", + "nl", + "nl-be", + "nn", + "no", + "pa", + "pl", + "pt", + "pt-br", + "rm", + "ro", + "ro-md", + "ru", + "ru-md", + "sb", + "sk", + "sl", + "sq", + "sr", + "sv", + "sv-fi", + "th", + "tn", + "tr", + "ts", + "ua", + "ur", + "ve", + "vi", + "xh", + "zh-cn", + "zh-hk", + "zh-sg", + "zh-tw", + "zu" + ], + "x-enum-name": "SmsTemplateLocale", + "x-enum-keys": [], + "in": "path" + } + ] + }, + "patch": { + "summary": "Update custom SMS template", + "operationId": "projectsUpdateSmsTemplate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. ", + "responses": { + "200": { + "description": "SmsTemplate", + "schema": { + "$ref": "#\/definitions\/smsTemplate" + } + } + }, + "x-appwrite": { + "method": "updateSmsTemplate", + "weight": 192, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-sms-template.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-sms-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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": "type", + "description": "Template type", + "required": true, + "type": "string", + "x-example": "verification", + "enum": [ + "verification", + "login", + "invitation", + "mfachallenge" + ], + "x-enum-name": "SmsTemplateType", + "x-enum-keys": [], + "in": "path" + }, + { + "name": "locale", + "description": "Template locale", + "required": true, + "type": "string", + "x-example": "af", + "enum": [ + "af", + "ar-ae", + "ar-bh", + "ar-dz", + "ar-eg", + "ar-iq", + "ar-jo", + "ar-kw", + "ar-lb", + "ar-ly", + "ar-ma", + "ar-om", + "ar-qa", + "ar-sa", + "ar-sy", + "ar-tn", + "ar-ye", + "as", + "az", + "be", + "bg", + "bh", + "bn", + "bs", + "ca", + "cs", + "cy", + "da", + "de", + "de-at", + "de-ch", + "de-li", + "de-lu", + "el", + "en", + "en-au", + "en-bz", + "en-ca", + "en-gb", + "en-ie", + "en-jm", + "en-nz", + "en-tt", + "en-us", + "en-za", + "eo", + "es", + "es-ar", + "es-bo", + "es-cl", + "es-co", + "es-cr", + "es-do", + "es-ec", + "es-gt", + "es-hn", + "es-mx", + "es-ni", + "es-pa", + "es-pe", + "es-pr", + "es-py", + "es-sv", + "es-uy", + "es-ve", + "et", + "eu", + "fa", + "fi", + "fo", + "fr", + "fr-be", + "fr-ca", + "fr-ch", + "fr-lu", + "ga", + "gd", + "he", + "hi", + "hr", + "hu", + "id", + "is", + "it", + "it-ch", + "ja", + "ji", + "ko", + "ku", + "lt", + "lv", + "mk", + "ml", + "ms", + "mt", + "nb", + "ne", + "nl", + "nl-be", + "nn", + "no", + "pa", + "pl", + "pt", + "pt-br", + "rm", + "ro", + "ro-md", + "ru", + "ru-md", + "sb", + "sk", + "sl", + "sq", + "sr", + "sv", + "sv-fi", + "th", + "tn", + "tr", + "ts", + "ua", + "ur", + "ve", + "vi", + "xh", + "zh-cn", + "zh-hk", + "zh-sg", + "zh-tw", + "zu" + ], + "x-enum-name": "SmsTemplateLocale", + "x-enum-keys": [], + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Template message", + "default": null, + "x-example": "<MESSAGE>" + } + }, + "required": [ + "message" + ] + } + } + ] + }, + "delete": { + "summary": "Reset custom SMS template", + "operationId": "projectsDeleteSmsTemplate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. ", + "responses": { + "200": { + "description": "SmsTemplate", + "schema": { + "$ref": "#\/definitions\/smsTemplate" + } + } + }, + "x-appwrite": { + "method": "deleteSmsTemplate", + "weight": 194, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/delete-sms-template.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-sms-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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": "type", + "description": "Template type", + "required": true, + "type": "string", + "x-example": "verification", + "enum": [ + "verification", + "login", + "invitation", + "mfachallenge" + ], + "x-enum-name": "SmsTemplateType", + "x-enum-keys": [], + "in": "path" + }, + { + "name": "locale", + "description": "Template locale", + "required": true, + "type": "string", + "x-example": "af", + "enum": [ + "af", + "ar-ae", + "ar-bh", + "ar-dz", + "ar-eg", + "ar-iq", + "ar-jo", + "ar-kw", + "ar-lb", + "ar-ly", + "ar-ma", + "ar-om", + "ar-qa", + "ar-sa", + "ar-sy", + "ar-tn", + "ar-ye", + "as", + "az", + "be", + "bg", + "bh", + "bn", + "bs", + "ca", + "cs", + "cy", + "da", + "de", + "de-at", + "de-ch", + "de-li", + "de-lu", + "el", + "en", + "en-au", + "en-bz", + "en-ca", + "en-gb", + "en-ie", + "en-jm", + "en-nz", + "en-tt", + "en-us", + "en-za", + "eo", + "es", + "es-ar", + "es-bo", + "es-cl", + "es-co", + "es-cr", + "es-do", + "es-ec", + "es-gt", + "es-hn", + "es-mx", + "es-ni", + "es-pa", + "es-pe", + "es-pr", + "es-py", + "es-sv", + "es-uy", + "es-ve", + "et", + "eu", + "fa", + "fi", + "fo", + "fr", + "fr-be", + "fr-ca", + "fr-ch", + "fr-lu", + "ga", + "gd", + "he", + "hi", + "hr", + "hu", + "id", + "is", + "it", + "it-ch", + "ja", + "ji", + "ko", + "ku", + "lt", + "lv", + "mk", + "ml", + "ms", + "mt", + "nb", + "ne", + "nl", + "nl-be", + "nn", + "no", + "pa", + "pl", + "pt", + "pt-br", + "rm", + "ro", + "ro-md", + "ru", + "ru-md", + "sb", + "sk", + "sl", + "sq", + "sr", + "sv", + "sv-fi", + "th", + "tn", + "tr", + "ts", + "ua", + "ur", + "ve", + "vi", + "xh", + "zh-cn", + "zh-hk", + "zh-sg", + "zh-tw", + "zu" + ], + "x-enum-name": "SmsTemplateLocale", + "x-enum-keys": [], + "in": "path" + } + ] + } + }, + "\/projects\/{projectId}\/webhooks": { + "get": { + "summary": "List webhooks", + "operationId": "projectsListWebhooks", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Get a list of all webhooks belonging to the project. You can use the query params to filter your results. ", + "responses": { + "200": { + "description": "Webhooks List", + "schema": { + "$ref": "#\/definitions\/webhookList" + } + } + }, + "x-appwrite": { + "method": "listWebhooks", + "weight": 172, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/list-webhooks.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-webhooks.md", + "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": "Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur. ", + "responses": { + "201": { + "description": "Webhook", + "schema": { + "$ref": "#\/definitions\/webhook" + } + } + }, + "x-appwrite": { + "method": "createWebhook", + "weight": 171, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/create-webhook.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-webhook.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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>" + }, + "enabled": { + "type": "boolean", + "description": "Enable or disable a webhook.", + "default": true, + "x-example": false + }, + "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": null + }, + "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": "Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. ", + "responses": { + "200": { + "description": "Webhook", + "schema": { + "$ref": "#\/definitions\/webhook" + } + } + }, + "x-appwrite": { + "method": "getWebhook", + "weight": 173, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/get-webhook.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-webhook.md", + "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": "Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook. ", + "responses": { + "200": { + "description": "Webhook", + "schema": { + "$ref": "#\/definitions\/webhook" + } + } + }, + "x-appwrite": { + "method": "updateWebhook", + "weight": 174, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-webhook.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-webhook.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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>" + }, + "enabled": { + "type": "boolean", + "description": "Enable or disable a webhook.", + "default": true, + "x-example": false + }, + "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": null + }, + "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": "Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. ", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteWebhook", + "weight": 176, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/delete-webhook.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-webhook.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "<PROJECT_ID>", + "in": "path" + }, + { + "name": "webhookId", + "description": "Webhook unique ID.", + "required": true, + "type": "string", + "x-example": "<WEBHOOK_ID>", + "in": "path" + } + ] + } + }, + "\/projects\/{projectId}\/webhooks\/{webhookId}\/signature": { + "patch": { + "summary": "Update webhook signature key", + "operationId": "projectsUpdateWebhookSignature", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook. ", + "responses": { + "200": { + "description": "Webhook", + "schema": { + "$ref": "#\/definitions\/webhook" + } + } + }, + "x-appwrite": { + "method": "updateWebhookSignature", + "weight": 175, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-webhook-signature.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-webhook-signature.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "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" + } + ] + } + }, + "\/proxy\/rules": { + "get": { + "summary": "List rules", + "operationId": "proxyListRules", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "proxy" + ], + "description": "Get a list of all the proxy rules. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rule List", + "schema": { + "$ref": "#\/definitions\/proxyRuleList" + } + } + }, + "x-appwrite": { + "method": "listRules", + "weight": 317, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "proxy\/list-rules.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/list-rules.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rules.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: domain, resourceType, resourceId, url", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + }, + "post": { + "summary": "Create rule", + "operationId": "proxyCreateRule", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "proxy" + ], + "description": "Create a new proxy rule.", + "responses": { + "201": { + "description": "Rule", + "schema": { + "$ref": "#\/definitions\/proxyRule" + } + } + }, + "x-appwrite": { + "method": "createRule", + "weight": 316, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "proxy\/create-rule.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/create-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rules.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain name.", + "default": null, + "x-example": null + }, + "resourceType": { + "type": "string", + "description": "Action definition for the rule. Possible values are \"api\", \"function\"", + "default": null, + "x-example": "api", + "enum": [ + "api", + "function" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "resourceId": { + "type": "string", + "description": "ID of resource for the action type. If resourceType is \"api\", leave empty. If resourceType is \"function\", provide ID of the function.", + "default": "", + "x-example": "<RESOURCE_ID>" + } + }, + "required": [ + "domain", + "resourceType" + ] + } + } + ] + } + }, + "\/proxy\/rules\/{ruleId}": { + "get": { + "summary": "Get rule", + "operationId": "proxyGetRule", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "proxy" + ], + "description": "Get a proxy rule by its unique ID.", + "responses": { + "200": { + "description": "Rule", + "schema": { + "$ref": "#\/definitions\/proxyRule" + } + } + }, + "x-appwrite": { + "method": "getRule", + "weight": 318, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "proxy\/get-rule.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/get-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rules.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "description": "Rule ID.", + "required": true, + "type": "string", + "x-example": "<RULE_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete rule", + "operationId": "proxyDeleteRule", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "proxy" + ], + "description": "Delete a proxy rule by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRule", + "weight": 319, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "proxy\/delete-rule.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/delete-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rules.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "description": "Rule ID.", + "required": true, + "type": "string", + "x-example": "<RULE_ID>", + "in": "path" + } + ] + } + }, + "\/proxy\/rules\/{ruleId}\/verification": { + "patch": { + "summary": "Update rule verification status", + "operationId": "proxyUpdateRuleVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "proxy" + ], + "description": "Retry getting verification process of a proxy rule. This endpoint triggers domain verification by checking DNS records (CNAME) against the configured target domain. If verification is successful, a TLS certificate will be automatically provisioned for the domain.", + "responses": { + "200": { + "description": "Rule", + "schema": { + "$ref": "#\/definitions\/proxyRule" + } + } + }, + "x-appwrite": { + "method": "updateRuleVerification", + "weight": 320, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "proxy\/update-rule-verification.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/update-rule-verification.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rules.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "description": "Rule ID.", + "required": true, + "type": "string", + "x-example": "<RULE_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": 203, + "cookies": false, + "type": "", + "deprecated": false, + "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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + }, + "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": 202, + "cookies": false, + "type": "", + "deprecated": false, + "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 a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "fileSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", + "default": true, + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", + "default": {}, + "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" + } + }, + "compression": { + "type": "string", + "description": "Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", + "default": "none", + "x-example": "none", + "enum": [ + "none", + "gzip", + "zstd" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "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" + ] + } + } + ] + } + }, + "\/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": 204, + "cookies": false, + "type": "", + "deprecated": false, + "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": 205, + "cookies": false, + "type": "", + "deprecated": false, + "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>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "fileSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", + "default": true, + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", + "default": {}, + "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" + } + }, + "compression": { + "type": "string", + "description": "Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", + "default": "none", + "x-example": "none", + "enum": [ + "none", + "gzip", + "zstd" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "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" + ] + } + } + ] + }, + "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": 206, + "cookies": false, + "type": "", + "deprecated": false, + "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.", + "responses": { + "200": { + "description": "Files List", + "schema": { + "$ref": "#\/definitions\/fileList" + } + } + }, + "x-appwrite": { + "method": "listFiles", + "weight": 208, + "cookies": false, + "type": "", + "deprecated": false, + "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](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_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\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + }, + "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](https:\/\/appwrite.io\/docs\/server\/storage#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": 207, + "cookies": false, + "type": "upload", + "deprecated": false, + "demo": "storage\/create-file.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}", + "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](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https:\/\/appwrite.io\/docs\/products\/storage\/upload-download#input-file).", + "required": true, + "type": "file", + "in": "formData" + }, + { + "name": "permissions", + "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "x-example": "[\"read(\"any\")\"]", + "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": 209, + "cookies": false, + "type": "", + "deprecated": false, + "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](https:\/\/appwrite.io\/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": 214, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "storage\/update-file.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "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](https:\/\/appwrite.io\/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": { + "name": { + "type": "string", + "description": "Name of the file", + "default": null, + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission string. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "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": 215, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "storage\/delete-file.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "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](https:\/\/appwrite.io\/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": 211, + "cookies": false, + "type": "location", + "deprecated": false, + "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](https:\/\/appwrite.io\/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": 210, + "cookies": false, + "type": "location", + "deprecated": false, + "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](https:\/\/appwrite.io\/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", + "enum": [ + "center", + "top-left", + "top", + "top-right", + "left", + "right", + "bottom-left", + "bottom", + "bottom-right" + ], + "x-enum-name": "ImageGravity", + "x-enum-keys": [], + "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", + "enum": [ + "jpg", + "jpeg", + "gif", + "png", + "webp", + "heic", + "avif" + ], + "x-enum-name": "ImageFormat", + "x-enum-keys": [], + "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": 212, + "cookies": false, + "type": "location", + "deprecated": false, + "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](https:\/\/appwrite.io\/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 storage usage stats", + "operationId": "storageGetUsage", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Get usage metrics and statistics for all buckets in the project. You can view the total number of buckets, files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.\n", + "responses": { + "200": { + "description": "StorageUsage", + "schema": { + "$ref": "#\/definitions\/usageStorage" + } + } + }, + "x-appwrite": { + "method": "getUsage", + "weight": 216, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "storage\/get-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-usage.md", + "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", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "StorageUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/storage\/{bucketId}\/usage": { + "get": { + "summary": "Get bucket usage stats", + "operationId": "storageGetBucketUsage", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Get usage metrics and statistics a specific bucket in the project. You can view the total number of files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.\n", + "responses": { + "200": { + "description": "UsageBuckets", + "schema": { + "$ref": "#\/definitions\/usageBuckets" + } + } + }, + "x-appwrite": { + "method": "getBucketUsage", + "weight": 217, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "storage\/get-bucket-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket-usage.md", + "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", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "StorageUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "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.", + "responses": { + "200": { + "description": "Teams List", + "schema": { + "$ref": "#\/definitions\/teamList" + } + } + }, + "x-appwrite": { + "method": "list", + "weight": 219, + "cookies": false, + "type": "", + "deprecated": false, + "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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + }, + "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": 218, + "cookies": false, + "type": "", + "deprecated": false, + "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 a custom ID or generate a random ID with `ID.unique()`. Valid 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](https:\/\/appwrite.io\/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": 220, + "cookies": false, + "type": "", + "deprecated": false, + "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 name", + "operationId": "teamsUpdateName", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Update the team's name by its unique ID.", + "responses": { + "200": { + "description": "Team", + "schema": { + "$ref": "#\/definitions\/team" + } + } + }, + "x-appwrite": { + "method": "updateName", + "weight": 222, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "teams\/update-name.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.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": 224, + "cookies": false, + "type": "", + "deprecated": false, + "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": 231, + "cookies": false, + "type": "", + "deprecated": false, + "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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/teams\/{teamId}\/memberships": { + "get": { + "summary": "List team memberships", + "operationId": "teamsListMemberships", + "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. Hide sensitive attributes from the response by toggling membership privacy in the Console.", + "responses": { + "200": { + "description": "Memberships List", + "schema": { + "$ref": "#\/definitions\/membershipList" + } + } + }, + "x-appwrite": { + "method": "listMemberships", + "weight": 226, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "teams\/list-memberships.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + }, + "post": { + "summary": "Create team membership", + "operationId": "teamsCreateMembership", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) 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) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", + "responses": { + "201": { + "description": "Membership", + "schema": { + "$ref": "#\/definitions\/membership" + } + } + }, + "x-appwrite": { + "method": "createMembership", + "weight": 225, + "cookies": false, + "type": "", + "deprecated": false, + "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": "", + "x-example": "email@example.com" + }, + "userId": { + "type": "string", + "description": "ID of the user to be added to a team.", + "default": "", + "x-example": "<USER_ID>" + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100" + }, + "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](https:\/\/appwrite.io\/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. This parameter is not required when an API key is supplied. 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" + }, + "name": { + "type": "string", + "description": "Name of the new team member. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "roles" + ] + } + } + ] + } + }, + "\/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. Hide sensitive attributes from the response by toggling membership privacy in the Console.", + "responses": { + "200": { + "description": "Membership", + "schema": { + "$ref": "#\/definitions\/membership" + } + } + }, + "x-appwrite": { + "method": "getMembership", + "weight": 227, + "cookies": false, + "type": "", + "deprecated": false, + "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", + "operationId": "teamsUpdateMembership", + "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](https:\/\/appwrite.io\/docs\/permissions).\n", + "responses": { + "200": { + "description": "Membership", + "schema": { + "$ref": "#\/definitions\/membership" + } + } + }, + "x-appwrite": { + "method": "updateMembership", + "weight": 228, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "teams\/update-membership.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-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" + }, + { + "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": 230, + "cookies": false, + "type": "", + "deprecated": false, + "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": 229, + "cookies": false, + "type": "", + "deprecated": false, + "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" + ] + } + } + ] + } + }, + "\/teams\/{teamId}\/prefs": { + "get": { + "summary": "Get team preferences", + "operationId": "teamsGetPrefs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getPrefs).", + "responses": { + "200": { + "description": "Preferences", + "schema": { + "$ref": "#\/definitions\/preferences" + } + } + }, + "x-appwrite": { + "method": "getPrefs", + "weight": 221, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "teams\/get-prefs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "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" + } + ] + }, + "put": { + "summary": "Update preferences", + "operationId": "teamsUpdatePrefs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Update the team's 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 an error if exceeded.", + "responses": { + "200": { + "description": "Preferences", + "schema": { + "$ref": "#\/definitions\/preferences" + } + } + }, + "x-appwrite": { + "method": "updatePrefs", + "weight": 223, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "teams\/update-prefs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "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": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "default": {}, + "x-example": "{}" + } + }, + "required": [ + "prefs" + ] + } + } + ] + } + }, + "\/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": 241, + "cookies": false, + "type": "", + "deprecated": false, + "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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + }, + "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": 232, + "cookies": false, + "type": "", + "deprecated": false, + "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 a custom ID or generate a random ID with `ID.unique()`. Valid 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" + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": null, + "x-example": "+12065550100" + }, + "password": { + "type": "string", + "description": "Plain text user password. Must be at least 8 chars.", + "default": "", + "x-example": null + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId" + ] + } + } + ] + } + }, + "\/users\/argon2": { + "post": { + "summary": "Create user with Argon2 password", + "operationId": "usersCreateArgon2User", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "createArgon2User", + "weight": 235, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-argon2user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using Argon2.", + "default": null, + "x-example": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] + } + }, + "\/users\/bcrypt": { + "post": { + "summary": "Create user with bcrypt password", + "operationId": "usersCreateBcryptUser", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "createBcryptUser", + "weight": 233, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-bcrypt-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using Bcrypt.", + "default": null, + "x-example": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] + } + }, + "\/users\/identities": { + "get": { + "summary": "List identities", + "operationId": "usersListIdentities", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get identities for all users.", + "responses": { + "200": { + "description": "Identities List", + "schema": { + "$ref": "#\/definitions\/identityList" + } + } + }, + "x-appwrite": { + "method": "listIdentities", + "weight": 249, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/list-identities.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-identities.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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + } + }, + "\/users\/identities\/{identityId}": { + "delete": { + "summary": "Delete identity", + "operationId": "usersDeleteIdentity", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "users" + ], + "description": "Delete an identity by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteIdentity", + "weight": 272, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/delete-identity.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-identity.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": "identityId", + "description": "Identity ID.", + "required": true, + "type": "string", + "x-example": "<IDENTITY_ID>", + "in": "path" + } + ] + } + }, + "\/users\/md5": { + "post": { + "summary": "Create user with MD5 password", + "operationId": "usersCreateMD5User", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "createMD5User", + "weight": 234, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-m-d5user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using MD5.", + "default": null, + "x-example": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] + } + }, + "\/users\/phpass": { + "post": { + "summary": "Create user with PHPass password", + "operationId": "usersCreatePHPassUser", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "createPHPassUser", + "weight": 237, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-p-h-pass-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-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 a custom ID or pass the string `ID.unique()`to auto generate it. Valid 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 hashed using PHPass.", + "default": null, + "x-example": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] + } + }, + "\/users\/scrypt": { + "post": { + "summary": "Create user with Scrypt password", + "operationId": "usersCreateScryptUser", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "createScryptUser", + "weight": 238, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-scrypt-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using Scrypt.", + "default": null, + "x-example": "password" + }, + "passwordSalt": { + "type": "string", + "description": "Optional salt used to hash password.", + "default": null, + "x-example": "<PASSWORD_SALT>" + }, + "passwordCpu": { + "type": "integer", + "description": "Optional CPU cost used to hash password.", + "default": null, + "x-example": null + }, + "passwordMemory": { + "type": "integer", + "description": "Optional memory cost used to hash password.", + "default": null, + "x-example": null + }, + "passwordParallel": { + "type": "integer", + "description": "Optional parallelization cost used to hash password.", + "default": null, + "x-example": null + }, + "passwordLength": { + "type": "integer", + "description": "Optional hash length used to hash password.", + "default": null, + "x-example": null + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password", + "passwordSalt", + "passwordCpu", + "passwordMemory", + "passwordParallel", + "passwordLength" + ] + } + } + ] + } + }, + "\/users\/scrypt-modified": { + "post": { + "summary": "Create user with Scrypt modified password", + "operationId": "usersCreateScryptModifiedUser", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "createScryptModifiedUser", + "weight": 239, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-scrypt-modified-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using Scrypt Modified.", + "default": null, + "x-example": "password" + }, + "passwordSalt": { + "type": "string", + "description": "Salt used to hash password.", + "default": null, + "x-example": "<PASSWORD_SALT>" + }, + "passwordSaltSeparator": { + "type": "string", + "description": "Salt separator used to hash password.", + "default": null, + "x-example": "<PASSWORD_SALT_SEPARATOR>" + }, + "passwordSignerKey": { + "type": "string", + "description": "Signer key used to hash password.", + "default": null, + "x-example": "<PASSWORD_SIGNER_KEY>" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password", + "passwordSalt", + "passwordSaltSeparator", + "passwordSignerKey" + ] + } + } + ] + } + }, + "\/users\/sha": { + "post": { + "summary": "Create user with SHA password", + "operationId": "usersCreateSHAUser", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "createSHAUser", + "weight": 236, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-s-h-a-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using SHA.", + "default": null, + "x-example": "password" + }, + "passwordVersion": { + "type": "string", + "description": "Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'", + "default": "", + "x-example": "sha1", + "enum": [ + "sha1", + "sha224", + "sha256", + "sha384", + "sha512\/224", + "sha512\/256", + "sha512", + "sha3-224", + "sha3-256", + "sha3-384", + "sha3-512" + ], + "x-enum-name": "PasswordHash", + "x-enum-keys": [] + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] + } + }, + "\/users\/usage": { + "get": { + "summary": "Get users usage stats", + "operationId": "usersGetUsage", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get usage metrics and statistics for all users in the project. You can view the total number of users and sessions. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.\n", + "responses": { + "200": { + "description": "UsageUsers", + "schema": { + "$ref": "#\/definitions\/usageUsers" + } + } + }, + "x-appwrite": { + "method": "getUsage", + "weight": 274, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/get-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-usage.md", + "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", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UserUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "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": 242, + "cookies": false, + "type": "", + "deprecated": false, + "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](https:\/\/appwrite.io\/docs\/server\/users#usersUpdateStatus) endpoint instead.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "weight": 270, + "cookies": false, + "type": "", + "deprecated": false, + "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": 255, + "cookies": false, + "type": "", + "deprecated": false, + "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}\/jwts": { + "post": { + "summary": "Create user JWT", + "operationId": "usersCreateJWT", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.", + "responses": { + "201": { + "description": "JWT", + "schema": { + "$ref": "#\/definitions\/jwt" + } + } + }, + "x-appwrite": { + "method": "createJWT", + "weight": 273, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-j-w-t.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.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": { + "sessionId": { + "type": "string", + "description": "Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session.", + "default": "", + "x-example": "<SESSION_ID>" + }, + "duration": { + "type": "integer", + "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", + "default": 900, + "x-example": 0 + } + } + } + } + ] + } + }, + "\/users\/{userId}\/labels": { + "put": { + "summary": "Update user labels", + "operationId": "usersUpdateLabels", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user labels by its unique ID. \n\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "updateLabels", + "weight": 251, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/update-labels.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-labels.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": { + "labels": { + "type": "array", + "description": "Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "labels" + ] + } + } + ] + } + }, + "\/users\/{userId}\/logs": { + "get": { + "summary": "List user logs", + "operationId": "usersListLogs", + "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": "listLogs", + "weight": 247, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/list-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/users\/{userId}\/memberships": { + "get": { + "summary": "List user memberships", + "operationId": "usersListMemberships", + "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": "listMemberships", + "weight": 246, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/list-memberships.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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}\/mfa": { + "patch": { + "summary": "Update MFA", + "operationId": "usersUpdateMfa", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Enable or disable MFA on a user account.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "updateMfa", + "weight": 260, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/update-mfa.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-mfa.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": { + "mfa": { + "type": "boolean", + "description": "Enable or disable MFA.", + "default": null, + "x-example": false + } + }, + "required": [ + "mfa" + ] + } + } + ] + } + }, + "\/users\/{userId}\/mfa\/authenticators\/{type}": { + "delete": { + "summary": "Delete authenticator", + "operationId": "usersDeleteMfaAuthenticator", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "users" + ], + "description": "Delete an authenticator app.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteMfaAuthenticator", + "weight": 265, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/delete-mfa-authenticator.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-mfa-authenticator.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": "type", + "description": "Type of authenticator.", + "required": true, + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [], + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/mfa\/factors": { + "get": { + "summary": "List factors", + "operationId": "usersListMfaFactors", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "responses": { + "200": { + "description": "MFAFactors", + "schema": { + "$ref": "#\/definitions\/mfaFactors" + } + } + }, + "x-appwrite": { + "method": "listMfaFactors", + "weight": 261, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/list-mfa-factors.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-mfa-factors.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}\/mfa\/recovery-codes": { + "get": { + "summary": "Get MFA recovery codes", + "operationId": "usersGetMfaRecoveryCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "x-appwrite": { + "method": "getMfaRecoveryCodes", + "weight": 262, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/get-mfa-recovery-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-mfa-recovery-codes.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" + } + ] + }, + "put": { + "summary": "Regenerate MFA recovery codes", + "operationId": "usersUpdateMfaRecoveryCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "x-appwrite": { + "method": "updateMfaRecoveryCodes", + "weight": 264, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/update-mfa-recovery-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-mfa-recovery-codes.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" + } + ] + }, + "patch": { + "summary": "Create MFA recovery codes", + "operationId": "usersCreateMfaRecoveryCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "responses": { + "201": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "x-appwrite": { + "method": "createMfaRecoveryCodes", + "weight": 263, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-mfa-recovery-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-mfa-recovery-codes.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}\/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": 253, + "cookies": false, + "type": "", + "deprecated": false, + "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": 254, + "cookies": false, + "type": "", + "deprecated": false, + "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": null + } + }, + "required": [ + "password" + ] + } + } + ] + } + }, + "\/users\/{userId}\/phone": { + "patch": { + "summary": "Update phone", + "operationId": "usersUpdatePhone", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user phone by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "updatePhone", + "weight": 256, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/update-phone.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "User phone number.", + "default": null, + "x-example": "+12065550100" + } + }, + "required": [ + "number" + ] + } + } + ] + } + }, + "\/users\/{userId}\/prefs": { + "get": { + "summary": "Get user preferences", + "operationId": "usersGetPrefs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get the user preferences by its unique ID.", + "responses": { + "200": { + "description": "Preferences", + "schema": { + "$ref": "#\/definitions\/preferences" + } + } + }, + "x-appwrite": { + "method": "getPrefs", + "weight": 243, + "cookies": false, + "type": "", + "deprecated": false, + "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": 258, + "cookies": false, + "type": "", + "deprecated": false, + "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": "List user sessions", + "operationId": "usersListSessions", + "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": "listSessions", + "weight": 245, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/list-sessions.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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" + } + ] + }, + "post": { + "summary": "Create session", + "operationId": "usersCreateSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Creates a session for a user. Returns an immediately usable session object.\n\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "x-appwrite": { + "method": "createSession", + "weight": 266, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-session.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-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. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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, + "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": 269, + "cookies": false, + "type": "", + "deprecated": false, + "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": 268, + "cookies": false, + "type": "", + "deprecated": false, + "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": 250, + "cookies": false, + "type": "", + "deprecated": false, + "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}\/targets": { + "get": { + "summary": "List user targets", + "operationId": "usersListTargets", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "List the messaging targets that are associated with a user.", + "responses": { + "200": { + "description": "Target list", + "schema": { + "$ref": "#\/definitions\/targetList" + } + } + }, + "x-appwrite": { + "method": "listTargets", + "weight": 248, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/list-targets.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-targets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_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\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create user target", + "operationId": "usersCreateTarget", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a messaging target.", + "responses": { + "201": { + "description": "Target", + "schema": { + "$ref": "#\/definitions\/target" + } + } + }, + "x-appwrite": { + "method": "createTarget", + "weight": 240, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-target.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "server", + "console" + ], + "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": { + "targetId": { + "type": "string", + "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<TARGET_ID>" + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "default": null, + "x-example": "email", + "enum": [ + "email", + "sms", + "push" + ], + "x-enum-name": "MessagingProviderType", + "x-enum-keys": [] + }, + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "default": null, + "x-example": "<IDENTIFIER>" + }, + "providerId": { + "type": "string", + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "default": "", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "targetId", + "providerType", + "identifier" + ] + } + } + ] + } + }, + "\/users\/{userId}\/targets\/{targetId}": { + "get": { + "summary": "Get user target", + "operationId": "usersGetTarget", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get a user's push notification target by ID.", + "responses": { + "200": { + "description": "Target", + "schema": { + "$ref": "#\/definitions\/target" + } + } + }, + "x-appwrite": { + "method": "getTarget", + "weight": 244, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/get-target.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "type": "string", + "x-example": "<TARGET_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update user target", + "operationId": "usersUpdateTarget", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update a messaging target.", + "responses": { + "200": { + "description": "Target", + "schema": { + "$ref": "#\/definitions\/target" + } + } + }, + "x-appwrite": { + "method": "updateTarget", + "weight": 259, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/update-target.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "type": "string", + "x-example": "<TARGET_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "default": "", + "x-example": "<IDENTIFIER>" + }, + "providerId": { + "type": "string", + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "default": "", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", + "default": "", + "x-example": "<NAME>" + } + } + } + } + ] + }, + "delete": { + "summary": "Delete user target", + "operationId": "usersDeleteTarget", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "users" + ], + "description": "Delete a messaging target.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteTarget", + "weight": 271, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/delete-target.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "type": "string", + "x-example": "<TARGET_ID>", + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/tokens": { + "post": { + "summary": "Create token", + "operationId": "usersCreateToken", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\n", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "x-appwrite": { + "method": "createToken", + "weight": 267, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-token.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-token.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": { + "length": { + "type": "integer", + "description": "Token length in characters. The default length is 6 characters", + "default": 6, + "x-example": 4 + }, + "expire": { + "type": "integer", + "description": "Token expiration period in seconds. The default expiration is 15 minutes.", + "default": 900, + "x-example": 60 + } + } + } + } + ] + } + }, + "\/users\/{userId}\/verification": { + "patch": { + "summary": "Update email verification", + "operationId": "usersUpdateEmailVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user email verification status by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "updateEmailVerification", + "weight": 257, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/update-email-verification.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "emailVerification": { + "type": "boolean", + "description": "User email verification status.", + "default": null, + "x-example": false + } + }, + "required": [ + "emailVerification" + ] + } + } + ] + } + }, + "\/users\/{userId}\/verification\/phone": { + "patch": { + "summary": "Update phone verification", + "operationId": "usersUpdatePhoneVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user phone verification status by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "updatePhoneVerification", + "weight": 252, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/update-phone-verification.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "phoneVerification": { + "type": "boolean", + "description": "User phone verification status.", + "default": null, + "x-example": false + } + }, + "required": [ + "phoneVerification" + ] + } + } + ] + } + }, + "\/vcs\/github\/installations\/{installationId}\/providerRepositories": { + "get": { + "summary": "List repositories", + "operationId": "vcsListRepositories", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vcs" + ], + "description": "Get a list of GitHub repositories available through your installation. This endpoint returns repositories with their basic information, detected runtime environments, and latest push dates. You can optionally filter repositories using a search term. Each repository's runtime is automatically detected based on its contents and language statistics. The GitHub installation must be properly configured for this endpoint to work.", + "responses": { + "200": { + "description": "Provider Repositories List", + "schema": { + "$ref": "#\/definitions\/providerRepositoryList" + } + } + }, + "x-appwrite": { + "method": "listRepositories", + "weight": 279, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "vcs\/list-repositories.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repositories.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "type": "string", + "x-example": "<INSTALLATION_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" + } + ] + }, + "post": { + "summary": "Create repository", + "operationId": "vcsCreateRepository", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vcs" + ], + "description": "Create a new GitHub repository through your installation. This endpoint allows you to create either a public or private repository by specifying a name and visibility setting. The repository will be created under your GitHub user account or organization, depending on your installation type. The GitHub installation must be properly configured and have the necessary permissions for repository creation.", + "responses": { + "200": { + "description": "ProviderRepository", + "schema": { + "$ref": "#\/definitions\/providerRepository" + } + } + }, + "x-appwrite": { + "method": "createRepository", + "weight": 280, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "vcs\/create-repository.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "type": "string", + "x-example": "<INSTALLATION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Repository name (slug)", + "default": null, + "x-example": "<NAME>" + }, + "private": { + "type": "boolean", + "description": "Mark repository public or private", + "default": null, + "x-example": false + } + }, + "required": [ + "name", + "private" + ] + } + } + ] + } + }, + "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}": { + "get": { + "summary": "Get repository", + "operationId": "vcsGetRepository", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vcs" + ], + "description": "Get detailed information about a specific GitHub repository from your installation. This endpoint returns repository details including its ID, name, visibility status, organization, and latest push date. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.", + "responses": { + "200": { + "description": "ProviderRepository", + "schema": { + "$ref": "#\/definitions\/providerRepository" + } + } + }, + "x-appwrite": { + "method": "getRepository", + "weight": 281, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "vcs\/get-repository.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "type": "string", + "x-example": "<INSTALLATION_ID>", + "in": "path" + }, + { + "name": "providerRepositoryId", + "description": "Repository Id", + "required": true, + "type": "string", + "x-example": "<PROVIDER_REPOSITORY_ID>", + "in": "path" + } + ] + } + }, + "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}\/branches": { + "get": { + "summary": "List repository branches", + "operationId": "vcsListRepositoryBranches", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vcs" + ], + "description": "Get a list of all branches from a GitHub repository in your installation. This endpoint returns the names of all branches in the repository and their total count. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.\n", + "responses": { + "200": { + "description": "Branches List", + "schema": { + "$ref": "#\/definitions\/branchList" + } + } + }, + "x-appwrite": { + "method": "listRepositoryBranches", + "weight": 282, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "vcs\/list-repository-branches.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repository-branches.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "type": "string", + "x-example": "<INSTALLATION_ID>", + "in": "path" + }, + { + "name": "providerRepositoryId", + "description": "Repository Id", + "required": true, + "type": "string", + "x-example": "<PROVIDER_REPOSITORY_ID>", + "in": "path" + } + ] + } + }, + "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}\/contents": { + "get": { + "summary": "Get files and directories of a VCS repository", + "operationId": "vcsGetRepositoryContents", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vcs" + ], + "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.\n", + "responses": { + "200": { + "description": "VCS Content List", + "schema": { + "$ref": "#\/definitions\/vcsContentList" + } + } + }, + "x-appwrite": { + "method": "getRepositoryContents", + "weight": 277, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "vcs\/get-repository-contents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository-contents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "type": "string", + "x-example": "<INSTALLATION_ID>", + "in": "path" + }, + { + "name": "providerRepositoryId", + "description": "Repository Id", + "required": true, + "type": "string", + "x-example": "<PROVIDER_REPOSITORY_ID>", + "in": "path" + }, + { + "name": "providerRootDirectory", + "description": "Path to get contents of nested directory", + "required": false, + "type": "string", + "x-example": "<PROVIDER_ROOT_DIRECTORY>", + "default": "", + "in": "query" + } + ] + } + }, + "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}\/detection": { + "post": { + "summary": "Detect runtime settings from source code", + "operationId": "vcsCreateRepositoryDetection", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vcs" + ], + "description": "Analyze a GitHub repository to automatically detect the programming language and runtime environment. This endpoint scans the repository's files and language statistics to determine the appropriate runtime settings for your function. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", + "responses": { + "200": { + "description": "Detection", + "schema": { + "$ref": "#\/definitions\/detection" + } + } + }, + "x-appwrite": { + "method": "createRepositoryDetection", + "weight": 278, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "vcs\/create-repository-detection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository-detection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "type": "string", + "x-example": "<INSTALLATION_ID>", + "in": "path" + }, + { + "name": "providerRepositoryId", + "description": "Repository Id", + "required": true, + "type": "string", + "x-example": "<PROVIDER_REPOSITORY_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerRootDirectory": { + "type": "string", + "description": "Path to Root Directory", + "default": "", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + } + } + } + } + ] + } + }, + "\/vcs\/github\/installations\/{installationId}\/repositories\/{repositoryId}": { + "patch": { + "summary": "Authorize external deployment", + "operationId": "vcsUpdateExternalDeployments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vcs" + ], + "description": "Authorize and create deployments for a GitHub pull request in your project. This endpoint allows external contributions by creating deployments from pull requests, enabling preview environments for code review. The pull request must be open and not previously authorized. The GitHub installation must be properly configured and have access to both the repository and pull request for this endpoint to work.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "updateExternalDeployments", + "weight": 287, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "vcs\/update-external-deployments.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/update-external-deployments.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "type": "string", + "x-example": "<INSTALLATION_ID>", + "in": "path" + }, + { + "name": "repositoryId", + "description": "VCS Repository Id", + "required": true, + "type": "string", + "x-example": "<REPOSITORY_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerPullRequestId": { + "type": "string", + "description": "GitHub Pull Request Id", + "default": null, + "x-example": "<PROVIDER_PULL_REQUEST_ID>" + } + }, + "required": [ + "providerPullRequestId" + ] + } + } + ] + } + }, + "\/vcs\/installations": { + "get": { + "summary": "List installations", + "operationId": "vcsListInstallations", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vcs" + ], + "description": "List all VCS installations configured for the current project. This endpoint returns a list of installations including their provider, organization, and other configuration details.\n", + "responses": { + "200": { + "description": "Installations List", + "schema": { + "$ref": "#\/definitions\/installationList" + } + } + }, + "x-appwrite": { + "method": "listInstallations", + "weight": 284, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "vcs\/list-installations.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-installations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: provider, organization", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + } + }, + "\/vcs\/installations\/{installationId}": { + "get": { + "summary": "Get installation", + "operationId": "vcsGetInstallation", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vcs" + ], + "description": "Get a VCS installation by its unique ID. This endpoint returns the installation's details including its provider, organization, and configuration. ", + "responses": { + "200": { + "description": "Installation", + "schema": { + "$ref": "#\/definitions\/installation" + } + } + }, + "x-appwrite": { + "method": "getInstallation", + "weight": 285, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "vcs\/get-installation.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-installation.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "type": "string", + "x-example": "<INSTALLATION_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete installation", + "operationId": "vcsDeleteInstallation", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "vcs" + ], + "description": "Delete a VCS installation by its unique ID. This endpoint removes the installation and all its associated repositories from the project.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteInstallation", + "weight": 286, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "vcs\/delete-installation.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/delete-installation.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "type": "string", + "x-example": "<INSTALLATION_ID>", + "in": "path" + } + ] + } + } }, - "/projects/{projectId}/service/all": { - "patch": { - "summary": "Update all service status", - "operationId": "projectsUpdateServiceStatusAll", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Update the status of all services. Use this endpoint to enable or disable all optional services at once. ", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#/definitions/project" - } - } + "tags": [ + { + "name": "account", + "description": "The Account service allows you to authenticate and manage a user account.", + "x-globalAttributes": [] }, - "x-appwrite": { - "method": "updateServiceStatusAll", - "weight": 156, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update-service-status-all.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update-service-status-all.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } + { + "name": "avatars", + "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.", + "x-globalAttributes": [] }, - "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": { - "status": { - "type": "boolean", - "description": "Service status.", - "default": null, - "x-example": false - } - }, - "required": ["status"] - } - } - ] - } - }, - "/projects/{projectId}/smtp": { - "patch": { - "summary": "Update SMTP", - "operationId": "projectsUpdateSmtp", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails. ", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#/definitions/project" - } - } + { + "name": "databases", + "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents", + "x-globalAttributes": [ + "databaseId" + ] }, - "x-appwrite": { - "method": "updateSmtp", - "weight": 188, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update-smtp.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update-smtp.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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": { - "enabled": { - "type": "boolean", - "description": "Enable custom SMTP service", - "default": null, - "x-example": false - }, - "senderName": { - "type": "string", - "description": "Name of the email sender", - "default": "", - "x-example": "<SENDER_NAME>" - }, - "senderEmail": { - "type": "string", - "description": "Email of the sender", - "default": "", - "x-example": "email@example.com" - }, - "replyTo": { - "type": "string", - "description": "Reply to email", - "default": "", - "x-example": "email@example.com" - }, - "host": { - "type": "string", - "description": "SMTP server host name", - "default": "", - "x-example": null - }, - "port": { - "type": "integer", - "description": "SMTP server port", - "default": 587, - "x-example": null - }, - "username": { - "type": "string", - "description": "SMTP server username", - "default": "", - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "SMTP server password", - "default": "", - "x-example": "<PASSWORD>" - }, - "secure": { - "type": "string", - "description": "Does SMTP server use secure connection", - "default": "", - "x-example": "tls", - "enum": ["tls", "ssl"], - "x-enum-name": "SMTPSecure", - "x-enum-keys": [] - } - }, - "required": ["enabled"] - } - } - ] - } - }, - "/projects/{projectId}/smtp/tests": { - "post": { - "summary": "Create SMTP test", - "operationId": "projectsCreateSmtpTest", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Send a test email to verify SMTP configuration. ", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "createSmtpTest", - "weight": 189, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/create-smtp-test.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/create-smtp-test.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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": { - "emails": { - "type": "array", - "description": "Array of emails to send test email to. Maximum of 10 emails are allowed.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "senderName": { - "type": "string", - "description": "Name of the email sender", - "default": null, - "x-example": "<SENDER_NAME>" - }, - "senderEmail": { - "type": "string", - "description": "Email of the sender", - "default": null, - "x-example": "email@example.com" - }, - "replyTo": { - "type": "string", - "description": "Reply to email", - "default": "", - "x-example": "email@example.com" - }, - "host": { - "type": "string", - "description": "SMTP server host name", - "default": null, - "x-example": null - }, - "port": { - "type": "integer", - "description": "SMTP server port", - "default": 587, - "x-example": null - }, - "username": { - "type": "string", - "description": "SMTP server username", - "default": "", - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "SMTP server password", - "default": "", - "x-example": "<PASSWORD>" - }, - "secure": { - "type": "string", - "description": "Does SMTP server use secure connection", - "default": "", - "x-example": "tls", - "enum": ["tls", "ssl"], - "x-enum-name": "SMTPSecure", - "x-enum-keys": [] - } - }, - "required": ["emails", "senderName", "senderEmail", "host"] - } - } - ] - } - }, - "/projects/{projectId}/team": { - "patch": { - "summary": "Update project team", - "operationId": "projectsUpdateTeam", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Update the team ID of a project allowing for it to be transferred to another team.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#/definitions/project" - } - } - }, - "x-appwrite": { - "method": "updateTeam", - "weight": 154, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update-team.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update-team.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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": { - "teamId": { - "type": "string", - "description": "Team ID of the team to transfer project to.", - "default": null, - "x-example": "<TEAM_ID>" - } - }, - "required": ["teamId"] - } - } - ] - } - }, - "/projects/{projectId}/templates/email/{type}/{locale}": { - "get": { - "summary": "Get custom email template", - "operationId": "projectsGetEmailTemplate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details. ", - "responses": { - "200": { - "description": "EmailTemplate", - "schema": { - "$ref": "#/definitions/emailTemplate" - } - } - }, - "x-appwrite": { - "method": "getEmailTemplate", - "weight": 191, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/get-email-template.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/get-email-template.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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": "type", - "description": "Template type", - "required": true, - "type": "string", - "x-example": "verification", - "enum": [ - "verification", - "magicsession", - "recovery", - "invitation", - "mfachallenge", - "sessionalert", - "otpsession" - ], - "x-enum-name": "EmailTemplateType", - "x-enum-keys": [], - "in": "path" - }, - { + { "name": "locale", - "description": "Template locale", - "required": true, - "type": "string", - "x-example": "af", - "enum": [ - "af", - "ar-ae", - "ar-bh", - "ar-dz", - "ar-eg", - "ar-iq", - "ar-jo", - "ar-kw", - "ar-lb", - "ar-ly", - "ar-ma", - "ar-om", - "ar-qa", - "ar-sa", - "ar-sy", - "ar-tn", - "ar-ye", - "as", - "az", - "be", - "bg", - "bh", - "bn", - "bs", - "ca", - "cs", - "cy", - "da", - "de", - "de-at", - "de-ch", - "de-li", - "de-lu", - "el", - "en", - "en-au", - "en-bz", - "en-ca", - "en-gb", - "en-ie", - "en-jm", - "en-nz", - "en-tt", - "en-us", - "en-za", - "eo", - "es", - "es-ar", - "es-bo", - "es-cl", - "es-co", - "es-cr", - "es-do", - "es-ec", - "es-gt", - "es-hn", - "es-mx", - "es-ni", - "es-pa", - "es-pe", - "es-pr", - "es-py", - "es-sv", - "es-uy", - "es-ve", - "et", - "eu", - "fa", - "fi", - "fo", - "fr", - "fr-be", - "fr-ca", - "fr-ch", - "fr-lu", - "ga", - "gd", - "he", - "hi", - "hr", - "hu", - "id", - "is", - "it", - "it-ch", - "ja", - "ji", - "ko", - "ku", - "lt", - "lv", - "mk", - "ml", - "ms", - "mt", - "nb", - "ne", - "nl", - "nl-be", - "nn", - "no", - "pa", - "pl", - "pt", - "pt-br", - "rm", - "ro", - "ro-md", - "ru", - "ru-md", - "sb", - "sk", - "sl", - "sq", - "sr", - "sv", - "sv-fi", - "th", - "tn", - "tr", - "ts", - "ua", - "ur", - "ve", - "vi", - "xh", - "zh-cn", - "zh-hk", - "zh-sg", - "zh-tw", - "zu" - ], - "x-enum-name": "EmailTemplateLocale", - "x-enum-keys": [], - "in": "path" - } - ] - }, - "patch": { - "summary": "Update custom email templates", - "operationId": "projectsUpdateEmailTemplate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.", - "responses": { - "200": { - "description": "EmailTemplate", - "schema": { - "$ref": "#/definitions/emailTemplate" - } - } + "description": "The Locale service allows you to customize your app based on your users' location.", + "x-globalAttributes": [] }, - "x-appwrite": { - "method": "updateEmailTemplate", - "weight": 193, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update-email-template.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update-email-template.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } + { + "name": "health", + "description": "The Health service allows you to both validate and monitor your Appwrite server's health.", + "x-globalAttributes": [] }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "<PROJECT_ID>", - "in": "path" - }, - { - "name": "type", - "description": "Template type", - "required": true, - "type": "string", - "x-example": "verification", - "enum": [ - "verification", - "magicsession", - "recovery", - "invitation", - "mfachallenge", - "sessionalert", - "otpsession" - ], - "x-enum-name": "EmailTemplateType", - "x-enum-keys": [], - "in": "path" - }, - { - "name": "locale", - "description": "Template locale", - "required": true, - "type": "string", - "x-example": "af", - "enum": [ - "af", - "ar-ae", - "ar-bh", - "ar-dz", - "ar-eg", - "ar-iq", - "ar-jo", - "ar-kw", - "ar-lb", - "ar-ly", - "ar-ma", - "ar-om", - "ar-qa", - "ar-sa", - "ar-sy", - "ar-tn", - "ar-ye", - "as", - "az", - "be", - "bg", - "bh", - "bn", - "bs", - "ca", - "cs", - "cy", - "da", - "de", - "de-at", - "de-ch", - "de-li", - "de-lu", - "el", - "en", - "en-au", - "en-bz", - "en-ca", - "en-gb", - "en-ie", - "en-jm", - "en-nz", - "en-tt", - "en-us", - "en-za", - "eo", - "es", - "es-ar", - "es-bo", - "es-cl", - "es-co", - "es-cr", - "es-do", - "es-ec", - "es-gt", - "es-hn", - "es-mx", - "es-ni", - "es-pa", - "es-pe", - "es-pr", - "es-py", - "es-sv", - "es-uy", - "es-ve", - "et", - "eu", - "fa", - "fi", - "fo", - "fr", - "fr-be", - "fr-ca", - "fr-ch", - "fr-lu", - "ga", - "gd", - "he", - "hi", - "hr", - "hu", - "id", - "is", - "it", - "it-ch", - "ja", - "ji", - "ko", - "ku", - "lt", - "lv", - "mk", - "ml", - "ms", - "mt", - "nb", - "ne", - "nl", - "nl-be", - "nn", - "no", - "pa", - "pl", - "pt", - "pt-br", - "rm", - "ro", - "ro-md", - "ru", - "ru-md", - "sb", - "sk", - "sl", - "sq", - "sr", - "sv", - "sv-fi", - "th", - "tn", - "tr", - "ts", - "ua", - "ur", - "ve", - "vi", - "xh", - "zh-cn", - "zh-hk", - "zh-sg", - "zh-tw", - "zu" - ], - "x-enum-name": "EmailTemplateLocale", - "x-enum-keys": [], - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "subject": { - "type": "string", - "description": "Email Subject", - "default": null, - "x-example": "<SUBJECT>" + { + "name": "projects", + "description": "The Project service allows you to manage all the projects in your Appwrite server.", + "x-globalAttributes": [] + }, + { + "name": "project", + "description": "The Project service allows you to manage all the projects in your Appwrite server.", + "x-globalAttributes": [] + }, + { + "name": "storage", + "description": "The Storage service allows you to manage your project files.", + "x-globalAttributes": [] + }, + { + "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", + "x-globalAttributes": [] + }, + { + "name": "users", + "description": "The Users service allows you to manage your project users.", + "x-globalAttributes": [] + }, + { + "name": "functions", + "description": "The Functions Service allows you view, create and manage your Cloud Functions.", + "x-globalAttributes": [] + }, + { + "name": "proxy", + "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration.", + "x-globalAttributes": [] + }, + { + "name": "graphql", + "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL.", + "x-globalAttributes": [] + }, + { + "name": "console", + "description": "The Console service allows you to interact with console relevant informations.", + "x-globalAttributes": [] + }, + { + "name": "migrations", + "description": "The Migrations service allows you to migrate third-party data to your Appwrite project.", + "x-globalAttributes": [] + }, + { + "name": "messaging", + "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.).", + "x-globalAttributes": [] + } + ], + "definitions": { + "any": { + "description": "Any", + "type": "object", + "additionalProperties": true + }, + "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" }, - "message": { - "type": "string", - "description": "Template message", - "default": null, - "x-example": "<MESSAGE>" - }, - "senderName": { - "type": "string", - "description": "Name of the email sender", - "default": "", - "x-example": "<SENDER_NAME>" - }, - "senderEmail": { - "type": "string", - "description": "Email of the sender", - "default": "", - "x-example": "email@example.com" - }, - "replyTo": { - "type": "string", - "description": "Reply to email", - "default": "", - "x-example": "email@example.com" + "documents": { + "type": "array", + "description": "List of documents.", + "items": { + "type": "object", + "$ref": "#\/definitions\/document" + }, + "x-example": "" } - }, - "required": ["subject", "message"] - } - } - ] - }, - "delete": { - "summary": "Reset custom email template", - "operationId": "projectsDeleteEmailTemplate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Reset a custom email template to its default value. This endpoint removes any custom content and restores the template to its original state. ", - "responses": { - "200": { - "description": "EmailTemplate", - "schema": { - "$ref": "#/definitions/emailTemplate" - } - } - }, - "x-appwrite": { - "method": "deleteEmailTemplate", - "weight": 195, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/delete-email-template.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/delete-email-template.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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": "type", - "description": "Template type", - "required": true, - "type": "string", - "x-example": "verification", - "enum": [ - "verification", - "magicsession", - "recovery", - "invitation", - "mfachallenge", - "sessionalert", - "otpsession" - ], - "x-enum-name": "EmailTemplateType", - "x-enum-keys": [], - "in": "path" - }, - { - "name": "locale", - "description": "Template locale", - "required": true, - "type": "string", - "x-example": "af", - "enum": [ - "af", - "ar-ae", - "ar-bh", - "ar-dz", - "ar-eg", - "ar-iq", - "ar-jo", - "ar-kw", - "ar-lb", - "ar-ly", - "ar-ma", - "ar-om", - "ar-qa", - "ar-sa", - "ar-sy", - "ar-tn", - "ar-ye", - "as", - "az", - "be", - "bg", - "bh", - "bn", - "bs", - "ca", - "cs", - "cy", - "da", - "de", - "de-at", - "de-ch", - "de-li", - "de-lu", - "el", - "en", - "en-au", - "en-bz", - "en-ca", - "en-gb", - "en-ie", - "en-jm", - "en-nz", - "en-tt", - "en-us", - "en-za", - "eo", - "es", - "es-ar", - "es-bo", - "es-cl", - "es-co", - "es-cr", - "es-do", - "es-ec", - "es-gt", - "es-hn", - "es-mx", - "es-ni", - "es-pa", - "es-pe", - "es-pr", - "es-py", - "es-sv", - "es-uy", - "es-ve", - "et", - "eu", - "fa", - "fi", - "fo", - "fr", - "fr-be", - "fr-ca", - "fr-ch", - "fr-lu", - "ga", - "gd", - "he", - "hi", - "hr", - "hu", - "id", - "is", - "it", - "it-ch", - "ja", - "ji", - "ko", - "ku", - "lt", - "lv", - "mk", - "ml", - "ms", - "mt", - "nb", - "ne", - "nl", - "nl-be", - "nn", - "no", - "pa", - "pl", - "pt", - "pt-br", - "rm", - "ro", - "ro-md", - "ru", - "ru-md", - "sb", - "sk", - "sl", - "sq", - "sr", - "sv", - "sv-fi", - "th", - "tn", - "tr", - "ts", - "ua", - "ur", - "ve", - "vi", - "xh", - "zh-cn", - "zh-hk", - "zh-sg", - "zh-tw", - "zu" - ], - "x-enum-name": "EmailTemplateLocale", - "x-enum-keys": [], - "in": "path" - } - ] - } - }, - "/projects/{projectId}/templates/sms/{type}/{locale}": { - "get": { - "summary": "Get custom SMS template", - "operationId": "projectsGetSmsTemplate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Get a custom SMS template for the specified locale and type returning it's contents.", - "responses": { - "200": { - "description": "SmsTemplate", - "schema": { - "$ref": "#/definitions/smsTemplate" - } - } - }, - "x-appwrite": { - "method": "getSmsTemplate", - "weight": 190, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/get-sms-template.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/get-sms-template.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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": "type", - "description": "Template type", - "required": true, - "type": "string", - "x-example": "verification", - "enum": ["verification", "login", "invitation", "mfachallenge"], - "x-enum-name": "SmsTemplateType", - "x-enum-keys": [], - "in": "path" - }, - { - "name": "locale", - "description": "Template locale", - "required": true, - "type": "string", - "x-example": "af", - "enum": [ - "af", - "ar-ae", - "ar-bh", - "ar-dz", - "ar-eg", - "ar-iq", - "ar-jo", - "ar-kw", - "ar-lb", - "ar-ly", - "ar-ma", - "ar-om", - "ar-qa", - "ar-sa", - "ar-sy", - "ar-tn", - "ar-ye", - "as", - "az", - "be", - "bg", - "bh", - "bn", - "bs", - "ca", - "cs", - "cy", - "da", - "de", - "de-at", - "de-ch", - "de-li", - "de-lu", - "el", - "en", - "en-au", - "en-bz", - "en-ca", - "en-gb", - "en-ie", - "en-jm", - "en-nz", - "en-tt", - "en-us", - "en-za", - "eo", - "es", - "es-ar", - "es-bo", - "es-cl", - "es-co", - "es-cr", - "es-do", - "es-ec", - "es-gt", - "es-hn", - "es-mx", - "es-ni", - "es-pa", - "es-pe", - "es-pr", - "es-py", - "es-sv", - "es-uy", - "es-ve", - "et", - "eu", - "fa", - "fi", - "fo", - "fr", - "fr-be", - "fr-ca", - "fr-ch", - "fr-lu", - "ga", - "gd", - "he", - "hi", - "hr", - "hu", - "id", - "is", - "it", - "it-ch", - "ja", - "ji", - "ko", - "ku", - "lt", - "lv", - "mk", - "ml", - "ms", - "mt", - "nb", - "ne", - "nl", - "nl-be", - "nn", - "no", - "pa", - "pl", - "pt", - "pt-br", - "rm", - "ro", - "ro-md", - "ru", - "ru-md", - "sb", - "sk", - "sl", - "sq", - "sr", - "sv", - "sv-fi", - "th", - "tn", - "tr", - "ts", - "ua", - "ur", - "ve", - "vi", - "xh", - "zh-cn", - "zh-hk", - "zh-sg", - "zh-tw", - "zu" - ], - "x-enum-name": "SmsTemplateLocale", - "x-enum-keys": [], - "in": "path" - } - ] - }, - "patch": { - "summary": "Update custom SMS template", - "operationId": "projectsUpdateSmsTemplate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. ", - "responses": { - "200": { - "description": "SmsTemplate", - "schema": { - "$ref": "#/definitions/smsTemplate" - } - } - }, - "x-appwrite": { - "method": "updateSmsTemplate", - "weight": 192, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update-sms-template.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update-sms-template.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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": "type", - "description": "Template type", - "required": true, - "type": "string", - "x-example": "verification", - "enum": ["verification", "login", "invitation", "mfachallenge"], - "x-enum-name": "SmsTemplateType", - "x-enum-keys": [], - "in": "path" - }, - { - "name": "locale", - "description": "Template locale", - "required": true, - "type": "string", - "x-example": "af", - "enum": [ - "af", - "ar-ae", - "ar-bh", - "ar-dz", - "ar-eg", - "ar-iq", - "ar-jo", - "ar-kw", - "ar-lb", - "ar-ly", - "ar-ma", - "ar-om", - "ar-qa", - "ar-sa", - "ar-sy", - "ar-tn", - "ar-ye", - "as", - "az", - "be", - "bg", - "bh", - "bn", - "bs", - "ca", - "cs", - "cy", - "da", - "de", - "de-at", - "de-ch", - "de-li", - "de-lu", - "el", - "en", - "en-au", - "en-bz", - "en-ca", - "en-gb", - "en-ie", - "en-jm", - "en-nz", - "en-tt", - "en-us", - "en-za", - "eo", - "es", - "es-ar", - "es-bo", - "es-cl", - "es-co", - "es-cr", - "es-do", - "es-ec", - "es-gt", - "es-hn", - "es-mx", - "es-ni", - "es-pa", - "es-pe", - "es-pr", - "es-py", - "es-sv", - "es-uy", - "es-ve", - "et", - "eu", - "fa", - "fi", - "fo", - "fr", - "fr-be", - "fr-ca", - "fr-ch", - "fr-lu", - "ga", - "gd", - "he", - "hi", - "hr", - "hu", - "id", - "is", - "it", - "it-ch", - "ja", - "ji", - "ko", - "ku", - "lt", - "lv", - "mk", - "ml", - "ms", - "mt", - "nb", - "ne", - "nl", - "nl-be", - "nn", - "no", - "pa", - "pl", - "pt", - "pt-br", - "rm", - "ro", - "ro-md", - "ru", - "ru-md", - "sb", - "sk", - "sl", - "sq", - "sr", - "sv", - "sv-fi", - "th", - "tn", - "tr", - "ts", - "ua", - "ur", - "ve", - "vi", - "xh", - "zh-cn", - "zh-hk", - "zh-sg", - "zh-tw", - "zu" - ], - "x-enum-name": "SmsTemplateLocale", - "x-enum-keys": [], - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string", - "description": "Template message", - "default": null, - "x-example": "<MESSAGE>" - } - }, - "required": ["message"] - } - } - ] - }, - "delete": { - "summary": "Reset custom SMS template", - "operationId": "projectsDeleteSmsTemplate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. ", - "responses": { - "200": { - "description": "SmsTemplate", - "schema": { - "$ref": "#/definitions/smsTemplate" - } - } - }, - "x-appwrite": { - "method": "deleteSmsTemplate", - "weight": 194, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/delete-sms-template.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/delete-sms-template.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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": "type", - "description": "Template type", - "required": true, - "type": "string", - "x-example": "verification", - "enum": ["verification", "login", "invitation", "mfachallenge"], - "x-enum-name": "SmsTemplateType", - "x-enum-keys": [], - "in": "path" - }, - { - "name": "locale", - "description": "Template locale", - "required": true, - "type": "string", - "x-example": "af", - "enum": [ - "af", - "ar-ae", - "ar-bh", - "ar-dz", - "ar-eg", - "ar-iq", - "ar-jo", - "ar-kw", - "ar-lb", - "ar-ly", - "ar-ma", - "ar-om", - "ar-qa", - "ar-sa", - "ar-sy", - "ar-tn", - "ar-ye", - "as", - "az", - "be", - "bg", - "bh", - "bn", - "bs", - "ca", - "cs", - "cy", - "da", - "de", - "de-at", - "de-ch", - "de-li", - "de-lu", - "el", - "en", - "en-au", - "en-bz", - "en-ca", - "en-gb", - "en-ie", - "en-jm", - "en-nz", - "en-tt", - "en-us", - "en-za", - "eo", - "es", - "es-ar", - "es-bo", - "es-cl", - "es-co", - "es-cr", - "es-do", - "es-ec", - "es-gt", - "es-hn", - "es-mx", - "es-ni", - "es-pa", - "es-pe", - "es-pr", - "es-py", - "es-sv", - "es-uy", - "es-ve", - "et", - "eu", - "fa", - "fi", - "fo", - "fr", - "fr-be", - "fr-ca", - "fr-ch", - "fr-lu", - "ga", - "gd", - "he", - "hi", - "hr", - "hu", - "id", - "is", - "it", - "it-ch", - "ja", - "ji", - "ko", - "ku", - "lt", - "lv", - "mk", - "ml", - "ms", - "mt", - "nb", - "ne", - "nl", - "nl-be", - "nn", - "no", - "pa", - "pl", - "pt", - "pt-br", - "rm", - "ro", - "ro-md", - "ru", - "ru-md", - "sb", - "sk", - "sl", - "sq", - "sr", - "sv", - "sv-fi", - "th", - "tn", - "tr", - "ts", - "ua", - "ur", - "ve", - "vi", - "xh", - "zh-cn", - "zh-hk", - "zh-sg", - "zh-tw", - "zu" - ], - "x-enum-name": "SmsTemplateLocale", - "x-enum-keys": [], - "in": "path" - } - ] - } - }, - "/projects/{projectId}/webhooks": { - "get": { - "summary": "List webhooks", - "operationId": "projectsListWebhooks", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Get a list of all webhooks belonging to the project. You can use the query params to filter your results. ", - "responses": { - "200": { - "description": "Webhooks List", - "schema": { - "$ref": "#/definitions/webhookList" - } - } - }, - "x-appwrite": { - "method": "listWebhooks", - "weight": 172, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/list-webhooks.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/list-webhooks.md", - "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": "Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur. ", - "responses": { - "201": { - "description": "Webhook", - "schema": { - "$ref": "#/definitions/webhook" - } - } - }, - "x-appwrite": { - "method": "createWebhook", - "weight": 171, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/create-webhook.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/create-webhook.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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>" - }, - "enabled": { - "type": "boolean", - "description": "Enable or disable a webhook.", - "default": true, - "x-example": false - }, - "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": null - }, - "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": "Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. ", - "responses": { - "200": { - "description": "Webhook", - "schema": { - "$ref": "#/definitions/webhook" - } - } - }, - "x-appwrite": { - "method": "getWebhook", - "weight": 173, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/get-webhook.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/get-webhook.md", - "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": "Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook. ", - "responses": { - "200": { - "description": "Webhook", - "schema": { - "$ref": "#/definitions/webhook" - } - } - }, - "x-appwrite": { - "method": "updateWebhook", - "weight": 174, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update-webhook.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update-webhook.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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>" - }, - "enabled": { - "type": "boolean", - "description": "Enable or disable a webhook.", - "default": true, - "x-example": false - }, - "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": null - }, - "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": "Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. ", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteWebhook", - "weight": 176, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/delete-webhook.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/delete-webhook.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "<PROJECT_ID>", - "in": "path" - }, - { - "name": "webhookId", - "description": "Webhook unique ID.", - "required": true, - "type": "string", - "x-example": "<WEBHOOK_ID>", - "in": "path" - } - ] - } - }, - "/projects/{projectId}/webhooks/{webhookId}/signature": { - "patch": { - "summary": "Update webhook signature key", - "operationId": "projectsUpdateWebhookSignature", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook. ", - "responses": { - "200": { - "description": "Webhook", - "schema": { - "$ref": "#/definitions/webhook" - } - } - }, - "x-appwrite": { - "method": "updateWebhookSignature", - "weight": 175, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects/update-webhook-signature.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/projects/update-webhook-signature.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "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" - } - ] - } - }, - "/proxy/rules": { - "get": { - "summary": "List rules", - "operationId": "proxyListRules", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["proxy"], - "description": "Get a list of all the proxy rules. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Rule List", - "schema": { - "$ref": "#/definitions/proxyRuleList" - } - } - }, - "x-appwrite": { - "method": "listRules", - "weight": 317, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "proxy/list-rules.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/proxy/list-rules.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rules.read", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: domain, resourceType, resourceId, url", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" }, - "default": [], - "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" - } - ] - }, - "post": { - "summary": "Create rule", - "operationId": "proxyCreateRule", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["proxy"], - "description": "Create a new proxy rule.", - "responses": { - "201": { - "description": "Rule", - "schema": { - "$ref": "#/definitions/proxyRule" - } - } + "required": [ + "total", + "documents" + ] }, - "x-appwrite": { - "method": "createRule", - "weight": 316, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "proxy/create-rule.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/proxy/create-rule.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rules.write", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "domain": { - "type": "string", - "description": "Domain name.", - "default": null, - "x-example": null + "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" }, - "resourceType": { - "type": "string", - "description": "Action definition for the rule. Possible values are \"api\", \"function\"", - "default": null, - "x-example": "api", - "enum": ["api", "function"], - "x-enum-name": null, - "x-enum-keys": [] - }, - "resourceId": { - "type": "string", - "description": "ID of resource for the action type. If resourceType is \"api\", leave empty. If resourceType is \"function\", provide ID of the function.", - "default": "", - "x-example": "<RESOURCE_ID>" + "collections": { + "type": "array", + "description": "List of collections.", + "items": { + "type": "object", + "$ref": "#\/definitions\/collection" + }, + "x-example": "" } - }, - "required": ["domain", "resourceType"] - } - } - ] - } - }, - "/proxy/rules/{ruleId}": { - "get": { - "summary": "Get rule", - "operationId": "proxyGetRule", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["proxy"], - "description": "Get a proxy rule by its unique ID.", - "responses": { - "200": { - "description": "Rule", - "schema": { - "$ref": "#/definitions/proxyRule" - } - } - }, - "x-appwrite": { - "method": "getRule", - "weight": 318, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "proxy/get-rule.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/proxy/get-rule.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rules.read", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "ruleId", - "description": "Rule ID.", - "required": true, - "type": "string", - "x-example": "<RULE_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete rule", - "operationId": "proxyDeleteRule", - "consumes": ["application/json"], - "produces": [], - "tags": ["proxy"], - "description": "Delete a proxy rule by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteRule", - "weight": 319, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "proxy/delete-rule.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/proxy/delete-rule.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rules.write", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "ruleId", - "description": "Rule ID.", - "required": true, - "type": "string", - "x-example": "<RULE_ID>", - "in": "path" - } - ] - } - }, - "/proxy/rules/{ruleId}/verification": { - "patch": { - "summary": "Update rule verification status", - "operationId": "proxyUpdateRuleVerification", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["proxy"], - "description": "Retry getting verification process of a proxy rule. This endpoint triggers domain verification by checking DNS records (CNAME) against the configured target domain. If verification is successful, a TLS certificate will be automatically provisioned for the domain.", - "responses": { - "200": { - "description": "Rule", - "schema": { - "$ref": "#/definitions/proxyRule" - } - } - }, - "x-appwrite": { - "method": "updateRuleVerification", - "weight": 320, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "proxy/update-rule-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/proxy/update-rule-verification.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rules.write", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "ruleId", - "description": "Rule ID.", - "required": true, - "type": "string", - "x-example": "<RULE_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": 203, - "cookies": false, - "type": "", - "deprecated": false, - "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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" }, - "default": [], - "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" - } - ] - }, - "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" - } - } + "required": [ + "total", + "collections" + ] }, - "x-appwrite": { - "method": "createBucket", - "weight": 202, - "cookies": false, - "type": "", - "deprecated": false, - "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 a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + "databaseList": { + "description": "Databases List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of databases documents that matched your query.", + "x-example": 5, + "format": "int32" }, - "name": { - "type": "string", - "description": "Bucket name", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "fileSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", - "default": true, - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", - "default": {}, - "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" - } - }, - "compression": { - "type": "string", - "description": "Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled", - "default": "none", - "x-example": "none", - "enum": ["none", "gzip", "zstd"], - "x-enum-name": null, - "x-enum-keys": [] - }, - "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 + "databases": { + "type": "array", + "description": "List of databases.", + "items": { + "type": "object", + "$ref": "#\/definitions\/database" + }, + "x-example": "" } - }, - "required": ["bucketId", "name"] - } - } - ] - } - }, - "/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": 204, - "cookies": false, - "type": "", - "deprecated": false, - "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": 205, - "cookies": false, - "type": "", - "deprecated": false, - "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>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "fileSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", - "default": true, - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", - "default": {}, - "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" - } - }, - "compression": { - "type": "string", - "description": "Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled", - "default": "none", - "x-example": "none", - "enum": ["none", "gzip", "zstd"], - "x-enum-name": null, - "x-enum-keys": [] - }, - "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"] - } - } - ] - }, - "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": 206, - "cookies": false, - "type": "", - "deprecated": false, - "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.", - "responses": { - "200": { - "description": "Files List", - "schema": { - "$ref": "#/definitions/fileList" - } - } - }, - "x-appwrite": { - "method": "listFiles", - "weight": 208, - "cookies": false, - "type": "", - "deprecated": false, - "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](https://appwrite.io/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" }, - "default": [], - "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" - } - ] - }, - "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](https://appwrite.io/docs/server/storage#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" - } - } + "required": [ + "total", + "databases" + ] }, - "x-appwrite": { - "method": "createFile", - "weight": 207, - "cookies": false, - "type": "upload", - "deprecated": false, - "demo": "storage/create-file.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/create-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}", - "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](https://appwrite.io/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).", - "required": true, - "type": "file", - "in": "formData" - }, - { - "name": "permissions", - "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "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": "" + } }, - "x-example": "[\"read(\"any\")\"]", - "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" - } - } + "required": [ + "total", + "indexes" + ] }, - "x-appwrite": { - "method": "getFile", - "weight": 209, - "cookies": false, - "type": "", - "deprecated": false, - "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](https://appwrite.io/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": 214, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "storage/update-file.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/update-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "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](https://appwrite.io/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": { - "name": { - "type": "string", - "description": "Name of the file", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission string. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "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": 215, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "storage/delete-file.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/delete-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "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](https://appwrite.io/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": 211, - "cookies": false, - "type": "location", - "deprecated": false, - "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](https://appwrite.io/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": 210, - "cookies": false, - "type": "location", - "deprecated": false, - "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](https://appwrite.io/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", - "enum": [ - "center", - "top-left", - "top", - "top-right", - "left", - "right", - "bottom-left", - "bottom", - "bottom-right" - ], - "x-enum-name": "ImageGravity", - "x-enum-keys": [], - "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", - "enum": ["jpg", "jpeg", "gif", "png", "webp", "heic", "avif"], - "x-enum-name": "ImageFormat", - "x-enum-keys": [], - "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": 212, - "cookies": false, - "type": "location", - "deprecated": false, - "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](https://appwrite.io/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 storage usage stats", - "operationId": "storageGetUsage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Get usage metrics and statistics for all buckets in the project. You can view the total number of buckets, files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.\n", - "responses": { - "200": { - "description": "StorageUsage", - "schema": { - "$ref": "#/definitions/usageStorage" - } - } - }, - "x-appwrite": { - "method": "getUsage", - "weight": 216, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "storage/get-usage.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-usage.md", - "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", - "enum": ["24h", "30d", "90d"], - "x-enum-name": "StorageUsageRange", - "x-enum-keys": ["Twenty Four Hours", "Thirty Days", "Ninety Days"], - "default": "30d", - "in": "query" - } - ] - } - }, - "/storage/{bucketId}/usage": { - "get": { - "summary": "Get bucket usage stats", - "operationId": "storageGetBucketUsage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Get usage metrics and statistics a specific bucket in the project. You can view the total number of files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.\n", - "responses": { - "200": { - "description": "UsageBuckets", - "schema": { - "$ref": "#/definitions/usageBuckets" - } - } - }, - "x-appwrite": { - "method": "getBucketUsage", - "weight": 217, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "storage/get-bucket-usage.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-bucket-usage.md", - "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", - "enum": ["24h", "30d", "90d"], - "x-enum-name": "StorageUsageRange", - "x-enum-keys": ["Twenty Four Hours", "Thirty Days", "Ninety Days"], - "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.", - "responses": { - "200": { - "description": "Teams List", - "schema": { - "$ref": "#/definitions/teamList" - } - } - }, - "x-appwrite": { - "method": "list", - "weight": 219, - "cookies": false, - "type": "", - "deprecated": false, - "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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "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" - } - ] - }, - "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": 218, - "cookies": false, - "type": "", - "deprecated": false, - "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 a custom ID or generate a random ID with `ID.unique()`. Valid 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](https://appwrite.io/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": 220, - "cookies": false, - "type": "", - "deprecated": false, - "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 name", - "operationId": "teamsUpdateName", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Update the team's name by its unique ID.", - "responses": { - "200": { - "description": "Team", - "schema": { - "$ref": "#/definitions/team" - } - } - }, - "x-appwrite": { - "method": "updateName", - "weight": 222, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "teams/update-name.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team-name.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": 224, - "cookies": false, - "type": "", - "deprecated": false, - "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": 231, - "cookies": false, - "type": "", - "deprecated": false, - "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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "/teams/{teamId}/memberships": { - "get": { - "summary": "List team memberships", - "operationId": "teamsListMemberships", - "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. Hide sensitive attributes from the response by toggling membership privacy in the Console.", - "responses": { - "200": { - "description": "Memberships List", - "schema": { - "$ref": "#/definitions/membershipList" - } - } - }, - "x-appwrite": { - "method": "listMemberships", - "weight": 226, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "teams/list-memberships.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/list-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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "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" - } - ] - }, - "post": { - "summary": "Create team membership", - "operationId": "teamsCreateMembership", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) 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) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", - "responses": { - "201": { - "description": "Membership", - "schema": { - "$ref": "#/definitions/membership" - } - } - }, - "x-appwrite": { - "method": "createMembership", - "weight": 225, - "cookies": false, - "type": "", - "deprecated": false, - "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": "", - "x-example": "email@example.com" - }, - "userId": { - "type": "string", - "description": "ID of the user to be added to a team.", - "default": "", - "x-example": "<USER_ID>" - }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100" - }, - "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](https://appwrite.io/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. This parameter is not required when an API key is supplied. 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" - }, - "name": { - "type": "string", - "description": "Name of the new team member. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": ["roles"] - } - } - ] - } - }, - "/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. Hide sensitive attributes from the response by toggling membership privacy in the Console.", - "responses": { - "200": { - "description": "Membership", - "schema": { - "$ref": "#/definitions/membership" - } - } - }, - "x-appwrite": { - "method": "getMembership", - "weight": 227, - "cookies": false, - "type": "", - "deprecated": false, - "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", - "operationId": "teamsUpdateMembership", - "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](https://appwrite.io/docs/permissions).\n", - "responses": { - "200": { - "description": "Membership", - "schema": { - "$ref": "#/definitions/membership" - } - } - }, - "x-appwrite": { - "method": "updateMembership", - "weight": 228, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "teams/update-membership.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-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" - }, - { - "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": 230, - "cookies": false, - "type": "", - "deprecated": false, - "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": 229, - "cookies": false, - "type": "", - "deprecated": false, - "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"] - } - } - ] - } - }, - "/teams/{teamId}/prefs": { - "get": { - "summary": "Get team preferences", - "operationId": "teamsGetPrefs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs).", - "responses": { - "200": { - "description": "Preferences", - "schema": { - "$ref": "#/definitions/preferences" - } - } - }, - "x-appwrite": { - "method": "getPrefs", - "weight": 221, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "teams/get-prefs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/get-team-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "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" - } - ] - }, - "put": { - "summary": "Update preferences", - "operationId": "teamsUpdatePrefs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Update the team's 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 an error if exceeded.", - "responses": { - "200": { - "description": "Preferences", - "schema": { - "$ref": "#/definitions/preferences" - } - } - }, - "x-appwrite": { - "method": "updatePrefs", - "weight": 223, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "teams/update-prefs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "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": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "default": {}, - "x-example": "{}" - } - }, - "required": ["prefs"] - } - } - ] - } - }, - "/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": { + "userList": { "description": "Users List", - "schema": { - "$ref": "#/definitions/userList" - } - } - }, - "x-appwrite": { - "method": "list", - "weight": 241, - "cookies": false, - "type": "", - "deprecated": false, - "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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "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": "" + } }, - "default": [], - "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" - } - ] - }, - "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" - } - } + "required": [ + "total", + "users" + ] }, - "x-appwrite": { - "method": "create", - "weight": 232, - "cookies": false, - "type": "", - "deprecated": false, - "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 a custom ID or generate a random ID with `ID.unique()`. Valid 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" - }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": null, - "x-example": "+12065550100" - }, - "password": { - "type": "string", - "description": "Plain text user password. Must be at least 8 chars.", - "default": "", - "x-example": null - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": ["userId"] - } - } - ] - } - }, - "/users/argon2": { - "post": { - "summary": "Create user with Argon2 password", - "operationId": "usersCreateArgon2User", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Create a new user. Password provided must be hashed with the [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "createArgon2User", - "weight": 235, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-argon2user.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-argon2-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using Argon2.", - "default": null, - "x-example": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": ["userId", "email", "password"] - } - } - ] - } - }, - "/users/bcrypt": { - "post": { - "summary": "Create user with bcrypt password", - "operationId": "usersCreateBcryptUser", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Create a new user. Password provided must be hashed with the [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "createBcryptUser", - "weight": 233, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-bcrypt-user.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-bcrypt-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using Bcrypt.", - "default": null, - "x-example": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": ["userId", "email", "password"] - } - } - ] - } - }, - "/users/identities": { - "get": { - "summary": "List identities", - "operationId": "usersListIdentities", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Get identities for all users.", - "responses": { - "200": { - "description": "Identities List", - "schema": { - "$ref": "#/definitions/identityList" - } - } - }, - "x-appwrite": { - "method": "listIdentities", - "weight": 249, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/list-identities.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/list-identities.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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "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" - } - ] - } - }, - "/users/identities/{identityId}": { - "delete": { - "summary": "Delete identity", - "operationId": "usersDeleteIdentity", - "consumes": ["application/json"], - "produces": [], - "tags": ["users"], - "description": "Delete an identity by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteIdentity", - "weight": 272, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/delete-identity.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/delete-identity.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": "identityId", - "description": "Identity ID.", - "required": true, - "type": "string", - "x-example": "<IDENTITY_ID>", - "in": "path" - } - ] - } - }, - "/users/md5": { - "post": { - "summary": "Create user with MD5 password", - "operationId": "usersCreateMD5User", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Create a new user. Password provided must be hashed with the [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "createMD5User", - "weight": 234, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-m-d5user.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-md5-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using MD5.", - "default": null, - "x-example": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": ["userId", "email", "password"] - } - } - ] - } - }, - "/users/phpass": { - "post": { - "summary": "Create user with PHPass password", - "operationId": "usersCreatePHPassUser", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Create a new user. Password provided must be hashed with the [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "createPHPassUser", - "weight": 237, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-p-h-pass-user.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-phpass-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 a custom ID or pass the string `ID.unique()`to auto generate it. Valid 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 hashed using PHPass.", - "default": null, - "x-example": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": ["userId", "email", "password"] - } - } - ] - } - }, - "/users/scrypt": { - "post": { - "summary": "Create user with Scrypt password", - "operationId": "usersCreateScryptUser", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Create a new user. Password provided must be hashed with the [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "createScryptUser", - "weight": 238, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-scrypt-user.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-scrypt-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using Scrypt.", - "default": null, - "x-example": "password" - }, - "passwordSalt": { - "type": "string", - "description": "Optional salt used to hash password.", - "default": null, - "x-example": "<PASSWORD_SALT>" - }, - "passwordCpu": { - "type": "integer", - "description": "Optional CPU cost used to hash password.", - "default": null, - "x-example": null - }, - "passwordMemory": { - "type": "integer", - "description": "Optional memory cost used to hash password.", - "default": null, - "x-example": null - }, - "passwordParallel": { - "type": "integer", - "description": "Optional parallelization cost used to hash password.", - "default": null, - "x-example": null - }, - "passwordLength": { - "type": "integer", - "description": "Optional hash length used to hash password.", - "default": null, - "x-example": null - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password", - "passwordSalt", - "passwordCpu", - "passwordMemory", - "passwordParallel", - "passwordLength" - ] - } - } - ] - } - }, - "/users/scrypt-modified": { - "post": { - "summary": "Create user with Scrypt modified password", - "operationId": "usersCreateScryptModifiedUser", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Create a new user. Password provided must be hashed with the [Scrypt Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "createScryptModifiedUser", - "weight": 239, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-scrypt-modified-user.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-scrypt-modified-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using Scrypt Modified.", - "default": null, - "x-example": "password" - }, - "passwordSalt": { - "type": "string", - "description": "Salt used to hash password.", - "default": null, - "x-example": "<PASSWORD_SALT>" - }, - "passwordSaltSeparator": { - "type": "string", - "description": "Salt separator used to hash password.", - "default": null, - "x-example": "<PASSWORD_SALT_SEPARATOR>" - }, - "passwordSignerKey": { - "type": "string", - "description": "Signer key used to hash password.", - "default": null, - "x-example": "<PASSWORD_SIGNER_KEY>" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password", - "passwordSalt", - "passwordSaltSeparator", - "passwordSignerKey" - ] - } - } - ] - } - }, - "/users/sha": { - "post": { - "summary": "Create user with SHA password", - "operationId": "usersCreateSHAUser", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Create a new user. Password provided must be hashed with the [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "createSHAUser", - "weight": 236, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-s-h-a-user.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-sha-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using SHA.", - "default": null, - "x-example": "password" - }, - "passwordVersion": { - "type": "string", - "description": "Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512/224', 'sha512/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'", - "default": "", - "x-example": "sha1", - "enum": [ - "sha1", - "sha224", - "sha256", - "sha384", - "sha512/224", - "sha512/256", - "sha512", - "sha3-224", - "sha3-256", - "sha3-384", - "sha3-512" - ], - "x-enum-name": "PasswordHash", - "x-enum-keys": [] - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": ["userId", "email", "password"] - } - } - ] - } - }, - "/users/usage": { - "get": { - "summary": "Get users usage stats", - "operationId": "usersGetUsage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Get usage metrics and statistics for all users in the project. You can view the total number of users and sessions. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.\n", - "responses": { - "200": { - "description": "UsageUsers", - "schema": { - "$ref": "#/definitions/usageUsers" - } - } - }, - "x-appwrite": { - "method": "getUsage", - "weight": 274, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/get-usage.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/get-usage.md", - "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", - "enum": ["24h", "30d", "90d"], - "x-enum-name": "UserUsageRange", - "x-enum-keys": ["Twenty Four Hours", "Thirty Days", "Ninety Days"], - "default": "30d", - "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": 242, - "cookies": false, - "type": "", - "deprecated": false, - "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](https://appwrite.io/docs/server/users#usersUpdateStatus) endpoint instead.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "delete", - "weight": 270, - "cookies": false, - "type": "", - "deprecated": false, - "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": 255, - "cookies": false, - "type": "", - "deprecated": false, - "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}/jwts": { - "post": { - "summary": "Create user JWT", - "operationId": "usersCreateJWT", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.", - "responses": { - "201": { - "description": "JWT", - "schema": { - "$ref": "#/definitions/jwt" - } - } - }, - "x-appwrite": { - "method": "createJWT", - "weight": 273, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-j-w-t.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-user-jwt.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": { - "sessionId": { - "type": "string", - "description": "Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session.", - "default": "", - "x-example": "<SESSION_ID>" - }, - "duration": { - "type": "integer", - "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", - "default": 900, - "x-example": 0 - } - } - } - } - ] - } - }, - "/users/{userId}/labels": { - "put": { - "summary": "Update user labels", - "operationId": "usersUpdateLabels", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Update the user labels by its unique ID. \n\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "updateLabels", - "weight": 251, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/update-labels.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-labels.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": { - "labels": { - "type": "array", - "description": "Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": ["labels"] - } - } - ] - } - }, - "/users/{userId}/logs": { - "get": { - "summary": "List user logs", - "operationId": "usersListLogs", - "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": "listLogs", - "weight": 247, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/list-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/list-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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "/users/{userId}/memberships": { - "get": { - "summary": "List user memberships", - "operationId": "usersListMemberships", - "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": "listMemberships", - "weight": 246, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/list-memberships.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/list-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}/mfa": { - "patch": { - "summary": "Update MFA", - "operationId": "usersUpdateMfa", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Enable or disable MFA on a user account.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "updateMfa", - "weight": 260, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/update-mfa.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-mfa.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": { - "mfa": { - "type": "boolean", - "description": "Enable or disable MFA.", - "default": null, - "x-example": false - } - }, - "required": ["mfa"] - } - } - ] - } - }, - "/users/{userId}/mfa/authenticators/{type}": { - "delete": { - "summary": "Delete authenticator", - "operationId": "usersDeleteMfaAuthenticator", - "consumes": ["application/json"], - "produces": [], - "tags": ["users"], - "description": "Delete an authenticator app.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteMfaAuthenticator", - "weight": 265, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/delete-mfa-authenticator.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/delete-mfa-authenticator.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": "type", - "description": "Type of authenticator.", - "required": true, - "type": "string", - "x-example": "totp", - "enum": ["totp"], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [], - "in": "path" - } - ] - } - }, - "/users/{userId}/mfa/factors": { - "get": { - "summary": "List factors", - "operationId": "usersListMfaFactors", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "List the factors available on the account to be used as a MFA challange.", - "responses": { - "200": { - "description": "MFAFactors", - "schema": { - "$ref": "#/definitions/mfaFactors" - } - } - }, - "x-appwrite": { - "method": "listMfaFactors", - "weight": 261, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/list-mfa-factors.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/list-mfa-factors.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}/mfa/recovery-codes": { - "get": { - "summary": "Get MFA recovery codes", - "operationId": "usersGetMfaRecoveryCodes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#/definitions/mfaRecoveryCodes" - } - } - }, - "x-appwrite": { - "method": "getMfaRecoveryCodes", - "weight": 262, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/get-mfa-recovery-codes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/get-mfa-recovery-codes.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" - } - ] - }, - "put": { - "summary": "Regenerate MFA recovery codes", - "operationId": "usersUpdateMfaRecoveryCodes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#/definitions/mfaRecoveryCodes" - } - } - }, - "x-appwrite": { - "method": "updateMfaRecoveryCodes", - "weight": 264, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/update-mfa-recovery-codes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-mfa-recovery-codes.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" - } - ] - }, - "patch": { - "summary": "Create MFA recovery codes", - "operationId": "usersCreateMfaRecoveryCodes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method by client SDK.", - "responses": { - "201": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#/definitions/mfaRecoveryCodes" - } - } - }, - "x-appwrite": { - "method": "createMfaRecoveryCodes", - "weight": 263, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-mfa-recovery-codes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-mfa-recovery-codes.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}/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": 253, - "cookies": false, - "type": "", - "deprecated": false, - "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": 254, - "cookies": false, - "type": "", - "deprecated": false, - "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": null - } - }, - "required": ["password"] - } - } - ] - } - }, - "/users/{userId}/phone": { - "patch": { - "summary": "Update phone", - "operationId": "usersUpdatePhone", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Update the user phone by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "updatePhone", - "weight": 256, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/update-phone.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "number": { - "type": "string", - "description": "User phone number.", - "default": null, - "x-example": "+12065550100" - } - }, - "required": ["number"] - } - } - ] - } - }, - "/users/{userId}/prefs": { - "get": { - "summary": "Get user preferences", - "operationId": "usersGetPrefs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Get the user preferences by its unique ID.", - "responses": { - "200": { - "description": "Preferences", - "schema": { - "$ref": "#/definitions/preferences" - } - } - }, - "x-appwrite": { - "method": "getPrefs", - "weight": 243, - "cookies": false, - "type": "", - "deprecated": false, - "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": 258, - "cookies": false, - "type": "", - "deprecated": false, - "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": "List user sessions", - "operationId": "usersListSessions", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Get the user sessions list by its unique ID.", - "responses": { - "200": { + "sessionList": { "description": "Sessions List", - "schema": { - "$ref": "#/definitions/sessionList" - } - } - }, - "x-appwrite": { - "method": "listSessions", - "weight": 245, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/list-sessions.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/list-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" - } - ] - }, - "post": { - "summary": "Create session", - "operationId": "usersCreateSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Creates a session for a user. Returns an immediately usable session object.\n\nIf you want to generate a token for a custom authentication flow, use the [POST /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken) endpoint.", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#/definitions/session" - } - } - }, - "x-appwrite": { - "method": "createSession", - "weight": 266, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-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. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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, - "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": 269, - "cookies": false, - "type": "", - "deprecated": false, - "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": 268, - "cookies": false, - "type": "", - "deprecated": false, - "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": 250, - "cookies": false, - "type": "", - "deprecated": false, - "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 + "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": ["status"] - } - } - ] - } - }, - "/users/{userId}/targets": { - "get": { - "summary": "List user targets", - "operationId": "usersListTargets", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "List the messaging targets that are associated with a user.", - "responses": { - "200": { - "description": "Target list", - "schema": { - "$ref": "#/definitions/targetList" - } - } - }, - "x-appwrite": { - "method": "listTargets", - "weight": 248, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/list-targets.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/list-user-targets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", - "platforms": ["server", "console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create user target", - "operationId": "usersCreateTarget", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Create a messaging target.", - "responses": { - "201": { - "description": "Target", - "schema": { - "$ref": "#/definitions/target" - } - } + "required": [ + "total", + "sessions" + ] }, - "x-appwrite": { - "method": "createTarget", - "weight": 240, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-target.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": ["server", "console"], - "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": { - "targetId": { - "type": "string", - "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<TARGET_ID>" + "identityList": { + "description": "Identities List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of identities documents that matched your query.", + "x-example": 5, + "format": "int32" }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "default": null, - "x-example": "email", - "enum": ["email", "sms", "push"], - "x-enum-name": "MessagingProviderType", - "x-enum-keys": [] + "identities": { + "type": "array", + "description": "List of identities.", + "items": { + "type": "object", + "$ref": "#\/definitions\/identity" + }, + "x-example": "" + } + }, + "required": [ + "total", + "identities" + ] + }, + "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" }, - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "default": null, - "x-example": "<IDENTIFIER>" + "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" }, - "providerId": { - "type": "string", - "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", - "default": "", - "x-example": "<PROVIDER_ID>" + "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" }, - "name": { - "type": "string", - "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", - "default": "", - "x-example": "<NAME>" + "buckets": { + "type": "array", + "description": "List of buckets.", + "items": { + "type": "object", + "$ref": "#\/definitions\/bucket" + }, + "x-example": "" } - }, - "required": ["targetId", "providerType", "identifier"] - } - } - ] - } - }, - "/users/{userId}/targets/{targetId}": { - "get": { - "summary": "Get user target", - "operationId": "usersGetTarget", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Get a user's push notification target by ID.", - "responses": { - "200": { - "description": "Target", - "schema": { - "$ref": "#/definitions/target" - } - } + }, + "required": [ + "total", + "buckets" + ] }, - "x-appwrite": { - "method": "getTarget", - "weight": 244, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/get-target.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/get-user-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", - "platforms": ["server", "console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "type": "string", - "x-example": "<TARGET_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update user target", - "operationId": "usersUpdateTarget", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Update a messaging target.", - "responses": { - "200": { - "description": "Target", - "schema": { - "$ref": "#/definitions/target" - } - } - }, - "x-appwrite": { - "method": "updateTarget", - "weight": 259, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/update-target.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": ["server", "console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "type": "string", - "x-example": "<TARGET_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "default": "", - "x-example": "<IDENTIFIER>" + "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" }, - "providerId": { - "type": "string", - "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", - "default": "", - "x-example": "<PROVIDER_ID>" + "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" }, - "name": { - "type": "string", - "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", - "default": "", - "x-example": "<NAME>" + "memberships": { + "type": "array", + "description": "List of memberships.", + "items": { + "type": "object", + "$ref": "#\/definitions\/membership" + }, + "x-example": "" } - } - } - } - ] - }, - "delete": { - "summary": "Delete user target", - "operationId": "usersDeleteTarget", - "consumes": ["application/json"], - "produces": [], - "tags": ["users"], - "description": "Delete a messaging target.", - "responses": { - "204": { - "description": "No content" - } + }, + "required": [ + "total", + "memberships" + ] }, - "x-appwrite": { - "method": "deleteTarget", - "weight": 271, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/delete-target.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/delete-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": ["server", "console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "type": "string", - "x-example": "<TARGET_ID>", - "in": "path" - } - ] - } - }, - "/users/{userId}/tokens": { - "post": { - "summary": "Create token", - "operationId": "usersCreateToken", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT /account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process.\n", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#/definitions/token" - } - } - }, - "x-appwrite": { - "method": "createToken", - "weight": 267, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-token.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-token.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": { - "length": { - "type": "integer", - "description": "Token length in characters. The default length is 6 characters", - "default": 6, - "x-example": 4 + "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" }, - "expire": { - "type": "integer", - "description": "Token expiration period in seconds. The default expiration is 15 minutes.", - "default": 900, - "x-example": 60 + "functions": { + "type": "array", + "description": "List of functions.", + "items": { + "type": "object", + "$ref": "#\/definitions\/function" + }, + "x-example": "" } - } - } - } - ] - } - }, - "/users/{userId}/verification": { - "patch": { - "summary": "Update email verification", - "operationId": "usersUpdateEmailVerification", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Update the user email verification status by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } + }, + "required": [ + "total", + "functions" + ] }, - "x-appwrite": { - "method": "updateEmailVerification", - "weight": 257, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/update-email-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-email-verification.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "emailVerification": { - "type": "boolean", - "description": "User email verification status.", - "default": null, - "x-example": false - } - }, - "required": ["emailVerification"] - } - } - ] - } - }, - "/users/{userId}/verification/phone": { - "patch": { - "summary": "Update phone verification", - "operationId": "usersUpdatePhoneVerification", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Update the user phone verification status by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "updatePhoneVerification", - "weight": 252, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/update-phone-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-phone-verification.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "phoneVerification": { - "type": "boolean", - "description": "User phone verification status.", - "default": null, - "x-example": false - } - }, - "required": ["phoneVerification"] - } - } - ] - } - }, - "/vcs/github/installations/{installationId}/providerRepositories": { - "get": { - "summary": "List repositories", - "operationId": "vcsListRepositories", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["vcs"], - "description": "Get a list of GitHub repositories available through your installation. This endpoint returns repositories with their basic information, detected runtime environments, and latest push dates. You can optionally filter repositories using a search term. Each repository's runtime is automatically detected based on its contents and language statistics. The GitHub installation must be properly configured for this endpoint to work.", - "responses": { - "200": { - "description": "Provider Repositories List", - "schema": { - "$ref": "#/definitions/providerRepositoryList" - } - } - }, - "x-appwrite": { - "method": "listRepositories", - "weight": 279, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "vcs/list-repositories.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/vcs/list-repositories.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.read", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "type": "string", - "x-example": "<INSTALLATION_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" - } - ] - }, - "post": { - "summary": "Create repository", - "operationId": "vcsCreateRepository", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["vcs"], - "description": "Create a new GitHub repository through your installation. This endpoint allows you to create either a public or private repository by specifying a name and visibility setting. The repository will be created under your GitHub user account or organization, depending on your installation type. The GitHub installation must be properly configured and have the necessary permissions for repository creation.", - "responses": { - "200": { - "description": "ProviderRepository", - "schema": { - "$ref": "#/definitions/providerRepository" - } - } - }, - "x-appwrite": { - "method": "createRepository", - "weight": 280, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "vcs/create-repository.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/vcs/create-repository.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.write", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "type": "string", - "x-example": "<INSTALLATION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Repository name (slug)", - "default": null, - "x-example": "<NAME>" + "templateFunctionList": { + "description": "Function Templates List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of templates documents that matched your query.", + "x-example": 5, + "format": "int32" }, - "private": { - "type": "boolean", - "description": "Mark repository public or private", - "default": null, - "x-example": false + "templates": { + "type": "array", + "description": "List of templates.", + "items": { + "type": "object", + "$ref": "#\/definitions\/templateFunction" + }, + "x-example": "" } - }, - "required": ["name", "private"] - } - } - ] - } - }, - "/vcs/github/installations/{installationId}/providerRepositories/{providerRepositoryId}": { - "get": { - "summary": "Get repository", - "operationId": "vcsGetRepository", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["vcs"], - "description": "Get detailed information about a specific GitHub repository from your installation. This endpoint returns repository details including its ID, name, visibility status, organization, and latest push date. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.", - "responses": { - "200": { - "description": "ProviderRepository", - "schema": { - "$ref": "#/definitions/providerRepository" - } - } + }, + "required": [ + "total", + "templates" + ] }, - "x-appwrite": { - "method": "getRepository", - "weight": 281, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "vcs/get-repository.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/vcs/get-repository.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.read", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "type": "string", - "x-example": "<INSTALLATION_ID>", - "in": "path" - }, - { - "name": "providerRepositoryId", - "description": "Repository Id", - "required": true, - "type": "string", - "x-example": "<PROVIDER_REPOSITORY_ID>", - "in": "path" - } - ] - } - }, - "/vcs/github/installations/{installationId}/providerRepositories/{providerRepositoryId}/branches": { - "get": { - "summary": "List repository branches", - "operationId": "vcsListRepositoryBranches", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["vcs"], - "description": "Get a list of all branches from a GitHub repository in your installation. This endpoint returns the names of all branches in the repository and their total count. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.\n", - "responses": { - "200": { - "description": "Branches List", - "schema": { - "$ref": "#/definitions/branchList" - } - } - }, - "x-appwrite": { - "method": "listRepositoryBranches", - "weight": 282, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "vcs/list-repository-branches.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/vcs/list-repository-branches.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.read", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "type": "string", - "x-example": "<INSTALLATION_ID>", - "in": "path" - }, - { - "name": "providerRepositoryId", - "description": "Repository Id", - "required": true, - "type": "string", - "x-example": "<PROVIDER_REPOSITORY_ID>", - "in": "path" - } - ] - } - }, - "/vcs/github/installations/{installationId}/providerRepositories/{providerRepositoryId}/contents": { - "get": { - "summary": "Get files and directories of a VCS repository", - "operationId": "vcsGetRepositoryContents", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["vcs"], - "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.\n", - "responses": { - "200": { - "description": "VCS Content List", - "schema": { - "$ref": "#/definitions/vcsContentList" - } - } - }, - "x-appwrite": { - "method": "getRepositoryContents", - "weight": 277, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "vcs/get-repository-contents.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/vcs/get-repository-contents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.read", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "type": "string", - "x-example": "<INSTALLATION_ID>", - "in": "path" - }, - { - "name": "providerRepositoryId", - "description": "Repository Id", - "required": true, - "type": "string", - "x-example": "<PROVIDER_REPOSITORY_ID>", - "in": "path" - }, - { - "name": "providerRootDirectory", - "description": "Path to get contents of nested directory", - "required": false, - "type": "string", - "x-example": "<PROVIDER_ROOT_DIRECTORY>", - "default": "", - "in": "query" - } - ] - } - }, - "/vcs/github/installations/{installationId}/providerRepositories/{providerRepositoryId}/detection": { - "post": { - "summary": "Detect runtime settings from source code", - "operationId": "vcsCreateRepositoryDetection", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["vcs"], - "description": "Analyze a GitHub repository to automatically detect the programming language and runtime environment. This endpoint scans the repository's files and language statistics to determine the appropriate runtime settings for your function. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", - "responses": { - "200": { - "description": "Detection", - "schema": { - "$ref": "#/definitions/detection" - } - } - }, - "x-appwrite": { - "method": "createRepositoryDetection", - "weight": 278, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "vcs/create-repository-detection.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/vcs/create-repository-detection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.write", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "type": "string", - "x-example": "<INSTALLATION_ID>", - "in": "path" - }, - { - "name": "providerRepositoryId", - "description": "Repository Id", - "required": true, - "type": "string", - "x-example": "<PROVIDER_REPOSITORY_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerRootDirectory": { - "type": "string", - "description": "Path to Root Directory", - "default": "", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - } - } - } - } - ] - } - }, - "/vcs/github/installations/{installationId}/repositories/{repositoryId}": { - "patch": { - "summary": "Authorize external deployment", - "operationId": "vcsUpdateExternalDeployments", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["vcs"], - "description": "Authorize and create deployments for a GitHub pull request in your project. This endpoint allows external contributions by creating deployments from pull requests, enabling preview environments for code review. The pull request must be open and not previously authorized. The GitHub installation must be properly configured and have access to both the repository and pull request for this endpoint to work.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "updateExternalDeployments", - "weight": 287, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "vcs/update-external-deployments.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/vcs/update-external-deployments.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.write", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "type": "string", - "x-example": "<INSTALLATION_ID>", - "in": "path" - }, - { - "name": "repositoryId", - "description": "VCS Repository Id", - "required": true, - "type": "string", - "x-example": "<REPOSITORY_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerPullRequestId": { - "type": "string", - "description": "GitHub Pull Request Id", - "default": null, - "x-example": "<PROVIDER_PULL_REQUEST_ID>" - } - }, - "required": ["providerPullRequestId"] - } - } - ] - } - }, - "/vcs/installations": { - "get": { - "summary": "List installations", - "operationId": "vcsListInstallations", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["vcs"], - "description": "List all VCS installations configured for the current project. This endpoint returns a list of installations including their provider, organization, and other configuration details.\n", - "responses": { - "200": { + "installationList": { "description": "Installations List", - "schema": { - "$ref": "#/definitions/installationList" - } - } - }, - "x-appwrite": { - "method": "listInstallations", - "weight": 284, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "vcs/list-installations.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/vcs/list-installations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.read", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: provider, organization", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of installations documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "installations": { + "type": "array", + "description": "List of installations.", + "items": { + "type": "object", + "$ref": "#\/definitions\/installation" + }, + "x-example": "" + } }, - "default": [], - "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" - } - ] - } - }, - "/vcs/installations/{installationId}": { - "get": { - "summary": "Get installation", - "operationId": "vcsGetInstallation", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["vcs"], - "description": "Get a VCS installation by its unique ID. This endpoint returns the installation's details including its provider, organization, and configuration. ", - "responses": { - "200": { - "description": "Installation", - "schema": { - "$ref": "#/definitions/installation" - } - } - }, - "x-appwrite": { - "method": "getInstallation", - "weight": 285, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "vcs/get-installation.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/vcs/get-installation.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.read", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "type": "string", - "x-example": "<INSTALLATION_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete installation", - "operationId": "vcsDeleteInstallation", - "consumes": ["application/json"], - "produces": [], - "tags": ["vcs"], - "description": "Delete a VCS installation by its unique ID. This endpoint removes the installation and all its associated repositories from the project.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteInstallation", - "weight": 286, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "vcs/delete-installation.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/vcs/delete-installation.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.write", - "platforms": ["console"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "type": "string", - "x-example": "<INSTALLATION_ID>", - "in": "path" - } - ] - } - } - }, - "tags": [ - { - "name": "account", - "description": "The Account service allows you to authenticate and manage a user account.", - "x-globalAttributes": [] - }, - { - "name": "avatars", - "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.", - "x-globalAttributes": [] - }, - { - "name": "databases", - "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents", - "x-globalAttributes": ["databaseId"] - }, - { - "name": "locale", - "description": "The Locale service allows you to customize your app based on your users' location.", - "x-globalAttributes": [] - }, - { - "name": "health", - "description": "The Health service allows you to both validate and monitor your Appwrite server's health.", - "x-globalAttributes": [] - }, - { - "name": "projects", - "description": "The Project service allows you to manage all the projects in your Appwrite server.", - "x-globalAttributes": [] - }, - { - "name": "project", - "description": "The Project service allows you to manage all the projects in your Appwrite server.", - "x-globalAttributes": [] - }, - { - "name": "storage", - "description": "The Storage service allows you to manage your project files.", - "x-globalAttributes": [] - }, - { - "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", - "x-globalAttributes": [] - }, - { - "name": "users", - "description": "The Users service allows you to manage your project users.", - "x-globalAttributes": [] - }, - { - "name": "functions", - "description": "The Functions Service allows you view, create and manage your Cloud Functions.", - "x-globalAttributes": [] - }, - { - "name": "proxy", - "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration.", - "x-globalAttributes": [] - }, - { - "name": "graphql", - "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL.", - "x-globalAttributes": [] - }, - { - "name": "console", - "description": "The Console service allows you to interact with console relevant informations.", - "x-globalAttributes": [] - }, - { - "name": "migrations", - "description": "The Migrations service allows you to migrate third-party data to your Appwrite project.", - "x-globalAttributes": [] - }, - { - "name": "messaging", - "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.).", - "x-globalAttributes": [] - } - ], - "definitions": { - "any": { - "description": "Any", - "type": "object", - "additionalProperties": true - }, - "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"] - }, - "databaseList": { - "description": "Databases List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of databases documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "databases": { - "type": "array", - "description": "List of databases.", - "items": { - "type": "object", - "$ref": "#/definitions/database" - }, - "x-example": "" - } - }, - "required": ["total", "databases"] - }, - "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"] - }, - "identityList": { - "description": "Identities List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of identities documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "identities": { - "type": "array", - "description": "List of identities.", - "items": { - "type": "object", - "$ref": "#/definitions/identity" - }, - "x-example": "" - } - }, - "required": ["total", "identities"] - }, - "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"] - }, - "templateFunctionList": { - "description": "Function Templates List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of templates documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "templates": { - "type": "array", - "description": "List of templates.", - "items": { - "type": "object", - "$ref": "#/definitions/templateFunction" - }, - "x-example": "" - } - }, - "required": ["total", "templates"] - }, - "installationList": { - "description": "Installations List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of installations documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "installations": { - "type": "array", - "description": "List of installations.", - "items": { - "type": "object", - "$ref": "#/definitions/installation" - }, - "x-example": "" - } - }, - "required": ["total", "installations"] - }, - "providerRepositoryList": { - "description": "Provider Repositories List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of providerRepositories documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "providerRepositories": { - "type": "array", - "description": "List of providerRepositories.", - "items": { - "type": "object", - "$ref": "#/definitions/providerRepository" - }, - "x-example": "" - } - }, - "required": ["total", "providerRepositories"] - }, - "branchList": { - "description": "Branches List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of branches documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "branches": { - "type": "array", - "description": "List of branches.", - "items": { - "type": "object", - "$ref": "#/definitions/branch" - }, - "x-example": "" - } - }, - "required": ["total", "branches"] - }, - "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"] - }, - "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"] - }, - "variableList": { - "description": "Variables List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of variables documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "variables": { - "type": "array", - "description": "List of variables.", - "items": { - "type": "object", - "$ref": "#/definitions/variable" - }, - "x-example": "" - } - }, - "required": ["total", "variables"] - }, - "proxyRuleList": { - "description": "Rule List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of rules documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "rules": { - "type": "array", - "description": "List of rules.", - "items": { - "type": "object", - "$ref": "#/definitions/proxyRule" - }, - "x-example": "" - } - }, - "required": ["total", "rules"] - }, - "localeCodeList": { - "description": "Locale codes list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "localeCodes": { - "type": "array", - "description": "List of localeCodes.", - "items": { - "type": "object", - "$ref": "#/definitions/localeCode" - }, - "x-example": "" - } - }, - "required": ["total", "localeCodes"] - }, - "providerList": { - "description": "Provider list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of providers documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "providers": { - "type": "array", - "description": "List of providers.", - "items": { - "type": "object", - "$ref": "#/definitions/provider" - }, - "x-example": "" - } - }, - "required": ["total", "providers"] - }, - "messageList": { - "description": "Message list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of messages documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "messages": { - "type": "array", - "description": "List of messages.", - "items": { - "type": "object", - "$ref": "#/definitions/message" - }, - "x-example": "" - } - }, - "required": ["total", "messages"] - }, - "topicList": { - "description": "Topic list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of topics documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "topics": { - "type": "array", - "description": "List of topics.", - "items": { - "type": "object", - "$ref": "#/definitions/topic" - }, - "x-example": "" - } - }, - "required": ["total", "topics"] - }, - "subscriberList": { - "description": "Subscriber list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of subscribers documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "subscribers": { - "type": "array", - "description": "List of subscribers.", - "items": { - "type": "object", - "$ref": "#/definitions/subscriber" - }, - "x-example": "" - } - }, - "required": ["total", "subscribers"] - }, - "targetList": { - "description": "Target list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of targets documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "targets": { - "type": "array", - "description": "List of targets.", - "items": { - "type": "object", - "$ref": "#/definitions/target" - }, - "x-example": "" - } - }, - "required": ["total", "targets"] - }, - "migrationList": { - "description": "Migrations List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of migrations documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "migrations": { - "type": "array", - "description": "List of migrations.", - "items": { - "type": "object", - "$ref": "#/definitions/migration" - }, - "x-example": "" - } - }, - "required": ["total", "migrations"] - }, - "specificationList": { - "description": "Specifications List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of specifications documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "specifications": { - "type": "array", - "description": "List of specifications.", - "items": { - "type": "object", - "$ref": "#/definitions/specification" - }, - "x-example": "" - } - }, - "required": ["total", "specifications"] - }, - "vcsContentList": { - "description": "VCS Content List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of contents documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "contents": { - "type": "array", - "description": "List of contents.", - "items": { - "type": "object", - "$ref": "#/definitions/vcsContent" - }, - "x-example": "" - } - }, - "required": ["total", "contents"] - }, - "database": { - "description": "Database", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Database name.", - "x-example": "My Database" - }, - "$createdAt": { - "type": "string", - "description": "Database creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Database update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "enabled": { - "type": "boolean", - "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - } - }, - "required": ["$id", "name", "$createdAt", "$updatedAt", "enabled"] - }, - "collection": { - "description": "Collection", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Collection creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Collection update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Collection permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "items": { - "type": "string" - }, - "x-example": ["read(\"any\")"] - }, - "databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Collection name.", - "x-example": "My Collection" - }, - "enabled": { - "type": "boolean", - "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - }, - "documentSecurity": { - "type": "boolean", - "description": "Whether document-level permissions are enabled. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "x-example": true - }, - "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/attributeDatetime" - }, - { - "$ref": "#/definitions/attributeRelationship" - }, - { - "$ref": "#/definitions/attributeString" - } + "required": [ + "total", + "installations" ] - }, - "x-example": {} }, - "indexes": { - "type": "array", - "description": "Collection indexes.", - "items": { + "providerRepositoryList": { + "description": "Provider Repositories List", "type": "object", - "$ref": "#/definitions/index" - }, - "x-example": {} - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "databaseId", - "name", - "enabled", - "documentSecurity", - "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/attributeDatetime" - }, - { - "$ref": "#/definitions/attributeRelationship" - }, - { - "$ref": "#/definitions/attributeString" - } + "properties": { + "total": { + "type": "integer", + "description": "Total number of providerRepositories documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "providerRepositories": { + "type": "array", + "description": "List of providerRepositories.", + "items": { + "type": "object", + "$ref": "#\/definitions\/providerRepository" + }, + "x-example": "" + } + }, + "required": [ + "total", + "providerRepositories" ] - }, - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt", - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt" - ] - }, - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt" - ] - }, - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt" - ] - }, - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt", - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt", - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt", - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ] - }, - "attributeDatetime": { - "description": "AttributeDatetime", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "birthDay" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "datetime" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "ISO 8601 format.", - "x-example": "datetime" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Only null is optional", - "x-example": "2020-10-15T06:38:00.000+00:00", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ] - }, - "attributeRelationship": { - "description": "AttributeRelationship", - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "relatedCollection": { - "type": "string", - "description": "The ID of the related collection.", - "x-example": "collection" - }, - "relationType": { - "type": "string", - "description": "The type of the relationship.", - "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" - }, - "twoWay": { - "type": "boolean", - "description": "Is the relationship two-way?", - "x-example": false - }, - "twoWayKey": { - "type": "string", - "description": "The key of the two-way relationship.", - "x-example": "string" - }, - "onDelete": { - "type": "string", - "description": "How deleting the parent document will propagate to child documents.", - "x-example": "restrict|cascade|setNull" - }, - "side": { - "type": "string", - "description": "Whether this is the parent or child side of the relationship", - "x-example": "parent|child" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "relatedCollection", - "relationType", - "twoWay", - "twoWayKey", - "onDelete", - "side" - ] - }, - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an index.", - "x-example": "string" - }, - "attributes": { - "type": "array", - "description": "Index attributes.", - "items": { - "type": "string" - }, - "x-example": [] - }, - "orders": { - "type": "array", - "description": "Index orders.", - "items": { - "type": "string" - }, - "x-example": [], - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Index creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Index update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "attributes", - "$createdAt", - "$updatedAt" - ] - }, - "document": { - "description": "Document", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Document ID.", - "x-example": "5e5ea5c16897e" - }, - "$collectionId": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c15117e" - }, - "$databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c15117e" - }, - "$createdAt": { - "type": "string", - "description": "Document creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Document update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Document permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "items": { - "type": "string" - }, - "x-example": ["read(\"any\")"] - } - }, - "additionalProperties": true, - "required": [ - "$id", - "$collectionId", - "$databaseId", - "$createdAt", - "$updatedAt", - "$permissions" - ] - }, - "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": "string", - "description": "Log creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "osCode": { - "type": "string", - "description": "Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).", - "x-example": "Mac" - }, - "osName": { - "type": "string", - "description": "Operating system name.", - "x-example": "Mac" - }, - "osVersion": { - "type": "string", - "description": "Operating system version.", - "x-example": "Mac" - }, - "clientType": { - "type": "string", - "description": "Client type.", - "x-example": "browser" - }, - "clientCode": { - "type": "string", - "description": "Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).", - "x-example": "CM" - }, - "clientName": { - "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" - }, - "clientVersion": { - "type": "string", - "description": "Client version.", - "x-example": "84.0" - }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" - }, - "clientEngineVersion": { - "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" - }, - "deviceName": { - "type": "string", - "description": "Device name.", - "x-example": "smartphone" - }, - "deviceBrand": { - "type": "string", - "description": "Device brand name.", - "x-example": "Google" - }, - "deviceModel": { - "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": [ - "event", - "userId", - "userEmail", - "userName", - "mode", - "ip", - "time", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName" - ] - }, - "user": { - "description": "User", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "User creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "User update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "User name.", - "x-example": "John Doe" - }, - "password": { - "type": "string", - "description": "Hashed user password.", - "x-example": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L/4LdgrVRXxE", - "x-nullable": true - }, - "hash": { - "type": "string", - "description": "Password hashing algorithm.", - "x-example": "argon2", - "x-nullable": true - }, - "hashOptions": { - "type": "object", - "description": "Password hashing algorithm configuration.", - "x-example": {}, - "items": { - "x-oneOf": [ - { - "$ref": "#/definitions/algoArgon2" - }, - { - "$ref": "#/definitions/algoScrypt" - }, - { - "$ref": "#/definitions/algoScryptModified" - }, - { - "$ref": "#/definitions/algoBcrypt" - }, - { - "$ref": "#/definitions/algoPhpass" - }, - { - "$ref": "#/definitions/algoSha" - }, - { - "$ref": "#/definitions/algoMd5" - } + "branchList": { + "description": "Branches List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of branches documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "branches": { + "type": "array", + "description": "List of branches.", + "items": { + "type": "object", + "$ref": "#\/definitions\/branch" + }, + "x-example": "" + } + }, + "required": [ + "total", + "branches" ] - }, - "x-nullable": true }, - "registration": { - "type": "string", - "description": "User registration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "status": { - "type": "boolean", - "description": "User status. Pass `true` for enabled and `false` for disabled.", - "x-example": true - }, - "labels": { - "type": "array", - "description": "Labels for the user.", - "items": { - "type": "string" - }, - "x-example": ["vip"] - }, - "passwordUpdate": { - "type": "string", - "description": "Password update time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "email": { - "type": "string", - "description": "User email address.", - "x-example": "john@appwrite.io" - }, - "phone": { - "type": "string", - "description": "User phone number in E.164 format.", - "x-example": "+4930901820" - }, - "emailVerification": { - "type": "boolean", - "description": "Email verification status.", - "x-example": true - }, - "phoneVerification": { - "type": "boolean", - "description": "Phone verification status.", - "x-example": true - }, - "mfa": { - "type": "boolean", - "description": "Multi factor authentication 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" - } - }, - "targets": { - "type": "array", - "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.", - "items": { - "type": "object", - "$ref": "#/definitions/target" - }, - "x-example": [] - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "registration", - "status", - "labels", - "passwordUpdate", - "email", - "phone", - "emailVerification", - "phoneVerification", - "mfa", - "prefs", - "targets", - "accessedAt" - ] - }, - "algoMd5": { - "description": "AlgoMD5", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "md5" - } - }, - "required": ["type"] - }, - "algoSha": { - "description": "AlgoSHA", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "sha" - } - }, - "required": ["type"] - }, - "algoPhpass": { - "description": "AlgoPHPass", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "phpass" - } - }, - "required": ["type"] - }, - "algoBcrypt": { - "description": "AlgoBcrypt", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "bcrypt" - } - }, - "required": ["type"] - }, - "algoScrypt": { - "description": "AlgoScrypt", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "scrypt" - }, - "costCpu": { - "type": "integer", - "description": "CPU complexity of computed hash.", - "x-example": 8, - "format": "int32" - }, - "costMemory": { - "type": "integer", - "description": "Memory complexity of computed hash.", - "x-example": 14, - "format": "int32" - }, - "costParallel": { - "type": "integer", - "description": "Parallelization of computed hash.", - "x-example": 1, - "format": "int32" - }, - "length": { - "type": "integer", - "description": "Length used to compute hash.", - "x-example": 64, - "format": "int32" - } - }, - "required": ["type", "costCpu", "costMemory", "costParallel", "length"] - }, - "algoScryptModified": { - "description": "AlgoScryptModified", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "scryptMod" - }, - "salt": { - "type": "string", - "description": "Salt used to compute hash.", - "x-example": "UxLMreBr6tYyjQ==" - }, - "saltSeparator": { - "type": "string", - "description": "Separator used to compute hash.", - "x-example": "Bw==" - }, - "signerKey": { - "type": "string", - "description": "Key used to compute hash.", - "x-example": "XyEKE9RcTDeLEsL/RjwPDBv/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" - } - }, - "required": ["type", "salt", "saltSeparator", "signerKey"] - }, - "algoArgon2": { - "description": "AlgoArgon2", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "argon2" - }, - "memoryCost": { - "type": "integer", - "description": "Memory used to compute hash.", - "x-example": 65536, - "format": "int32" - }, - "timeCost": { - "type": "integer", - "description": "Amount of time consumed to compute hash", - "x-example": 4, - "format": "int32" - }, - "threads": { - "type": "integer", - "description": "Number of threads used to compute hash.", - "x-example": 3, - "format": "int32" - } - }, - "required": ["type", "memoryCost", "timeCost", "threads"] - }, - "preferences": { - "description": "Preferences", - "type": "object", - "additionalProperties": true - }, - "session": { - "description": "Session", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Session ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Session creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Session update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" - }, - "expire": { - "type": "string", - "description": "Session expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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": "string", - "description": "The date of when the access token expires in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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 - }, - "factors": { - "type": "array", - "description": "Returns a list of active session factors.", - "items": { - "type": "string" - }, - "x-example": ["email"] - }, - "secret": { - "type": "string", - "description": "Secret used to authenticate the user. Only included if the request was made with an API key", - "x-example": "5e5bb8c16897e" - }, - "mfaUpdatedAt": { - "type": "string", - "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "expire", - "provider", - "providerUid", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken", - "ip", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName", - "current", - "factors", - "secret", - "mfaUpdatedAt" - ] - }, - "identity": { - "description": "Identity", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Identity ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Identity creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Identity update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" - }, - "provider": { - "type": "string", - "description": "Identity Provider.", - "x-example": "email" - }, - "providerUid": { - "type": "string", - "description": "ID of the User in the Identity Provider.", - "x-example": "5e5bb8c16897e" - }, - "providerEmail": { - "type": "string", - "description": "Email of the User in the Identity Provider.", - "x-example": "user@example.com" - }, - "providerAccessToken": { - "type": "string", - "description": "Identity Provider Access Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "providerAccessTokenExpiry": { - "type": "string", - "description": "The date of when the access token expires in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerRefreshToken": { - "type": "string", - "description": "Identity Provider Refresh Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "provider", - "providerUid", - "providerEmail", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken" - ] - }, - "token": { - "description": "Token", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "phrase": { - "type": "string", - "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.", - "x-example": "Golden Fox" - } - }, - "required": ["$id", "$createdAt", "userId", "secret", "expire", "phrase"] - }, - "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 European 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" - ] - }, - "localeCode": { - "description": "LocaleCode", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)", - "x-example": "en-us" - }, - "name": { - "type": "string", - "description": "Locale name", - "x-example": "US" - } - }, - "required": ["code", "name"] - }, - "file": { - "description": "File", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "File ID.", - "x-example": "5e5ea5c16897e" - }, - "bucketId": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "File creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "File update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "File permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "items": { - "type": "string" - }, - "x-example": ["read(\"any\")"] - }, - "name": { - "type": "string", - "description": "File name.", - "x-example": "Pink.png" - }, - "signature": { - "type": "string", - "description": "File MD5 signature.", - "x-example": "5d529fd02b544198ae075bd57c1762bb" - }, - "mimeType": { - "type": "string", - "description": "File mime type.", - "x-example": "image/png" - }, - "sizeOriginal": { - "type": "integer", - "description": "File original size in bytes.", - "x-example": 17890, - "format": "int32" - }, - "chunksTotal": { - "type": "integer", - "description": "Total number of chunks available", - "x-example": 17890, - "format": "int32" - }, - "chunksUploaded": { - "type": "integer", - "description": "Total number of chunks uploaded", - "x-example": 17890, - "format": "int32" - } - }, - "required": [ - "$id", - "bucketId", - "$createdAt", - "$updatedAt", - "$permissions", - "name", - "signature", - "mimeType", - "sizeOriginal", - "chunksTotal", - "chunksUploaded" - ] - }, - "bucket": { - "description": "Bucket", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Bucket creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Bucket update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Bucket permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "items": { - "type": "string" - }, - "x-example": ["read(\"any\")"] - }, - "fileSecurity": { - "type": "boolean", - "description": "Whether file-level security is enabled. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "x-example": true - }, - "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"] - }, - "compression": { - "type": "string", - "description": "Compression algorithm choosen for compression. Will be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd).", - "x-example": "gzip" - }, - "encryption": { - "type": "boolean", - "description": "Bucket is encrypted.", - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Virus scanning is enabled.", - "x-example": false - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "fileSecurity", - "name", - "enabled", - "maximumFileSize", - "allowedFileExtensions", - "compression", - "encryption", - "antivirus" - ] - }, - "team": { - "description": "Team", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Team creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Team update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "total": { - "type": "integer", - "description": "Total number of team members.", - "x-example": 7, - "format": "int32" - }, - "prefs": { - "type": "object", - "description": "Team preferences as a key-value object", - "x-example": { - "theme": "pink", - "timezone": "UTC" - }, - "items": { - "type": "object", - "$ref": "#/definitions/preferences" - } - } - }, - "required": ["$id", "$createdAt", "$updatedAt", "name", "total", "prefs"] - }, - "membership": { - "description": "Membership", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Membership ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Membership creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Membership update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "userName": { - "type": "string", - "description": "User name. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "John Doe" - }, - "userEmail": { - "type": "string", - "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", - "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": "string", - "description": "Date, the user has been invited to join the team in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "joined": { - "type": "string", - "description": "Date, the user has accepted the invitation to join the team in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "confirm": { - "type": "boolean", - "description": "User confirmation status, true if the user has joined the team or false otherwise.", - "x-example": false - }, - "mfa": { - "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", - "x-example": false - }, - "roles": { - "type": "array", - "description": "User list of roles", - "items": { - "type": "string" - }, - "x-example": ["owner"] - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "userName", - "userEmail", - "teamId", - "teamName", - "invited", - "joined", - "confirm", - "mfa", - "roles" - ] - }, - "function": { - "description": "Function", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Function creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Function update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "execute": { - "type": "array", - "description": "Execution permissions.", - "items": { - "type": "string" - }, - "x-example": "users" - }, - "name": { - "type": "string", - "description": "Function name.", - "x-example": "My Function" - }, - "enabled": { - "type": "boolean", - "description": "Function enabled.", - "x-example": false - }, - "live": { - "type": "boolean", - "description": "Is the function deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the function to update it with the latest configuration.", - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project.", - "x-example": false - }, - "runtime": { - "type": "string", - "description": "Function execution runtime.", - "x-example": "python-3.8" - }, - "deployment": { - "type": "string", - "description": "Function's active deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "scopes": { - "type": "array", - "description": "Allowed permission scopes.", - "items": { - "type": "string" - }, - "x-example": "users.read" - }, - "vars": { - "type": "array", - "description": "Function variables.", - "items": { - "type": "object", - "$ref": "#/definitions/variable" - }, - "x-example": [] - }, - "events": { - "type": "array", - "description": "Function trigger events.", - "items": { - "type": "string" - }, - "x-example": "account.create" - }, - "schedule": { - "type": "string", - "description": "Function execution schedule in CRON format.", - "x-example": "5 4 * * *" - }, - "timeout": { - "type": "integer", - "description": "Function execution timeout in seconds.", - "x-example": 300, - "format": "int32" - }, - "entrypoint": { - "type": "string", - "description": "The entrypoint file used to execute the deployment.", - "x-example": "index.js" - }, - "commands": { - "type": "string", - "description": "The build command used to build the deployment.", - "x-example": "npm install" - }, - "version": { - "type": "string", - "description": "Version of Open Runtimes used for the function.", - "x-example": "v2" - }, - "installationId": { - "type": "string", - "description": "Function VCS (Version Control System) installation id.", - "x-example": "6m40at4ejk5h2u9s1hboo" - }, - "providerRepositoryId": { - "type": "string", - "description": "VCS (Version Control System) Repository ID", - "x-example": "appwrite" - }, - "providerBranch": { - "type": "string", - "description": "VCS (Version Control System) branch name", - "x-example": "main" - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function in VCS (Version Control System) repository", - "x-example": "functions/helloWorld" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", - "x-example": false - }, - "specification": { - "type": "string", - "description": "Machine specification for builds and executions.", - "x-example": "s-1vcpu-512mb" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "execute", - "name", - "enabled", - "live", - "logging", - "runtime", - "deployment", - "scopes", - "vars", - "events", - "schedule", - "timeout", - "entrypoint", - "commands", - "version", - "installationId", - "providerRepositoryId", - "providerBranch", - "providerRootDirectory", - "providerSilentMode", - "specification" - ] - }, - "templateFunction": { - "description": "Template Function", - "type": "object", - "properties": { - "icon": { - "type": "string", - "description": "Function Template Icon.", - "x-example": "icon-lightning-bolt" - }, - "id": { - "type": "string", - "description": "Function Template ID.", - "x-example": "starter" - }, - "name": { - "type": "string", - "description": "Function Template Name.", - "x-example": "Starter function" - }, - "tagline": { - "type": "string", - "description": "Function Template Tagline.", - "x-example": "A simple function to get started." - }, - "permissions": { - "type": "array", - "description": "Execution permissions.", - "items": { - "type": "string" - }, - "x-example": "any" - }, - "events": { - "type": "array", - "description": "Function trigger events.", - "items": { - "type": "string" - }, - "x-example": "account.create" - }, - "cron": { - "type": "string", - "description": "Function execution schedult in CRON format.", - "x-example": "0 0 * * *" - }, - "timeout": { - "type": "integer", - "description": "Function execution timeout in seconds.", - "x-example": 300, - "format": "int32" - }, - "useCases": { - "type": "array", - "description": "Function use cases.", - "items": { - "type": "string" - }, - "x-example": "Starter" - }, - "runtimes": { - "type": "array", - "description": "List of runtimes that can be used with this template.", - "items": { - "type": "object", - "$ref": "#/definitions/templateRuntime" - }, - "x-example": [] - }, - "instructions": { - "type": "string", - "description": "Function Template Instructions.", - "x-example": "For documentation and instructions check out <link>." - }, - "vcsProvider": { - "type": "string", - "description": "VCS (Version Control System) Provider.", - "x-example": "github" - }, - "providerRepositoryId": { - "type": "string", - "description": "VCS (Version Control System) Repository ID", - "x-example": "templates" - }, - "providerOwner": { - "type": "string", - "description": "VCS (Version Control System) Owner.", - "x-example": "appwrite" - }, - "providerVersion": { - "type": "string", - "description": "VCS (Version Control System) branch version (tag).", - "x-example": "main" - }, - "variables": { - "type": "array", - "description": "Function variables.", - "items": { - "type": "object", - "$ref": "#/definitions/templateVariable" - }, - "x-example": [] - }, - "scopes": { - "type": "array", - "description": "Function scopes.", - "items": { - "type": "string" - }, - "x-example": "users.read" - } - }, - "required": [ - "icon", - "id", - "name", - "tagline", - "permissions", - "events", - "cron", - "timeout", - "useCases", - "runtimes", - "instructions", - "vcsProvider", - "providerRepositoryId", - "providerOwner", - "providerVersion", - "variables", - "scopes" - ] - }, - "templateRuntime": { - "description": "Template Runtime", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Runtime Name.", - "x-example": "node-19.0" - }, - "commands": { - "type": "string", - "description": "The build command used to build the deployment.", - "x-example": "npm install" - }, - "entrypoint": { - "type": "string", - "description": "The entrypoint file used to execute the deployment.", - "x-example": "index.js" - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function in VCS (Version Control System) repository", - "x-example": "node/starter" - } - }, - "required": ["name", "commands", "entrypoint", "providerRootDirectory"] - }, - "templateVariable": { - "description": "Template Variable", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Variable Name.", - "x-example": "APPWRITE_DATABASE_ID" - }, - "description": { - "type": "string", - "description": "Variable Description.", - "x-example": "The ID of the Appwrite database that contains the collection to sync." - }, - "value": { - "type": "string", - "description": "Variable Value.", - "x-example": "512" - }, - "placeholder": { - "type": "string", - "description": "Variable Placeholder.", - "x-example": "64a55...7b912" - }, - "required": { - "type": "boolean", - "description": "Is the variable required?", - "x-example": false - }, - "type": { - "type": "string", - "description": "Variable Type.", - "x-example": "password" - } - }, - "required": [ - "name", - "description", - "value", - "placeholder", - "required", - "type" - ] - }, - "installation": { - "description": "Installation", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Function creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Function update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "provider": { - "type": "string", - "description": "VCS (Version Control System) provider name.", - "x-example": "github" - }, - "organization": { - "type": "string", - "description": "VCS (Version Control System) organization name.", - "x-example": "appwrite" - }, - "providerInstallationId": { - "type": "string", - "description": "VCS (Version Control System) installation ID.", - "x-example": "5322" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "provider", - "organization", - "providerInstallationId" - ] - }, - "providerRepository": { - "description": "ProviderRepository", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "VCS (Version Control System) repository ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "VCS (Version Control System) repository name.", - "x-example": "appwrite" - }, - "organization": { - "type": "string", - "description": "VCS (Version Control System) organization name", - "x-example": "appwrite" - }, - "provider": { - "type": "string", - "description": "VCS (Version Control System) provider name.", - "x-example": "github" - }, - "private": { - "type": "boolean", - "description": "Is VCS (Version Control System) repository private?", - "x-example": true - }, - "runtime": { - "type": "string", - "description": "Auto-detected runtime suggestion. Empty if getting response of getRuntime().", - "x-example": "node" - }, - "pushedAt": { - "type": "string", - "description": "Last commit date in ISO 8601 format.", - "x-example": "datetime" - } - }, - "required": [ - "id", - "name", - "organization", - "provider", - "private", - "runtime", - "pushedAt" - ] - }, - "detection": { - "description": "Detection", - "type": "object", - "properties": { - "runtime": { - "type": "string", - "description": "Runtime", - "x-example": "node" - } - }, - "required": ["runtime"] - }, - "vcsContent": { - "description": "VcsContents", - "type": "object", - "properties": { - "size": { - "type": "integer", - "description": "Content size in bytes. Only files have size, and for directories, 0 is returned.", - "x-example": 1523, - "format": "int32", - "x-nullable": true - }, - "isDirectory": { - "type": "boolean", - "description": "If a content is a directory. Directories can be used to check nested contents.", - "x-example": true, - "x-nullable": true - }, - "name": { - "type": "string", - "description": "Name of directory or file.", - "x-example": "Main.java" - } - }, - "required": ["name"] - }, - "branch": { - "description": "Branch", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Branch Name.", - "x-example": "main" - } - }, - "required": ["name"] - }, - "runtime": { - "description": "Runtime", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Runtime ID.", - "x-example": "python-3.8" - }, - "key": { - "type": "string", - "description": "Parent runtime key.", - "x-example": "python" - }, - "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", - "key", - "name", - "version", - "base", - "image", - "logo", - "supports" - ] - }, - "deployment": { - "description": "Deployment", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Deployment update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "type": { - "type": "string", - "description": "Type of deployment.", - "x-example": "vcs" - }, - "resourceId": { - "type": "string", - "description": "Resource ID.", - "x-example": "5e5ea6g16897e" - }, - "resourceType": { - "type": "string", - "description": "Resource type.", - "x-example": "functions" - }, - "entrypoint": { - "type": "string", - "description": "The entrypoint file to use to execute the deployment code.", - "x-example": "index.js" - }, - "size": { - "type": "integer", - "description": "The code size in bytes.", - "x-example": 128, - "format": "int32" - }, - "buildSize": { - "type": "integer", - "description": "The build output 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. Possible values are \"processing\", \"building\", \"waiting\", \"ready\", and \"failed\".", - "x-example": "ready" - }, - "buildLogs": { - "type": "string", - "description": "The build logs.", - "x-example": "Compiling source files..." - }, - "buildTime": { - "type": "integer", - "description": "The current build time in seconds.", - "x-example": 128, - "format": "int32" - }, - "providerRepositoryName": { - "type": "string", - "description": "The name of the vcs provider repository", - "x-example": "database" - }, - "providerRepositoryOwner": { - "type": "string", - "description": "The name of the vcs provider repository owner", - "x-example": "utopia" - }, - "providerRepositoryUrl": { - "type": "string", - "description": "The url of the vcs provider repository", - "x-example": "https://github.com/vermakhushboo/g4-node-function" - }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, - "providerCommitHash": { - "type": "string", - "description": "The commit hash of the vcs commit", - "x-example": "7c3f25d" - }, - "providerCommitAuthorUrl": { - "type": "string", - "description": "The url of vcs commit author", - "x-example": "https://github.com/vermakhushboo" - }, - "providerCommitAuthor": { - "type": "string", - "description": "The name of vcs commit author", - "x-example": "Khushboo Verma" - }, - "providerCommitMessage": { - "type": "string", - "description": "The commit message", - "x-example": "Update index.js" - }, - "providerCommitUrl": { - "type": "string", - "description": "The url of the vcs commit", - "x-example": "https://github.com/vermakhushboo/g4-node-function/commit/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" - }, - "providerBranchUrl": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "https://github.com/vermakhushboo/appwrite/tree/0.7.x" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "type", - "resourceId", - "resourceType", - "entrypoint", - "size", - "buildSize", - "buildId", - "activate", - "status", - "buildLogs", - "buildTime", - "providerRepositoryName", - "providerRepositoryOwner", - "providerRepositoryUrl", - "providerBranch", - "providerCommitHash", - "providerCommitAuthorUrl", - "providerCommitAuthor", - "providerCommitMessage", - "providerCommitUrl", - "providerBranchUrl" - ] - }, - "execution": { - "description": "Execution", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Execution ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Execution creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Execution upate date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Execution roles.", - "items": { - "type": "string" - }, - "x-example": ["any"] - }, - "functionId": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea6g16897e" - }, - "trigger": { - "type": "string", - "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" - }, - "status": { - "type": "string", - "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" - }, - "requestMethod": { - "type": "string", - "description": "HTTP request method type.", - "x-example": "GET" - }, - "requestPath": { - "type": "string", - "description": "HTTP request path and query.", - "x-example": "/articles?id=5" - }, - "requestHeaders": { - "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", - "items": { - "type": "object", - "$ref": "#/definitions/headers" - }, - "x-example": [ - { - "Content-Type": "application/json" - } - ] - }, - "responseStatusCode": { - "type": "integer", - "description": "HTTP response status code.", - "x-example": 200, - "format": "int32" - }, - "responseBody": { - "type": "string", - "description": "HTTP response body. This will return empty unless execution is created as synchronous.", - "x-example": "" - }, - "responseHeaders": { - "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", - "items": { - "type": "object", - "$ref": "#/definitions/headers" - }, - "x-example": [ - { - "Content-Type": "application/json" - } - ] - }, - "logs": { - "type": "string", - "description": "Function logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "errors": { - "type": "string", - "description": "Function errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "duration": { - "type": "number", - "description": "Function execution duration in seconds.", - "x-example": 0.4, - "format": "double" - }, - "scheduledAt": { - "type": "string", - "description": "The scheduled time for execution. If left empty, execution will be queued immediately.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "x-nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "functionId", - "trigger", - "status", - "requestMethod", - "requestPath", - "requestHeaders", - "responseStatusCode", - "responseBody", - "responseHeaders", - "logs", - "errors", - "duration" - ] - }, - "build": { - "description": "Build", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Build ID.", - "x-example": "5e5ea5c16897e" - }, - "deploymentId": { - "type": "string", - "description": "The deployment that created this build.", - "x-example": "5e5ea5c16897e" - }, - "status": { - "type": "string", - "description": "The build status. There are a few different types and each one means something different. \\nFailed - The deployment build has failed. More details can usually be found in buildStderr\\nReady - The deployment build was successful and the deployment is ready to be deployed\\nProcessing - The deployment is currently waiting to have a build triggered\\nBuilding - The deployment is currently being built", - "x-example": "ready" - }, - "stdout": { - "type": "string", - "description": "The stdout of the build.", - "x-example": "" - }, - "stderr": { - "type": "string", - "description": "The stderr of the build.", - "x-example": "" - }, - "startTime": { - "type": "string", - "description": "The deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "endTime": { - "type": "string", - "description": "The time the build was finished in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "duration": { - "type": "integer", - "description": "The build duration in seconds.", - "x-example": 0, - "format": "int32" - }, - "size": { - "type": "integer", - "description": "The code size in bytes.", - "x-example": 128, - "format": "int32" - } - }, - "required": [ - "$id", - "deploymentId", - "status", - "stdout", - "stderr", - "startTime", - "endTime", - "duration", - "size" - ] - }, - "project": { - "description": "Project", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Project ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Project creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Project update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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" - }, - "authDuration": { - "type": "integer", - "description": "Session duration in seconds.", - "x-example": 60, - "format": "int32" - }, - "authLimit": { - "type": "integer", - "description": "Max users allowed. 0 is unlimited.", - "x-example": 100, - "format": "int32" - }, - "authSessionsLimit": { - "type": "integer", - "description": "Max sessions allowed per user. 100 maximum.", - "x-example": 10, - "format": "int32" - }, - "authPasswordHistory": { - "type": "integer", - "description": "Max allowed passwords in the history list per user. Max passwords limit allowed in history is 20. Use 0 for disabling password history.", - "x-example": 5, - "format": "int32" - }, - "authPasswordDictionary": { - "type": "boolean", - "description": "Whether or not to check user's password against most commonly used passwords.", - "x-example": true - }, - "authPersonalDataCheck": { - "type": "boolean", - "description": "Whether or not to check the user password for similarity with their personal data.", - "x-example": true - }, - "authMockNumbers": { - "type": "array", - "description": "An array of mock numbers and their corresponding verification codes (OTPs).", - "items": { - "type": "object", - "$ref": "#/definitions/mockNumber" - }, - "x-example": [{}] - }, - "authSessionAlerts": { - "type": "boolean", - "description": "Whether or not to send session alert emails to users.", - "x-example": true - }, - "authMembershipsUserName": { - "type": "boolean", - "description": "Whether or not to show user names in the teams membership response.", - "x-example": true - }, - "authMembershipsUserEmail": { - "type": "boolean", - "description": "Whether or not to show user emails in the teams membership response.", - "x-example": true - }, - "authMembershipsMfa": { - "type": "boolean", - "description": "Whether or not to show user MFA status in the teams membership response.", - "x-example": true - }, - "oAuthProviders": { - "type": "array", - "description": "List of Auth Providers.", - "items": { - "type": "object", - "$ref": "#/definitions/authProvider" - }, - "x-example": [{}] - }, - "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": {} - }, - "smtpEnabled": { - "type": "boolean", - "description": "Status for custom SMTP", - "x-example": false - }, - "smtpSenderName": { - "type": "string", - "description": "SMTP sender name", - "x-example": "John Appwrite" - }, - "smtpSenderEmail": { - "type": "string", - "description": "SMTP sender email", - "x-example": "john@appwrite.io" - }, - "smtpReplyTo": { - "type": "string", - "description": "SMTP reply to email", - "x-example": "support@appwrite.io" - }, - "smtpHost": { - "type": "string", - "description": "SMTP server host name", - "x-example": "mail.appwrite.io" - }, - "smtpPort": { - "type": "integer", - "description": "SMTP server port", - "x-example": 25, - "format": "int32" - }, - "smtpUsername": { - "type": "string", - "description": "SMTP server username", - "x-example": "emailuser" - }, - "smtpPassword": { - "type": "string", - "description": "SMTP server password", - "x-example": "securepassword" - }, - "smtpSecure": { - "type": "string", - "description": "SMTP server secure protocol", - "x-example": "tls" - }, - "pingCount": { - "type": "integer", - "description": "Number of times the ping was received for this project.", - "x-example": 1, - "format": "int32" - }, - "pingedAt": { - "type": "string", - "description": "Last ping datetime in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "authEmailPassword": { - "type": "boolean", - "description": "Email/Password auth method status", - "x-example": true - }, - "authUsersAuthMagicURL": { - "type": "boolean", - "description": "Magic URL auth method status", - "x-example": true - }, - "authEmailOtp": { - "type": "boolean", - "description": "Email (OTP) auth method status", - "x-example": true - }, - "authAnonymous": { - "type": "boolean", - "description": "Anonymous auth method status", - "x-example": true - }, - "authInvites": { - "type": "boolean", - "description": "Invites auth method status", - "x-example": true - }, - "authJWT": { - "type": "boolean", - "description": "JWT auth method status", - "x-example": true - }, - "authPhone": { - "type": "boolean", - "description": "Phone auth method status", - "x-example": true - }, - "serviceStatusForAccount": { - "type": "boolean", - "description": "Account service status", - "x-example": true - }, - "serviceStatusForAvatars": { - "type": "boolean", - "description": "Avatars service status", - "x-example": true - }, - "serviceStatusForDatabases": { - "type": "boolean", - "description": "Databases service status", - "x-example": true - }, - "serviceStatusForLocale": { - "type": "boolean", - "description": "Locale service status", - "x-example": true - }, - "serviceStatusForHealth": { - "type": "boolean", - "description": "Health service status", - "x-example": true - }, - "serviceStatusForStorage": { - "type": "boolean", - "description": "Storage service status", - "x-example": true - }, - "serviceStatusForTeams": { - "type": "boolean", - "description": "Teams service status", - "x-example": true - }, - "serviceStatusForUsers": { - "type": "boolean", - "description": "Users service status", - "x-example": true - }, - "serviceStatusForFunctions": { - "type": "boolean", - "description": "Functions service status", - "x-example": true - }, - "serviceStatusForGraphql": { - "type": "boolean", - "description": "GraphQL service status", - "x-example": true - }, - "serviceStatusForMessaging": { - "type": "boolean", - "description": "Messaging service status", - "x-example": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "description", - "teamId", - "logo", - "url", - "legalName", - "legalCountry", - "legalState", - "legalCity", - "legalAddress", - "legalTaxId", - "authDuration", - "authLimit", - "authSessionsLimit", - "authPasswordHistory", - "authPasswordDictionary", - "authPersonalDataCheck", - "authMockNumbers", - "authSessionAlerts", - "authMembershipsUserName", - "authMembershipsUserEmail", - "authMembershipsMfa", - "oAuthProviders", - "platforms", - "webhooks", - "keys", - "smtpEnabled", - "smtpSenderName", - "smtpSenderEmail", - "smtpReplyTo", - "smtpHost", - "smtpPort", - "smtpUsername", - "smtpPassword", - "smtpSecure", - "pingCount", - "pingedAt", - "authEmailPassword", - "authUsersAuthMagicURL", - "authEmailOtp", - "authAnonymous", - "authInvites", - "authJWT", - "authPhone", - "serviceStatusForAccount", - "serviceStatusForAvatars", - "serviceStatusForDatabases", - "serviceStatusForLocale", - "serviceStatusForHealth", - "serviceStatusForStorage", - "serviceStatusForTeams", - "serviceStatusForUsers", - "serviceStatusForFunctions", - "serviceStatusForGraphql", - "serviceStatusForMessaging" - ] - }, - "webhook": { - "description": "Webhook", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Webhook ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Webhook creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Webhook update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Webhook name.", - "x-example": "My Webhook" - }, - "url": { - "type": "string", - "description": "Webhook URL endpoint.", - "x-example": "https://example.com/webhook" - }, - "events": { - "type": "array", - "description": "Webhook trigger events.", - "items": { - "type": "string" - }, - "x-example": "database.collections.update" - }, - "security": { - "type": "boolean", - "description": "Indicated if SSL / TLS Certificate verification is enabled.", - "x-example": true - }, - "httpUser": { - "type": "string", - "description": "HTTP basic authentication username.", - "x-example": "username" - }, - "httpPass": { - "type": "string", - "description": "HTTP basic authentication password.", - "x-example": "password" - }, - "signatureKey": { - "type": "string", - "description": "Signature key which can be used to validated incoming", - "x-example": "ad3d581ca230e2b7059c545e5a" - }, - "enabled": { - "type": "boolean", - "description": "Indicates if this webhook is enabled.", - "x-example": true - }, - "logs": { - "type": "string", - "description": "Webhook error logs from the most recent failure.", - "x-example": "Failed to connect to remote server." - }, - "attempts": { - "type": "integer", - "description": "Number of consecutive failed webhook attempts.", - "x-example": 10, - "format": "int32" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "url", - "events", - "security", - "httpUser", - "httpPass", - "signatureKey", - "enabled", - "logs", - "attempts" - ] - }, - "key": { - "description": "Key", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Key ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Key creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Key update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Key name.", - "x-example": "My API Key" - }, - "expire": { - "type": "string", - "description": "Key expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "scopes": { - "type": "array", - "description": "Allowed permission scopes.", - "items": { - "type": "string" - }, - "x-example": "users.read" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "x-example": "919c2d18fb5d4...a2ae413da83346ad2" - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "sdks": { - "type": "array", - "description": "List of SDK user agents that used this key.", - "items": { - "type": "string" - }, - "x-example": "appwrite:flutter" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "expire", - "scopes", - "secret", - "accessedAt", - "sdks" - ] - }, - "mockNumber": { - "description": "Mock Number", - "type": "object", - "properties": { - "phone": { - "type": "string", - "description": "Mock phone number for testing phone authentication. Useful for testing phone authentication without sending an SMS.", - "x-example": "+1612842323" - }, - "otp": { - "type": "string", - "description": "Mock OTP for the number. ", - "x-example": "123456" - } - }, - "required": ["phone", "otp"] - }, - "authProvider": { - "description": "AuthProvider", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Auth Provider.", - "x-example": "github" - }, - "name": { - "type": "string", - "description": "Auth Provider name.", - "x-example": "GitHub" - }, - "appId": { - "type": "string", - "description": "OAuth 2.0 application ID.", - "x-example": "259125845563242502" - }, - "secret": { - "type": "string", - "description": "OAuth 2.0 application secret. Might be JSON string if provider requires extra configuration.", - "x-example": "Bpw_g9c2TGXxfgLshDbSaL8tsCcqgczQ" - }, - "enabled": { - "type": "boolean", - "description": "Auth Provider is active and can be used to create session.", - "x-example": "" - } - }, - "required": ["key", "name", "appId", "secret", "enabled"] - }, - "platform": { - "description": "Platform", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Platform name.", - "x-example": "My Web App" - }, - "type": { - "type": "string", - "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.", - "x-example": "web" - }, - "key": { - "type": "string", - "description": "Platform Key. iOS bundle ID or Android package name. Empty string for other platforms.", - "x-example": "com.company.appname" - }, - "store": { - "type": "string", - "description": "App store or Google Play store ID.", - "x-example": "" - }, - "hostname": { - "type": "string", - "description": "Web app hostname. Empty string for other platforms.", - "x-example": true - }, - "httpUser": { - "type": "string", - "description": "HTTP basic authentication username.", - "x-example": "username" - }, - "httpPass": { - "type": "string", - "description": "HTTP basic authentication password.", - "x-example": "password" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "type", - "key", - "store", - "hostname", - "httpUser", - "httpPass" - ] - }, - "variable": { - "description": "Variable", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Variable ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Variable creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Variable creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "key": { - "type": "string", - "description": "Variable key.", - "x-example": "API_KEY" - }, - "value": { - "type": "string", - "description": "Variable value.", - "x-example": "myPa$$word1" - }, - "resourceType": { - "type": "string", - "description": "Service to which the variable belongs. Possible values are \"project\", \"function\"", - "x-example": "function" - }, - "resourceId": { - "type": "string", - "description": "ID of resource to which the variable belongs. If resourceType is \"project\", it is empty. If resourceType is \"function\", it is ID of the function.", - "x-example": "myAwesomeFunction" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "key", - "value", - "resourceType", - "resourceId" - ] - }, - "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": { - "name": { - "type": "string", - "description": "Name of the service.", - "x-example": "database" - }, - "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": ["name", "ping", "status"] - }, - "healthCertificate": { - "description": "Health Certificate", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Certificate name", - "x-example": "/CN=www.google.com" - }, - "subjectSN": { - "type": "string", - "description": "Subject SN", - "x-example": "" - }, - "issuerOrganisation": { - "type": "string", - "description": "Issuer organisation", - "x-example": "" - }, - "validFrom": { - "type": "string", - "description": "Valid from", - "x-example": "1704200998" - }, - "validTo": { - "type": "string", - "description": "Valid to", - "x-example": "1711458597" - }, - "signatureTypeSN": { - "type": "string", - "description": "Signature type SN", - "x-example": "RSA-SHA256" - } - }, - "required": [ - "name", - "subjectSN", - "issuerOrganisation", - "validFrom", - "validTo", - "signatureTypeSN" - ] - }, - "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"] - }, - "metric": { - "description": "Metric", - "type": "object", - "properties": { - "value": { - "type": "integer", - "description": "The value of this metric at the timestamp.", - "x-example": 1, - "format": "int32" - }, - "date": { - "type": "string", - "description": "The date at which this metric was aggregated in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": ["value", "date"] - }, - "metricBreakdown": { - "description": "Metric Breakdown", - "type": "object", - "properties": { - "resourceId": { - "type": "string", - "description": "Resource ID.", - "x-example": "5e5ea5c16897e", - "x-nullable": true - }, - "name": { - "type": "string", - "description": "Resource name.", - "x-example": "Documents" - }, - "value": { - "type": "integer", - "description": "The value of this metric at the timestamp.", - "x-example": 1, - "format": "int32" - }, - "estimate": { - "type": "number", - "description": "The estimated value of this metric at the end of the period.", - "x-example": 1, - "format": "double", - "x-nullable": true - } - }, - "required": ["name", "value"] - }, - "usageDatabases": { - "description": "UsageDatabases", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "databasesTotal": { - "type": "integer", - "description": "Total aggregated number of databases.", - "x-example": 0, - "format": "int32" - }, - "collectionsTotal": { - "type": "integer", - "description": "Total aggregated number of collections.", - "x-example": 0, - "format": "int32" - }, - "documentsTotal": { - "type": "integer", - "description": "Total aggregated number of documents.", - "x-example": 0, - "format": "int32" - }, - "storageTotal": { - "type": "integer", - "description": "Total aggregated number of total databases storage in bytes.", - "x-example": 0, - "format": "int32" - }, - "databasesReadsTotal": { - "type": "integer", - "description": "Total number of databases reads.", - "x-example": 0, - "format": "int32" - }, - "databasesWritesTotal": { - "type": "integer", - "description": "Total number of databases writes.", - "x-example": 0, - "format": "int32" - }, - "databases": { - "type": "array", - "description": "Aggregated number of databases per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "collections": { - "type": "array", - "description": "Aggregated number of collections per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "documents": { - "type": "array", - "description": "Aggregated number of documents per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "An array of the aggregated number of databases storage in bytes per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "databasesReads": { - "type": "array", - "description": "An array of aggregated number of database reads.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "databasesWrites": { - "type": "array", - "description": "An array of aggregated number of database writes.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "databasesTotal", - "collectionsTotal", - "documentsTotal", - "storageTotal", - "databasesReadsTotal", - "databasesWritesTotal", - "databases", - "collections", - "documents", - "storage", - "databasesReads", - "databasesWrites" - ] - }, - "usageDatabase": { - "description": "UsageDatabase", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "collectionsTotal": { - "type": "integer", - "description": "Total aggregated number of collections.", - "x-example": 0, - "format": "int32" - }, - "documentsTotal": { - "type": "integer", - "description": "Total aggregated number of documents.", - "x-example": 0, - "format": "int32" - }, - "storageTotal": { - "type": "integer", - "description": "Total aggregated number of total storage used in bytes.", - "x-example": 0, - "format": "int32" - }, - "databaseReadsTotal": { - "type": "integer", - "description": "Total number of databases reads.", - "x-example": 0, - "format": "int32" - }, - "databaseWritesTotal": { - "type": "integer", - "description": "Total number of databases writes.", - "x-example": 0, - "format": "int32" - }, - "collections": { - "type": "array", - "description": "Aggregated number of collections per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "documents": { - "type": "array", - "description": "Aggregated number of documents per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "Aggregated storage used in bytes per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "databaseReads": { - "type": "array", - "description": "An array of aggregated number of database reads.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "databaseWrites": { - "type": "array", - "description": "An array of aggregated number of database writes.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "collectionsTotal", - "documentsTotal", - "storageTotal", - "databaseReadsTotal", - "databaseWritesTotal", - "collections", - "documents", - "storage", - "databaseReads", - "databaseWrites" - ] - }, - "usageCollection": { - "description": "UsageCollection", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "documentsTotal": { - "type": "integer", - "description": "Total aggregated number of of documents.", - "x-example": 0, - "format": "int32" - }, - "documents": { - "type": "array", - "description": "Aggregated number of documents per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - } - }, - "required": ["range", "documentsTotal", "documents"] - }, - "usageUsers": { - "description": "UsageUsers", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "usersTotal": { - "type": "integer", - "description": "Total aggregated number of statistics of users.", - "x-example": 0, - "format": "int32" - }, - "sessionsTotal": { - "type": "integer", - "description": "Total aggregated number of active sessions.", - "x-example": 0, - "format": "int32" - }, - "users": { - "type": "array", - "description": "Aggregated number of users per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "sessions": { - "type": "array", - "description": "Aggregated number of active sessions per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - } - }, - "required": ["range", "usersTotal", "sessionsTotal", "users", "sessions"] - }, - "usageStorage": { - "description": "StorageUsage", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "bucketsTotal": { - "type": "integer", - "description": "Total aggregated number of buckets", - "x-example": 0, - "format": "int32" - }, - "filesTotal": { - "type": "integer", - "description": "Total aggregated number of files.", - "x-example": 0, - "format": "int32" - }, - "filesStorageTotal": { - "type": "integer", - "description": "Total aggregated number of files storage (in bytes).", - "x-example": 0, - "format": "int32" - }, - "buckets": { - "type": "array", - "description": "Aggregated number of buckets per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "files": { - "type": "array", - "description": "Aggregated number of files per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "Aggregated number of files storage (in bytes) per period .", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "bucketsTotal", - "filesTotal", - "filesStorageTotal", - "buckets", - "files", - "storage" - ] - }, - "usageBuckets": { - "description": "UsageBuckets", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "filesTotal": { - "type": "integer", - "description": "Total aggregated number of bucket files.", - "x-example": 0, - "format": "int32" - }, - "filesStorageTotal": { - "type": "integer", - "description": "Total aggregated number of bucket files storage (in bytes).", - "x-example": 0, - "format": "int32" - }, - "files": { - "type": "array", - "description": "Aggregated number of bucket files per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "Aggregated number of bucket storage files (in bytes) per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "filesTotal", - "filesStorageTotal", - "files", - "storage" - ] - }, - "usageFunctions": { - "description": "UsageFunctions", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "functionsTotal": { - "type": "integer", - "description": "Total aggregated number of functions.", - "x-example": 0, - "format": "int32" - }, - "deploymentsTotal": { - "type": "integer", - "description": "Total aggregated number of functions deployments.", - "x-example": 0, - "format": "int32" - }, - "deploymentsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of functions deployment storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTotal": { - "type": "integer", - "description": "Total aggregated number of functions build.", - "x-example": 0, - "format": "int32" - }, - "buildsStorageTotal": { - "type": "integer", - "description": "total aggregated sum of functions build storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of functions build compute time.", - "x-example": 0, - "format": "int32" - }, - "buildsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of functions build mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "executionsTotal": { - "type": "integer", - "description": "Total aggregated number of functions execution.", - "x-example": 0, - "format": "int32" - }, - "executionsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of functions execution compute time.", - "x-example": 0, - "format": "int32" - }, - "executionsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of functions execution mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "functions": { - "type": "array", - "description": "Aggregated number of functions per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": 0 - }, - "deployments": { - "type": "array", - "description": "Aggregated number of functions deployment per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "deploymentsStorage": { - "type": "array", - "description": "Aggregated number of functions deployment storage per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "builds": { - "type": "array", - "description": "Aggregated number of functions build per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "buildsStorage": { - "type": "array", - "description": "Aggregated sum of functions build storage per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "buildsTime": { - "type": "array", - "description": "Aggregated sum of functions build compute time per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "buildsMbSeconds": { - "type": "array", - "description": "Aggregated sum of functions build mbSeconds per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "executions": { - "type": "array", - "description": "Aggregated number of functions execution per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "executionsTime": { - "type": "array", - "description": "Aggregated number of functions execution compute time per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "executionsMbSeconds": { - "type": "array", - "description": "Aggregated number of functions mbSeconds per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "functionsTotal", - "deploymentsTotal", - "deploymentsStorageTotal", - "buildsTotal", - "buildsStorageTotal", - "buildsTimeTotal", - "buildsMbSecondsTotal", - "executionsTotal", - "executionsTimeTotal", - "executionsMbSecondsTotal", - "functions", - "deployments", - "deploymentsStorage", - "builds", - "buildsStorage", - "buildsTime", - "buildsMbSeconds", - "executions", - "executionsTime", - "executionsMbSeconds" - ] - }, - "usageFunction": { - "description": "UsageFunction", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "The time range of the usage stats.", - "x-example": "30d" - }, - "deploymentsTotal": { - "type": "integer", - "description": "Total aggregated number of function deployments.", - "x-example": 0, - "format": "int32" - }, - "deploymentsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of function deployments storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTotal": { - "type": "integer", - "description": "Total aggregated number of function builds.", - "x-example": 0, - "format": "int32" - }, - "buildsStorageTotal": { - "type": "integer", - "description": "total aggregated sum of function builds storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of function builds compute time.", - "x-example": 0, - "format": "int32" - }, - "buildsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of function builds mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "executionsTotal": { - "type": "integer", - "description": "Total aggregated number of function executions.", - "x-example": 0, - "format": "int32" - }, - "executionsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of function executions compute time.", - "x-example": 0, - "format": "int32" - }, - "executionsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of function executions mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "deployments": { - "type": "array", - "description": "Aggregated number of function deployments per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "deploymentsStorage": { - "type": "array", - "description": "Aggregated number of function deployments storage per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "builds": { - "type": "array", - "description": "Aggregated number of function builds per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "buildsStorage": { - "type": "array", - "description": "Aggregated sum of function builds storage per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "buildsTime": { - "type": "array", - "description": "Aggregated sum of function builds compute time per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "buildsMbSeconds": { - "type": "array", - "description": "Aggregated number of function builds mbSeconds per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "executions": { - "type": "array", - "description": "Aggregated number of function executions per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "executionsTime": { - "type": "array", - "description": "Aggregated number of function executions compute time per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "executionsMbSeconds": { - "type": "array", - "description": "Aggregated number of function mbSeconds per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "deploymentsTotal", - "deploymentsStorageTotal", - "buildsTotal", - "buildsStorageTotal", - "buildsTimeTotal", - "buildsMbSecondsTotal", - "executionsTotal", - "executionsTimeTotal", - "executionsMbSecondsTotal", - "deployments", - "deploymentsStorage", - "builds", - "buildsStorage", - "buildsTime", - "buildsMbSeconds", - "executions", - "executionsTime", - "executionsMbSeconds" - ] - }, - "usageProject": { - "description": "UsageProject", - "type": "object", - "properties": { - "executionsTotal": { - "type": "integer", - "description": "Total aggregated number of function executions.", - "x-example": 0, - "format": "int32" - }, - "documentsTotal": { - "type": "integer", - "description": "Total aggregated number of documents.", - "x-example": 0, - "format": "int32" - }, - "databasesTotal": { - "type": "integer", - "description": "Total aggregated number of databases.", - "x-example": 0, - "format": "int32" - }, - "databasesStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of databases storage size (in bytes).", - "x-example": 0, - "format": "int32" - }, - "usersTotal": { - "type": "integer", - "description": "Total aggregated number of users.", - "x-example": 0, - "format": "int32" - }, - "filesStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of files storage size (in bytes).", - "x-example": 0, - "format": "int32" - }, - "functionsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of functions storage size (in bytes).", - "x-example": 0, - "format": "int32" - }, - "buildsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of builds storage size (in bytes).", - "x-example": 0, - "format": "int32" - }, - "deploymentsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of deployments storage size (in bytes).", - "x-example": 0, - "format": "int32" - }, - "bucketsTotal": { - "type": "integer", - "description": "Total aggregated number of buckets.", - "x-example": 0, - "format": "int32" - }, - "executionsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated number of function executions mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "buildsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated number of function builds mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "databasesReadsTotal": { - "type": "integer", - "description": "Total number of databases reads.", - "x-example": 0, - "format": "int32" - }, - "databasesWritesTotal": { - "type": "integer", - "description": "Total number of databases writes.", - "x-example": 0, - "format": "int32" - }, - "requests": { - "type": "array", - "description": "Aggregated number of requests per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "network": { - "type": "array", - "description": "Aggregated number of consumed bandwidth per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "users": { - "type": "array", - "description": "Aggregated number of users per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "executions": { - "type": "array", - "description": "Aggregated number of executions per period.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "executionsBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of executions by functions.", - "items": { - "type": "object", - "$ref": "#/definitions/metricBreakdown" - }, - "x-example": [] - }, - "bucketsBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of usage by buckets.", - "items": { - "type": "object", - "$ref": "#/definitions/metricBreakdown" - }, - "x-example": [] - }, - "databasesStorageBreakdown": { - "type": "array", - "description": "An array of the aggregated breakdown of storage usage by databases.", - "items": { - "type": "object", - "$ref": "#/definitions/metricBreakdown" - }, - "x-example": [] - }, - "executionsMbSecondsBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of execution mbSeconds by functions.", - "items": { - "type": "object", - "$ref": "#/definitions/metricBreakdown" - }, - "x-example": [] - }, - "buildsMbSecondsBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of build mbSeconds by functions.", - "items": { - "type": "object", - "$ref": "#/definitions/metricBreakdown" - }, - "x-example": [] - }, - "functionsStorageBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of functions storage size (in bytes).", - "items": { - "type": "object", - "$ref": "#/definitions/metricBreakdown" - }, - "x-example": [] - }, - "authPhoneTotal": { - "type": "integer", - "description": "Total aggregated number of phone auth.", - "x-example": 0, - "format": "int32" - }, - "authPhoneEstimate": { - "type": "number", - "description": "Estimated total aggregated cost of phone auth.", - "x-example": 0, - "format": "double" - }, - "authPhoneCountryBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of phone auth by country.", - "items": { - "type": "object", - "$ref": "#/definitions/metricBreakdown" - }, - "x-example": [] - }, - "databasesReads": { - "type": "array", - "description": "An array of aggregated number of database reads.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - }, - "databasesWrites": { - "type": "array", - "description": "An array of aggregated number of database writes.", - "items": { - "type": "object", - "$ref": "#/definitions/metric" - }, - "x-example": [] - } - }, - "required": [ - "executionsTotal", - "documentsTotal", - "databasesTotal", - "databasesStorageTotal", - "usersTotal", - "filesStorageTotal", - "functionsStorageTotal", - "buildsStorageTotal", - "deploymentsStorageTotal", - "bucketsTotal", - "executionsMbSecondsTotal", - "buildsMbSecondsTotal", - "databasesReadsTotal", - "databasesWritesTotal", - "requests", - "network", - "users", - "executions", - "executionsBreakdown", - "bucketsBreakdown", - "databasesStorageBreakdown", - "executionsMbSecondsBreakdown", - "buildsMbSecondsBreakdown", - "functionsStorageBreakdown", - "authPhoneTotal", - "authPhoneEstimate", - "authPhoneCountryBreakdown", - "databasesReads", - "databasesWrites" - ] - }, - "headers": { - "description": "Headers", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Header name.", - "x-example": "Content-Type" - }, - "value": { - "type": "string", - "description": "Header value.", - "x-example": "application/json" - } - }, - "required": ["name", "value"] - }, - "specification": { - "description": "Specification", - "type": "object", - "properties": { - "memory": { - "type": "integer", - "description": "Memory size in MB.", - "x-example": 512, - "format": "int32" - }, - "cpus": { - "type": "number", - "description": "Number of CPUs.", - "x-example": 1, - "format": "double" - }, - "enabled": { - "type": "boolean", - "description": "Is size enabled.", - "x-example": true - }, - "slug": { - "type": "string", - "description": "Size slug.", - "x-example": "s-1vcpu-512mb" - } - }, - "required": ["memory", "cpus", "enabled", "slug"] - }, - "proxyRule": { - "description": "Rule", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Rule ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Rule creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Rule update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "domain": { - "type": "string", - "description": "Domain name.", - "x-example": "appwrite.company.com" - }, - "resourceType": { - "type": "string", - "description": "Action definition for the rule. Possible values are \"api\", \"function\", or \"redirect\"", - "x-example": "function" - }, - "resourceId": { - "type": "string", - "description": "ID of resource for the action type. If resourceType is \"api\" or \"url\", it is empty. If resourceType is \"function\", it is ID of the function.", - "x-example": "myAwesomeFunction" - }, - "status": { - "type": "string", - "description": "Domain verification status. Possible values are \"created\", \"verifying\", \"verified\" and \"unverified\"", - "x-example": "verified" - }, - "logs": { - "type": "string", - "description": "Certificate generation logs. This will return an empty string if generation did not run, or succeeded.", - "x-example": "HTTP challegne failed." - }, - "renewAt": { - "type": "string", - "description": "Certificate auto-renewal date in ISO 8601 format.", - "x-example": "datetime" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "domain", - "resourceType", - "resourceId", - "status", - "logs", - "renewAt" - ] - }, - "smsTemplate": { - "description": "SmsTemplate", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Template type", - "x-example": "verification" - }, - "locale": { - "type": "string", - "description": "Template locale", - "x-example": "en_us" - }, - "message": { - "type": "string", - "description": "Template message", - "x-example": "Click on the link to verify your account." - } - }, - "required": ["type", "locale", "message"] - }, - "emailTemplate": { - "description": "EmailTemplate", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Template type", - "x-example": "verification" - }, - "locale": { - "type": "string", - "description": "Template locale", - "x-example": "en_us" - }, - "message": { - "type": "string", - "description": "Template message", - "x-example": "Click on the link to verify your account." - }, - "senderName": { - "type": "string", - "description": "Name of the sender", - "x-example": "My User" - }, - "senderEmail": { - "type": "string", - "description": "Email of the sender", - "x-example": "mail@appwrite.io" - }, - "replyTo": { - "type": "string", - "description": "Reply to email address", - "x-example": "emails@appwrite.io" - }, - "subject": { - "type": "string", - "description": "Email subject", - "x-example": "Please verify your email address" - } - }, - "required": [ - "type", - "locale", - "message", - "senderName", - "senderEmail", - "replyTo", - "subject" - ] - }, - "consoleVariables": { - "description": "Console Variables", - "type": "object", - "properties": { - "_APP_DOMAIN_TARGET": { - "type": "string", - "description": "CNAME target for your Appwrite custom domains.", - "x-example": "appwrite.io" - }, - "_APP_STORAGE_LIMIT": { - "type": "integer", - "description": "Maximum file size allowed for file upload in bytes.", - "x-example": "30000000", - "format": "int32" - }, - "_APP_FUNCTIONS_SIZE_LIMIT": { - "type": "integer", - "description": "Maximum file size allowed for deployment in bytes.", - "x-example": "30000000", - "format": "int32" - }, - "_APP_USAGE_STATS": { - "type": "string", - "description": "Defines if usage stats are enabled. This value is set to 'enabled' by default, to disable the usage stats set the value to 'disabled'.", - "x-example": "enabled" - }, - "_APP_VCS_ENABLED": { - "type": "boolean", - "description": "Defines if VCS (Version Control System) is enabled.", - "x-example": true - }, - "_APP_DOMAIN_ENABLED": { - "type": "boolean", - "description": "Defines if main domain is configured. If so, custom domains can be created.", - "x-example": true - }, - "_APP_ASSISTANT_ENABLED": { - "type": "boolean", - "description": "Defines if AI assistant is enabled.", - "x-example": true - } - }, - "required": [ - "_APP_DOMAIN_TARGET", - "_APP_STORAGE_LIMIT", - "_APP_FUNCTIONS_SIZE_LIMIT", - "_APP_USAGE_STATS", - "_APP_VCS_ENABLED", - "_APP_DOMAIN_ENABLED", - "_APP_ASSISTANT_ENABLED" - ] - }, - "mfaChallenge": { - "description": "MFA Challenge", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" - }, - "expire": { - "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": ["$id", "$createdAt", "userId", "expire"] - }, - "mfaRecoveryCodes": { - "description": "MFA Recovery Codes", - "type": "object", - "properties": { - "recoveryCodes": { - "type": "array", - "description": "Recovery codes.", - "items": { - "type": "string" - }, - "x-example": ["a3kf0-s0cl2", "s0co1-as98s"] - } - }, - "required": ["recoveryCodes"] - }, - "mfaType": { - "description": "MFAType", - "type": "object", - "properties": { - "secret": { - "type": "string", - "description": "Secret token used for TOTP factor.", - "x-example": true - }, - "uri": { - "type": "string", - "description": "URI for authenticator apps.", - "x-example": true - } - }, - "required": ["secret", "uri"] - }, - "mfaFactors": { - "description": "MFAFactors", - "type": "object", - "properties": { - "totp": { - "type": "boolean", - "description": "Can TOTP be used for MFA challenge for this account.", - "x-example": true - }, - "phone": { - "type": "boolean", - "description": "Can phone (SMS) be used for MFA challenge for this account.", - "x-example": true - }, - "email": { - "type": "boolean", - "description": "Can email be used for MFA challenge for this account.", - "x-example": true - }, - "recoveryCode": { - "type": "boolean", - "description": "Can recovery code be used for MFA challenge for this account.", - "x-example": true - } - }, - "required": ["totp", "phone", "email", "recoveryCode"] - }, - "provider": { - "description": "Provider", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Provider ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Provider creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Provider update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "The name for the provider instance.", - "x-example": "Mailgun" - }, - "provider": { - "type": "string", - "description": "The name of the provider service.", - "x-example": "mailgun" - }, - "enabled": { - "type": "boolean", - "description": "Is provider enabled?", - "x-example": true - }, - "type": { - "type": "string", - "description": "Type of provider.", - "x-example": "sms" - }, - "credentials": { - "type": "object", - "additionalProperties": true, - "description": "Provider credentials.", - "x-example": { - "key": "123456789" - } - }, - "options": { - "type": "object", - "additionalProperties": true, - "description": "Provider options.", - "x-example": { - "from": "sender-email@mydomain" - } - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "provider", - "enabled", - "type", - "credentials" - ] - }, - "message": { - "description": "Message", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Message ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Message creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Message update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerType": { - "type": "string", - "description": "Message provider type.", - "x-example": "email" - }, - "topics": { - "type": "array", - "description": "Topic IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": ["5e5ea5c16897e"] - }, - "users": { - "type": "array", - "description": "User IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": ["5e5ea5c16897e"] - }, - "targets": { - "type": "array", - "description": "Target IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": ["5e5ea5c16897e"] - }, - "scheduledAt": { - "type": "string", - "description": "The scheduled time for message.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "x-nullable": true - }, - "deliveredAt": { - "type": "string", - "description": "The time when the message was delivered.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "x-nullable": true - }, - "deliveryErrors": { - "type": "array", - "description": "Delivery errors if any.", - "items": { - "type": "string" - }, - "x-example": [ - "Failed to send message to target 5e5ea5c16897e: Credentials not valid." - ], - "x-nullable": true - }, - "deliveredTotal": { - "type": "integer", - "description": "Number of recipients the message was delivered to.", - "x-example": 1, - "format": "int32" - }, - "data": { - "type": "object", - "additionalProperties": true, - "description": "Data of the message.", - "x-example": { - "subject": "Welcome to Appwrite", - "content": "Hi there, welcome to Appwrite family." - } - }, - "status": { - "type": "string", - "description": "Status of delivery.", - "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "providerType", - "topics", - "users", - "targets", - "deliveredTotal", - "data", - "status" - ] - }, - "topic": { - "description": "Topic", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Topic ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Topic creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Topic update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "The name of the topic.", - "x-example": "events" - }, - "emailTotal": { - "type": "integer", - "description": "Total count of email subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" - }, - "smsTotal": { - "type": "integer", - "description": "Total count of SMS subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" - }, - "pushTotal": { - "type": "integer", - "description": "Total count of push subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" - }, - "subscribe": { - "type": "array", - "description": "Subscribe permissions.", - "items": { - "type": "string" - }, - "x-example": "users" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "emailTotal", - "smsTotal", - "pushTotal", - "subscribe" - ] - }, - "subscriber": { - "description": "Subscriber", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Subscriber ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Subscriber creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Subscriber update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "targetId": { - "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" - }, - "target": { - "type": "object", - "description": "Target.", - "x-example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "providerId": "259125845563242502", - "name": "ageon-app-email", - "identifier": "random-mail@email.org", - "userId": "5e5ea5c16897e" - }, - "items": { - "type": "object", - "$ref": "#/definitions/target" - } - }, - "userId": { - "type": "string", - "description": "Topic ID.", - "x-example": "5e5ea5c16897e" - }, - "userName": { - "type": "string", - "description": "User Name.", - "x-example": "Aegon Targaryen" - }, - "topicId": { - "type": "string", - "description": "Topic ID.", - "x-example": "259125845563242502" - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "targetId", - "target", - "userId", - "userName", - "topicId", - "providerType" - ] - }, - "target": { - "description": "Target", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Target creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Target update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Target Name.", - "x-example": "Apple iPhone 12" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "259125845563242502" - }, - "providerId": { - "type": "string", - "description": "Provider ID.", - "x-example": "259125845563242502", - "x-nullable": true - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" - }, - "identifier": { - "type": "string", - "description": "The target identifier.", - "x-example": "token" - }, - "expired": { - "type": "boolean", - "description": "Is the target expired.", - "x-example": false - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "userId", - "providerType", - "identifier", - "expired" - ] - }, - "migration": { - "description": "Migration", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Migration ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Migration creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Variable creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "status": { - "type": "string", - "description": "Migration status ( pending, processing, failed, completed ) ", - "x-example": "pending" - }, - "stage": { - "type": "string", - "description": "Migration stage ( init, processing, source-check, destination-check, migrating, finished )", - "x-example": "init" - }, - "source": { - "type": "string", - "description": "A string containing the type of source of the migration.", - "x-example": "Appwrite" - }, - "destination": { - "type": "string", - "description": "A string containing the type of destination of the migration.", - "x-example": "Appwrite" - }, - "resources": { - "type": "array", - "description": "Resources to migrate.", - "items": { - "type": "string" - }, - "x-example": ["user"] - }, - "statusCounters": { - "type": "object", - "additionalProperties": true, - "description": "A group of counters that represent the total progress of the migration.", - "x-example": "{\"Database\": {\"PENDING\": 0, \"SUCCESS\": 1, \"ERROR\": 0, \"SKIP\": 0, \"PROCESSING\": 0, \"WARNING\": 0}}" - }, - "resourceData": { - "type": "object", - "additionalProperties": true, - "description": "An array of objects containing the report data of the resources that were migrated.", - "x-example": "[{\"resource\":\"Database\",\"id\":\"public\",\"status\":\"SUCCESS\",\"message\":\"\"}]" - }, - "errors": { - "type": "array", - "description": "All errors that occurred during the migration process.", - "items": { - "type": "string" - }, - "x-example": [] - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "status", - "stage", - "source", - "destination", - "resources", - "statusCounters", - "resourceData", - "errors" - ] - }, - "migrationReport": { - "description": "Migration Report", - "type": "object", - "properties": { - "user": { - "type": "integer", - "description": "Number of users to be migrated.", - "x-example": 20, - "format": "int32" - }, - "team": { - "type": "integer", - "description": "Number of teams to be migrated.", - "x-example": 20, - "format": "int32" + "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" + ] + }, + "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" + ] + }, + "variableList": { + "description": "Variables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of variables documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "variables": { + "type": "array", + "description": "List of variables.", + "items": { + "type": "object", + "$ref": "#\/definitions\/variable" + }, + "x-example": "" + } + }, + "required": [ + "total", + "variables" + ] + }, + "proxyRuleList": { + "description": "Rule List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rules documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rules": { + "type": "array", + "description": "List of rules.", + "items": { + "type": "object", + "$ref": "#\/definitions\/proxyRule" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rules" + ] + }, + "localeCodeList": { + "description": "Locale codes list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of localeCodes documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "localeCodes": { + "type": "array", + "description": "List of localeCodes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/localeCode" + }, + "x-example": "" + } + }, + "required": [ + "total", + "localeCodes" + ] + }, + "providerList": { + "description": "Provider list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of providers documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "providers": { + "type": "array", + "description": "List of providers.", + "items": { + "type": "object", + "$ref": "#\/definitions\/provider" + }, + "x-example": "" + } + }, + "required": [ + "total", + "providers" + ] + }, + "messageList": { + "description": "Message list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of messages documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "messages": { + "type": "array", + "description": "List of messages.", + "items": { + "type": "object", + "$ref": "#\/definitions\/message" + }, + "x-example": "" + } + }, + "required": [ + "total", + "messages" + ] + }, + "topicList": { + "description": "Topic list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of topics documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "topics": { + "type": "array", + "description": "List of topics.", + "items": { + "type": "object", + "$ref": "#\/definitions\/topic" + }, + "x-example": "" + } + }, + "required": [ + "total", + "topics" + ] + }, + "subscriberList": { + "description": "Subscriber list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of subscribers documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "subscribers": { + "type": "array", + "description": "List of subscribers.", + "items": { + "type": "object", + "$ref": "#\/definitions\/subscriber" + }, + "x-example": "" + } + }, + "required": [ + "total", + "subscribers" + ] + }, + "targetList": { + "description": "Target list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of targets documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "targets": { + "type": "array", + "description": "List of targets.", + "items": { + "type": "object", + "$ref": "#\/definitions\/target" + }, + "x-example": "" + } + }, + "required": [ + "total", + "targets" + ] + }, + "migrationList": { + "description": "Migrations List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of migrations documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "migrations": { + "type": "array", + "description": "List of migrations.", + "items": { + "type": "object", + "$ref": "#\/definitions\/migration" + }, + "x-example": "" + } + }, + "required": [ + "total", + "migrations" + ] + }, + "specificationList": { + "description": "Specifications List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of specifications documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "specifications": { + "type": "array", + "description": "List of specifications.", + "items": { + "type": "object", + "$ref": "#\/definitions\/specification" + }, + "x-example": "" + } + }, + "required": [ + "total", + "specifications" + ] + }, + "vcsContentList": { + "description": "VCS Content List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of contents documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "contents": { + "type": "array", + "description": "List of contents.", + "items": { + "type": "object", + "$ref": "#\/definitions\/vcsContent" + }, + "x-example": "" + } + }, + "required": [ + "total", + "contents" + ] }, "database": { - "type": "integer", - "description": "Number of databases to be migrated.", - "x-example": 20, - "format": "int32" + "description": "Database", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Database name.", + "x-example": "My Database" + }, + "$createdAt": { + "type": "string", + "description": "Database creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Database update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "enabled": { + "type": "boolean", + "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + } + }, + "required": [ + "$id", + "name", + "$createdAt", + "$updatedAt", + "enabled" + ] + }, + "collection": { + "description": "Collection", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Collection creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Collection update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Collection name.", + "x-example": "My Collection" + }, + "enabled": { + "type": "boolean", + "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "documentSecurity": { + "type": "boolean", + "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "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\/attributeDatetime" + }, + { + "$ref": "#\/definitions\/attributeRelationship" + }, + { + "$ref": "#\/definitions\/attributeString" + } + ] + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Collection indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/index" + }, + "x-example": {} + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "documentSecurity", + "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\/attributeDatetime" + }, + { + "$ref": "#\/definitions\/attributeRelationship" + }, + { + "$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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt", + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt", + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt", + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt", + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "attributeDatetime": { + "description": "AttributeDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "attributeRelationship": { + "description": "AttributeRelationship", + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedCollection": { + "type": "string", + "description": "The ID of the related collection.", + "x-example": "collection" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedCollection", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ] + }, + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "attributes": { + "type": "array", + "description": "Index attributes.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "attributes", + "$createdAt", + "$updatedAt" + ] }, "document": { - "type": "integer", - "description": "Number of documents to be migrated.", - "x-example": 20, - "format": "int32" + "description": "Document", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Document ID.", + "x-example": "5e5ea5c16897e" + }, + "$collectionId": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Document creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Document update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Document permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$collectionId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, + "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": "string", + "description": "Log creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "osCode": { + "type": "string", + "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", + "x-example": "Mac" + }, + "osName": { + "type": "string", + "description": "Operating system name.", + "x-example": "Mac" + }, + "osVersion": { + "type": "string", + "description": "Operating system version.", + "x-example": "Mac" + }, + "clientType": { + "type": "string", + "description": "Client type.", + "x-example": "browser" + }, + "clientCode": { + "type": "string", + "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", + "x-example": "CM" + }, + "clientName": { + "type": "string", + "description": "Client name.", + "x-example": "Chrome Mobile iOS" + }, + "clientVersion": { + "type": "string", + "description": "Client version.", + "x-example": "84.0" + }, + "clientEngine": { + "type": "string", + "description": "Client engine name.", + "x-example": "WebKit" + }, + "clientEngineVersion": { + "type": "string", + "description": "Client engine name.", + "x-example": "605.1.15" + }, + "deviceName": { + "type": "string", + "description": "Device name.", + "x-example": "smartphone" + }, + "deviceBrand": { + "type": "string", + "description": "Device brand name.", + "x-example": "Google" + }, + "deviceModel": { + "type": "string", + "description": "Device model name.", + "x-example": "Nexus 5" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + } + }, + "required": [ + "event", + "userId", + "userEmail", + "userName", + "mode", + "ip", + "time", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName" + ] + }, + "user": { + "description": "User", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "User creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "User update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "User name.", + "x-example": "John Doe" + }, + "password": { + "type": "string", + "description": "Hashed user password.", + "x-example": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "x-nullable": true + }, + "hash": { + "type": "string", + "description": "Password hashing algorithm.", + "x-example": "argon2", + "x-nullable": true + }, + "hashOptions": { + "type": "object", + "description": "Password hashing algorithm configuration.", + "x-example": {}, + "items": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/algoArgon2" + }, + { + "$ref": "#\/definitions\/algoScrypt" + }, + { + "$ref": "#\/definitions\/algoScryptModified" + }, + { + "$ref": "#\/definitions\/algoBcrypt" + }, + { + "$ref": "#\/definitions\/algoPhpass" + }, + { + "$ref": "#\/definitions\/algoSha" + }, + { + "$ref": "#\/definitions\/algoMd5" + } + ] + }, + "x-nullable": true + }, + "registration": { + "type": "string", + "description": "User registration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "status": { + "type": "boolean", + "description": "User status. Pass `true` for enabled and `false` for disabled.", + "x-example": true + }, + "labels": { + "type": "array", + "description": "Labels for the user.", + "items": { + "type": "string" + }, + "x-example": [ + "vip" + ] + }, + "passwordUpdate": { + "type": "string", + "description": "Password update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "email": { + "type": "string", + "description": "User email address.", + "x-example": "john@appwrite.io" + }, + "phone": { + "type": "string", + "description": "User phone number in E.164 format.", + "x-example": "+4930901820" + }, + "emailVerification": { + "type": "boolean", + "description": "Email verification status.", + "x-example": true + }, + "phoneVerification": { + "type": "boolean", + "description": "Phone verification status.", + "x-example": true + }, + "mfa": { + "type": "boolean", + "description": "Multi factor authentication 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" + } + }, + "targets": { + "type": "array", + "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.", + "items": { + "type": "object", + "$ref": "#\/definitions\/target" + }, + "x-example": [] + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "registration", + "status", + "labels", + "passwordUpdate", + "email", + "phone", + "emailVerification", + "phoneVerification", + "mfa", + "prefs", + "targets", + "accessedAt" + ] + }, + "algoMd5": { + "description": "AlgoMD5", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "md5" + } + }, + "required": [ + "type" + ] + }, + "algoSha": { + "description": "AlgoSHA", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "sha" + } + }, + "required": [ + "type" + ] + }, + "algoPhpass": { + "description": "AlgoPHPass", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "phpass" + } + }, + "required": [ + "type" + ] + }, + "algoBcrypt": { + "description": "AlgoBcrypt", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "bcrypt" + } + }, + "required": [ + "type" + ] + }, + "algoScrypt": { + "description": "AlgoScrypt", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "scrypt" + }, + "costCpu": { + "type": "integer", + "description": "CPU complexity of computed hash.", + "x-example": 8, + "format": "int32" + }, + "costMemory": { + "type": "integer", + "description": "Memory complexity of computed hash.", + "x-example": 14, + "format": "int32" + }, + "costParallel": { + "type": "integer", + "description": "Parallelization of computed hash.", + "x-example": 1, + "format": "int32" + }, + "length": { + "type": "integer", + "description": "Length used to compute hash.", + "x-example": 64, + "format": "int32" + } + }, + "required": [ + "type", + "costCpu", + "costMemory", + "costParallel", + "length" + ] + }, + "algoScryptModified": { + "description": "AlgoScryptModified", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "scryptMod" + }, + "salt": { + "type": "string", + "description": "Salt used to compute hash.", + "x-example": "UxLMreBr6tYyjQ==" + }, + "saltSeparator": { + "type": "string", + "description": "Separator used to compute hash.", + "x-example": "Bw==" + }, + "signerKey": { + "type": "string", + "description": "Key used to compute hash.", + "x-example": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } + }, + "required": [ + "type", + "salt", + "saltSeparator", + "signerKey" + ] + }, + "algoArgon2": { + "description": "AlgoArgon2", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "argon2" + }, + "memoryCost": { + "type": "integer", + "description": "Memory used to compute hash.", + "x-example": 65536, + "format": "int32" + }, + "timeCost": { + "type": "integer", + "description": "Amount of time consumed to compute hash", + "x-example": 4, + "format": "int32" + }, + "threads": { + "type": "integer", + "description": "Number of threads used to compute hash.", + "x-example": 3, + "format": "int32" + } + }, + "required": [ + "type", + "memoryCost", + "timeCost", + "threads" + ] + }, + "preferences": { + "description": "Preferences", + "type": "object", + "additionalProperties": true + }, + "session": { + "description": "Session", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Session ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Session creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Session update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5bb8c16897e" + }, + "expire": { + "type": "string", + "description": "Session expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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": "string", + "description": "The date of when the access token expires in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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 + }, + "factors": { + "type": "array", + "description": "Returns a list of active session factors.", + "items": { + "type": "string" + }, + "x-example": [ + "email" + ] + }, + "secret": { + "type": "string", + "description": "Secret used to authenticate the user. Only included if the request was made with an API key", + "x-example": "5e5bb8c16897e" + }, + "mfaUpdatedAt": { + "type": "string", + "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "expire", + "provider", + "providerUid", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken", + "ip", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName", + "current", + "factors", + "secret", + "mfaUpdatedAt" + ] + }, + "identity": { + "description": "Identity", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Identity ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Identity creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Identity update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5bb8c16897e" + }, + "provider": { + "type": "string", + "description": "Identity Provider.", + "x-example": "email" + }, + "providerUid": { + "type": "string", + "description": "ID of the User in the Identity Provider.", + "x-example": "5e5bb8c16897e" + }, + "providerEmail": { + "type": "string", + "description": "Email of the User in the Identity Provider.", + "x-example": "user@example.com" + }, + "providerAccessToken": { + "type": "string", + "description": "Identity Provider Access Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "providerAccessTokenExpiry": { + "type": "string", + "description": "The date of when the access token expires in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "providerRefreshToken": { + "type": "string", + "description": "Identity Provider Refresh Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "provider", + "providerUid", + "providerEmail", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken" + ] + }, + "token": { + "description": "Token", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "phrase": { + "type": "string", + "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.", + "x-example": "Golden Fox" + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "secret", + "expire", + "phrase" + ] + }, + "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 European 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" + ] + }, + "localeCode": { + "description": "LocaleCode", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes)", + "x-example": "en-us" + }, + "name": { + "type": "string", + "description": "Locale name", + "x-example": "US" + } + }, + "required": [ + "code", + "name" + ] }, "file": { - "type": "integer", - "description": "Number of files to be migrated.", - "x-example": 20, - "format": "int32" + "description": "File", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "File ID.", + "x-example": "5e5ea5c16897e" + }, + "bucketId": { + "type": "string", + "description": "Bucket ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "File creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "File update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "File permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "name": { + "type": "string", + "description": "File name.", + "x-example": "Pink.png" + }, + "signature": { + "type": "string", + "description": "File MD5 signature.", + "x-example": "5d529fd02b544198ae075bd57c1762bb" + }, + "mimeType": { + "type": "string", + "description": "File mime type.", + "x-example": "image\/png" + }, + "sizeOriginal": { + "type": "integer", + "description": "File original size in bytes.", + "x-example": 17890, + "format": "int32" + }, + "chunksTotal": { + "type": "integer", + "description": "Total number of chunks available", + "x-example": 17890, + "format": "int32" + }, + "chunksUploaded": { + "type": "integer", + "description": "Total number of chunks uploaded", + "x-example": 17890, + "format": "int32" + } + }, + "required": [ + "$id", + "bucketId", + "$createdAt", + "$updatedAt", + "$permissions", + "name", + "signature", + "mimeType", + "sizeOriginal", + "chunksTotal", + "chunksUploaded" + ] }, "bucket": { - "type": "integer", - "description": "Number of buckets to be migrated.", - "x-example": 20, - "format": "int32" + "description": "Bucket", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Bucket ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Bucket creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Bucket update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Bucket permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "fileSecurity": { + "type": "boolean", + "description": "Whether file-level security is enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "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" + ] + }, + "compression": { + "type": "string", + "description": "Compression algorithm choosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", + "x-example": "gzip" + }, + "encryption": { + "type": "boolean", + "description": "Bucket is encrypted.", + "x-example": false + }, + "antivirus": { + "type": "boolean", + "description": "Virus scanning is enabled.", + "x-example": false + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "fileSecurity", + "name", + "enabled", + "maximumFileSize", + "allowedFileExtensions", + "compression", + "encryption", + "antivirus" + ] + }, + "team": { + "description": "Team", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Team creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Team update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Team name.", + "x-example": "VIP" + }, + "total": { + "type": "integer", + "description": "Total number of team members.", + "x-example": 7, + "format": "int32" + }, + "prefs": { + "type": "object", + "description": "Team preferences as a key-value object", + "x-example": { + "theme": "pink", + "timezone": "UTC" + }, + "items": { + "type": "object", + "$ref": "#\/definitions\/preferences" + } + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "total", + "prefs" + ] + }, + "membership": { + "description": "Membership", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Membership ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Membership creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Membership update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" + }, + "userName": { + "type": "string", + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "John Doe" + }, + "userEmail": { + "type": "string", + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", + "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": "string", + "description": "Date, the user has been invited to join the team in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "joined": { + "type": "string", + "description": "Date, the user has accepted the invitation to join the team in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "confirm": { + "type": "boolean", + "description": "User confirmation status, true if the user has joined the team or false otherwise.", + "x-example": false + }, + "mfa": { + "type": "boolean", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", + "x-example": false + }, + "roles": { + "type": "array", + "description": "User list of roles", + "items": { + "type": "string" + }, + "x-example": [ + "owner" + ] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "userName", + "userEmail", + "teamId", + "teamName", + "invited", + "joined", + "confirm", + "mfa", + "roles" + ] }, "function": { - "type": "integer", - "description": "Number of functions to be migrated.", - "x-example": 20, - "format": "int32" + "description": "Function", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Function creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Function update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "execute": { + "type": "array", + "description": "Execution permissions.", + "items": { + "type": "string" + }, + "x-example": "users" + }, + "name": { + "type": "string", + "description": "Function name.", + "x-example": "My Function" + }, + "enabled": { + "type": "boolean", + "description": "Function enabled.", + "x-example": false + }, + "live": { + "type": "boolean", + "description": "Is the function deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the function to update it with the latest configuration.", + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project.", + "x-example": false + }, + "runtime": { + "type": "string", + "description": "Function execution runtime.", + "x-example": "python-3.8" + }, + "deployment": { + "type": "string", + "description": "Function's active deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { + "type": "string" + }, + "x-example": "users.read" + }, + "vars": { + "type": "array", + "description": "Function variables.", + "items": { + "type": "object", + "$ref": "#\/definitions\/variable" + }, + "x-example": [] + }, + "events": { + "type": "array", + "description": "Function trigger events.", + "items": { + "type": "string" + }, + "x-example": "account.create" + }, + "schedule": { + "type": "string", + "description": "Function execution schedule in CRON format.", + "x-example": "5 4 * * *" + }, + "timeout": { + "type": "integer", + "description": "Function execution timeout in seconds.", + "x-example": 300, + "format": "int32" + }, + "entrypoint": { + "type": "string", + "description": "The entrypoint file used to execute the deployment.", + "x-example": "index.js" + }, + "commands": { + "type": "string", + "description": "The build command used to build the deployment.", + "x-example": "npm install" + }, + "version": { + "type": "string", + "description": "Version of Open Runtimes used for the function.", + "x-example": "v2" + }, + "installationId": { + "type": "string", + "description": "Function VCS (Version Control System) installation id.", + "x-example": "6m40at4ejk5h2u9s1hboo" + }, + "providerRepositoryId": { + "type": "string", + "description": "VCS (Version Control System) Repository ID", + "x-example": "appwrite" + }, + "providerBranch": { + "type": "string", + "description": "VCS (Version Control System) branch name", + "x-example": "main" + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function in VCS (Version Control System) repository", + "x-example": "functions\/helloWorld" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", + "x-example": false + }, + "specification": { + "type": "string", + "description": "Machine specification for builds and executions.", + "x-example": "s-1vcpu-512mb" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "execute", + "name", + "enabled", + "live", + "logging", + "runtime", + "deployment", + "scopes", + "vars", + "events", + "schedule", + "timeout", + "entrypoint", + "commands", + "version", + "installationId", + "providerRepositoryId", + "providerBranch", + "providerRootDirectory", + "providerSilentMode", + "specification" + ] }, - "size": { - "type": "integer", - "description": "Size of files to be migrated in mb.", - "x-example": 30000, - "format": "int32" + "templateFunction": { + "description": "Template Function", + "type": "object", + "properties": { + "icon": { + "type": "string", + "description": "Function Template Icon.", + "x-example": "icon-lightning-bolt" + }, + "id": { + "type": "string", + "description": "Function Template ID.", + "x-example": "starter" + }, + "name": { + "type": "string", + "description": "Function Template Name.", + "x-example": "Starter function" + }, + "tagline": { + "type": "string", + "description": "Function Template Tagline.", + "x-example": "A simple function to get started." + }, + "permissions": { + "type": "array", + "description": "Execution permissions.", + "items": { + "type": "string" + }, + "x-example": "any" + }, + "events": { + "type": "array", + "description": "Function trigger events.", + "items": { + "type": "string" + }, + "x-example": "account.create" + }, + "cron": { + "type": "string", + "description": "Function execution schedult in CRON format.", + "x-example": "0 0 * * *" + }, + "timeout": { + "type": "integer", + "description": "Function execution timeout in seconds.", + "x-example": 300, + "format": "int32" + }, + "useCases": { + "type": "array", + "description": "Function use cases.", + "items": { + "type": "string" + }, + "x-example": "Starter" + }, + "runtimes": { + "type": "array", + "description": "List of runtimes that can be used with this template.", + "items": { + "type": "object", + "$ref": "#\/definitions\/templateRuntime" + }, + "x-example": [] + }, + "instructions": { + "type": "string", + "description": "Function Template Instructions.", + "x-example": "For documentation and instructions check out <link>." + }, + "vcsProvider": { + "type": "string", + "description": "VCS (Version Control System) Provider.", + "x-example": "github" + }, + "providerRepositoryId": { + "type": "string", + "description": "VCS (Version Control System) Repository ID", + "x-example": "templates" + }, + "providerOwner": { + "type": "string", + "description": "VCS (Version Control System) Owner.", + "x-example": "appwrite" + }, + "providerVersion": { + "type": "string", + "description": "VCS (Version Control System) branch version (tag).", + "x-example": "main" + }, + "variables": { + "type": "array", + "description": "Function variables.", + "items": { + "type": "object", + "$ref": "#\/definitions\/templateVariable" + }, + "x-example": [] + }, + "scopes": { + "type": "array", + "description": "Function scopes.", + "items": { + "type": "string" + }, + "x-example": "users.read" + } + }, + "required": [ + "icon", + "id", + "name", + "tagline", + "permissions", + "events", + "cron", + "timeout", + "useCases", + "runtimes", + "instructions", + "vcsProvider", + "providerRepositoryId", + "providerOwner", + "providerVersion", + "variables", + "scopes" + ] }, - "version": { - "type": "string", - "description": "Version of the Appwrite instance to be migrated.", - "x-example": "1.4.0" + "templateRuntime": { + "description": "Template Runtime", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Runtime Name.", + "x-example": "node-19.0" + }, + "commands": { + "type": "string", + "description": "The build command used to build the deployment.", + "x-example": "npm install" + }, + "entrypoint": { + "type": "string", + "description": "The entrypoint file used to execute the deployment.", + "x-example": "index.js" + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function in VCS (Version Control System) repository", + "x-example": "node\/starter" + } + }, + "required": [ + "name", + "commands", + "entrypoint", + "providerRootDirectory" + ] + }, + "templateVariable": { + "description": "Template Variable", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Variable Name.", + "x-example": "APPWRITE_DATABASE_ID" + }, + "description": { + "type": "string", + "description": "Variable Description.", + "x-example": "The ID of the Appwrite database that contains the collection to sync." + }, + "value": { + "type": "string", + "description": "Variable Value.", + "x-example": "512" + }, + "placeholder": { + "type": "string", + "description": "Variable Placeholder.", + "x-example": "64a55...7b912" + }, + "required": { + "type": "boolean", + "description": "Is the variable required?", + "x-example": false + }, + "type": { + "type": "string", + "description": "Variable Type.", + "x-example": "password" + } + }, + "required": [ + "name", + "description", + "value", + "placeholder", + "required", + "type" + ] + }, + "installation": { + "description": "Installation", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Function creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Function update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "provider": { + "type": "string", + "description": "VCS (Version Control System) provider name.", + "x-example": "github" + }, + "organization": { + "type": "string", + "description": "VCS (Version Control System) organization name.", + "x-example": "appwrite" + }, + "providerInstallationId": { + "type": "string", + "description": "VCS (Version Control System) installation ID.", + "x-example": "5322" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "provider", + "organization", + "providerInstallationId" + ] + }, + "providerRepository": { + "description": "ProviderRepository", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "VCS (Version Control System) repository ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "VCS (Version Control System) repository name.", + "x-example": "appwrite" + }, + "organization": { + "type": "string", + "description": "VCS (Version Control System) organization name", + "x-example": "appwrite" + }, + "provider": { + "type": "string", + "description": "VCS (Version Control System) provider name.", + "x-example": "github" + }, + "private": { + "type": "boolean", + "description": "Is VCS (Version Control System) repository private?", + "x-example": true + }, + "runtime": { + "type": "string", + "description": "Auto-detected runtime suggestion. Empty if getting response of getRuntime().", + "x-example": "node" + }, + "pushedAt": { + "type": "string", + "description": "Last commit date in ISO 8601 format.", + "x-example": "datetime" + } + }, + "required": [ + "id", + "name", + "organization", + "provider", + "private", + "runtime", + "pushedAt" + ] + }, + "detection": { + "description": "Detection", + "type": "object", + "properties": { + "runtime": { + "type": "string", + "description": "Runtime", + "x-example": "node" + } + }, + "required": [ + "runtime" + ] + }, + "vcsContent": { + "description": "VcsContents", + "type": "object", + "properties": { + "size": { + "type": "integer", + "description": "Content size in bytes. Only files have size, and for directories, 0 is returned.", + "x-example": 1523, + "format": "int32", + "x-nullable": true + }, + "isDirectory": { + "type": "boolean", + "description": "If a content is a directory. Directories can be used to check nested contents.", + "x-example": true, + "x-nullable": true + }, + "name": { + "type": "string", + "description": "Name of directory or file.", + "x-example": "Main.java" + } + }, + "required": [ + "name" + ] + }, + "branch": { + "description": "Branch", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Branch Name.", + "x-example": "main" + } + }, + "required": [ + "name" + ] + }, + "runtime": { + "description": "Runtime", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Runtime ID.", + "x-example": "python-3.8" + }, + "key": { + "type": "string", + "description": "Parent runtime key.", + "x-example": "python" + }, + "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", + "key", + "name", + "version", + "base", + "image", + "logo", + "supports" + ] + }, + "deployment": { + "description": "Deployment", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Deployment update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "type": { + "type": "string", + "description": "Type of deployment.", + "x-example": "vcs" + }, + "resourceId": { + "type": "string", + "description": "Resource ID.", + "x-example": "5e5ea6g16897e" + }, + "resourceType": { + "type": "string", + "description": "Resource type.", + "x-example": "functions" + }, + "entrypoint": { + "type": "string", + "description": "The entrypoint file to use to execute the deployment code.", + "x-example": "index.js" + }, + "size": { + "type": "integer", + "description": "The code size in bytes.", + "x-example": 128, + "format": "int32" + }, + "buildSize": { + "type": "integer", + "description": "The build output 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. Possible values are \"processing\", \"building\", \"waiting\", \"ready\", and \"failed\".", + "x-example": "ready" + }, + "buildLogs": { + "type": "string", + "description": "The build logs.", + "x-example": "Compiling source files..." + }, + "buildTime": { + "type": "integer", + "description": "The current build time in seconds.", + "x-example": 128, + "format": "int32" + }, + "providerRepositoryName": { + "type": "string", + "description": "The name of the vcs provider repository", + "x-example": "database" + }, + "providerRepositoryOwner": { + "type": "string", + "description": "The name of the vcs provider repository owner", + "x-example": "utopia" + }, + "providerRepositoryUrl": { + "type": "string", + "description": "The url of the vcs provider repository", + "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" + }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, + "providerCommitHash": { + "type": "string", + "description": "The commit hash of the vcs commit", + "x-example": "7c3f25d" + }, + "providerCommitAuthorUrl": { + "type": "string", + "description": "The url of vcs commit author", + "x-example": "https:\/\/github.com\/vermakhushboo" + }, + "providerCommitAuthor": { + "type": "string", + "description": "The name of vcs commit author", + "x-example": "Khushboo Verma" + }, + "providerCommitMessage": { + "type": "string", + "description": "The commit message", + "x-example": "Update index.js" + }, + "providerCommitUrl": { + "type": "string", + "description": "The url of the vcs commit", + "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" + }, + "providerBranchUrl": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "type", + "resourceId", + "resourceType", + "entrypoint", + "size", + "buildSize", + "buildId", + "activate", + "status", + "buildLogs", + "buildTime", + "providerRepositoryName", + "providerRepositoryOwner", + "providerRepositoryUrl", + "providerBranch", + "providerCommitHash", + "providerCommitAuthorUrl", + "providerCommitAuthor", + "providerCommitMessage", + "providerCommitUrl", + "providerBranchUrl" + ] + }, + "execution": { + "description": "Execution", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Execution ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Execution creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Execution upate date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Execution roles.", + "items": { + "type": "string" + }, + "x-example": [ + "any" + ] + }, + "functionId": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea6g16897e" + }, + "trigger": { + "type": "string", + "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", + "x-example": "http" + }, + "status": { + "type": "string", + "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", + "x-example": "processing" + }, + "requestMethod": { + "type": "string", + "description": "HTTP request method type.", + "x-example": "GET" + }, + "requestPath": { + "type": "string", + "description": "HTTP request path and query.", + "x-example": "\/articles?id=5" + }, + "requestHeaders": { + "type": "array", + "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "items": { + "type": "object", + "$ref": "#\/definitions\/headers" + }, + "x-example": [ + { + "Content-Type": "application\/json" + } + ] + }, + "responseStatusCode": { + "type": "integer", + "description": "HTTP response status code.", + "x-example": 200, + "format": "int32" + }, + "responseBody": { + "type": "string", + "description": "HTTP response body. This will return empty unless execution is created as synchronous.", + "x-example": "" + }, + "responseHeaders": { + "type": "array", + "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "items": { + "type": "object", + "$ref": "#\/definitions\/headers" + }, + "x-example": [ + { + "Content-Type": "application\/json" + } + ] + }, + "logs": { + "type": "string", + "description": "Function logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "errors": { + "type": "string", + "description": "Function errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "duration": { + "type": "number", + "description": "Function execution duration in seconds.", + "x-example": 0.4, + "format": "double" + }, + "scheduledAt": { + "type": "string", + "description": "The scheduled time for execution. If left empty, execution will be queued immediately.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "functionId", + "trigger", + "status", + "requestMethod", + "requestPath", + "requestHeaders", + "responseStatusCode", + "responseBody", + "responseHeaders", + "logs", + "errors", + "duration" + ] + }, + "build": { + "description": "Build", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Build ID.", + "x-example": "5e5ea5c16897e" + }, + "deploymentId": { + "type": "string", + "description": "The deployment that created this build.", + "x-example": "5e5ea5c16897e" + }, + "status": { + "type": "string", + "description": "The build status. There are a few different types and each one means something different. \\nFailed - The deployment build has failed. More details can usually be found in buildStderr\\nReady - The deployment build was successful and the deployment is ready to be deployed\\nProcessing - The deployment is currently waiting to have a build triggered\\nBuilding - The deployment is currently being built", + "x-example": "ready" + }, + "stdout": { + "type": "string", + "description": "The stdout of the build.", + "x-example": "" + }, + "stderr": { + "type": "string", + "description": "The stderr of the build.", + "x-example": "" + }, + "startTime": { + "type": "string", + "description": "The deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "endTime": { + "type": "string", + "description": "The time the build was finished in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "duration": { + "type": "integer", + "description": "The build duration in seconds.", + "x-example": 0, + "format": "int32" + }, + "size": { + "type": "integer", + "description": "The code size in bytes.", + "x-example": 128, + "format": "int32" + } + }, + "required": [ + "$id", + "deploymentId", + "status", + "stdout", + "stderr", + "startTime", + "endTime", + "duration", + "size" + ] + }, + "project": { + "description": "Project", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Project ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Project creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Project update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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" + }, + "authDuration": { + "type": "integer", + "description": "Session duration in seconds.", + "x-example": 60, + "format": "int32" + }, + "authLimit": { + "type": "integer", + "description": "Max users allowed. 0 is unlimited.", + "x-example": 100, + "format": "int32" + }, + "authSessionsLimit": { + "type": "integer", + "description": "Max sessions allowed per user. 100 maximum.", + "x-example": 10, + "format": "int32" + }, + "authPasswordHistory": { + "type": "integer", + "description": "Max allowed passwords in the history list per user. Max passwords limit allowed in history is 20. Use 0 for disabling password history.", + "x-example": 5, + "format": "int32" + }, + "authPasswordDictionary": { + "type": "boolean", + "description": "Whether or not to check user's password against most commonly used passwords.", + "x-example": true + }, + "authPersonalDataCheck": { + "type": "boolean", + "description": "Whether or not to check the user password for similarity with their personal data.", + "x-example": true + }, + "authMockNumbers": { + "type": "array", + "description": "An array of mock numbers and their corresponding verification codes (OTPs).", + "items": { + "type": "object", + "$ref": "#\/definitions\/mockNumber" + }, + "x-example": [ + {} + ] + }, + "authSessionAlerts": { + "type": "boolean", + "description": "Whether or not to send session alert emails to users.", + "x-example": true + }, + "authMembershipsUserName": { + "type": "boolean", + "description": "Whether or not to show user names in the teams membership response.", + "x-example": true + }, + "authMembershipsUserEmail": { + "type": "boolean", + "description": "Whether or not to show user emails in the teams membership response.", + "x-example": true + }, + "authMembershipsMfa": { + "type": "boolean", + "description": "Whether or not to show user MFA status in the teams membership response.", + "x-example": true + }, + "oAuthProviders": { + "type": "array", + "description": "List of Auth Providers.", + "items": { + "type": "object", + "$ref": "#\/definitions\/authProvider" + }, + "x-example": [ + {} + ] + }, + "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": {} + }, + "smtpEnabled": { + "type": "boolean", + "description": "Status for custom SMTP", + "x-example": false + }, + "smtpSenderName": { + "type": "string", + "description": "SMTP sender name", + "x-example": "John Appwrite" + }, + "smtpSenderEmail": { + "type": "string", + "description": "SMTP sender email", + "x-example": "john@appwrite.io" + }, + "smtpReplyTo": { + "type": "string", + "description": "SMTP reply to email", + "x-example": "support@appwrite.io" + }, + "smtpHost": { + "type": "string", + "description": "SMTP server host name", + "x-example": "mail.appwrite.io" + }, + "smtpPort": { + "type": "integer", + "description": "SMTP server port", + "x-example": 25, + "format": "int32" + }, + "smtpUsername": { + "type": "string", + "description": "SMTP server username", + "x-example": "emailuser" + }, + "smtpPassword": { + "type": "string", + "description": "SMTP server password", + "x-example": "securepassword" + }, + "smtpSecure": { + "type": "string", + "description": "SMTP server secure protocol", + "x-example": "tls" + }, + "pingCount": { + "type": "integer", + "description": "Number of times the ping was received for this project.", + "x-example": 1, + "format": "int32" + }, + "pingedAt": { + "type": "string", + "description": "Last ping datetime in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "authEmailPassword": { + "type": "boolean", + "description": "Email\/Password auth method status", + "x-example": true + }, + "authUsersAuthMagicURL": { + "type": "boolean", + "description": "Magic URL auth method status", + "x-example": true + }, + "authEmailOtp": { + "type": "boolean", + "description": "Email (OTP) auth method status", + "x-example": true + }, + "authAnonymous": { + "type": "boolean", + "description": "Anonymous auth method status", + "x-example": true + }, + "authInvites": { + "type": "boolean", + "description": "Invites auth method status", + "x-example": true + }, + "authJWT": { + "type": "boolean", + "description": "JWT auth method status", + "x-example": true + }, + "authPhone": { + "type": "boolean", + "description": "Phone auth method status", + "x-example": true + }, + "serviceStatusForAccount": { + "type": "boolean", + "description": "Account service status", + "x-example": true + }, + "serviceStatusForAvatars": { + "type": "boolean", + "description": "Avatars service status", + "x-example": true + }, + "serviceStatusForDatabases": { + "type": "boolean", + "description": "Databases service status", + "x-example": true + }, + "serviceStatusForLocale": { + "type": "boolean", + "description": "Locale service status", + "x-example": true + }, + "serviceStatusForHealth": { + "type": "boolean", + "description": "Health service status", + "x-example": true + }, + "serviceStatusForStorage": { + "type": "boolean", + "description": "Storage service status", + "x-example": true + }, + "serviceStatusForTeams": { + "type": "boolean", + "description": "Teams service status", + "x-example": true + }, + "serviceStatusForUsers": { + "type": "boolean", + "description": "Users service status", + "x-example": true + }, + "serviceStatusForFunctions": { + "type": "boolean", + "description": "Functions service status", + "x-example": true + }, + "serviceStatusForGraphql": { + "type": "boolean", + "description": "GraphQL service status", + "x-example": true + }, + "serviceStatusForMessaging": { + "type": "boolean", + "description": "Messaging service status", + "x-example": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "description", + "teamId", + "logo", + "url", + "legalName", + "legalCountry", + "legalState", + "legalCity", + "legalAddress", + "legalTaxId", + "authDuration", + "authLimit", + "authSessionsLimit", + "authPasswordHistory", + "authPasswordDictionary", + "authPersonalDataCheck", + "authMockNumbers", + "authSessionAlerts", + "authMembershipsUserName", + "authMembershipsUserEmail", + "authMembershipsMfa", + "oAuthProviders", + "platforms", + "webhooks", + "keys", + "smtpEnabled", + "smtpSenderName", + "smtpSenderEmail", + "smtpReplyTo", + "smtpHost", + "smtpPort", + "smtpUsername", + "smtpPassword", + "smtpSecure", + "pingCount", + "pingedAt", + "authEmailPassword", + "authUsersAuthMagicURL", + "authEmailOtp", + "authAnonymous", + "authInvites", + "authJWT", + "authPhone", + "serviceStatusForAccount", + "serviceStatusForAvatars", + "serviceStatusForDatabases", + "serviceStatusForLocale", + "serviceStatusForHealth", + "serviceStatusForStorage", + "serviceStatusForTeams", + "serviceStatusForUsers", + "serviceStatusForFunctions", + "serviceStatusForGraphql", + "serviceStatusForMessaging" + ] + }, + "webhook": { + "description": "Webhook", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Webhook ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Webhook creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Webhook update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Webhook name.", + "x-example": "My Webhook" + }, + "url": { + "type": "string", + "description": "Webhook URL endpoint.", + "x-example": "https:\/\/example.com\/webhook" + }, + "events": { + "type": "array", + "description": "Webhook trigger events.", + "items": { + "type": "string" + }, + "x-example": "database.collections.update" + }, + "security": { + "type": "boolean", + "description": "Indicated if SSL \/ TLS Certificate verification is enabled.", + "x-example": true + }, + "httpUser": { + "type": "string", + "description": "HTTP basic authentication username.", + "x-example": "username" + }, + "httpPass": { + "type": "string", + "description": "HTTP basic authentication password.", + "x-example": "password" + }, + "signatureKey": { + "type": "string", + "description": "Signature key which can be used to validated incoming", + "x-example": "ad3d581ca230e2b7059c545e5a" + }, + "enabled": { + "type": "boolean", + "description": "Indicates if this webhook is enabled.", + "x-example": true + }, + "logs": { + "type": "string", + "description": "Webhook error logs from the most recent failure.", + "x-example": "Failed to connect to remote server." + }, + "attempts": { + "type": "integer", + "description": "Number of consecutive failed webhook attempts.", + "x-example": 10, + "format": "int32" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "url", + "events", + "security", + "httpUser", + "httpPass", + "signatureKey", + "enabled", + "logs", + "attempts" + ] + }, + "key": { + "description": "Key", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Key ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Key creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Key update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Key name.", + "x-example": "My API Key" + }, + "expire": { + "type": "string", + "description": "Key expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { + "type": "string" + }, + "x-example": "users.read" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "x-example": "919c2d18fb5d4...a2ae413da83346ad2" + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "sdks": { + "type": "array", + "description": "List of SDK user agents that used this key.", + "items": { + "type": "string" + }, + "x-example": "appwrite:flutter" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "expire", + "scopes", + "secret", + "accessedAt", + "sdks" + ] + }, + "mockNumber": { + "description": "Mock Number", + "type": "object", + "properties": { + "phone": { + "type": "string", + "description": "Mock phone number for testing phone authentication. Useful for testing phone authentication without sending an SMS.", + "x-example": "+1612842323" + }, + "otp": { + "type": "string", + "description": "Mock OTP for the number. ", + "x-example": "123456" + } + }, + "required": [ + "phone", + "otp" + ] + }, + "authProvider": { + "description": "AuthProvider", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Auth Provider.", + "x-example": "github" + }, + "name": { + "type": "string", + "description": "Auth Provider name.", + "x-example": "GitHub" + }, + "appId": { + "type": "string", + "description": "OAuth 2.0 application ID.", + "x-example": "259125845563242502" + }, + "secret": { + "type": "string", + "description": "OAuth 2.0 application secret. Might be JSON string if provider requires extra configuration.", + "x-example": "Bpw_g9c2TGXxfgLshDbSaL8tsCcqgczQ" + }, + "enabled": { + "type": "boolean", + "description": "Auth Provider is active and can be used to create session.", + "x-example": "" + } + }, + "required": [ + "key", + "name", + "appId", + "secret", + "enabled" + ] + }, + "platform": { + "description": "Platform", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "x-example": "My Web App" + }, + "type": { + "type": "string", + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.", + "x-example": "web" + }, + "key": { + "type": "string", + "description": "Platform Key. iOS bundle ID or Android package name. Empty string for other platforms.", + "x-example": "com.company.appname" + }, + "store": { + "type": "string", + "description": "App store or Google Play store ID.", + "x-example": "" + }, + "hostname": { + "type": "string", + "description": "Web app hostname. Empty string for other platforms.", + "x-example": true + }, + "httpUser": { + "type": "string", + "description": "HTTP basic authentication username.", + "x-example": "username" + }, + "httpPass": { + "type": "string", + "description": "HTTP basic authentication password.", + "x-example": "password" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "key", + "store", + "hostname", + "httpUser", + "httpPass" + ] + }, + "variable": { + "description": "Variable", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Variable ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Variable creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Variable creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "key": { + "type": "string", + "description": "Variable key.", + "x-example": "API_KEY" + }, + "value": { + "type": "string", + "description": "Variable value.", + "x-example": "myPa$$word1" + }, + "resourceType": { + "type": "string", + "description": "Service to which the variable belongs. Possible values are \"project\", \"function\"", + "x-example": "function" + }, + "resourceId": { + "type": "string", + "description": "ID of resource to which the variable belongs. If resourceType is \"project\", it is empty. If resourceType is \"function\", it is ID of the function.", + "x-example": "myAwesomeFunction" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "value", + "resourceType", + "resourceId" + ] + }, + "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": { + "name": { + "type": "string", + "description": "Name of the service.", + "x-example": "database" + }, + "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": [ + "name", + "ping", + "status" + ] + }, + "healthCertificate": { + "description": "Health Certificate", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Certificate name", + "x-example": "\/CN=www.google.com" + }, + "subjectSN": { + "type": "string", + "description": "Subject SN", + "x-example": "" + }, + "issuerOrganisation": { + "type": "string", + "description": "Issuer organisation", + "x-example": "" + }, + "validFrom": { + "type": "string", + "description": "Valid from", + "x-example": "1704200998" + }, + "validTo": { + "type": "string", + "description": "Valid to", + "x-example": "1711458597" + }, + "signatureTypeSN": { + "type": "string", + "description": "Signature type SN", + "x-example": "RSA-SHA256" + } + }, + "required": [ + "name", + "subjectSN", + "issuerOrganisation", + "validFrom", + "validTo", + "signatureTypeSN" + ] + }, + "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" + ] + }, + "metric": { + "description": "Metric", + "type": "object", + "properties": { + "value": { + "type": "integer", + "description": "The value of this metric at the timestamp.", + "x-example": 1, + "format": "int32" + }, + "date": { + "type": "string", + "description": "The date at which this metric was aggregated in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "value", + "date" + ] + }, + "metricBreakdown": { + "description": "Metric Breakdown", + "type": "object", + "properties": { + "resourceId": { + "type": "string", + "description": "Resource ID.", + "x-example": "5e5ea5c16897e", + "x-nullable": true + }, + "name": { + "type": "string", + "description": "Resource name.", + "x-example": "Documents" + }, + "value": { + "type": "integer", + "description": "The value of this metric at the timestamp.", + "x-example": 1, + "format": "int32" + }, + "estimate": { + "type": "number", + "description": "The estimated value of this metric at the end of the period.", + "x-example": 1, + "format": "double", + "x-nullable": true + } + }, + "required": [ + "name", + "value" + ] + }, + "usageDatabases": { + "description": "UsageDatabases", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "databasesTotal": { + "type": "integer", + "description": "Total aggregated number of databases.", + "x-example": 0, + "format": "int32" + }, + "collectionsTotal": { + "type": "integer", + "description": "Total aggregated number of collections.", + "x-example": 0, + "format": "int32" + }, + "documentsTotal": { + "type": "integer", + "description": "Total aggregated number of documents.", + "x-example": 0, + "format": "int32" + }, + "storageTotal": { + "type": "integer", + "description": "Total aggregated number of total databases storage in bytes.", + "x-example": 0, + "format": "int32" + }, + "databasesReadsTotal": { + "type": "integer", + "description": "Total number of databases reads.", + "x-example": 0, + "format": "int32" + }, + "databasesWritesTotal": { + "type": "integer", + "description": "Total number of databases writes.", + "x-example": 0, + "format": "int32" + }, + "databases": { + "type": "array", + "description": "Aggregated number of databases per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "collections": { + "type": "array", + "description": "Aggregated number of collections per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "documents": { + "type": "array", + "description": "Aggregated number of documents per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "storage": { + "type": "array", + "description": "An array of the aggregated number of databases storage in bytes per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "databasesReads": { + "type": "array", + "description": "An array of aggregated number of database reads.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "databasesWrites": { + "type": "array", + "description": "An array of aggregated number of database writes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "databasesTotal", + "collectionsTotal", + "documentsTotal", + "storageTotal", + "databasesReadsTotal", + "databasesWritesTotal", + "databases", + "collections", + "documents", + "storage", + "databasesReads", + "databasesWrites" + ] + }, + "usageDatabase": { + "description": "UsageDatabase", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "collectionsTotal": { + "type": "integer", + "description": "Total aggregated number of collections.", + "x-example": 0, + "format": "int32" + }, + "documentsTotal": { + "type": "integer", + "description": "Total aggregated number of documents.", + "x-example": 0, + "format": "int32" + }, + "storageTotal": { + "type": "integer", + "description": "Total aggregated number of total storage used in bytes.", + "x-example": 0, + "format": "int32" + }, + "databaseReadsTotal": { + "type": "integer", + "description": "Total number of databases reads.", + "x-example": 0, + "format": "int32" + }, + "databaseWritesTotal": { + "type": "integer", + "description": "Total number of databases writes.", + "x-example": 0, + "format": "int32" + }, + "collections": { + "type": "array", + "description": "Aggregated number of collections per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "documents": { + "type": "array", + "description": "Aggregated number of documents per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "storage": { + "type": "array", + "description": "Aggregated storage used in bytes per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "databaseReads": { + "type": "array", + "description": "An array of aggregated number of database reads.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "databaseWrites": { + "type": "array", + "description": "An array of aggregated number of database writes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "collectionsTotal", + "documentsTotal", + "storageTotal", + "databaseReadsTotal", + "databaseWritesTotal", + "collections", + "documents", + "storage", + "databaseReads", + "databaseWrites" + ] + }, + "usageCollection": { + "description": "UsageCollection", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "documentsTotal": { + "type": "integer", + "description": "Total aggregated number of of documents.", + "x-example": 0, + "format": "int32" + }, + "documents": { + "type": "array", + "description": "Aggregated number of documents per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "documentsTotal", + "documents" + ] + }, + "usageUsers": { + "description": "UsageUsers", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "usersTotal": { + "type": "integer", + "description": "Total aggregated number of statistics of users.", + "x-example": 0, + "format": "int32" + }, + "sessionsTotal": { + "type": "integer", + "description": "Total aggregated number of active sessions.", + "x-example": 0, + "format": "int32" + }, + "users": { + "type": "array", + "description": "Aggregated number of users per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "sessions": { + "type": "array", + "description": "Aggregated number of active sessions per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "usersTotal", + "sessionsTotal", + "users", + "sessions" + ] + }, + "usageStorage": { + "description": "StorageUsage", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "bucketsTotal": { + "type": "integer", + "description": "Total aggregated number of buckets", + "x-example": 0, + "format": "int32" + }, + "filesTotal": { + "type": "integer", + "description": "Total aggregated number of files.", + "x-example": 0, + "format": "int32" + }, + "filesStorageTotal": { + "type": "integer", + "description": "Total aggregated number of files storage (in bytes).", + "x-example": 0, + "format": "int32" + }, + "buckets": { + "type": "array", + "description": "Aggregated number of buckets per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "files": { + "type": "array", + "description": "Aggregated number of files per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "storage": { + "type": "array", + "description": "Aggregated number of files storage (in bytes) per period .", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "bucketsTotal", + "filesTotal", + "filesStorageTotal", + "buckets", + "files", + "storage" + ] + }, + "usageBuckets": { + "description": "UsageBuckets", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "filesTotal": { + "type": "integer", + "description": "Total aggregated number of bucket files.", + "x-example": 0, + "format": "int32" + }, + "filesStorageTotal": { + "type": "integer", + "description": "Total aggregated number of bucket files storage (in bytes).", + "x-example": 0, + "format": "int32" + }, + "files": { + "type": "array", + "description": "Aggregated number of bucket files per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "storage": { + "type": "array", + "description": "Aggregated number of bucket storage files (in bytes) per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "filesTotal", + "filesStorageTotal", + "files", + "storage" + ] + }, + "usageFunctions": { + "description": "UsageFunctions", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "functionsTotal": { + "type": "integer", + "description": "Total aggregated number of functions.", + "x-example": 0, + "format": "int32" + }, + "deploymentsTotal": { + "type": "integer", + "description": "Total aggregated number of functions deployments.", + "x-example": 0, + "format": "int32" + }, + "deploymentsStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of functions deployment storage.", + "x-example": 0, + "format": "int32" + }, + "buildsTotal": { + "type": "integer", + "description": "Total aggregated number of functions build.", + "x-example": 0, + "format": "int32" + }, + "buildsStorageTotal": { + "type": "integer", + "description": "total aggregated sum of functions build storage.", + "x-example": 0, + "format": "int32" + }, + "buildsTimeTotal": { + "type": "integer", + "description": "Total aggregated sum of functions build compute time.", + "x-example": 0, + "format": "int32" + }, + "buildsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated sum of functions build mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "executionsTotal": { + "type": "integer", + "description": "Total aggregated number of functions execution.", + "x-example": 0, + "format": "int32" + }, + "executionsTimeTotal": { + "type": "integer", + "description": "Total aggregated sum of functions execution compute time.", + "x-example": 0, + "format": "int32" + }, + "executionsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated sum of functions execution mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "functions": { + "type": "array", + "description": "Aggregated number of functions per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": 0 + }, + "deployments": { + "type": "array", + "description": "Aggregated number of functions deployment per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "deploymentsStorage": { + "type": "array", + "description": "Aggregated number of functions deployment storage per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "builds": { + "type": "array", + "description": "Aggregated number of functions build per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsStorage": { + "type": "array", + "description": "Aggregated sum of functions build storage per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsTime": { + "type": "array", + "description": "Aggregated sum of functions build compute time per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsMbSeconds": { + "type": "array", + "description": "Aggregated sum of functions build mbSeconds per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "executions": { + "type": "array", + "description": "Aggregated number of functions execution per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "executionsTime": { + "type": "array", + "description": "Aggregated number of functions execution compute time per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "executionsMbSeconds": { + "type": "array", + "description": "Aggregated number of functions mbSeconds per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "functionsTotal", + "deploymentsTotal", + "deploymentsStorageTotal", + "buildsTotal", + "buildsStorageTotal", + "buildsTimeTotal", + "buildsMbSecondsTotal", + "executionsTotal", + "executionsTimeTotal", + "executionsMbSecondsTotal", + "functions", + "deployments", + "deploymentsStorage", + "builds", + "buildsStorage", + "buildsTime", + "buildsMbSeconds", + "executions", + "executionsTime", + "executionsMbSeconds" + ] + }, + "usageFunction": { + "description": "UsageFunction", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "The time range of the usage stats.", + "x-example": "30d" + }, + "deploymentsTotal": { + "type": "integer", + "description": "Total aggregated number of function deployments.", + "x-example": 0, + "format": "int32" + }, + "deploymentsStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of function deployments storage.", + "x-example": 0, + "format": "int32" + }, + "buildsTotal": { + "type": "integer", + "description": "Total aggregated number of function builds.", + "x-example": 0, + "format": "int32" + }, + "buildsStorageTotal": { + "type": "integer", + "description": "total aggregated sum of function builds storage.", + "x-example": 0, + "format": "int32" + }, + "buildsTimeTotal": { + "type": "integer", + "description": "Total aggregated sum of function builds compute time.", + "x-example": 0, + "format": "int32" + }, + "buildsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated sum of function builds mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "executionsTotal": { + "type": "integer", + "description": "Total aggregated number of function executions.", + "x-example": 0, + "format": "int32" + }, + "executionsTimeTotal": { + "type": "integer", + "description": "Total aggregated sum of function executions compute time.", + "x-example": 0, + "format": "int32" + }, + "executionsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated sum of function executions mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "deployments": { + "type": "array", + "description": "Aggregated number of function deployments per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "deploymentsStorage": { + "type": "array", + "description": "Aggregated number of function deployments storage per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "builds": { + "type": "array", + "description": "Aggregated number of function builds per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsStorage": { + "type": "array", + "description": "Aggregated sum of function builds storage per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsTime": { + "type": "array", + "description": "Aggregated sum of function builds compute time per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsMbSeconds": { + "type": "array", + "description": "Aggregated number of function builds mbSeconds per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "executions": { + "type": "array", + "description": "Aggregated number of function executions per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "executionsTime": { + "type": "array", + "description": "Aggregated number of function executions compute time per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "executionsMbSeconds": { + "type": "array", + "description": "Aggregated number of function mbSeconds per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "deploymentsTotal", + "deploymentsStorageTotal", + "buildsTotal", + "buildsStorageTotal", + "buildsTimeTotal", + "buildsMbSecondsTotal", + "executionsTotal", + "executionsTimeTotal", + "executionsMbSecondsTotal", + "deployments", + "deploymentsStorage", + "builds", + "buildsStorage", + "buildsTime", + "buildsMbSeconds", + "executions", + "executionsTime", + "executionsMbSeconds" + ] + }, + "usageProject": { + "description": "UsageProject", + "type": "object", + "properties": { + "executionsTotal": { + "type": "integer", + "description": "Total aggregated number of function executions.", + "x-example": 0, + "format": "int32" + }, + "documentsTotal": { + "type": "integer", + "description": "Total aggregated number of documents.", + "x-example": 0, + "format": "int32" + }, + "databasesTotal": { + "type": "integer", + "description": "Total aggregated number of databases.", + "x-example": 0, + "format": "int32" + }, + "databasesStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of databases storage size (in bytes).", + "x-example": 0, + "format": "int32" + }, + "usersTotal": { + "type": "integer", + "description": "Total aggregated number of users.", + "x-example": 0, + "format": "int32" + }, + "filesStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of files storage size (in bytes).", + "x-example": 0, + "format": "int32" + }, + "functionsStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of functions storage size (in bytes).", + "x-example": 0, + "format": "int32" + }, + "buildsStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of builds storage size (in bytes).", + "x-example": 0, + "format": "int32" + }, + "deploymentsStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of deployments storage size (in bytes).", + "x-example": 0, + "format": "int32" + }, + "bucketsTotal": { + "type": "integer", + "description": "Total aggregated number of buckets.", + "x-example": 0, + "format": "int32" + }, + "executionsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated number of function executions mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "buildsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated number of function builds mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "databasesReadsTotal": { + "type": "integer", + "description": "Total number of databases reads.", + "x-example": 0, + "format": "int32" + }, + "databasesWritesTotal": { + "type": "integer", + "description": "Total number of databases writes.", + "x-example": 0, + "format": "int32" + }, + "requests": { + "type": "array", + "description": "Aggregated number of requests per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "network": { + "type": "array", + "description": "Aggregated number of consumed bandwidth per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "users": { + "type": "array", + "description": "Aggregated number of users per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "executions": { + "type": "array", + "description": "Aggregated number of executions per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "executionsBreakdown": { + "type": "array", + "description": "Aggregated breakdown in totals of executions by functions.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metricBreakdown" + }, + "x-example": [] + }, + "bucketsBreakdown": { + "type": "array", + "description": "Aggregated breakdown in totals of usage by buckets.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metricBreakdown" + }, + "x-example": [] + }, + "databasesStorageBreakdown": { + "type": "array", + "description": "An array of the aggregated breakdown of storage usage by databases.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metricBreakdown" + }, + "x-example": [] + }, + "executionsMbSecondsBreakdown": { + "type": "array", + "description": "Aggregated breakdown in totals of execution mbSeconds by functions.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metricBreakdown" + }, + "x-example": [] + }, + "buildsMbSecondsBreakdown": { + "type": "array", + "description": "Aggregated breakdown in totals of build mbSeconds by functions.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metricBreakdown" + }, + "x-example": [] + }, + "functionsStorageBreakdown": { + "type": "array", + "description": "Aggregated breakdown in totals of functions storage size (in bytes).", + "items": { + "type": "object", + "$ref": "#\/definitions\/metricBreakdown" + }, + "x-example": [] + }, + "authPhoneTotal": { + "type": "integer", + "description": "Total aggregated number of phone auth.", + "x-example": 0, + "format": "int32" + }, + "authPhoneEstimate": { + "type": "number", + "description": "Estimated total aggregated cost of phone auth.", + "x-example": 0, + "format": "double" + }, + "authPhoneCountryBreakdown": { + "type": "array", + "description": "Aggregated breakdown in totals of phone auth by country.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metricBreakdown" + }, + "x-example": [] + }, + "databasesReads": { + "type": "array", + "description": "An array of aggregated number of database reads.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "databasesWrites": { + "type": "array", + "description": "An array of aggregated number of database writes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "executionsTotal", + "documentsTotal", + "databasesTotal", + "databasesStorageTotal", + "usersTotal", + "filesStorageTotal", + "functionsStorageTotal", + "buildsStorageTotal", + "deploymentsStorageTotal", + "bucketsTotal", + "executionsMbSecondsTotal", + "buildsMbSecondsTotal", + "databasesReadsTotal", + "databasesWritesTotal", + "requests", + "network", + "users", + "executions", + "executionsBreakdown", + "bucketsBreakdown", + "databasesStorageBreakdown", + "executionsMbSecondsBreakdown", + "buildsMbSecondsBreakdown", + "functionsStorageBreakdown", + "authPhoneTotal", + "authPhoneEstimate", + "authPhoneCountryBreakdown", + "databasesReads", + "databasesWrites" + ] + }, + "headers": { + "description": "Headers", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Header name.", + "x-example": "Content-Type" + }, + "value": { + "type": "string", + "description": "Header value.", + "x-example": "application\/json" + } + }, + "required": [ + "name", + "value" + ] + }, + "specification": { + "description": "Specification", + "type": "object", + "properties": { + "memory": { + "type": "integer", + "description": "Memory size in MB.", + "x-example": 512, + "format": "int32" + }, + "cpus": { + "type": "number", + "description": "Number of CPUs.", + "x-example": 1, + "format": "double" + }, + "enabled": { + "type": "boolean", + "description": "Is size enabled.", + "x-example": true + }, + "slug": { + "type": "string", + "description": "Size slug.", + "x-example": "s-1vcpu-512mb" + } + }, + "required": [ + "memory", + "cpus", + "enabled", + "slug" + ] + }, + "proxyRule": { + "description": "Rule", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Rule ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Rule creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Rule update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "domain": { + "type": "string", + "description": "Domain name.", + "x-example": "appwrite.company.com" + }, + "resourceType": { + "type": "string", + "description": "Action definition for the rule. Possible values are \"api\", \"function\", or \"redirect\"", + "x-example": "function" + }, + "resourceId": { + "type": "string", + "description": "ID of resource for the action type. If resourceType is \"api\" or \"url\", it is empty. If resourceType is \"function\", it is ID of the function.", + "x-example": "myAwesomeFunction" + }, + "status": { + "type": "string", + "description": "Domain verification status. Possible values are \"created\", \"verifying\", \"verified\" and \"unverified\"", + "x-example": "verified" + }, + "logs": { + "type": "string", + "description": "Certificate generation logs. This will return an empty string if generation did not run, or succeeded.", + "x-example": "HTTP challegne failed." + }, + "renewAt": { + "type": "string", + "description": "Certificate auto-renewal date in ISO 8601 format.", + "x-example": "datetime" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "domain", + "resourceType", + "resourceId", + "status", + "logs", + "renewAt" + ] + }, + "smsTemplate": { + "description": "SmsTemplate", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Template type", + "x-example": "verification" + }, + "locale": { + "type": "string", + "description": "Template locale", + "x-example": "en_us" + }, + "message": { + "type": "string", + "description": "Template message", + "x-example": "Click on the link to verify your account." + } + }, + "required": [ + "type", + "locale", + "message" + ] + }, + "emailTemplate": { + "description": "EmailTemplate", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Template type", + "x-example": "verification" + }, + "locale": { + "type": "string", + "description": "Template locale", + "x-example": "en_us" + }, + "message": { + "type": "string", + "description": "Template message", + "x-example": "Click on the link to verify your account." + }, + "senderName": { + "type": "string", + "description": "Name of the sender", + "x-example": "My User" + }, + "senderEmail": { + "type": "string", + "description": "Email of the sender", + "x-example": "mail@appwrite.io" + }, + "replyTo": { + "type": "string", + "description": "Reply to email address", + "x-example": "emails@appwrite.io" + }, + "subject": { + "type": "string", + "description": "Email subject", + "x-example": "Please verify your email address" + } + }, + "required": [ + "type", + "locale", + "message", + "senderName", + "senderEmail", + "replyTo", + "subject" + ] + }, + "consoleVariables": { + "description": "Console Variables", + "type": "object", + "properties": { + "_APP_DOMAIN_TARGET": { + "type": "string", + "description": "CNAME target for your Appwrite custom domains.", + "x-example": "appwrite.io" + }, + "_APP_STORAGE_LIMIT": { + "type": "integer", + "description": "Maximum file size allowed for file upload in bytes.", + "x-example": "30000000", + "format": "int32" + }, + "_APP_FUNCTIONS_SIZE_LIMIT": { + "type": "integer", + "description": "Maximum file size allowed for deployment in bytes.", + "x-example": "30000000", + "format": "int32" + }, + "_APP_USAGE_STATS": { + "type": "string", + "description": "Defines if usage stats are enabled. This value is set to 'enabled' by default, to disable the usage stats set the value to 'disabled'.", + "x-example": "enabled" + }, + "_APP_VCS_ENABLED": { + "type": "boolean", + "description": "Defines if VCS (Version Control System) is enabled.", + "x-example": true + }, + "_APP_DOMAIN_ENABLED": { + "type": "boolean", + "description": "Defines if main domain is configured. If so, custom domains can be created.", + "x-example": true + }, + "_APP_ASSISTANT_ENABLED": { + "type": "boolean", + "description": "Defines if AI assistant is enabled.", + "x-example": true + } + }, + "required": [ + "_APP_DOMAIN_TARGET", + "_APP_STORAGE_LIMIT", + "_APP_FUNCTIONS_SIZE_LIMIT", + "_APP_USAGE_STATS", + "_APP_VCS_ENABLED", + "_APP_DOMAIN_ENABLED", + "_APP_ASSISTANT_ENABLED" + ] + }, + "mfaChallenge": { + "description": "MFA Challenge", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c168bb8" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "expire" + ] + }, + "mfaRecoveryCodes": { + "description": "MFA Recovery Codes", + "type": "object", + "properties": { + "recoveryCodes": { + "type": "array", + "description": "Recovery codes.", + "items": { + "type": "string" + }, + "x-example": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } + }, + "required": [ + "recoveryCodes" + ] + }, + "mfaType": { + "description": "MFAType", + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "Secret token used for TOTP factor.", + "x-example": true + }, + "uri": { + "type": "string", + "description": "URI for authenticator apps.", + "x-example": true + } + }, + "required": [ + "secret", + "uri" + ] + }, + "mfaFactors": { + "description": "MFAFactors", + "type": "object", + "properties": { + "totp": { + "type": "boolean", + "description": "Can TOTP be used for MFA challenge for this account.", + "x-example": true + }, + "phone": { + "type": "boolean", + "description": "Can phone (SMS) be used for MFA challenge for this account.", + "x-example": true + }, + "email": { + "type": "boolean", + "description": "Can email be used for MFA challenge for this account.", + "x-example": true + }, + "recoveryCode": { + "type": "boolean", + "description": "Can recovery code be used for MFA challenge for this account.", + "x-example": true + } + }, + "required": [ + "totp", + "phone", + "email", + "recoveryCode" + ] + }, + "provider": { + "description": "Provider", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Provider ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Provider creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Provider update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "The name for the provider instance.", + "x-example": "Mailgun" + }, + "provider": { + "type": "string", + "description": "The name of the provider service.", + "x-example": "mailgun" + }, + "enabled": { + "type": "boolean", + "description": "Is provider enabled?", + "x-example": true + }, + "type": { + "type": "string", + "description": "Type of provider.", + "x-example": "sms" + }, + "credentials": { + "type": "object", + "additionalProperties": true, + "description": "Provider credentials.", + "x-example": { + "key": "123456789" + } + }, + "options": { + "type": "object", + "additionalProperties": true, + "description": "Provider options.", + "x-example": { + "from": "sender-email@mydomain" + } + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "provider", + "enabled", + "type", + "credentials" + ] + }, + "message": { + "description": "Message", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Message ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Message creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Message update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "providerType": { + "type": "string", + "description": "Message provider type.", + "x-example": "email" + }, + "topics": { + "type": "array", + "description": "Topic IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "users": { + "type": "array", + "description": "User IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "targets": { + "type": "array", + "description": "Target IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "scheduledAt": { + "type": "string", + "description": "The scheduled time for message.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + }, + "deliveredAt": { + "type": "string", + "description": "The time when the message was delivered.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + }, + "deliveryErrors": { + "type": "array", + "description": "Delivery errors if any.", + "items": { + "type": "string" + }, + "x-example": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "x-nullable": true + }, + "deliveredTotal": { + "type": "integer", + "description": "Number of recipients the message was delivered to.", + "x-example": 1, + "format": "int32" + }, + "data": { + "type": "object", + "additionalProperties": true, + "description": "Data of the message.", + "x-example": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + } + }, + "status": { + "type": "string", + "description": "Status of delivery.", + "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "providerType", + "topics", + "users", + "targets", + "deliveredTotal", + "data", + "status" + ] + }, + "topic": { + "description": "Topic", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Topic ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Topic creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Topic update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "The name of the topic.", + "x-example": "events" + }, + "emailTotal": { + "type": "integer", + "description": "Total count of email subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "smsTotal": { + "type": "integer", + "description": "Total count of SMS subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "pushTotal": { + "type": "integer", + "description": "Total count of push subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "subscribe": { + "type": "array", + "description": "Subscribe permissions.", + "items": { + "type": "string" + }, + "x-example": "users" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "emailTotal", + "smsTotal", + "pushTotal", + "subscribe" + ] + }, + "subscriber": { + "description": "Subscriber", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Subscriber ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Subscriber creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Subscriber update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "targetId": { + "type": "string", + "description": "Target ID.", + "x-example": "259125845563242502" + }, + "target": { + "type": "object", + "description": "Target.", + "x-example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "items": { + "type": "object", + "$ref": "#\/definitions\/target" + } + }, + "userId": { + "type": "string", + "description": "Topic ID.", + "x-example": "5e5ea5c16897e" + }, + "userName": { + "type": "string", + "description": "User Name.", + "x-example": "Aegon Targaryen" + }, + "topicId": { + "type": "string", + "description": "Topic ID.", + "x-example": "259125845563242502" + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "targetId", + "target", + "userId", + "userName", + "topicId", + "providerType" + ] + }, + "target": { + "description": "Target", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Target ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Target creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Target update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Target Name.", + "x-example": "Apple iPhone 12" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "259125845563242502" + }, + "providerId": { + "type": "string", + "description": "Provider ID.", + "x-example": "259125845563242502", + "x-nullable": true + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" + }, + "identifier": { + "type": "string", + "description": "The target identifier.", + "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "userId", + "providerType", + "identifier", + "expired" + ] + }, + "migration": { + "description": "Migration", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Migration ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Migration creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Variable creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "status": { + "type": "string", + "description": "Migration status ( pending, processing, failed, completed ) ", + "x-example": "pending" + }, + "stage": { + "type": "string", + "description": "Migration stage ( init, processing, source-check, destination-check, migrating, finished )", + "x-example": "init" + }, + "source": { + "type": "string", + "description": "A string containing the type of source of the migration.", + "x-example": "Appwrite" + }, + "destination": { + "type": "string", + "description": "A string containing the type of destination of the migration.", + "x-example": "Appwrite" + }, + "resources": { + "type": "array", + "description": "Resources to migrate.", + "items": { + "type": "string" + }, + "x-example": [ + "user" + ] + }, + "statusCounters": { + "type": "object", + "additionalProperties": true, + "description": "A group of counters that represent the total progress of the migration.", + "x-example": "{\"Database\": {\"PENDING\": 0, \"SUCCESS\": 1, \"ERROR\": 0, \"SKIP\": 0, \"PROCESSING\": 0, \"WARNING\": 0}}" + }, + "resourceData": { + "type": "object", + "additionalProperties": true, + "description": "An array of objects containing the report data of the resources that were migrated.", + "x-example": "[{\"resource\":\"Database\",\"id\":\"public\",\"status\":\"SUCCESS\",\"message\":\"\"}]" + }, + "errors": { + "type": "array", + "description": "All errors that occurred during the migration process.", + "items": { + "type": "string" + }, + "x-example": [] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "status", + "stage", + "source", + "destination", + "resources", + "statusCounters", + "resourceData", + "errors" + ] + }, + "migrationReport": { + "description": "Migration Report", + "type": "object", + "properties": { + "user": { + "type": "integer", + "description": "Number of users to be migrated.", + "x-example": 20, + "format": "int32" + }, + "team": { + "type": "integer", + "description": "Number of teams to be migrated.", + "x-example": 20, + "format": "int32" + }, + "database": { + "type": "integer", + "description": "Number of databases to be migrated.", + "x-example": 20, + "format": "int32" + }, + "document": { + "type": "integer", + "description": "Number of documents to be migrated.", + "x-example": 20, + "format": "int32" + }, + "file": { + "type": "integer", + "description": "Number of files to be migrated.", + "x-example": 20, + "format": "int32" + }, + "bucket": { + "type": "integer", + "description": "Number of buckets to be migrated.", + "x-example": 20, + "format": "int32" + }, + "function": { + "type": "integer", + "description": "Number of functions to be migrated.", + "x-example": 20, + "format": "int32" + }, + "size": { + "type": "integer", + "description": "Size of files to be migrated in mb.", + "x-example": 30000, + "format": "int32" + }, + "version": { + "type": "string", + "description": "Version of the Appwrite instance to be migrated.", + "x-example": "1.4.0" + } + }, + "required": [ + "user", + "team", + "database", + "document", + "file", + "bucket", + "function", + "size", + "version" + ] } - }, - "required": [ - "user", - "team", - "database", - "document", - "file", - "bucket", - "function", - "size", - "version" - ] + }, + "externalDocs": { + "description": "Full API docs, specs and tutorials", + "url": "https:\/\/appwrite.io\/docs" } - }, - "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 0281057a8e..e38495629c 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -1,24050 +1,26870 @@ { - "swagger": "2.0", - "info": { - "version": "1.6.1", - "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" + "swagger": "2.0", + "info": { + "version": "1.6.1", + "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" + } }, - "license": { - "name": "BSD-3-Clause", - "url": "https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE" - } - }, - "host": "cloud.appwrite.io", - "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": "<YOUR_PROJECT_ID>" - } - }, - "Key": { - "type": "apiKey", - "name": "X-Appwrite-Key", - "description": "Your secret API key", - "in": "header", - "x-appwrite": { - "demo": "<YOUR_API_KEY>" - } - }, - "JWT": { - "type": "apiKey", - "name": "X-Appwrite-JWT", - "description": "Your secret JSON Web Token", - "in": "header", - "x-appwrite": { - "demo": "<YOUR_JWT>" - } - }, - "Locale": { - "type": "apiKey", - "name": "X-Appwrite-Locale", - "description": "", - "in": "header", - "x-appwrite": { - "demo": "en" - } - }, - "Session": { - "type": "apiKey", - "name": "X-Appwrite-Session", - "description": "The user session to authenticate with", - "in": "header" - }, - "ForwardedUserAgent": { - "type": "apiKey", - "name": "X-Forwarded-User-Agent", - "description": "The user agent string of the client that made the request", - "in": "header" - } - }, - "paths": { - "/account": { - "get": { - "summary": "Get account", - "operationId": "accountGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Get the currently logged in user.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" + "host": "cloud.appwrite.io", + "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": "<YOUR_PROJECT_ID>" } - } }, - "x-appwrite": { - "method": "get", - "weight": 9, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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](https://appwrite.io/docs/references/cloud/client-web/account#createVerification) 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](https://appwrite.io/docs/references/cloud/client-web/account#createEmailSession).", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" + "Key": { + "type": "apiKey", + "name": "X-Appwrite-Key", + "description": "Your secret API key", + "in": "header", + "x-appwrite": { + "demo": "<YOUR_API_KEY>" } - } }, - "x-appwrite": { - "method": "create", - "weight": 8, - "cookies": false, - "type": "", - "deprecated": false, - "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": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } + "JWT": { + "type": "apiKey", + "name": "X-Appwrite-JWT", + "description": "Your secret JSON Web Token", + "in": "header", + "x-appwrite": { + "demo": "<YOUR_JWT>" + } }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + "Locale": { + "type": "apiKey", + "name": "X-Appwrite-Locale", + "description": "", + "in": "header", + "x-appwrite": { + "demo": "en" + } + }, + "Session": { + "type": "apiKey", + "name": "X-Appwrite-Session", + "description": "The user session to authenticate with", + "in": "header" + }, + "ForwardedUserAgent": { + "type": "apiKey", + "name": "X-Forwarded-User-Agent", + "description": "The user agent string of the client that made the request", + "in": "header" + } + }, + "paths": { + "\/account": { + "get": { + "summary": "Get account", + "operationId": "accountGet", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the currently logged in user.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com" + "x-appwrite": { + "method": "get", + "weight": 9, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } }, - "password": { - "type": "string", - "description": "New user password. Must be between 8 and 256 chars.", - "default": null, - "x-example": null - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": ["userId", "email", "password"] - } - } - ] - } - }, - "/account/email": { - "patch": { - "summary": "Update 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": 34, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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/identities": { - "get": { - "summary": "List identities", - "operationId": "accountListIdentities", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Get the list of identities for the currently logged in user.", - "responses": { - "200": { - "description": "Identities List", - "schema": { - "$ref": "#/definitions/identityList" - } - } - }, - "x-appwrite": { - "method": "listIdentities", - "weight": 57, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/list-identities.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/list-identities.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] }, - "default": [], - "in": "query" - } - ] - } - }, - "/account/identities/{identityId}": { - "delete": { - "summary": "Delete identity", - "operationId": "accountDeleteIdentity", - "consumes": ["application/json"], - "produces": [], - "tags": ["account"], - "description": "Delete an identity by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteIdentity", - "weight": 58, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/delete-identity.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete-identity.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "identityId", - "description": "Identity ID.", - "required": true, - "type": "string", - "x-example": "<IDENTITY_ID>", - "in": "path" - } - ] - } - }, - "/account/jwts": { - "post": { - "summary": "Create 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" + "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](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createVerification) 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](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createEmailSession).", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "create", + "weight": 8, + "cookies": false, + "type": "", + "deprecated": false, + "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": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "New user password. Must be between 8 and 256 chars.", + "default": null, + "x-example": null + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] } - } }, - "x-appwrite": { - "method": "createJWT", - "weight": 29, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-j-w-t.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-jwt.md", - "rate-limit": 100, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ] - } - }, - "/account/logs": { - "get": { - "summary": "List logs", - "operationId": "accountListLogs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#/definitions/logList" + "\/account\/email": { + "patch": { + "summary": "Update 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": 34, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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" + ] + } + } + ] } - } }, - "x-appwrite": { - "method": "listLogs", - "weight": 31, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/list-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/list-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } + "\/account\/identities": { + "get": { + "summary": "List identities", + "operationId": "accountListIdentities", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the list of identities for the currently logged in user.", + "responses": { + "200": { + "description": "Identities List", + "schema": { + "$ref": "#\/definitions\/identityList" + } + } + }, + "x-appwrite": { + "method": "listIdentities", + "weight": 57, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/list-identities.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "\/account\/identities\/{identityId}": { + "delete": { + "summary": "Delete identity", + "operationId": "accountDeleteIdentity", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "account" + ], + "description": "Delete an identity by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteIdentity", + "weight": 58, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/delete-identity.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "identityId", + "description": "Identity ID.", + "required": true, + "type": "string", + "x-example": "<IDENTITY_ID>", + "in": "path" + } + ] + } + }, + "\/account\/jwts": { + "post": { + "summary": "Create 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": 29, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-j-w-t.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ] + } + }, + "\/account\/logs": { + "get": { + "summary": "List logs", + "operationId": "accountListLogs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the list of latest security activity logs for the currently logged in user. 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": "listLogs", + "weight": 31, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/list-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/account\/mfa": { + "patch": { + "summary": "Update MFA", + "operationId": "accountUpdateMFA", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Enable or disable MFA on an account.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "updateMFA", + "weight": 44, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-m-f-a.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "mfa": { + "type": "boolean", + "description": "Enable or disable MFA.", + "default": null, + "x-example": false + } + }, + "required": [ + "mfa" + ] + } + } + ] + } + }, + "\/account\/mfa\/authenticators\/{type}": { + "post": { + "summary": "Create authenticator", + "operationId": "accountCreateMfaAuthenticator", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "responses": { + "200": { + "description": "MFAType", + "schema": { + "$ref": "#\/definitions\/mfaType" + } + } + }, + "x-appwrite": { + "method": "createMfaAuthenticator", + "weight": 46, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-mfa-authenticator.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator. Must be `totp`", + "required": true, + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [], + "in": "path" + } + ] }, - "default": [], - "in": "query" - } - ] - } - }, - "/account/mfa": { - "patch": { - "summary": "Update MFA", - "operationId": "accountUpdateMFA", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Enable or disable MFA on an account.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "updateMFA", - "weight": 44, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-m-f-a.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-mfa.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "mfa": { - "type": "boolean", - "description": "Enable or disable MFA.", - "default": null, - "x-example": false - } - }, - "required": ["mfa"] - } - } - ] - } - }, - "/account/mfa/authenticators/{type}": { - "post": { - "summary": "Create authenticator", - "operationId": "accountCreateMfaAuthenticator", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method.", - "responses": { - "200": { - "description": "MFAType", - "schema": { - "$ref": "#/definitions/mfaType" - } - } - }, - "x-appwrite": { - "method": "createMfaAuthenticator", - "weight": 46, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-mfa-authenticator.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator. Must be `totp`", - "required": true, - "type": "string", - "x-example": "totp", - "enum": ["totp"], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [], - "in": "path" - } - ] - }, - "put": { - "summary": "Verify authenticator", - "operationId": "accountUpdateMfaAuthenticator", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "updateMfaAuthenticator", - "weight": 47, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-mfa-authenticator.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator.", - "required": true, - "type": "string", - "x-example": "totp", - "enum": ["totp"], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [], - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "otp": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<OTP>" - } - }, - "required": ["otp"] - } - } - ] - }, - "delete": { - "summary": "Delete authenticator", - "operationId": "accountDeleteMfaAuthenticator", - "consumes": ["application/json"], - "produces": [], - "tags": ["account"], - "description": "Delete an authenticator for a user by ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteMfaAuthenticator", - "weight": 51, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/delete-mfa-authenticator.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator.", - "required": true, - "type": "string", - "x-example": "totp", - "enum": ["totp"], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [], - "in": "path" - } - ] - } - }, - "/account/mfa/challenge": { - "post": { - "summary": "Create MFA challenge", - "operationId": "accountCreateMfaChallenge", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.", - "responses": { - "201": { - "description": "MFA Challenge", - "schema": { - "$ref": "#/definitions/mfaChallenge" - } - } - }, - "x-appwrite": { - "method": "createMfaChallenge", - "weight": 52, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-mfa-challenge.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-mfa-challenge.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "factor": { - "type": "string", - "description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.", - "default": null, - "x-example": "email", - "enum": ["email", "phone", "totp", "recoverycode"], - "x-enum-name": "AuthenticationFactor", - "x-enum-keys": [] - } - }, - "required": ["factor"] - } - } - ] - }, - "put": { - "summary": "Create MFA challenge (confirmation)", - "operationId": "accountUpdateMfaChallenge", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.", - "responses": { - "200": { - "description": "Session", - "schema": { - "$ref": "#/definitions/session" - } - } - }, - "x-appwrite": { - "method": "updateMfaChallenge", - "weight": 53, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-mfa-challenge.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-mfa-challenge.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},challengeId:{param-challengeId}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "challengeId": { - "type": "string", - "description": "ID of the challenge.", - "default": null, - "x-example": "<CHALLENGE_ID>" + "put": { + "summary": "Verify authenticator", + "operationId": "accountUpdateMfaAuthenticator", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } }, - "otp": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<OTP>" - } - }, - "required": ["challengeId", "otp"] - } - } - ] - } - }, - "/account/mfa/factors": { - "get": { - "summary": "List factors", - "operationId": "accountListMfaFactors", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "List the factors available on the account to be used as a MFA challange.", - "responses": { - "200": { - "description": "MFAFactors", - "schema": { - "$ref": "#/definitions/mfaFactors" - } - } - }, - "x-appwrite": { - "method": "listMfaFactors", - "weight": 45, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/list-mfa-factors.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/list-mfa-factors.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "/account/mfa/recovery-codes": { - "get": { - "summary": "Get MFA recovery codes", - "operationId": "accountGetMfaRecoveryCodes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#/definitions/mfaRecoveryCodes" - } - } - }, - "x-appwrite": { - "method": "getMfaRecoveryCodes", - "weight": 50, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/get-mfa-recovery-codes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "post": { - "summary": "Create MFA recovery codes", - "operationId": "accountCreateMfaRecoveryCodes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.", - "responses": { - "201": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#/definitions/mfaRecoveryCodes" - } - } - }, - "x-appwrite": { - "method": "createMfaRecoveryCodes", - "weight": 48, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-mfa-recovery-codes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "patch": { - "summary": "Regenerate MFA recovery codes", - "operationId": "accountUpdateMfaRecoveryCodes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#/definitions/mfaRecoveryCodes" - } - } - }, - "x-appwrite": { - "method": "updateMfaRecoveryCodes", - "weight": 49, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-mfa-recovery-codes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "/account/name": { - "patch": { - "summary": "Update 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": 32, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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 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": 33, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-password.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-password.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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": null + "x-appwrite": { + "method": "updateMfaAuthenticator", + "weight": 47, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-mfa-authenticator.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } }, - "oldPassword": { - "type": "string", - "description": "Current user password. Must be at least 8 chars.", - "default": "", - "x-example": "password" - } - }, - "required": ["password"] - } - } - ] - } - }, - "/account/phone": { - "patch": { - "summary": "Update phone", - "operationId": "accountUpdatePhone", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "updatePhone", - "weight": 35, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-phone.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": null, - "x-example": "+12065550100" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - } - }, - "required": ["phone", "password"] - } - } - ] - } - }, - "/account/prefs": { - "get": { - "summary": "Get account preferences", - "operationId": "accountGetPrefs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Get the preferences as a key-value object for the currently logged in user.", - "responses": { - "200": { - "description": "Preferences", - "schema": { - "$ref": "#/definitions/preferences" - } - } - }, - "x-appwrite": { - "method": "getPrefs", - "weight": 30, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "patch": { - "summary": "Update 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": 36, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery) 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": 38, - "cookies": false, - "type": "", - "deprecated": false, - "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}", "url:{url},ip:{ip}"], - "scope": "sessions.write", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) 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": 39, - "cookies": false, - "type": "", - "deprecated": false, - "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": "sessions.write", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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 between 8 and 256 chars.", - "default": null, - "x-example": null - } - }, - "required": ["userId", "secret", "password"] - } - } - ] - } - }, - "/account/sessions": { - "get": { - "summary": "List sessions", - "operationId": "accountListSessions", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Get the list of active sessions across different devices for the currently logged in user.", - "responses": { - "200": { - "description": "Sessions List", - "schema": { - "$ref": "#/definitions/sessionList" - } - } - }, - "x-appwrite": { - "method": "listSessions", - "weight": 11, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/list-sessions.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/list-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "delete": { - "summary": "Delete 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": 12, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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](https://appwrite.io/docs/references/cloud/client-web/account#updateEmail) or create an [OAuth2 session](https://appwrite.io/docs/references/cloud/client-web/account#CreateOAuth2Session).", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#/definitions/session" - } - } - }, - "x-appwrite": { - "method": "createAnonymousSession", - "weight": 17, - "cookies": false, - "type": "", - "deprecated": false, - "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": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ] - } - }, - "/account/sessions/email": { - "post": { - "summary": "Create email password session", - "operationId": "accountCreateEmailPasswordSession", - "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.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#/definitions/session" - } - } - }, - "x-appwrite": { - "method": "createEmailPasswordSession", - "weight": 16, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-email-password-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-session-email-password.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},email:{param-email}", - "scope": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - } - }, - "required": ["email", "password"] - } - } - ] - } - }, - "/account/sessions/magic-url": { - "put": { - "summary": "Update magic URL session", - "operationId": "accountUpdateMagicURLSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#/definitions/session" - } - } - }, - "x-appwrite": { - "method": "updateMagicURLSession", - "weight": 26, - "cookies": false, - "type": "", - "deprecated": true, - "demo": "account/update-magic-u-r-l-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": ["userId", "secret"] - } - } - ] - } - }, - "/account/sessions/phone": { - "put": { - "summary": "Update phone session", - "operationId": "accountUpdatePhoneSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#/definitions/session" - } - } - }, - "x-appwrite": { - "method": "updatePhoneSession", - "weight": 27, - "cookies": false, - "type": "", - "deprecated": true, - "demo": "account/update-phone-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": ["userId", "secret"] - } - } - ] - } - }, - "/account/sessions/token": { - "post": { - "summary": "Create session", - "operationId": "accountCreateSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#/definitions/session" - } - } - }, - "x-appwrite": { - "method": "createSession", - "weight": 18, - "cookies": false, - "type": "", - "deprecated": false, - "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": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" - }, - "secret": { - "type": "string", - "description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": ["userId", "secret"] - } - } - ] - } - }, - "/account/sessions/{sessionId}": { - "get": { - "summary": "Get session", - "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": 13, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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", - "operationId": "accountUpdateSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.", - "responses": { - "200": { - "description": "Session", - "schema": { - "$ref": "#/definitions/session" - } - } - }, - "x-appwrite": { - "method": "updateSession", - "weight": 15, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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 session", - "operationId": "accountDeleteSession", - "consumes": ["application/json"], - "produces": [], - "tags": ["account"], - "description": "Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions) instead.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteSession", - "weight": 14, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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 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": 37, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "/account/tokens/email": { - "post": { - "summary": "Create email token (OTP)", - "operationId": "accountCreateEmailToken", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#/definitions/token" - } - } - }, - "x-appwrite": { - "method": "createEmailToken", - "weight": 25, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-email-token.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-token-email.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},email:{param-email}", - "scope": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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" - }, - "phrase": { - "type": "boolean", - "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", - "default": false, - "x-example": false - } - }, - "required": ["userId", "email"] - } - } - ] - } - }, - "/account/tokens/magic-url": { - "post": { - "summary": "Create magic URL token", - "operationId": "accountCreateMagicURLToken", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. 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 [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).\n", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#/definitions/token" - } - } - }, - "x-appwrite": { - "method": "createMagicURLToken", - "weight": 24, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-magic-u-r-l-token.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-token-magic-url.md", - "rate-limit": 60, - "rate-time": 3600, - "rate-key": ["url:{url},email:{param-email}", "url:{url},ip:{ip}"], - "scope": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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" - }, - "phrase": { - "type": "boolean", - "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", - "default": false, - "x-example": false - } - }, - "required": ["userId", "email"] - } - } - ] - } - }, - "/account/tokens/oauth2/{provider}": { - "get": { - "summary": "Create OAuth2 token", - "operationId": "accountCreateOAuth2Token", - "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 authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).", - "responses": { - "301": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "createOAuth2Token", - "weight": 23, - "cookies": false, - "type": "webAuth", - "deprecated": false, - "demo": "account/create-o-auth2token.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-token-oauth2.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", - "required": true, - "type": "string", - "x-example": "amazon", - "enum": [ - "amazon", - "apple", - "auth0", - "authentik", - "autodesk", - "bitbucket", - "bitly", - "box", - "dailymotion", - "discord", - "disqus", - "dropbox", - "etsy", - "facebook", - "github", - "gitlab", - "google", - "linkedin", - "microsoft", - "notion", - "oidc", - "okta", - "paypal", - "paypalSandbox", - "podio", - "salesforce", - "slack", - "spotify", - "stripe", - "tradeshift", - "tradeshiftBox", - "twitch", - "wordpress", - "yahoo", - "yammer", - "yandex", - "zoho", - "zoom", - "mock" - ], - "x-enum-name": "OAuthProvider", - "x-enum-keys": [], - "in": "path" - }, - { - "name": "success", - "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's 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's 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 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [], + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "otp": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<OTP>" + } + }, + "required": [ + "otp" + ] + } + } + ] }, - "default": [], - "in": "query" - } - ] - } - }, - "/account/tokens/phone": { - "post": { - "summary": "Create phone token", - "operationId": "accountCreatePhoneToken", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#/definitions/token" - } - } - }, - "x-appwrite": { - "method": "createPhoneToken", - "weight": 28, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-phone-token.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-token-phone.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": ["url:{url},phone:{param-phone}", "url:{url},ip:{ip}"], - "scope": "sessions.write", - "platforms": ["server", "client"], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + "delete": { + "summary": "Delete authenticator", + "operationId": "accountDeleteMfaAuthenticator", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "account" + ], + "description": "Delete an authenticator for a user by ID.", + "responses": { + "204": { + "description": "No content" + } }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": null, - "x-example": "+12065550100" - } - }, - "required": ["userId", "phone"] - } - } - ] - } - }, - "/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](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). 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": 40, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-email-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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": 41, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-email-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "public", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "<USER_ID>" + "x-appwrite": { + "method": "deleteMfaAuthenticator", + "weight": 51, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/delete-mfa-authenticator.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": ["userId", "secret"] + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [], + "in": "path" + } + ] } - } - ] - } - }, - "/account/verification/phone": { - "post": { - "summary": "Create phone verification", - "operationId": "accountCreatePhoneVerification", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#/definitions/token" - } - } }, - "x-appwrite": { - "method": "createPhoneVerification", - "weight": 42, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/create-phone-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-phone-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": ["url:{url},userId:{userId}", "url:{url},ip:{ip}"], - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "put": { - "summary": "Update phone verification (confirmation)", - "operationId": "accountUpdatePhoneVerification", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.", - "responses": { - "200": { - "description": "Token", - "schema": { - "$ref": "#/definitions/token" - } - } - }, - "x-appwrite": { - "method": "updatePhoneVerification", - "weight": 43, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "account/update-phone-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-phone-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "userId:{param-userId}", - "scope": "public", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "<USER_ID>" + "\/account\/mfa\/challenge": { + "post": { + "summary": "Create MFA challenge", + "operationId": "accountCreateMfaChallenge", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "responses": { + "201": { + "description": "MFA Challenge", + "schema": { + "$ref": "#\/definitions\/mfaChallenge" + } + } }, - "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](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) 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": 60, - "cookies": false, - "type": "location", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Browser Code.", - "required": true, - "type": "string", - "x-example": "aa", - "enum": [ - "aa", - "an", - "ch", - "ci", - "cm", - "cr", - "ff", - "sf", - "mf", - "ps", - "oi", - "om", - "op", - "on" - ], - "x-enum-name": "Browser", - "x-enum-keys": [ - "Avant Browser", - "Android WebView Beta", - "Google Chrome", - "Google Chrome (iOS)", - "Google Chrome (Mobile)", - "Chromium", - "Mozilla Firefox", - "Safari", - "Mobile Safari", - "Microsoft Edge", - "Microsoft Edge (iOS)", - "Opera Mini", - "Opera", - "Opera (Next)" - ], - "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": 59, - "cookies": false, - "type": "location", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.", - "required": true, - "type": "string", - "x-example": "amex", - "enum": [ - "amex", - "argencard", - "cabal", - "cencosud", - "diners", - "discover", - "elo", - "hipercard", - "jcb", - "mastercard", - "naranja", - "targeta-shopping", - "union-china-pay", - "visa", - "mir", - "maestro" - ], - "x-enum-name": "CreditCard", - "x-enum-keys": [ - "American Express", - "Argencard", - "Cabal", - "Cencosud", - "Diners Club", - "Discover", - "Elo", - "Hipercard", - "JCB", - "Mastercard", - "Naranja", - "Tarjeta Shopping", - "Union China Pay", - "Visa", - "MIR", - "Maestro" - ], - "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\nThis endpoint does not follow HTTP redirects.", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "x-appwrite": { - "method": "getFavicon", - "weight": 63, - "cookies": false, - "type": "location", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.\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": 61, - "cookies": false, - "type": "location", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Country Code. ISO Alpha-2 country code format.", - "required": true, - "type": "string", - "x-example": "af", - "enum": [ - "af", - "ao", - "al", - "ad", - "ae", - "ar", - "am", - "ag", - "au", - "at", - "az", - "bi", - "be", - "bj", - "bf", - "bd", - "bg", - "bh", - "bs", - "ba", - "by", - "bz", - "bo", - "br", - "bb", - "bn", - "bt", - "bw", - "cf", - "ca", - "ch", - "cl", - "cn", - "ci", - "cm", - "cd", - "cg", - "co", - "km", - "cv", - "cr", - "cu", - "cy", - "cz", - "de", - "dj", - "dm", - "dk", - "do", - "dz", - "ec", - "eg", - "er", - "es", - "ee", - "et", - "fi", - "fj", - "fr", - "fm", - "ga", - "gb", - "ge", - "gh", - "gn", - "gm", - "gw", - "gq", - "gr", - "gd", - "gt", - "gy", - "hn", - "hr", - "ht", - "hu", - "id", - "in", - "ie", - "ir", - "iq", - "is", - "il", - "it", - "jm", - "jo", - "jp", - "kz", - "ke", - "kg", - "kh", - "ki", - "kn", - "kr", - "kw", - "la", - "lb", - "lr", - "ly", - "lc", - "li", - "lk", - "ls", - "lt", - "lu", - "lv", - "ma", - "mc", - "md", - "mg", - "mv", - "mx", - "mh", - "mk", - "ml", - "mt", - "mm", - "me", - "mn", - "mz", - "mr", - "mu", - "mw", - "my", - "na", - "ne", - "ng", - "ni", - "nl", - "no", - "np", - "nr", - "nz", - "om", - "pk", - "pa", - "pe", - "ph", - "pw", - "pg", - "pl", - "pf", - "kp", - "pt", - "py", - "qa", - "ro", - "ru", - "rw", - "sa", - "sd", - "sn", - "sg", - "sb", - "sl", - "sv", - "sm", - "so", - "rs", - "ss", - "st", - "sr", - "sk", - "si", - "se", - "sz", - "sc", - "sy", - "td", - "tg", - "th", - "tj", - "tm", - "tl", - "to", - "tt", - "tn", - "tr", - "tv", - "tz", - "ug", - "ua", - "uy", - "us", - "uz", - "va", - "vc", - "ve", - "vn", - "vu", - "ws", - "ye", - "za", - "zm", - "zw" - ], - "x-enum-name": "Flag", - "x-enum-keys": [ - "Afghanistan", - "Angola", - "Albania", - "Andorra", - "United Arab Emirates", - "Argentina", - "Armenia", - "Antigua and Barbuda", - "Australia", - "Austria", - "Azerbaijan", - "Burundi", - "Belgium", - "Benin", - "Burkina Faso", - "Bangladesh", - "Bulgaria", - "Bahrain", - "Bahamas", - "Bosnia and Herzegovina", - "Belarus", - "Belize", - "Bolivia", - "Brazil", - "Barbados", - "Brunei Darussalam", - "Bhutan", - "Botswana", - "Central African Republic", - "Canada", - "Switzerland", - "Chile", - "China", - "C\u00f4te d'Ivoire", - "Cameroon", - "Democratic Republic of the Congo", - "Republic of the Congo", - "Colombia", - "Comoros", - "Cape Verde", - "Costa Rica", - "Cuba", - "Cyprus", - "Czech Republic", - "Germany", - "Djibouti", - "Dominica", - "Denmark", - "Dominican Republic", - "Algeria", - "Ecuador", - "Egypt", - "Eritrea", - "Spain", - "Estonia", - "Ethiopia", - "Finland", - "Fiji", - "France", - "Micronesia (Federated States of)", - "Gabon", - "United Kingdom", - "Georgia", - "Ghana", - "Guinea", - "Gambia", - "Guinea-Bissau", - "Equatorial Guinea", - "Greece", - "Grenada", - "Guatemala", - "Guyana", - "Honduras", - "Croatia", - "Haiti", - "Hungary", - "Indonesia", - "India", - "Ireland", - "Iran (Islamic Republic of)", - "Iraq", - "Iceland", - "Israel", - "Italy", - "Jamaica", - "Jordan", - "Japan", - "Kazakhstan", - "Kenya", - "Kyrgyzstan", - "Cambodia", - "Kiribati", - "Saint Kitts and Nevis", - "South Korea", - "Kuwait", - "Lao People's Democratic Republic", - "Lebanon", - "Liberia", - "Libya", - "Saint Lucia", - "Liechtenstein", - "Sri Lanka", - "Lesotho", - "Lithuania", - "Luxembourg", - "Latvia", - "Morocco", - "Monaco", - "Moldova", - "Madagascar", - "Maldives", - "Mexico", - "Marshall Islands", - "North Macedonia", - "Mali", - "Malta", - "Myanmar", - "Montenegro", - "Mongolia", - "Mozambique", - "Mauritania", - "Mauritius", - "Malawi", - "Malaysia", - "Namibia", - "Niger", - "Nigeria", - "Nicaragua", - "Netherlands", - "Norway", - "Nepal", - "Nauru", - "New Zealand", - "Oman", - "Pakistan", - "Panama", - "Peru", - "Philippines", - "Palau", - "Papua New Guinea", - "Poland", - "French Polynesia", - "North Korea", - "Portugal", - "Paraguay", - "Qatar", - "Romania", - "Russia", - "Rwanda", - "Saudi Arabia", - "Sudan", - "Senegal", - "Singapore", - "Solomon Islands", - "Sierra Leone", - "El Salvador", - "San Marino", - "Somalia", - "Serbia", - "South Sudan", - "Sao Tome and Principe", - "Suriname", - "Slovakia", - "Slovenia", - "Sweden", - "Eswatini", - "Seychelles", - "Syria", - "Chad", - "Togo", - "Thailand", - "Tajikistan", - "Turkmenistan", - "Timor-Leste", - "Tonga", - "Trinidad and Tobago", - "Tunisia", - "Turkey", - "Tuvalu", - "Tanzania", - "Uganda", - "Ukraine", - "Uruguay", - "United States", - "Uzbekistan", - "Vatican City", - "Saint Vincent and the Grenadines", - "Venezuela", - "Vietnam", - "Vanuatu", - "Samoa", - "Yemen", - "South Africa", - "Zambia", - "Zimbabwe" - ], - "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\nThis endpoint does not follow HTTP redirects.", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "x-appwrite": { - "method": "getImage", - "weight": 62, - "cookies": false, - "type": "location", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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": 65, - "cookies": false, - "type": "location", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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": "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": 64, - "cookies": false, - "type": "location", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "text", - "description": "Plain text to be converted to QR code image.", - "required": true, - "type": "string", - "x-example": "<TEXT>", - "in": "query" - }, - { - "name": "size", - "description": "QR code size. Pass an integer between 1 to 1000. Defaults to 400.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 400, - "in": "query" - }, - { - "name": "margin", - "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 1, - "in": "query" - }, - { - "name": "download", - "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", - "required": false, - "type": "boolean", - "x-example": false, - "default": false, - "in": "query" - } - ] - } - }, - "/databases": { - "get": { - "summary": "List databases", - "operationId": "databasesList", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Databases List", - "schema": { - "$ref": "#/definitions/databaseList" - } - } - }, - "x-appwrite": { - "method": "list", - "weight": 70, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/list.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "x-appwrite": { + "method": "createMfaChallenge", + "weight": 52, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-mfa-challenge.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "factor": { + "type": "string", + "description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.", + "default": null, + "x-example": "email", + "enum": [ + "email", + "phone", + "totp", + "recoverycode" + ], + "x-enum-name": "AuthenticationFactor", + "x-enum-keys": [] + } + }, + "required": [ + "factor" + ] + } + } + ] }, - "default": [], - "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" - } - ] - }, - "post": { - "summary": "Create database", - "operationId": "databasesCreate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create a new Database.\n", - "responses": { - "201": { - "description": "Database", - "schema": { - "$ref": "#/definitions/database" - } - } - }, - "x-appwrite": { - "method": "create", - "weight": 69, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "databaseId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<DATABASE_ID>" + "put": { + "summary": "Create MFA challenge (confirmation)", + "operationId": "accountUpdateMfaChallenge", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "responses": { + "200": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } }, - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" + "x-appwrite": { + "method": "updateMfaChallenge", + "weight": 53, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-mfa-challenge.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},challengeId:{param-challengeId}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } }, - "enabled": { - "type": "boolean", - "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": ["databaseId", "name"] + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "challengeId": { + "type": "string", + "description": "ID of the challenge.", + "default": null, + "x-example": "<CHALLENGE_ID>" + }, + "otp": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<OTP>" + } + }, + "required": [ + "challengeId", + "otp" + ] + } + } + ] } - } - ] - } - }, - "/databases/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "databasesGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", - "responses": { - "200": { - "description": "Database", - "schema": { - "$ref": "#/definitions/database" - } - } }, - "x-appwrite": { - "method": "get", - "weight": 71, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/get.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update database", - "operationId": "databasesUpdate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update a database by its unique ID.", - "responses": { - "200": { - "description": "Database", - "schema": { - "$ref": "#/definitions/database" - } - } - }, - "x-appwrite": { - "method": "update", - "weight": 73, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" + "\/account\/mfa\/factors": { + "get": { + "summary": "List factors", + "operationId": "accountListMfaFactors", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "responses": { + "200": { + "description": "MFAFactors", + "schema": { + "$ref": "#\/definitions\/mfaFactors" + } + } }, - "enabled": { - "type": "boolean", - "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": ["name"] + "x-appwrite": { + "method": "listMfaFactors", + "weight": 45, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/list-mfa-factors.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] } - } - ] - }, - "delete": { - "summary": "Delete database", - "operationId": "databasesDelete", - "consumes": ["application/json"], - "produces": [], - "tags": ["databases"], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", - "responses": { - "204": { - "description": "No content" - } }, - "x-appwrite": { - "method": "delete", - "weight": 74, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/delete.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - } - ] - } - }, - "/databases/{databaseId}/collections": { - "get": { - "summary": "List collections", - "operationId": "databasesListCollections", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Collections List", - "schema": { - "$ref": "#/definitions/collectionList" - } - } - }, - "x-appwrite": { - "method": "listCollections", - "weight": 76, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/list-collections.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/list-collections.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "\/account\/mfa\/recovery-codes": { + "get": { + "summary": "Get MFA recovery codes", + "operationId": "accountGetMfaRecoveryCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "x-appwrite": { + "method": "getMfaRecoveryCodes", + "weight": 50, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/get-mfa-recovery-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] }, - "default": [], - "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" - } - ] - }, - "post": { - "summary": "Create collection", - "operationId": "databasesCreateCollection", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Collection", - "schema": { - "$ref": "#/definitions/collection" - } - } - }, - "x-appwrite": { - "method": "createCollection", - "weight": 75, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-collection.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "collectionId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + "post": { + "summary": "Create MFA recovery codes", + "operationId": "accountCreateMfaRecoveryCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "responses": { + "201": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } }, - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" + "x-appwrite": { + "method": "createMfaRecoveryCodes", + "weight": 48, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-mfa-recovery-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": ["collectionId", "name"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}": { - "get": { - "summary": "Get collection", - "operationId": "databasesGetCollection", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "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": 77, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/get-collection.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/get-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update collection", - "operationId": "databasesUpdateCollection", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update a collection by its unique ID.", - "responses": { - "200": { - "description": "Collection", - "schema": { - "$ref": "#/definitions/collection" - } - } - }, - "x-appwrite": { - "method": "updateCollection", - "weight": 79, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-collection.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": ["name"] - } - } - ] - }, - "delete": { - "summary": "Delete collection", - "operationId": "databasesDeleteCollection", - "consumes": ["application/json"], - "produces": [], - "tags": ["databases"], - "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": "", - "deprecated": false, - "demo": "databases/delete-collection.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/delete-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes": { - "get": { - "summary": "List attributes", - "operationId": "databasesListAttributes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "List attributes in the collection.", - "responses": { - "200": { - "description": "Attributes List", - "schema": { - "$ref": "#/definitions/attributeList" - } - } - }, - "x-appwrite": { - "method": "listAttributes", - "weight": 91, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/list-attributes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/list-attributes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] }, - "default": [], - "in": "query" - } - ] - } + "patch": { + "summary": "Regenerate MFA recovery codes", + "operationId": "accountUpdateMfaRecoveryCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "x-appwrite": { + "method": "updateMfaRecoveryCodes", + "weight": 49, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-mfa-recovery-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/name": { + "patch": { + "summary": "Update 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": 32, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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 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": 33, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-password.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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": null + }, + "oldPassword": { + "type": "string", + "description": "Current user password. Must be at least 8 chars.", + "default": "", + "x-example": "password" + } + }, + "required": [ + "password" + ] + } + } + ] + } + }, + "\/account\/phone": { + "patch": { + "summary": "Update phone", + "operationId": "accountUpdatePhone", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createPhoneVerification) endpoint to send a confirmation SMS.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "updatePhone", + "weight": 35, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-phone.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": null, + "x-example": "+12065550100" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + } + }, + "required": [ + "phone", + "password" + ] + } + } + ] + } + }, + "\/account\/prefs": { + "get": { + "summary": "Get account preferences", + "operationId": "accountGetPrefs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the preferences as a key-value object for the currently logged in user.", + "responses": { + "200": { + "description": "Preferences", + "schema": { + "$ref": "#\/definitions\/preferences" + } + } + }, + "x-appwrite": { + "method": "getPrefs", + "weight": 30, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "patch": { + "summary": "Update 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": 36, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateRecovery) 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": 38, + "cookies": false, + "type": "", + "deprecated": false, + "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}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) 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": 39, + "cookies": false, + "type": "", + "deprecated": false, + "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": "sessions.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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 between 8 and 256 chars.", + "default": null, + "x-example": null + } + }, + "required": [ + "userId", + "secret", + "password" + ] + } + } + ] + } + }, + "\/account\/sessions": { + "get": { + "summary": "List sessions", + "operationId": "accountListSessions", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the list of active sessions across different devices for the currently logged in user.", + "responses": { + "200": { + "description": "Sessions List", + "schema": { + "$ref": "#\/definitions\/sessionList" + } + } + }, + "x-appwrite": { + "method": "listSessions", + "weight": 11, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/list-sessions.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "delete": { + "summary": "Delete 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": 12, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateEmail) or create an [OAuth2 session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#CreateOAuth2Session).", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "x-appwrite": { + "method": "createAnonymousSession", + "weight": 17, + "cookies": false, + "type": "", + "deprecated": false, + "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": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ] + } + }, + "\/account\/sessions\/email": { + "post": { + "summary": "Create email password session", + "operationId": "accountCreateEmailPasswordSession", + "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.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "x-appwrite": { + "method": "createEmailPasswordSession", + "weight": 16, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-email-password-session.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},email:{param-email}", + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + } + }, + "required": [ + "email", + "password" + ] + } + } + ] + } + }, + "\/account\/sessions\/magic-url": { + "put": { + "summary": "Update magic URL session", + "operationId": "accountUpdateMagicURLSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "x-appwrite": { + "method": "updateMagicURLSession", + "weight": 26, + "cookies": false, + "type": "", + "deprecated": true, + "demo": "account\/update-magic-u-r-l-session.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/account\/sessions\/phone": { + "put": { + "summary": "Update phone session", + "operationId": "accountUpdatePhoneSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "x-appwrite": { + "method": "updatePhoneSession", + "weight": 27, + "cookies": false, + "type": "", + "deprecated": true, + "demo": "account\/update-phone-session.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/account\/sessions\/token": { + "post": { + "summary": "Create session", + "operationId": "accountCreateSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "x-appwrite": { + "method": "createSession", + "weight": 18, + "cookies": false, + "type": "", + "deprecated": false, + "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": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + }, + "secret": { + "type": "string", + "description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/account\/sessions\/{sessionId}": { + "get": { + "summary": "Get session", + "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": 13, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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", + "operationId": "accountUpdateSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.", + "responses": { + "200": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "x-appwrite": { + "method": "updateSession", + "weight": 15, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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 session", + "operationId": "accountDeleteSession", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "account" + ], + "description": "Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#deleteSessions) instead.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteSession", + "weight": 14, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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 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": 37, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/tokens\/email": { + "post": { + "summary": "Create email token (OTP)", + "operationId": "accountCreateEmailToken", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "x-appwrite": { + "method": "createEmailToken", + "weight": 25, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-email-token.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},email:{param-email}", + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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" + }, + "phrase": { + "type": "boolean", + "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", + "default": false, + "x-example": false + } + }, + "required": [ + "userId", + "email" + ] + } + } + ] + } + }, + "\/account\/tokens\/magic-url": { + "post": { + "summary": "Create magic URL token", + "operationId": "accountCreateMagicURLToken", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. 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 [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "x-appwrite": { + "method": "createMagicURLToken", + "weight": 24, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-magic-u-r-l-token.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", + "rate-limit": 60, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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" + }, + "phrase": { + "type": "boolean", + "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", + "default": false, + "x-example": false + } + }, + "required": [ + "userId", + "email" + ] + } + } + ] + } + }, + "\/account\/tokens\/oauth2\/{provider}": { + "get": { + "summary": "Create OAuth2 token", + "operationId": "accountCreateOAuth2Token", + "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 authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "301": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "createOAuth2Token", + "weight": 23, + "cookies": false, + "type": "webAuth", + "deprecated": false, + "demo": "account\/create-o-auth2token.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "provider", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", + "required": true, + "type": "string", + "x-example": "amazon", + "enum": [ + "amazon", + "apple", + "auth0", + "authentik", + "autodesk", + "bitbucket", + "bitly", + "box", + "dailymotion", + "discord", + "disqus", + "dropbox", + "etsy", + "facebook", + "github", + "gitlab", + "google", + "linkedin", + "microsoft", + "notion", + "oidc", + "okta", + "paypal", + "paypalSandbox", + "podio", + "salesforce", + "slack", + "spotify", + "stripe", + "tradeshift", + "tradeshiftBox", + "twitch", + "wordpress", + "yahoo", + "yammer", + "yandex", + "zoho", + "zoom", + "mock" + ], + "x-enum-name": "OAuthProvider", + "x-enum-keys": [], + "in": "path" + }, + { + "name": "success", + "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's 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's 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 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/account\/tokens\/phone": { + "post": { + "summary": "Create phone token", + "operationId": "accountCreatePhoneToken", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "x-appwrite": { + "method": "createPhoneToken", + "weight": 28, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-phone-token.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},phone:{param-phone}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": null, + "x-example": "+12065550100" + } + }, + "required": [ + "userId", + "phone" + ] + } + } + ] + } + }, + "\/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](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). 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": 40, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-verification.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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": 41, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-verification.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "public", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/account\/verification\/phone": { + "post": { + "summary": "Create phone verification", + "operationId": "accountCreatePhoneVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "x-appwrite": { + "method": "createPhoneVerification", + "weight": 42, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/create-phone-verification.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},userId:{userId}", + "url:{url},ip:{ip}" + ], + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "put": { + "summary": "Update phone verification (confirmation)", + "operationId": "accountUpdatePhoneVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.", + "responses": { + "200": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "x-appwrite": { + "method": "updatePhoneVerification", + "weight": 43, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "account\/update-phone-verification.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "userId:{param-userId}", + "scope": "public", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) 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": 60, + "cookies": false, + "type": "location", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Browser Code.", + "required": true, + "type": "string", + "x-example": "aa", + "enum": [ + "aa", + "an", + "ch", + "ci", + "cm", + "cr", + "ff", + "sf", + "mf", + "ps", + "oi", + "om", + "op", + "on" + ], + "x-enum-name": "Browser", + "x-enum-keys": [ + "Avant Browser", + "Android WebView Beta", + "Google Chrome", + "Google Chrome (iOS)", + "Google Chrome (Mobile)", + "Chromium", + "Mozilla Firefox", + "Safari", + "Mobile Safari", + "Microsoft Edge", + "Microsoft Edge (iOS)", + "Opera Mini", + "Opera", + "Opera (Next)" + ], + "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": 59, + "cookies": false, + "type": "location", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.", + "required": true, + "type": "string", + "x-example": "amex", + "enum": [ + "amex", + "argencard", + "cabal", + "cencosud", + "diners", + "discover", + "elo", + "hipercard", + "jcb", + "mastercard", + "naranja", + "targeta-shopping", + "union-china-pay", + "visa", + "mir", + "maestro" + ], + "x-enum-name": "CreditCard", + "x-enum-keys": [ + "American Express", + "Argencard", + "Cabal", + "Cencosud", + "Diners Club", + "Discover", + "Elo", + "Hipercard", + "JCB", + "Mastercard", + "Naranja", + "Tarjeta Shopping", + "Union China Pay", + "Visa", + "MIR", + "Maestro" + ], + "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\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "x-appwrite": { + "method": "getFavicon", + "weight": 63, + "cookies": false, + "type": "location", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\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": 61, + "cookies": false, + "type": "location", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Country Code. ISO Alpha-2 country code format.", + "required": true, + "type": "string", + "x-example": "af", + "enum": [ + "af", + "ao", + "al", + "ad", + "ae", + "ar", + "am", + "ag", + "au", + "at", + "az", + "bi", + "be", + "bj", + "bf", + "bd", + "bg", + "bh", + "bs", + "ba", + "by", + "bz", + "bo", + "br", + "bb", + "bn", + "bt", + "bw", + "cf", + "ca", + "ch", + "cl", + "cn", + "ci", + "cm", + "cd", + "cg", + "co", + "km", + "cv", + "cr", + "cu", + "cy", + "cz", + "de", + "dj", + "dm", + "dk", + "do", + "dz", + "ec", + "eg", + "er", + "es", + "ee", + "et", + "fi", + "fj", + "fr", + "fm", + "ga", + "gb", + "ge", + "gh", + "gn", + "gm", + "gw", + "gq", + "gr", + "gd", + "gt", + "gy", + "hn", + "hr", + "ht", + "hu", + "id", + "in", + "ie", + "ir", + "iq", + "is", + "il", + "it", + "jm", + "jo", + "jp", + "kz", + "ke", + "kg", + "kh", + "ki", + "kn", + "kr", + "kw", + "la", + "lb", + "lr", + "ly", + "lc", + "li", + "lk", + "ls", + "lt", + "lu", + "lv", + "ma", + "mc", + "md", + "mg", + "mv", + "mx", + "mh", + "mk", + "ml", + "mt", + "mm", + "me", + "mn", + "mz", + "mr", + "mu", + "mw", + "my", + "na", + "ne", + "ng", + "ni", + "nl", + "no", + "np", + "nr", + "nz", + "om", + "pk", + "pa", + "pe", + "ph", + "pw", + "pg", + "pl", + "pf", + "kp", + "pt", + "py", + "qa", + "ro", + "ru", + "rw", + "sa", + "sd", + "sn", + "sg", + "sb", + "sl", + "sv", + "sm", + "so", + "rs", + "ss", + "st", + "sr", + "sk", + "si", + "se", + "sz", + "sc", + "sy", + "td", + "tg", + "th", + "tj", + "tm", + "tl", + "to", + "tt", + "tn", + "tr", + "tv", + "tz", + "ug", + "ua", + "uy", + "us", + "uz", + "va", + "vc", + "ve", + "vn", + "vu", + "ws", + "ye", + "za", + "zm", + "zw" + ], + "x-enum-name": "Flag", + "x-enum-keys": [ + "Afghanistan", + "Angola", + "Albania", + "Andorra", + "United Arab Emirates", + "Argentina", + "Armenia", + "Antigua and Barbuda", + "Australia", + "Austria", + "Azerbaijan", + "Burundi", + "Belgium", + "Benin", + "Burkina Faso", + "Bangladesh", + "Bulgaria", + "Bahrain", + "Bahamas", + "Bosnia and Herzegovina", + "Belarus", + "Belize", + "Bolivia", + "Brazil", + "Barbados", + "Brunei Darussalam", + "Bhutan", + "Botswana", + "Central African Republic", + "Canada", + "Switzerland", + "Chile", + "China", + "C\u00f4te d'Ivoire", + "Cameroon", + "Democratic Republic of the Congo", + "Republic of the Congo", + "Colombia", + "Comoros", + "Cape Verde", + "Costa Rica", + "Cuba", + "Cyprus", + "Czech Republic", + "Germany", + "Djibouti", + "Dominica", + "Denmark", + "Dominican Republic", + "Algeria", + "Ecuador", + "Egypt", + "Eritrea", + "Spain", + "Estonia", + "Ethiopia", + "Finland", + "Fiji", + "France", + "Micronesia (Federated States of)", + "Gabon", + "United Kingdom", + "Georgia", + "Ghana", + "Guinea", + "Gambia", + "Guinea-Bissau", + "Equatorial Guinea", + "Greece", + "Grenada", + "Guatemala", + "Guyana", + "Honduras", + "Croatia", + "Haiti", + "Hungary", + "Indonesia", + "India", + "Ireland", + "Iran (Islamic Republic of)", + "Iraq", + "Iceland", + "Israel", + "Italy", + "Jamaica", + "Jordan", + "Japan", + "Kazakhstan", + "Kenya", + "Kyrgyzstan", + "Cambodia", + "Kiribati", + "Saint Kitts and Nevis", + "South Korea", + "Kuwait", + "Lao People's Democratic Republic", + "Lebanon", + "Liberia", + "Libya", + "Saint Lucia", + "Liechtenstein", + "Sri Lanka", + "Lesotho", + "Lithuania", + "Luxembourg", + "Latvia", + "Morocco", + "Monaco", + "Moldova", + "Madagascar", + "Maldives", + "Mexico", + "Marshall Islands", + "North Macedonia", + "Mali", + "Malta", + "Myanmar", + "Montenegro", + "Mongolia", + "Mozambique", + "Mauritania", + "Mauritius", + "Malawi", + "Malaysia", + "Namibia", + "Niger", + "Nigeria", + "Nicaragua", + "Netherlands", + "Norway", + "Nepal", + "Nauru", + "New Zealand", + "Oman", + "Pakistan", + "Panama", + "Peru", + "Philippines", + "Palau", + "Papua New Guinea", + "Poland", + "French Polynesia", + "North Korea", + "Portugal", + "Paraguay", + "Qatar", + "Romania", + "Russia", + "Rwanda", + "Saudi Arabia", + "Sudan", + "Senegal", + "Singapore", + "Solomon Islands", + "Sierra Leone", + "El Salvador", + "San Marino", + "Somalia", + "Serbia", + "South Sudan", + "Sao Tome and Principe", + "Suriname", + "Slovakia", + "Slovenia", + "Sweden", + "Eswatini", + "Seychelles", + "Syria", + "Chad", + "Togo", + "Thailand", + "Tajikistan", + "Turkmenistan", + "Timor-Leste", + "Tonga", + "Trinidad and Tobago", + "Tunisia", + "Turkey", + "Tuvalu", + "Tanzania", + "Uganda", + "Ukraine", + "Uruguay", + "United States", + "Uzbekistan", + "Vatican City", + "Saint Vincent and the Grenadines", + "Venezuela", + "Vietnam", + "Vanuatu", + "Samoa", + "Yemen", + "South Africa", + "Zambia", + "Zimbabwe" + ], + "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\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "x-appwrite": { + "method": "getImage", + "weight": 62, + "cookies": false, + "type": "location", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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": 65, + "cookies": false, + "type": "location", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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": "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": 64, + "cookies": false, + "type": "location", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "text", + "description": "Plain text to be converted to QR code image.", + "required": true, + "type": "string", + "x-example": "<TEXT>", + "in": "query" + }, + { + "name": "size", + "description": "QR code size. Pass an integer between 1 to 1000. Defaults to 400.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 400, + "in": "query" + }, + { + "name": "margin", + "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 1, + "in": "query" + }, + { + "name": "download", + "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", + "required": false, + "type": "boolean", + "x-example": false, + "default": false, + "in": "query" + } + ] + } + }, + "\/databases": { + "get": { + "summary": "List databases", + "operationId": "databasesList", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "schema": { + "$ref": "#\/definitions\/databaseList" + } + } + }, + "x-appwrite": { + "method": "list", + "weight": 70, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "databasesCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "x-appwrite": { + "method": "create", + "weight": 69, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<DATABASE_ID>" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "databasesGet", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "x-appwrite": { + "method": "get", + "weight": 71, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "databasesUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "x-appwrite": { + "method": "update", + "weight": 73, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete database", + "operationId": "databasesDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "weight": 74, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections": { + "get": { + "summary": "List collections", + "operationId": "databasesListCollections", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Collections List", + "schema": { + "$ref": "#\/definitions\/collectionList" + } + } + }, + "x-appwrite": { + "method": "listCollections", + "weight": 76, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/list-collections.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + }, + "post": { + "summary": "Create collection", + "operationId": "databasesCreateCollection", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Collection", + "schema": { + "$ref": "#\/definitions\/collection" + } + } + }, + "x-appwrite": { + "method": "createCollection", + "weight": 75, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "collectionId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "collectionId", + "name" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}": { + "get": { + "summary": "Get collection", + "operationId": "databasesGetCollection", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "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": 77, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/get-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update collection", + "operationId": "databasesUpdateCollection", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a collection by its unique ID.", + "responses": { + "200": { + "description": "Collection", + "schema": { + "$ref": "#\/definitions\/collection" + } + } + }, + "x-appwrite": { + "method": "updateCollection", + "weight": 79, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete collection", + "operationId": "databasesDeleteCollection", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "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": "", + "deprecated": false, + "demo": "databases\/delete-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes": { + "get": { + "summary": "List attributes", + "operationId": "databasesListAttributes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Attributes List", + "schema": { + "$ref": "#\/definitions\/attributeList" + } + } + }, + "x-appwrite": { + "method": "listAttributes", + "weight": 91, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/list-attributes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean": { + "post": { + "summary": "Create boolean attribute", + "operationId": "databasesCreateBooleanAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a boolean attribute.\n", + "responses": { + "202": { + "description": "AttributeBoolean", + "schema": { + "$ref": "#\/definitions\/attributeBoolean" + } + } + }, + "x-appwrite": { + "method": "createBooleanAttribute", + "weight": 88, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-boolean-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean\/{key}": { + "patch": { + "summary": "Update boolean attribute", + "operationId": "databasesUpdateBooleanAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a boolean attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeBoolean", + "schema": { + "$ref": "#\/definitions\/attributeBoolean" + } + } + }, + "x-appwrite": { + "method": "updateBooleanAttribute", + "weight": 100, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-boolean-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "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, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime": { + "post": { + "summary": "Create datetime attribute", + "operationId": "databasesCreateDatetimeAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a date time attribute according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "AttributeDatetime", + "schema": { + "$ref": "#\/definitions\/attributeDatetime" + } + } + }, + "x-appwrite": { + "method": "createDatetimeAttribute", + "weight": 89, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-datetime-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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 the attribute in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime attribute", + "operationId": "databasesUpdateDatetimeAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a date time attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeDatetime", + "schema": { + "$ref": "#\/definitions\/attributeDatetime" + } + } + }, + "x-appwrite": { + "method": "updateDatetimeAttribute", + "weight": 101, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-datetime-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "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, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email": { + "post": { + "summary": "Create email attribute", + "operationId": "databasesCreateEmailAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create an email attribute.\n", + "responses": { + "202": { + "description": "AttributeEmail", + "schema": { + "$ref": "#\/definitions\/attributeEmail" + } + } + }, + "x-appwrite": { + "method": "createEmailAttribute", + "weight": 82, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-email-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email\/{key}": { + "patch": { + "summary": "Update email attribute", + "operationId": "databasesUpdateEmailAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeEmail", + "schema": { + "$ref": "#\/definitions\/attributeEmail" + } + } + }, + "x-appwrite": { + "method": "updateEmailAttribute", + "weight": 94, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-email-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "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", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum": { + "post": { + "summary": "Create enum attribute", + "operationId": "databasesCreateEnumAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "responses": { + "202": { + "description": "AttributeEnum", + "schema": { + "$ref": "#\/definitions\/attributeEnum" + } + } + }, + "x-appwrite": { + "method": "createEnumAttribute", + "weight": 83, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-enum-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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 255 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>" + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum\/{key}": { + "patch": { + "summary": "Update enum attribute", + "operationId": "databasesUpdateEnumAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeEnum", + "schema": { + "$ref": "#\/definitions\/attributeEnum" + } + } + }, + "x-appwrite": { + "method": "updateEnumAttribute", + "weight": 95, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-enum-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "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 255 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>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float": { + "post": { + "summary": "Create float attribute", + "operationId": "databasesCreateFloatAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "AttributeFloat", + "schema": { + "$ref": "#\/definitions\/attributeFloat" + } + } + }, + "x-appwrite": { + "method": "createFloatAttribute", + "weight": 87, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-float-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value to enforce on new documents", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value to enforce on new documents", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float\/{key}": { + "patch": { + "summary": "Update float attribute", + "operationId": "databasesUpdateFloatAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeFloat", + "schema": { + "$ref": "#\/definitions\/attributeFloat" + } + } + }, + "x-appwrite": { + "method": "updateFloatAttribute", + "weight": 99, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-float-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "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, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "min", + "max", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer": { + "post": { + "summary": "Create integer attribute", + "operationId": "databasesCreateIntegerAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "AttributeInteger", + "schema": { + "$ref": "#\/definitions\/attributeInteger" + } + } + }, + "x-appwrite": { + "method": "createIntegerAttribute", + "weight": 86, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-integer-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce on new documents", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce on new documents", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer\/{key}": { + "patch": { + "summary": "Update integer attribute", + "operationId": "databasesUpdateIntegerAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeInteger", + "schema": { + "$ref": "#\/definitions\/attributeInteger" + } + } + }, + "x-appwrite": { + "method": "updateIntegerAttribute", + "weight": 98, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-integer-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "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, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "min", + "max", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip": { + "post": { + "summary": "Create IP address attribute", + "operationId": "databasesCreateIpAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create IP address attribute.\n", + "responses": { + "202": { + "description": "AttributeIP", + "schema": { + "$ref": "#\/definitions\/attributeIp" + } + } + }, + "x-appwrite": { + "method": "createIpAttribute", + "weight": 84, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-ip-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip\/{key}": { + "patch": { + "summary": "Update IP address attribute", + "operationId": "databasesUpdateIpAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeIP", + "schema": { + "$ref": "#\/definitions\/attributeIp" + } + } + }, + "x-appwrite": { + "method": "updateIpAttribute", + "weight": 96, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-ip-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "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, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship": { + "post": { + "summary": "Create relationship attribute", + "operationId": "databasesCreateRelationshipAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", + "responses": { + "202": { + "description": "AttributeRelationship", + "schema": { + "$ref": "#\/definitions\/attributeRelationship" + } + } + }, + "x-appwrite": { + "method": "createRelationshipAttribute", + "weight": 90, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-relationship-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "relatedCollectionId": { + "type": "string", + "description": "Related Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "default": null, + "x-example": "<RELATED_COLLECTION_ID>" + }, + "type": { + "type": "string", + "description": "Relation type", + "default": null, + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "default": false, + "x-example": false + }, + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Attribute Key.", + "default": null, + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": "restrict", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedCollectionId", + "type" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string": { + "post": { + "summary": "Create string attribute", + "operationId": "databasesCreateStringAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a string attribute.\n", + "responses": { + "202": { + "description": "AttributeString", + "schema": { + "$ref": "#\/definitions\/attributeString" + } + } + }, + "x-appwrite": { + "method": "createStringAttribute", + "weight": 81, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-string-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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 + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string\/{key}": { + "patch": { + "summary": "Update string attribute", + "operationId": "databasesUpdateStringAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeString", + "schema": { + "$ref": "#\/definitions\/attributeString" + } + } + }, + "x-appwrite": { + "method": "updateStringAttribute", + "weight": 93, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-string-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "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>", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string attribute.", + "default": null, + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url": { + "post": { + "summary": "Create URL attribute", + "operationId": "databasesCreateUrlAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a URL attribute.\n", + "responses": { + "202": { + "description": "AttributeURL", + "schema": { + "$ref": "#\/definitions\/attributeUrl" + } + } + }, + "x-appwrite": { + "method": "createUrlAttribute", + "weight": 85, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-url-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url\/{key}": { + "patch": { + "summary": "Update URL attribute", + "operationId": "databasesUpdateUrlAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeURL", + "schema": { + "$ref": "#\/definitions\/attributeUrl" + } + } + }, + "x-appwrite": { + "method": "updateUrlAttribute", + "weight": 97, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-url-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "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", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}": { + "get": { + "summary": "Get attribute", + "operationId": "databasesGetAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get attribute by ID.", + "responses": { + "200": { + "description": "AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeRelationship, 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\/attributeDatetime" + }, + { + "$ref": "#\/definitions\/attributeRelationship" + }, + { + "$ref": "#\/definitions\/attributeString" + } + ] + } + } + }, + "x-appwrite": { + "method": "getAttribute", + "weight": 92, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/get-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete attribute", + "operationId": "databasesDeleteAttribute", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "description": "Deletes an attribute.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteAttribute", + "weight": 103, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}\/relationship": { + "patch": { + "summary": "Update relationship attribute", + "operationId": "databasesUpdateRelationshipAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", + "responses": { + "200": { + "description": "AttributeRelationship", + "schema": { + "$ref": "#\/definitions\/attributeRelationship" + } + } + }, + "x-appwrite": { + "method": "updateRelationshipAttribute", + "weight": 102, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-relationship-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": null, + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "databasesListDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "x-appwrite": { + "method": "listDocuments", + "weight": 109, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/list-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "databasesCreateDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "x-appwrite": { + "method": "createDocument", + "weight": 108, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). 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 a custom ID or generate a random ID with `ID.unique()`. Valid 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": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + }, + "required": [ + "documentId", + "data" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "databasesGetDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "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": 110, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/get-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "patch": { + "summary": "Update document", + "operationId": "databasesUpdateDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "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": 112, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete document", + "operationId": "databasesDeleteDocument", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteDocument", + "weight": 113, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "databasesListIndexes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Indexes List", + "schema": { + "$ref": "#\/definitions\/indexList" + } + } + }, + "x-appwrite": { + "method": "listIndexes", + "weight": 105, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "databasesCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/index" + } + } + }, + "x-appwrite": { + "method": "createIndex", + "weight": 104, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "IndexType", + "x-enum-keys": [] + }, + "attributes": { + "type": "array", + "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "key", + "type", + "attributes" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "databasesGetIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/index" + } + } + }, + "x-appwrite": { + "method": "getIndex", + "weight": 106, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "databasesDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteIndex", + "weight": 107, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": 289, + "cookies": false, + "type": "", + "deprecated": false, + "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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + }, + "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](https:\/\/appwrite.io\/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": 288, + "cookies": false, + "type": "", + "deprecated": false, + "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 a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + }, + "runtime": { + "type": "string", + "description": "Execution runtime.", + "default": null, + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-ml-3.11", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "go-1.23", + "static-1", + "flutter-3.24" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "execute": { + "type": "array", + "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "default": [], + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + }, + "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 + }, + "enabled": { + "type": "boolean", + "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project.", + "default": true, + "x-example": false + }, + "entrypoint": { + "type": "string", + "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", + "default": "", + "x-example": "<ENTRYPOINT>" + }, + "commands": { + "type": "string", + "description": "Build Commands.", + "default": "", + "x-example": "<COMMANDS>" + }, + "scopes": { + "type": "array", + "description": "List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", + "default": "", + "x-example": "<INSTALLATION_ID>" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the function.", + "default": "", + "x-example": "<PROVIDER_REPOSITORY_ID>" + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the function.", + "default": "", + "x-example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", + "default": false, + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function code in the linked repo.", + "default": "", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "templateRepository": { + "type": "string", + "description": "Repository name of the template.", + "default": "", + "x-example": "<TEMPLATE_REPOSITORY>" + }, + "templateOwner": { + "type": "string", + "description": "The name of the owner of the template.", + "default": "", + "x-example": "<TEMPLATE_OWNER>" + }, + "templateRootDirectory": { + "type": "string", + "description": "Path to function code in the template repo.", + "default": "", + "x-example": "<TEMPLATE_ROOT_DIRECTORY>" + }, + "templateVersion": { + "type": "string", + "description": "Version (tag) for the repo linked to the function template.", + "default": "", + "x-example": "<TEMPLATE_VERSION>" + }, + "specification": { + "type": "string", + "description": "Runtime specification for the function and builds.", + "default": "s-1vcpu-512mb", + "x-example": null + } + }, + "required": [ + "functionId", + "name", + "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": 290, + "cookies": false, + "type": "", + "deprecated": false, + "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\/specifications": { + "get": { + "summary": "List available function runtime specifications", + "operationId": "functionsListSpecifications", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "List allowed function specifications for this instance.\n", + "responses": { + "200": { + "description": "Specifications List", + "schema": { + "$ref": "#\/definitions\/specificationList" + } + } + }, + "x-appwrite": { + "method": "listSpecifications", + "weight": 291, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/list-specifications.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "server", + "console" + ], + "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": 292, + "cookies": false, + "type": "", + "deprecated": false, + "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": 295, + "cookies": false, + "type": "", + "deprecated": false, + "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>" + }, + "runtime": { + "type": "string", + "description": "Execution runtime.", + "default": "", + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-ml-3.11", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "go-1.23", + "static-1", + "flutter-3.24" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "execute": { + "type": "array", + "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "default": [], + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + }, + "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 + }, + "enabled": { + "type": "boolean", + "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project.", + "default": true, + "x-example": false + }, + "entrypoint": { + "type": "string", + "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", + "default": "", + "x-example": "<ENTRYPOINT>" + }, + "commands": { + "type": "string", + "description": "Build Commands.", + "default": "", + "x-example": "<COMMANDS>" + }, + "scopes": { + "type": "array", + "description": "List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Controle System) deployment.", + "default": "", + "x-example": "<INSTALLATION_ID>" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the function", + "default": null, + "x-example": "<PROVIDER_REPOSITORY_ID>", + "x-nullable": true + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the function", + "default": "", + "x-example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", + "default": false, + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function code in the linked repo.", + "default": "", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "specification": { + "type": "string", + "description": "Runtime specification for the function and builds.", + "default": "s-1vcpu-512mb", + "x-example": null + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "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": 298, + "cookies": false, + "type": "", + "deprecated": false, + "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": 300, + "cookies": false, + "type": "", + "deprecated": false, + "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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: size, buildId, activate, entrypoint, commands, type, size", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + }, + "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](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", + "responses": { + "202": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "x-appwrite": { + "method": "createDeployment", + "weight": 299, + "cookies": false, + "type": "upload", + "deprecated": false, + "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": false, + "type": "string", + "x-example": "<ENTRYPOINT>", + "in": "formData" + }, + { + "name": "commands", + "description": "Build Commands.", + "required": false, + "type": "string", + "x-example": "<COMMANDS>", + "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": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "x-appwrite": { + "method": "getDeployment", + "weight": 301, + "cookies": false, + "type": "", + "deprecated": false, + "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 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": 297, + "cookies": false, + "type": "", + "deprecated": false, + "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": 302, + "cookies": false, + "type": "", + "deprecated": false, + "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}\/build": { + "post": { + "summary": "Rebuild deployment", + "operationId": "functionsCreateBuild", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "createBuild", + "weight": 303, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/create-build.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-build.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" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "buildId": { + "type": "string", + "description": "Build unique ID.", + "default": "", + "x-example": "<BUILD_ID>" + } + } + } + } + ] + }, + "patch": { + "summary": "Cancel deployment", + "operationId": "functionsUpdateDeploymentBuild", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", + "responses": { + "200": { + "description": "Build", + "schema": { + "$ref": "#\/definitions\/build" + } + } + }, + "x-appwrite": { + "method": "updateDeploymentBuild", + "weight": 304, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/update-deployment-build.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-deployment-build.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}\/download": { + "get": { + "summary": "Download deployment", + "operationId": "functionsGetDeploymentDownload", + "consumes": [ + "application\/json" + ], + "produces": [ + "*\/*" + ], + "tags": [ + "functions" + ], + "description": "Get a Deployment's contents by its unique ID. This endpoint supports range requests for partial or streaming file download.", + "responses": { + "200": { + "description": "File", + "schema": { + "type": "file" + } + } + }, + "x-appwrite": { + "method": "getDeploymentDownload", + "weight": 296, + "cookies": false, + "type": "location", + "deprecated": false, + "demo": "functions\/get-deployment-download.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "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" + } + ] + } + }, + "\/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.", + "responses": { + "200": { + "description": "Executions List", + "schema": { + "$ref": "#\/definitions\/executionList" + } + } + }, + "x-appwrite": { + "method": "listExecutions", + "weight": 306, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_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\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + }, + "post": { + "summary": "Create execution", + "operationId": "functionsCreateExecution", + "consumes": [ + "application\/json" + ], + "produces": [ + "multipart\/form-data" + ], + "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": 305, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/create-execution.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "execution.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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": { + "body": { + "type": "string", + "description": "HTTP body of execution. Default value is empty string.", + "default": "", + "x-example": "<BODY>" + }, + "async": { + "type": "boolean", + "description": "Execute code in the background. Default value is false.", + "default": false, + "x-example": false + }, + "path": { + "type": "string", + "description": "HTTP path of execution. Path can include query params. Default value is \/", + "default": "\/", + "x-example": "<PATH>" + }, + "method": { + "type": "string", + "description": "HTTP method of execution. Default value is GET.", + "default": "POST", + "x-example": "GET", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS" + ], + "x-enum-name": "ExecutionMethod", + "x-enum-keys": [] + }, + "headers": { + "type": "object", + "description": "HTTP headers of execution. Defaults to empty.", + "default": [], + "x-example": "{}" + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/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": 307, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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" + } + ] + }, + "delete": { + "summary": "Delete execution", + "operationId": "functionsDeleteExecution", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "functions" + ], + "description": "Delete a function execution by its unique ID.\n", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteExecution", + "weight": 308, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/delete-execution.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "execution.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": "executionId", + "description": "Execution ID.", + "required": true, + "type": "string", + "x-example": "<EXECUTION_ID>", + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}\/variables": { + "get": { + "summary": "List variables", + "operationId": "functionsListVariables", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a list of all variables of a specific function.", + "responses": { + "200": { + "description": "Variables List", + "schema": { + "$ref": "#\/definitions\/variableList" + } + } + }, + "x-appwrite": { + "method": "listVariables", + "weight": 310, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/list-variables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-variables.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 unique ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + } + ] + }, + "post": { + "summary": "Create variable", + "operationId": "functionsCreateVariable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", + "responses": { + "201": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "x-appwrite": { + "method": "createVariable", + "weight": 309, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/create-variable.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-variable.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 unique ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "default": null, + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "default": null, + "x-example": "<VALUE>" + } + }, + "required": [ + "key", + "value" + ] + } + } + ] + } + }, + "\/functions\/{functionId}\/variables\/{variableId}": { + "get": { + "summary": "Get variable", + "operationId": "functionsGetVariable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "x-appwrite": { + "method": "getVariable", + "weight": 311, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/get-variable.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-variable.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 unique ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update variable", + "operationId": "functionsUpdateVariable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Update variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "x-appwrite": { + "method": "updateVariable", + "weight": 312, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/update-variable.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-variable.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 unique ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "default": null, + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "default": null, + "x-example": "<VALUE>" + } + }, + "required": [ + "key" + ] + } + } + ] + }, + "delete": { + "summary": "Delete variable", + "operationId": "functionsDeleteVariable", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "functions" + ], + "description": "Delete a variable by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteVariable", + "weight": 313, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "functions\/delete-variable.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-variable.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 unique ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + } + ] + } + }, + "\/graphql": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlQuery", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "graphql" + ], + "description": "Execute a GraphQL mutation.", + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "x-appwrite": { + "method": "query", + "weight": 331, + "cookies": false, + "type": "graphql", + "deprecated": false, + "demo": "graphql\/query.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", + "platforms": [ + "server", + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "query": { + "type": "object", + "description": "The query or queries to execute.", + "default": {}, + "x-example": "{}" + } + }, + "required": [ + "query" + ] + } + } + ] + } + }, + "\/graphql\/mutation": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlMutation", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "graphql" + ], + "description": "Execute a GraphQL mutation.", + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "x-appwrite": { + "method": "mutation", + "weight": 330, + "cookies": false, + "type": "graphql", + "deprecated": false, + "demo": "graphql\/mutation.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", + "platforms": [ + "server", + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "query": { + "type": "object", + "description": "The query or queries to execute.", + "default": {}, + "x-example": "{}" + } + }, + "required": [ + "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": 125, + "cookies": false, + "type": "", + "deprecated": false, + "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": 147, + "cookies": false, + "type": "", + "deprecated": false, + "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 servers are up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "schema": { + "$ref": "#\/definitions\/healthStatus" + } + } + }, + "x-appwrite": { + "method": "getCache", + "weight": 128, + "cookies": false, + "type": "", + "deprecated": false, + "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\/certificate": { + "get": { + "summary": "Get the SSL certificate for a domain", + "operationId": "healthGetCertificate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the SSL certificate for a domain", + "responses": { + "200": { + "description": "Health Certificate", + "schema": { + "$ref": "#\/definitions\/healthCertificate" + } + } + }, + "x-appwrite": { + "method": "getCertificate", + "weight": 134, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-certificate.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-certificate.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": [] + } + ], + "parameters": [ + { + "name": "domain", + "description": "string", + "required": false, + "type": "string", + "in": "query" + } + ] + } + }, + "\/health\/db": { + "get": { + "summary": "Get DB", + "operationId": "healthGetDB", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite database servers are up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "schema": { + "$ref": "#\/definitions\/healthStatus" + } + } + }, + "x-appwrite": { + "method": "getDB", + "weight": 127, + "cookies": false, + "type": "", + "deprecated": false, + "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\/pubsub": { + "get": { + "summary": "Get pubsub", + "operationId": "healthGetPubSub", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite pub-sub servers are up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "schema": { + "$ref": "#\/definitions\/healthStatus" + } + } + }, + "x-appwrite": { + "method": "getPubSub", + "weight": 130, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-pub-sub.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.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": { + "get": { + "summary": "Get queue", + "operationId": "healthGetQueue", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite queue messaging servers are up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "schema": { + "$ref": "#\/definitions\/healthStatus" + } + } + }, + "x-appwrite": { + "method": "getQueue", + "weight": 129, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue.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\/builds": { + "get": { + "summary": "Get builds queue", + "operationId": "healthGetQueueBuilds", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of builds that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "x-appwrite": { + "method": "getQueueBuilds", + "weight": 136, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue-builds.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-builds.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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/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": 135, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/databases": { + "get": { + "summary": "Get databases queue", + "operationId": "healthGetQueueDatabases", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "x-appwrite": { + "method": "getQueueDatabases", + "weight": 137, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue-databases.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-databases.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": [] + } + ], + "parameters": [ + { + "name": "name", + "description": "Queue name for which to check the queue size", + "required": false, + "type": "string", + "x-example": "<NAME>", + "default": "database_db_main", + "in": "query" + }, + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/deletes": { + "get": { + "summary": "Get deletes queue", + "operationId": "healthGetQueueDeletes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "x-appwrite": { + "method": "getQueueDeletes", + "weight": 138, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue-deletes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-deletes.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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/failed\/{name}": { + "get": { + "summary": "Get number of failed queue jobs", + "operationId": "healthGetFailedJobs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Returns the amount of failed jobs in a given queue.\n", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "x-appwrite": { + "method": "getFailedJobs", + "weight": 148, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-failed-jobs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-failed-queue-jobs.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": [] + } + ], + "parameters": [ + { + "name": "name", + "description": "The name of the queue", + "required": true, + "type": "string", + "x-example": "v1-database", + "enum": [ + "v1-database", + "v1-deletes", + "v1-audits", + "v1-mails", + "v1-functions", + "v1-usage", + "v1-usage-dump", + "v1-webhooks", + "v1-certificates", + "v1-builds", + "v1-messaging", + "v1-migrations" + ], + "x-enum-name": null, + "x-enum-keys": [], + "in": "path" + }, + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/functions": { + "get": { + "summary": "Get functions queue", + "operationId": "healthGetQueueFunctions", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "x-appwrite": { + "method": "getQueueFunctions", + "weight": 142, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/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": 133, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/mails": { + "get": { + "summary": "Get mails queue", + "operationId": "healthGetQueueMails", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of mails that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "x-appwrite": { + "method": "getQueueMails", + "weight": 139, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue-mails.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-mails.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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/messaging": { + "get": { + "summary": "Get messaging queue", + "operationId": "healthGetQueueMessaging", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of messages that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "x-appwrite": { + "method": "getQueueMessaging", + "weight": 140, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue-messaging.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-messaging.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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/migrations": { + "get": { + "summary": "Get migrations queue", + "operationId": "healthGetQueueMigrations", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "x-appwrite": { + "method": "getQueueMigrations", + "weight": 141, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue-migrations.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-migrations.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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/usage": { + "get": { + "summary": "Get usage queue", + "operationId": "healthGetQueueUsage", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of metrics 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": 143, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/usage-dump": { + "get": { + "summary": "Get usage dump queue", + "operationId": "healthGetQueueUsageDump", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of projects containing metrics that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "x-appwrite": { + "method": "getQueueUsageDump", + "weight": 144, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-queue-usage-dump.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage-dump.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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/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": 132, + "cookies": false, + "type": "", + "deprecated": false, + "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": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/storage": { + "get": { + "summary": "Get storage", + "operationId": "healthGetStorage", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite storage device is up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "schema": { + "$ref": "#\/definitions\/healthStatus" + } + } + }, + "x-appwrite": { + "method": "getStorage", + "weight": 146, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "health\/get-storage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage.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": 145, + "cookies": false, + "type": "", + "deprecated": false, + "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": 131, + "cookies": false, + "type": "", + "deprecated": false, + "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": 117, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/codes": { + "get": { + "summary": "List locale codes", + "operationId": "localeListCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "List of all locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", + "responses": { + "200": { + "description": "Locale codes list", + "schema": { + "$ref": "#\/definitions\/localeCodeList" + } + } + }, + "x-appwrite": { + "method": "listCodes", + "weight": 118, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "locale\/list-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/continents": { + "get": { + "summary": "List continents", + "operationId": "localeListContinents", + "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": "listContinents", + "weight": 122, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "locale\/list-continents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries": { + "get": { + "summary": "List countries", + "operationId": "localeListCountries", + "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": "listCountries", + "weight": 119, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "locale\/list-countries.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries\/eu": { + "get": { + "summary": "List EU countries", + "operationId": "localeListCountriesEU", + "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": "listCountriesEU", + "weight": 120, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "locale\/list-countries-e-u.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries\/phones": { + "get": { + "summary": "List countries phone codes", + "operationId": "localeListCountriesPhones", + "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": "listCountriesPhones", + "weight": 121, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "locale\/list-countries-phones.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/currencies": { + "get": { + "summary": "List currencies", + "operationId": "localeListCurrencies", + "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": "listCurrencies", + "weight": 123, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "locale\/list-currencies.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/languages": { + "get": { + "summary": "List languages", + "operationId": "localeListLanguages", + "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": "listLanguages", + "weight": 124, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "locale\/list-languages.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/messaging\/messages": { + "get": { + "summary": "List messages", + "operationId": "messagingListMessages", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a list of all messages from the current Appwrite project.", + "responses": { + "200": { + "description": "Message list", + "schema": { + "$ref": "#\/definitions\/messageList" + } + } + }, + "x-appwrite": { + "method": "listMessages", + "weight": 384, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-messages.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-messages.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + } + }, + "\/messaging\/messages\/email": { + "post": { + "summary": "Create email", + "operationId": "messagingCreateEmail", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new email message.", + "responses": { + "201": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "x-appwrite": { + "method": "createEmail", + "weight": 381, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-email.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<MESSAGE_ID>" + }, + "subject": { + "type": "string", + "description": "Email Subject.", + "default": null, + "x-example": "<SUBJECT>" + }, + "content": { + "type": "string", + "description": "Email Content.", + "default": null, + "x-example": "<CONTENT>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "cc": { + "type": "array", + "description": "Array of target IDs to be added as CC.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "bcc": { + "type": "array", + "description": "Array of target IDs to be added as BCC.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "attachments": { + "type": "array", + "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": false, + "x-example": false + }, + "html": { + "type": "boolean", + "description": "Is content of type HTML", + "default": false, + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": null + } + }, + "required": [ + "messageId", + "subject", + "content" + ] + } + } + ] + } + }, + "\/messaging\/messages\/email\/{messageId}": { + "patch": { + "summary": "Update email", + "operationId": "messagingUpdateEmail", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "x-appwrite": { + "method": "updateEmail", + "weight": 388, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-email.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "subject": { + "type": "string", + "description": "Email Subject.", + "default": null, + "x-example": "<SUBJECT>" + }, + "content": { + "type": "string", + "description": "Email Content.", + "default": null, + "x-example": "<CONTENT>" + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": null, + "x-example": false + }, + "html": { + "type": "boolean", + "description": "Is content of type HTML", + "default": null, + "x-example": false + }, + "cc": { + "type": "array", + "description": "Array of target IDs to be added as CC.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "bcc": { + "type": "array", + "description": "Array of target IDs to be added as BCC.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": null + }, + "attachments": { + "type": "array", + "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + } + }, + "\/messaging\/messages\/push": { + "post": { + "summary": "Create push notification", + "operationId": "messagingCreatePush", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new push notification.", + "responses": { + "201": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "x-appwrite": { + "method": "createPush", + "weight": 383, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-push.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-push.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<MESSAGE_ID>" + }, + "title": { + "type": "string", + "description": "Title for push notification.", + "default": "", + "x-example": "<TITLE>" + }, + "body": { + "type": "string", + "description": "Body for push notification.", + "default": "", + "x-example": "<BODY>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "data": { + "type": "object", + "description": "Additional key-value pair data for push notification.", + "default": {}, + "x-example": "{}" + }, + "action": { + "type": "string", + "description": "Action for push notification.", + "default": "", + "x-example": "<ACTION>" + }, + "image": { + "type": "string", + "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", + "default": "", + "x-example": "[ID1:ID2]" + }, + "icon": { + "type": "string", + "description": "Icon for push notification. Available only for Android and Web Platform.", + "default": "", + "x-example": "<ICON>" + }, + "sound": { + "type": "string", + "description": "Sound for push notification. Available only for Android and iOS Platform.", + "default": "", + "x-example": "<SOUND>" + }, + "color": { + "type": "string", + "description": "Color for push notification. Available only for Android Platform.", + "default": "", + "x-example": "<COLOR>" + }, + "tag": { + "type": "string", + "description": "Tag for push notification. Available only for Android Platform.", + "default": "", + "x-example": "<TAG>" + }, + "badge": { + "type": "integer", + "description": "Badge for push notification. Available only for iOS Platform.", + "default": -1, + "x-example": null + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": false, + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": null + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "default": false, + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "default": false, + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", + "default": "high", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] + } + }, + "required": [ + "messageId" + ] + } + } + ] + } + }, + "\/messaging\/messages\/push\/{messageId}": { + "patch": { + "summary": "Update push notification", + "operationId": "messagingUpdatePush", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "x-appwrite": { + "method": "updatePush", + "weight": 390, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-push.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-push.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "title": { + "type": "string", + "description": "Title for push notification.", + "default": null, + "x-example": "<TITLE>" + }, + "body": { + "type": "string", + "description": "Body for push notification.", + "default": null, + "x-example": "<BODY>" + }, + "data": { + "type": "object", + "description": "Additional Data for push notification.", + "default": {}, + "x-example": "{}" + }, + "action": { + "type": "string", + "description": "Action for push notification.", + "default": null, + "x-example": "<ACTION>" + }, + "image": { + "type": "string", + "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", + "default": null, + "x-example": "[ID1:ID2]" + }, + "icon": { + "type": "string", + "description": "Icon for push notification. Available only for Android and Web platforms.", + "default": null, + "x-example": "<ICON>" + }, + "sound": { + "type": "string", + "description": "Sound for push notification. Available only for Android and iOS platforms.", + "default": null, + "x-example": "<SOUND>" + }, + "color": { + "type": "string", + "description": "Color for push notification. Available only for Android platforms.", + "default": null, + "x-example": "<COLOR>" + }, + "tag": { + "type": "string", + "description": "Tag for push notification. Available only for Android platforms.", + "default": null, + "x-example": "<TAG>" + }, + "badge": { + "type": "integer", + "description": "Badge for push notification. Available only for iOS platforms.", + "default": null, + "x-example": null + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": null, + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": null + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "default": null, + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "default": null, + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", + "default": null, + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] + } + } + } + } + ] + } + }, + "\/messaging\/messages\/sms": { + "post": { + "summary": "Create SMS", + "operationId": "messagingCreateSms", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new SMS message.", + "responses": { + "201": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "x-appwrite": { + "method": "createSms", + "weight": 382, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-sms.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<MESSAGE_ID>" + }, + "content": { + "type": "string", + "description": "SMS Content.", + "default": null, + "x-example": "<CONTENT>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": false, + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": null + } + }, + "required": [ + "messageId", + "content" + ] + } + } + ] + } + }, + "\/messaging\/messages\/sms\/{messageId}": { + "patch": { + "summary": "Update SMS", + "operationId": "messagingUpdateSms", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "x-appwrite": { + "method": "updateSms", + "weight": 389, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-sms.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "content": { + "type": "string", + "description": "Email Content.", + "default": null, + "x-example": "<CONTENT>" + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": null, + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/messaging\/messages\/{messageId}": { + "get": { + "summary": "Get message", + "operationId": "messagingGetMessage", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a message by its unique ID.\n", + "responses": { + "200": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "x-appwrite": { + "method": "getMessage", + "weight": 387, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/get-message.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-message.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete message", + "operationId": "messagingDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "messaging" + ], + "description": "Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "weight": 391, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-message.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + } + ] + } + }, + "\/messaging\/messages\/{messageId}\/logs": { + "get": { + "summary": "List message logs", + "operationId": "messagingListMessageLogs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get the message activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "x-appwrite": { + "method": "listMessageLogs", + "weight": 385, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-message-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_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\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/messaging\/messages\/{messageId}\/targets": { + "get": { + "summary": "List message targets", + "operationId": "messagingListTargets", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a list of the targets associated with a message.", + "responses": { + "200": { + "description": "Target list", + "schema": { + "$ref": "#\/definitions\/targetList" + } + } + }, + "x-appwrite": { + "method": "listTargets", + "weight": 386, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-targets.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-targets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_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\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/messaging\/providers": { + "get": { + "summary": "List providers", + "operationId": "messagingListProviders", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a list of all providers from the current Appwrite project.", + "responses": { + "200": { + "description": "Provider list", + "schema": { + "$ref": "#\/definitions\/providerList" + } + } + }, + "x-appwrite": { + "method": "listProviders", + "weight": 356, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-providers.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-providers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + } + }, + "\/messaging\/providers\/apns": { + "post": { + "summary": "Create APNS provider", + "operationId": "messagingCreateApnsProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Apple Push Notification service provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "createApnsProvider", + "weight": 355, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-apns-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-apns-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "authKey": { + "type": "string", + "description": "APNS authentication key.", + "default": "", + "x-example": "<AUTH_KEY>" + }, + "authKeyId": { + "type": "string", + "description": "APNS authentication key ID.", + "default": "", + "x-example": "<AUTH_KEY_ID>" + }, + "teamId": { + "type": "string", + "description": "APNS team ID.", + "default": "", + "x-example": "<TEAM_ID>" + }, + "bundleId": { + "type": "string", + "description": "APNS bundle ID.", + "default": "", + "x-example": "<BUNDLE_ID>" + }, + "sandbox": { + "type": "boolean", + "description": "Use APNS sandbox environment.", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/apns\/{providerId}": { + "patch": { + "summary": "Update APNS provider", + "operationId": "messagingUpdateApnsProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "updateApnsProvider", + "weight": 368, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-apns-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-apns-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + }, + "authKey": { + "type": "string", + "description": "APNS authentication key.", + "default": "", + "x-example": "<AUTH_KEY>" + }, + "authKeyId": { + "type": "string", + "description": "APNS authentication key ID.", + "default": "", + "x-example": "<AUTH_KEY_ID>" + }, + "teamId": { + "type": "string", + "description": "APNS team ID.", + "default": "", + "x-example": "<TEAM_ID>" + }, + "bundleId": { + "type": "string", + "description": "APNS bundle ID.", + "default": "", + "x-example": "<BUNDLE_ID>" + }, + "sandbox": { + "type": "boolean", + "description": "Use APNS sandbox environment.", + "default": null, + "x-example": false + } + } + } + } + ] + } + }, + "\/messaging\/providers\/fcm": { + "post": { + "summary": "Create FCM provider", + "operationId": "messagingCreateFcmProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "createFcmProvider", + "weight": 354, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-fcm-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-fcm-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "serviceAccountJSON": { + "type": "object", + "description": "FCM service account JSON.", + "default": {}, + "x-example": "{}" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/fcm\/{providerId}": { + "patch": { + "summary": "Update FCM provider", + "operationId": "messagingUpdateFcmProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "updateFcmProvider", + "weight": 367, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-fcm-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-fcm-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + }, + "serviceAccountJSON": { + "type": "object", + "description": "FCM service account JSON.", + "default": {}, + "x-example": "{}" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/mailgun": { + "post": { + "summary": "Create Mailgun provider", + "operationId": "messagingCreateMailgunProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Mailgun provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "createMailgunProvider", + "weight": 346, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-mailgun-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-mailgun-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Mailgun API Key.", + "default": "", + "x-example": "<API_KEY>" + }, + "domain": { + "type": "string", + "description": "Mailgun Domain.", + "default": "", + "x-example": "<DOMAIN>" + }, + "isEuRegion": { + "type": "boolean", + "description": "Set as EU region.", + "default": null, + "x-example": false + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well.", + "default": "", + "x-example": "email@example.com" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/mailgun\/{providerId}": { + "patch": { + "summary": "Update Mailgun provider", + "operationId": "messagingUpdateMailgunProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Mailgun provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "updateMailgunProvider", + "weight": 359, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-mailgun-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-mailgun-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Mailgun API Key.", + "default": "", + "x-example": "<API_KEY>" + }, + "domain": { + "type": "string", + "description": "Mailgun Domain.", + "default": "", + "x-example": "<DOMAIN>" + }, + "isEuRegion": { + "type": "boolean", + "description": "Set as EU region.", + "default": null, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/msg91": { + "post": { + "summary": "Create Msg91 provider", + "operationId": "messagingCreateMsg91Provider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new MSG91 provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "createMsg91Provider", + "weight": 349, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-msg91provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "templateId": { + "type": "string", + "description": "Msg91 template ID", + "default": "", + "x-example": "<TEMPLATE_ID>" + }, + "senderId": { + "type": "string", + "description": "Msg91 sender ID.", + "default": "", + "x-example": "<SENDER_ID>" + }, + "authKey": { + "type": "string", + "description": "Msg91 auth key.", + "default": "", + "x-example": "<AUTH_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/msg91\/{providerId}": { + "patch": { + "summary": "Update Msg91 provider", + "operationId": "messagingUpdateMsg91Provider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a MSG91 provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "updateMsg91Provider", + "weight": 362, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-msg91provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + }, + "templateId": { + "type": "string", + "description": "Msg91 template ID.", + "default": "", + "x-example": "<TEMPLATE_ID>" + }, + "senderId": { + "type": "string", + "description": "Msg91 sender ID.", + "default": "", + "x-example": "<SENDER_ID>" + }, + "authKey": { + "type": "string", + "description": "Msg91 auth key.", + "default": "", + "x-example": "<AUTH_KEY>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/sendgrid": { + "post": { + "summary": "Create Sendgrid provider", + "operationId": "messagingCreateSendgridProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Sendgrid provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "createSendgridProvider", + "weight": 347, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-sendgrid-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Sendgrid API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "email@example.com" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/sendgrid\/{providerId}": { + "patch": { + "summary": "Update Sendgrid provider", + "operationId": "messagingUpdateSendgridProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Sendgrid provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "updateSendgridProvider", + "weight": 360, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-sendgrid-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + }, + "apiKey": { + "type": "string", + "description": "Sendgrid API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/smtp": { + "post": { + "summary": "Create SMTP provider", + "operationId": "messagingCreateSmtpProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new SMTP provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "createSmtpProvider", + "weight": 348, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-smtp-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-smtp-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "host": { + "type": "string", + "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", + "default": null, + "x-example": "<HOST>" + }, + "port": { + "type": "integer", + "description": "The default SMTP server port.", + "default": 587, + "x-example": 1 + }, + "username": { + "type": "string", + "description": "Authentication username.", + "default": "", + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "Authentication password.", + "default": "", + "x-example": "<PASSWORD>" + }, + "encryption": { + "type": "string", + "description": "Encryption type. Can be omitted, 'ssl', or 'tls'", + "default": "", + "x-example": "none", + "enum": [ + "none", + "ssl", + "tls" + ], + "x-enum-name": "SmtpEncryption", + "x-enum-keys": [] + }, + "autoTLS": { + "type": "boolean", + "description": "Enable SMTP AutoTLS feature.", + "default": true, + "x-example": false + }, + "mailer": { + "type": "string", + "description": "The value to use for the X-Mailer header.", + "default": "", + "x-example": "<MAILER>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "email@example.com" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + } + }, + "required": [ + "providerId", + "name", + "host" + ] + } + } + ] + } + }, + "\/messaging\/providers\/smtp\/{providerId}": { + "patch": { + "summary": "Update SMTP provider", + "operationId": "messagingUpdateSmtpProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a SMTP provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "updateSmtpProvider", + "weight": 361, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-smtp-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-smtp-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "host": { + "type": "string", + "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", + "default": "", + "x-example": "<HOST>" + }, + "port": { + "type": "integer", + "description": "SMTP port.", + "default": null, + "x-example": 1 + }, + "username": { + "type": "string", + "description": "Authentication username.", + "default": "", + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "Authentication password.", + "default": "", + "x-example": "<PASSWORD>" + }, + "encryption": { + "type": "string", + "description": "Encryption type. Can be 'ssl' or 'tls'", + "default": "", + "x-example": "none", + "enum": [ + "none", + "ssl", + "tls" + ], + "x-enum-name": "SmtpEncryption", + "x-enum-keys": [] + }, + "autoTLS": { + "type": "boolean", + "description": "Enable SMTP AutoTLS feature.", + "default": null, + "x-example": false + }, + "mailer": { + "type": "string", + "description": "The value to use for the X-Mailer header.", + "default": "", + "x-example": "<MAILER>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + } + } + } + } + ] + } + }, + "\/messaging\/providers\/telesign": { + "post": { + "summary": "Create Telesign provider", + "operationId": "messagingCreateTelesignProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Telesign provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "createTelesignProvider", + "weight": 350, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-telesign-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-telesign-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100" + }, + "customerId": { + "type": "string", + "description": "Telesign customer ID.", + "default": "", + "x-example": "<CUSTOMER_ID>" + }, + "apiKey": { + "type": "string", + "description": "Telesign API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/telesign\/{providerId}": { + "patch": { + "summary": "Update Telesign provider", + "operationId": "messagingUpdateTelesignProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Telesign provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "updateTelesignProvider", + "weight": 363, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-telesign-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-telesign-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + }, + "customerId": { + "type": "string", + "description": "Telesign customer ID.", + "default": "", + "x-example": "<CUSTOMER_ID>" + }, + "apiKey": { + "type": "string", + "description": "Telesign API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "default": "", + "x-example": "<FROM>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/textmagic": { + "post": { + "summary": "Create Textmagic provider", + "operationId": "messagingCreateTextmagicProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Textmagic provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "createTextmagicProvider", + "weight": 351, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-textmagic-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-textmagic-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100" + }, + "username": { + "type": "string", + "description": "Textmagic username.", + "default": "", + "x-example": "<USERNAME>" + }, + "apiKey": { + "type": "string", + "description": "Textmagic apiKey.", + "default": "", + "x-example": "<API_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/textmagic\/{providerId}": { + "patch": { + "summary": "Update Textmagic provider", + "operationId": "messagingUpdateTextmagicProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Textmagic provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "updateTextmagicProvider", + "weight": 364, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-textmagic-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-textmagic-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + }, + "username": { + "type": "string", + "description": "Textmagic username.", + "default": "", + "x-example": "<USERNAME>" + }, + "apiKey": { + "type": "string", + "description": "Textmagic apiKey.", + "default": "", + "x-example": "<API_KEY>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "default": "", + "x-example": "<FROM>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/twilio": { + "post": { + "summary": "Create Twilio provider", + "operationId": "messagingCreateTwilioProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Twilio provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "createTwilioProvider", + "weight": 352, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-twilio-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-twilio-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100" + }, + "accountSid": { + "type": "string", + "description": "Twilio account secret ID.", + "default": "", + "x-example": "<ACCOUNT_SID>" + }, + "authToken": { + "type": "string", + "description": "Twilio authentication token.", + "default": "", + "x-example": "<AUTH_TOKEN>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/twilio\/{providerId}": { + "patch": { + "summary": "Update Twilio provider", + "operationId": "messagingUpdateTwilioProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Twilio provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "updateTwilioProvider", + "weight": 365, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-twilio-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-twilio-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + }, + "accountSid": { + "type": "string", + "description": "Twilio account secret ID.", + "default": "", + "x-example": "<ACCOUNT_SID>" + }, + "authToken": { + "type": "string", + "description": "Twilio authentication token.", + "default": "", + "x-example": "<AUTH_TOKEN>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "default": "", + "x-example": "<FROM>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/vonage": { + "post": { + "summary": "Create Vonage provider", + "operationId": "messagingCreateVonageProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Vonage provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "createVonageProvider", + "weight": 353, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-vonage-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-vonage-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100" + }, + "apiKey": { + "type": "string", + "description": "Vonage API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "apiSecret": { + "type": "string", + "description": "Vonage API secret.", + "default": "", + "x-example": "<API_SECRET>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/vonage\/{providerId}": { + "patch": { + "summary": "Update Vonage provider", + "operationId": "messagingUpdateVonageProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Vonage provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "updateVonageProvider", + "weight": 366, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-vonage-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-vonage-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false + }, + "apiKey": { + "type": "string", + "description": "Vonage API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "apiSecret": { + "type": "string", + "description": "Vonage API secret.", + "default": "", + "x-example": "<API_SECRET>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "default": "", + "x-example": "<FROM>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/{providerId}": { + "get": { + "summary": "Get provider", + "operationId": "messagingGetProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a provider by its unique ID.\n", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "x-appwrite": { + "method": "getProvider", + "weight": 358, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/get-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete provider", + "operationId": "messagingDeleteProvider", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "messaging" + ], + "description": "Delete a provider by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteProvider", + "weight": 369, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/delete-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + } + ] + } + }, + "\/messaging\/providers\/{providerId}\/logs": { + "get": { + "summary": "List provider logs", + "operationId": "messagingListProviderLogs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get the provider activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "x-appwrite": { + "method": "listProviderLogs", + "weight": 357, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-provider-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-provider-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_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\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/messaging\/subscribers\/{subscriberId}\/logs": { + "get": { + "summary": "List subscriber logs", + "operationId": "messagingListSubscriberLogs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get the subscriber activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "x-appwrite": { + "method": "listSubscriberLogs", + "weight": 378, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-subscriber-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscriber-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "type": "string", + "x-example": "<SUBSCRIBER_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\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/messaging\/topics": { + "get": { + "summary": "List topics", + "operationId": "messagingListTopics", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a list of all topics from the current Appwrite project.", + "responses": { + "200": { + "description": "Topic list", + "schema": { + "$ref": "#\/definitions\/topicList" + } + } + }, + "x-appwrite": { + "method": "listTopics", + "weight": 371, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-topics.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topics.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + }, + "post": { + "summary": "Create topic", + "operationId": "messagingCreateTopic", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new topic.", + "responses": { + "201": { + "description": "Topic", + "schema": { + "$ref": "#\/definitions\/topic" + } + } + }, + "x-appwrite": { + "method": "createTopic", + "weight": 370, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-topic.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "topicId": { + "type": "string", + "description": "Topic ID. Choose a custom Topic ID or a new Topic ID.", + "default": null, + "x-example": "<TOPIC_ID>" + }, + "name": { + "type": "string", + "description": "Topic Name.", + "default": null, + "x-example": "<NAME>" + }, + "subscribe": { + "type": "array", + "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "default": [ + "users" + ], + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + } + }, + "required": [ + "topicId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/topics\/{topicId}": { + "get": { + "summary": "Get topic", + "operationId": "messagingGetTopic", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a topic by its unique ID.\n", + "responses": { + "200": { + "description": "Topic", + "schema": { + "$ref": "#\/definitions\/topic" + } + } + }, + "x-appwrite": { + "method": "getTopic", + "weight": 373, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/get-topic.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update topic", + "operationId": "messagingUpdateTopic", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a topic by its unique ID.\n", + "responses": { + "200": { + "description": "Topic", + "schema": { + "$ref": "#\/definitions\/topic" + } + } + }, + "x-appwrite": { + "method": "updateTopic", + "weight": 374, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/update-topic.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Topic Name.", + "default": null, + "x-example": "<NAME>" + }, + "subscribe": { + "type": "array", + "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "default": null, + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete topic", + "operationId": "messagingDeleteTopic", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "messaging" + ], + "description": "Delete a topic by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteTopic", + "weight": 375, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/delete-topic.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + } + ] + } + }, + "\/messaging\/topics\/{topicId}\/logs": { + "get": { + "summary": "List topic logs", + "operationId": "messagingListTopicLogs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get the topic activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "x-appwrite": { + "method": "listTopicLogs", + "weight": 372, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-topic-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topic-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "type": "string", + "x-example": "<TOPIC_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\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/messaging\/topics\/{topicId}\/subscribers": { + "get": { + "summary": "List subscribers", + "operationId": "messagingListSubscribers", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a list of all subscribers from the current Appwrite project.", + "responses": { + "200": { + "description": "Subscriber list", + "schema": { + "$ref": "#\/definitions\/subscriberList" + } + } + }, + "x-appwrite": { + "method": "listSubscribers", + "weight": 377, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/list-subscribers.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "type": "string", + "x-example": "<TOPIC_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\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + }, + "post": { + "summary": "Create subscriber", + "operationId": "messagingCreateSubscriber", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new subscriber.", + "responses": { + "201": { + "description": "Subscriber", + "schema": { + "$ref": "#\/definitions\/subscriber" + } + } + }, + "x-appwrite": { + "method": "createSubscriber", + "weight": 376, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/create-subscriber.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.write", + "platforms": [ + "server", + "client", + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "JWT": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Session": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID to subscribe to.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "subscriberId": { + "type": "string", + "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", + "default": null, + "x-example": "<SUBSCRIBER_ID>" + }, + "targetId": { + "type": "string", + "description": "Target ID. The target ID to link to the specified Topic ID.", + "default": null, + "x-example": "<TARGET_ID>" + } + }, + "required": [ + "subscriberId", + "targetId" + ] + } + } + ] + } + }, + "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { + "get": { + "summary": "Get subscriber", + "operationId": "messagingGetSubscriber", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a subscriber by its unique ID.\n", + "responses": { + "200": { + "description": "Subscriber", + "schema": { + "$ref": "#\/definitions\/subscriber" + } + } + }, + "x-appwrite": { + "method": "getSubscriber", + "weight": 379, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/get-subscriber.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + }, + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "type": "string", + "x-example": "<SUBSCRIBER_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete subscriber", + "operationId": "messagingDeleteSubscriber", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "messaging" + ], + "description": "Delete a subscriber by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteSubscriber", + "weight": 380, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "messaging\/delete-subscriber.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.write", + "platforms": [ + "server", + "client", + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "JWT": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Session": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + }, + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "type": "string", + "x-example": "<SUBSCRIBER_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": 203, + "cookies": false, + "type": "", + "deprecated": false, + "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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + }, + "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": 202, + "cookies": false, + "type": "", + "deprecated": false, + "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 a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "fileSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", + "default": true, + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", + "default": {}, + "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" + } + }, + "compression": { + "type": "string", + "description": "Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", + "default": "none", + "x-example": "none", + "enum": [ + "none", + "gzip", + "zstd" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "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" + ] + } + } + ] + } + }, + "\/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": 204, + "cookies": false, + "type": "", + "deprecated": false, + "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": 205, + "cookies": false, + "type": "", + "deprecated": false, + "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>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "fileSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", + "default": true, + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", + "default": {}, + "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" + } + }, + "compression": { + "type": "string", + "description": "Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", + "default": "none", + "x-example": "none", + "enum": [ + "none", + "gzip", + "zstd" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "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" + ] + } + } + ] + }, + "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": 206, + "cookies": false, + "type": "", + "deprecated": false, + "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.", + "responses": { + "200": { + "description": "Files List", + "schema": { + "$ref": "#\/definitions\/fileList" + } + } + }, + "x-appwrite": { + "method": "listFiles", + "weight": 208, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_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\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + }, + "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](https:\/\/appwrite.io\/docs\/server\/storage#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": 207, + "cookies": false, + "type": "upload", + "deprecated": false, + "demo": "storage\/create-file.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}", + "scope": "files.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https:\/\/appwrite.io\/docs\/products\/storage\/upload-download#input-file).", + "required": true, + "type": "file", + "in": "formData" + }, + { + "name": "permissions", + "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "x-example": "[\"read(\"any\")\"]", + "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": 209, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/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": 214, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "storage\/update-file.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "files.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/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": { + "name": { + "type": "string", + "description": "Name of the file", + "default": null, + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission string. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "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": 215, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "storage\/delete-file.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "files.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/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": 211, + "cookies": false, + "type": "location", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/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": 210, + "cookies": false, + "type": "location", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/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", + "enum": [ + "center", + "top-left", + "top", + "top-right", + "left", + "right", + "bottom-left", + "bottom", + "bottom-right" + ], + "x-enum-name": "ImageGravity", + "x-enum-keys": [], + "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", + "enum": [ + "jpg", + "jpeg", + "gif", + "png", + "webp", + "heic", + "avif" + ], + "x-enum-name": "ImageFormat", + "x-enum-keys": [], + "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": 212, + "cookies": false, + "type": "location", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/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.", + "responses": { + "200": { + "description": "Teams List", + "schema": { + "$ref": "#\/definitions\/teamList" + } + } + }, + "x-appwrite": { + "method": "list", + "weight": 219, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + }, + "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": 218, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "teamId": { + "type": "string", + "description": "Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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](https:\/\/appwrite.io\/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": 220, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update name", + "operationId": "teamsUpdateName", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Update the team's name by its unique ID.", + "responses": { + "200": { + "description": "Team", + "schema": { + "$ref": "#\/definitions\/team" + } + } + }, + "x-appwrite": { + "method": "updateName", + "weight": 222, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "teams\/update-name.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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": 224, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + } + ] + } + }, + "\/teams\/{teamId}\/memberships": { + "get": { + "summary": "List team memberships", + "operationId": "teamsListMemberships", + "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. Hide sensitive attributes from the response by toggling membership privacy in the Console.", + "responses": { + "200": { + "description": "Memberships List", + "schema": { + "$ref": "#\/definitions\/membershipList" + } + } + }, + "x-appwrite": { + "method": "listMemberships", + "weight": 226, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "teams\/list-memberships.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_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\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + }, + "post": { + "summary": "Create team membership", + "operationId": "teamsCreateMembership", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) 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) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", + "responses": { + "201": { + "description": "Membership", + "schema": { + "$ref": "#\/definitions\/membership" + } + } + }, + "x-appwrite": { + "method": "createMembership", + "weight": 225, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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": "", + "x-example": "email@example.com" + }, + "userId": { + "type": "string", + "description": "ID of the user to be added to a team.", + "default": "", + "x-example": "<USER_ID>" + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100" + }, + "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](https:\/\/appwrite.io\/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. This parameter is not required when an API key is supplied. 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" + }, + "name": { + "type": "string", + "description": "Name of the new team member. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "roles" + ] + } + } + ] + } + }, + "\/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. Hide sensitive attributes from the response by toggling membership privacy in the Console.", + "responses": { + "200": { + "description": "Membership", + "schema": { + "$ref": "#\/definitions\/membership" + } + } + }, + "x-appwrite": { + "method": "getMembership", + "weight": 227, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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", + "operationId": "teamsUpdateMembership", + "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](https:\/\/appwrite.io\/docs\/permissions).\n", + "responses": { + "200": { + "description": "Membership", + "schema": { + "$ref": "#\/definitions\/membership" + } + } + }, + "x-appwrite": { + "method": "updateMembership", + "weight": 228, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "teams\/update-membership.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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": 230, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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": 229, + "cookies": false, + "type": "", + "deprecated": false, + "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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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" + ] + } + } + ] + } + }, + "\/teams\/{teamId}\/prefs": { + "get": { + "summary": "Get team preferences", + "operationId": "teamsGetPrefs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getPrefs).", + "responses": { + "200": { + "description": "Preferences", + "schema": { + "$ref": "#\/definitions\/preferences" + } + } + }, + "x-appwrite": { + "method": "getPrefs", + "weight": 221, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "teams\/get-prefs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update preferences", + "operationId": "teamsUpdatePrefs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Update the team's 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 an error if exceeded.", + "responses": { + "200": { + "description": "Preferences", + "schema": { + "$ref": "#\/definitions\/preferences" + } + } + }, + "x-appwrite": { + "method": "updatePrefs", + "weight": 223, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "teams\/update-prefs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "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": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "default": {}, + "x-example": "{}" + } + }, + "required": [ + "prefs" + ] + } + } + ] + } + }, + "\/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": 241, + "cookies": false, + "type": "", + "deprecated": false, + "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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + }, + "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": 232, + "cookies": false, + "type": "", + "deprecated": false, + "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 a custom ID or generate a random ID with `ID.unique()`. Valid 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" + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": null, + "x-example": "+12065550100" + }, + "password": { + "type": "string", + "description": "Plain text user password. Must be at least 8 chars.", + "default": "", + "x-example": null + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId" + ] + } + } + ] + } + }, + "\/users\/argon2": { + "post": { + "summary": "Create user with Argon2 password", + "operationId": "usersCreateArgon2User", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "createArgon2User", + "weight": 235, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-argon2user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using Argon2.", + "default": null, + "x-example": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] + } + }, + "\/users\/bcrypt": { + "post": { + "summary": "Create user with bcrypt password", + "operationId": "usersCreateBcryptUser", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "createBcryptUser", + "weight": 233, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-bcrypt-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using Bcrypt.", + "default": null, + "x-example": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] + } + }, + "\/users\/identities": { + "get": { + "summary": "List identities", + "operationId": "usersListIdentities", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get identities for all users.", + "responses": { + "200": { + "description": "Identities List", + "schema": { + "$ref": "#\/definitions\/identityList" + } + } + }, + "x-appwrite": { + "method": "listIdentities", + "weight": 249, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/list-identities.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-identities.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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "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" + } + ] + } + }, + "\/users\/identities\/{identityId}": { + "delete": { + "summary": "Delete identity", + "operationId": "usersDeleteIdentity", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "users" + ], + "description": "Delete an identity by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteIdentity", + "weight": 272, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/delete-identity.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-identity.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": "identityId", + "description": "Identity ID.", + "required": true, + "type": "string", + "x-example": "<IDENTITY_ID>", + "in": "path" + } + ] + } + }, + "\/users\/md5": { + "post": { + "summary": "Create user with MD5 password", + "operationId": "usersCreateMD5User", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "createMD5User", + "weight": 234, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-m-d5user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using MD5.", + "default": null, + "x-example": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] + } + }, + "\/users\/phpass": { + "post": { + "summary": "Create user with PHPass password", + "operationId": "usersCreatePHPassUser", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "createPHPassUser", + "weight": 237, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-p-h-pass-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-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 a custom ID or pass the string `ID.unique()`to auto generate it. Valid 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 hashed using PHPass.", + "default": null, + "x-example": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] + } + }, + "\/users\/scrypt": { + "post": { + "summary": "Create user with Scrypt password", + "operationId": "usersCreateScryptUser", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "createScryptUser", + "weight": 238, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-scrypt-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using Scrypt.", + "default": null, + "x-example": "password" + }, + "passwordSalt": { + "type": "string", + "description": "Optional salt used to hash password.", + "default": null, + "x-example": "<PASSWORD_SALT>" + }, + "passwordCpu": { + "type": "integer", + "description": "Optional CPU cost used to hash password.", + "default": null, + "x-example": null + }, + "passwordMemory": { + "type": "integer", + "description": "Optional memory cost used to hash password.", + "default": null, + "x-example": null + }, + "passwordParallel": { + "type": "integer", + "description": "Optional parallelization cost used to hash password.", + "default": null, + "x-example": null + }, + "passwordLength": { + "type": "integer", + "description": "Optional hash length used to hash password.", + "default": null, + "x-example": null + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password", + "passwordSalt", + "passwordCpu", + "passwordMemory", + "passwordParallel", + "passwordLength" + ] + } + } + ] + } + }, + "\/users\/scrypt-modified": { + "post": { + "summary": "Create user with Scrypt modified password", + "operationId": "usersCreateScryptModifiedUser", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "createScryptModifiedUser", + "weight": 239, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-scrypt-modified-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using Scrypt Modified.", + "default": null, + "x-example": "password" + }, + "passwordSalt": { + "type": "string", + "description": "Salt used to hash password.", + "default": null, + "x-example": "<PASSWORD_SALT>" + }, + "passwordSaltSeparator": { + "type": "string", + "description": "Salt separator used to hash password.", + "default": null, + "x-example": "<PASSWORD_SALT_SEPARATOR>" + }, + "passwordSignerKey": { + "type": "string", + "description": "Signer key used to hash password.", + "default": null, + "x-example": "<PASSWORD_SIGNER_KEY>" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password", + "passwordSalt", + "passwordSaltSeparator", + "passwordSignerKey" + ] + } + } + ] + } + }, + "\/users\/sha": { + "post": { + "summary": "Create user with SHA password", + "operationId": "usersCreateSHAUser", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "createSHAUser", + "weight": 236, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-s-h-a-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using SHA.", + "default": null, + "x-example": "password" + }, + "passwordVersion": { + "type": "string", + "description": "Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'", + "default": "", + "x-example": "sha1", + "enum": [ + "sha1", + "sha224", + "sha256", + "sha384", + "sha512\/224", + "sha512\/256", + "sha512", + "sha3-224", + "sha3-256", + "sha3-384", + "sha3-512" + ], + "x-enum-name": "PasswordHash", + "x-enum-keys": [] + }, + "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": 242, + "cookies": false, + "type": "", + "deprecated": false, + "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](https:\/\/appwrite.io\/docs\/server\/users#usersUpdateStatus) endpoint instead.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "weight": 270, + "cookies": false, + "type": "", + "deprecated": false, + "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": 255, + "cookies": false, + "type": "", + "deprecated": false, + "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}\/jwts": { + "post": { + "summary": "Create user JWT", + "operationId": "usersCreateJWT", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.", + "responses": { + "201": { + "description": "JWT", + "schema": { + "$ref": "#\/definitions\/jwt" + } + } + }, + "x-appwrite": { + "method": "createJWT", + "weight": 273, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-j-w-t.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.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": { + "sessionId": { + "type": "string", + "description": "Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session.", + "default": "", + "x-example": "<SESSION_ID>" + }, + "duration": { + "type": "integer", + "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", + "default": 900, + "x-example": 0 + } + } + } + } + ] + } + }, + "\/users\/{userId}\/labels": { + "put": { + "summary": "Update user labels", + "operationId": "usersUpdateLabels", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user labels by its unique ID. \n\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "updateLabels", + "weight": 251, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/update-labels.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-labels.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": { + "labels": { + "type": "array", + "description": "Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "labels" + ] + } + } + ] + } + }, + "\/users\/{userId}\/logs": { + "get": { + "summary": "List user logs", + "operationId": "usersListLogs", + "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": "listLogs", + "weight": 247, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/list-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/users\/{userId}\/memberships": { + "get": { + "summary": "List user memberships", + "operationId": "usersListMemberships", + "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": "listMemberships", + "weight": 246, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/list-memberships.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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}\/mfa": { + "patch": { + "summary": "Update MFA", + "operationId": "usersUpdateMfa", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Enable or disable MFA on a user account.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "updateMfa", + "weight": 260, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/update-mfa.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-mfa.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": { + "mfa": { + "type": "boolean", + "description": "Enable or disable MFA.", + "default": null, + "x-example": false + } + }, + "required": [ + "mfa" + ] + } + } + ] + } + }, + "\/users\/{userId}\/mfa\/authenticators\/{type}": { + "delete": { + "summary": "Delete authenticator", + "operationId": "usersDeleteMfaAuthenticator", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "users" + ], + "description": "Delete an authenticator app.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteMfaAuthenticator", + "weight": 265, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/delete-mfa-authenticator.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-mfa-authenticator.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": "type", + "description": "Type of authenticator.", + "required": true, + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [], + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/mfa\/factors": { + "get": { + "summary": "List factors", + "operationId": "usersListMfaFactors", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "responses": { + "200": { + "description": "MFAFactors", + "schema": { + "$ref": "#\/definitions\/mfaFactors" + } + } + }, + "x-appwrite": { + "method": "listMfaFactors", + "weight": 261, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/list-mfa-factors.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-mfa-factors.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}\/mfa\/recovery-codes": { + "get": { + "summary": "Get MFA recovery codes", + "operationId": "usersGetMfaRecoveryCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "x-appwrite": { + "method": "getMfaRecoveryCodes", + "weight": 262, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/get-mfa-recovery-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-mfa-recovery-codes.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" + } + ] + }, + "put": { + "summary": "Regenerate MFA recovery codes", + "operationId": "usersUpdateMfaRecoveryCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "x-appwrite": { + "method": "updateMfaRecoveryCodes", + "weight": 264, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/update-mfa-recovery-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-mfa-recovery-codes.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" + } + ] + }, + "patch": { + "summary": "Create MFA recovery codes", + "operationId": "usersCreateMfaRecoveryCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "responses": { + "201": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "x-appwrite": { + "method": "createMfaRecoveryCodes", + "weight": 263, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-mfa-recovery-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-mfa-recovery-codes.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}\/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": 253, + "cookies": false, + "type": "", + "deprecated": false, + "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": 254, + "cookies": false, + "type": "", + "deprecated": false, + "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": null + } + }, + "required": [ + "password" + ] + } + } + ] + } + }, + "\/users\/{userId}\/phone": { + "patch": { + "summary": "Update phone", + "operationId": "usersUpdatePhone", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user phone by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "updatePhone", + "weight": 256, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/update-phone.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "User phone number.", + "default": null, + "x-example": "+12065550100" + } + }, + "required": [ + "number" + ] + } + } + ] + } + }, + "\/users\/{userId}\/prefs": { + "get": { + "summary": "Get user preferences", + "operationId": "usersGetPrefs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get the user preferences by its unique ID.", + "responses": { + "200": { + "description": "Preferences", + "schema": { + "$ref": "#\/definitions\/preferences" + } + } + }, + "x-appwrite": { + "method": "getPrefs", + "weight": 243, + "cookies": false, + "type": "", + "deprecated": false, + "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": 258, + "cookies": false, + "type": "", + "deprecated": false, + "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": "List user sessions", + "operationId": "usersListSessions", + "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": "listSessions", + "weight": 245, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/list-sessions.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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" + } + ] + }, + "post": { + "summary": "Create session", + "operationId": "usersCreateSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Creates a session for a user. Returns an immediately usable session object.\n\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "x-appwrite": { + "method": "createSession", + "weight": 266, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-session.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-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. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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, + "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": 269, + "cookies": false, + "type": "", + "deprecated": false, + "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": 268, + "cookies": false, + "type": "", + "deprecated": false, + "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": 250, + "cookies": false, + "type": "", + "deprecated": false, + "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}\/targets": { + "get": { + "summary": "List user targets", + "operationId": "usersListTargets", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "List the messaging targets that are associated with a user.", + "responses": { + "200": { + "description": "Target list", + "schema": { + "$ref": "#\/definitions\/targetList" + } + } + }, + "x-appwrite": { + "method": "listTargets", + "weight": 248, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/list-targets.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-targets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.read", + "platforms": [ + "server", + "console" + ], + "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": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create user target", + "operationId": "usersCreateTarget", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a messaging target.", + "responses": { + "201": { + "description": "Target", + "schema": { + "$ref": "#\/definitions\/target" + } + } + }, + "x-appwrite": { + "method": "createTarget", + "weight": 240, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-target.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "server", + "console" + ], + "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": { + "targetId": { + "type": "string", + "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<TARGET_ID>" + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "default": null, + "x-example": "email", + "enum": [ + "email", + "sms", + "push" + ], + "x-enum-name": "MessagingProviderType", + "x-enum-keys": [] + }, + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "default": null, + "x-example": "<IDENTIFIER>" + }, + "providerId": { + "type": "string", + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "default": "", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "targetId", + "providerType", + "identifier" + ] + } + } + ] + } + }, + "\/users\/{userId}\/targets\/{targetId}": { + "get": { + "summary": "Get user target", + "operationId": "usersGetTarget", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get a user's push notification target by ID.", + "responses": { + "200": { + "description": "Target", + "schema": { + "$ref": "#\/definitions\/target" + } + } + }, + "x-appwrite": { + "method": "getTarget", + "weight": 244, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/get-target.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.read", + "platforms": [ + "server", + "console" + ], + "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": "targetId", + "description": "Target ID.", + "required": true, + "type": "string", + "x-example": "<TARGET_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update user target", + "operationId": "usersUpdateTarget", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update a messaging target.", + "responses": { + "200": { + "description": "Target", + "schema": { + "$ref": "#\/definitions\/target" + } + } + }, + "x-appwrite": { + "method": "updateTarget", + "weight": 259, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/update-target.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "server", + "console" + ], + "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": "targetId", + "description": "Target ID.", + "required": true, + "type": "string", + "x-example": "<TARGET_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "default": "", + "x-example": "<IDENTIFIER>" + }, + "providerId": { + "type": "string", + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "default": "", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", + "default": "", + "x-example": "<NAME>" + } + } + } + } + ] + }, + "delete": { + "summary": "Delete user target", + "operationId": "usersDeleteTarget", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "users" + ], + "description": "Delete a messaging target.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteTarget", + "weight": 271, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/delete-target.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "server", + "console" + ], + "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": "targetId", + "description": "Target ID.", + "required": true, + "type": "string", + "x-example": "<TARGET_ID>", + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/tokens": { + "post": { + "summary": "Create token", + "operationId": "usersCreateToken", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\n", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "x-appwrite": { + "method": "createToken", + "weight": 267, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/create-token.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-token.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": { + "length": { + "type": "integer", + "description": "Token length in characters. The default length is 6 characters", + "default": 6, + "x-example": 4 + }, + "expire": { + "type": "integer", + "description": "Token expiration period in seconds. The default expiration is 15 minutes.", + "default": 900, + "x-example": 60 + } + } + } + } + ] + } + }, + "\/users\/{userId}\/verification": { + "patch": { + "summary": "Update email verification", + "operationId": "usersUpdateEmailVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user email verification status by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "updateEmailVerification", + "weight": 257, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/update-email-verification.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "emailVerification": { + "type": "boolean", + "description": "User email verification status.", + "default": null, + "x-example": false + } + }, + "required": [ + "emailVerification" + ] + } + } + ] + } + }, + "\/users\/{userId}\/verification\/phone": { + "patch": { + "summary": "Update phone verification", + "operationId": "usersUpdatePhoneVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user phone verification status by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "x-appwrite": { + "method": "updatePhoneVerification", + "weight": 252, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "users\/update-phone-verification.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "phoneVerification": { + "type": "boolean", + "description": "User phone verification status.", + "default": null, + "x-example": false + } + }, + "required": [ + "phoneVerification" + ] + } + } + ] + } + } }, - "/databases/{databaseId}/collections/{collectionId}/attributes/boolean": { - "post": { - "summary": "Create boolean attribute", - "operationId": "databasesCreateBooleanAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create a boolean attribute.\n", - "responses": { - "202": { - "description": "AttributeBoolean", - "schema": { - "$ref": "#/definitions/attributeBoolean" - } - } + "tags": [ + { + "name": "account", + "description": "The Account service allows you to authenticate and manage a user account.", + "x-globalAttributes": [] }, - "x-appwrite": { - "method": "createBooleanAttribute", - "weight": 88, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-boolean-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-boolean-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } + { + "name": "avatars", + "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.", + "x-globalAttributes": [] }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": false - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key}": { - "patch": { - "summary": "Update boolean attribute", - "operationId": "databasesUpdateBooleanAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update a boolean attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributeBoolean", - "schema": { - "$ref": "#/definitions/attributeBoolean" - } - } + { + "name": "databases", + "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents", + "x-globalAttributes": [ + "databaseId" + ] }, - "x-appwrite": { - "method": "updateBooleanAttribute", - "weight": 100, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-boolean-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-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": [] - } + { + "name": "locale", + "description": "The Locale service allows you to customize your app based on your users' location.", + "x-globalAttributes": [] }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "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, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null - } - }, - "required": ["required", "default"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/datetime": { - "post": { - "summary": "Create datetime attribute", - "operationId": "databasesCreateDatetimeAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create a date time attribute according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "AttributeDatetime", - "schema": { - "$ref": "#/definitions/attributeDatetime" - } - } + { + "name": "health", + "description": "The Health service allows you to both validate and monitor your Appwrite server's health.", + "x-globalAttributes": [] }, - "x-appwrite": { - "method": "createDatetimeAttribute", - "weight": 89, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-datetime-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-datetime-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } + { + "name": "projects", + "description": "The Project service allows you to manage all the projects in your Appwrite server.", + "x-globalAttributes": [] }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "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 the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key}": { - "patch": { - "summary": "Update dateTime attribute", - "operationId": "databasesUpdateDatetimeAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update a date time attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributeDatetime", - "schema": { - "$ref": "#/definitions/attributeDatetime" - } - } + { + "name": "project", + "description": "The Project service allows you to manage all the projects in your Appwrite server.", + "x-globalAttributes": [] }, - "x-appwrite": { - "method": "updateDatetimeAttribute", - "weight": 101, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-datetime-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-datetime-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } + { + "name": "storage", + "description": "The Storage service allows you to manage your project files.", + "x-globalAttributes": [] }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "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, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null - } - }, - "required": ["required", "default"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/email": { - "post": { - "summary": "Create email attribute", - "operationId": "databasesCreateEmailAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create an email attribute.\n", - "responses": { - "202": { - "description": "AttributeEmail", - "schema": { - "$ref": "#/definitions/attributeEmail" - } - } + { + "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", + "x-globalAttributes": [] }, - "x-appwrite": { - "method": "createEmailAttribute", - "weight": 82, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-email-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-email-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } + { + "name": "users", + "description": "The Users service allows you to manage your project users.", + "x-globalAttributes": [] }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "email@example.com" - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/email/{key}": { - "patch": { - "summary": "Update email attribute", - "operationId": "databasesUpdateEmailAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeEmail", - "schema": { - "$ref": "#/definitions/attributeEmail" - } - } + { + "name": "functions", + "description": "The Functions Service allows you view, create and manage your Cloud Functions.", + "x-globalAttributes": [] }, - "x-appwrite": { - "method": "updateEmailAttribute", - "weight": 94, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-email-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-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": [] - } + { + "name": "proxy", + "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration.", + "x-globalAttributes": [] }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "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", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null - } - }, - "required": ["required", "default"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/enum": { - "post": { - "summary": "Create enum attribute", - "operationId": "databasesCreateEnumAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", - "responses": { - "202": { - "description": "AttributeEnum", - "schema": { - "$ref": "#/definitions/attributeEnum" - } - } + { + "name": "graphql", + "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL.", + "x-globalAttributes": [] }, - "x-appwrite": { - "method": "createEnumAttribute", - "weight": 83, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-enum-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-attribute-enum.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } + { + "name": "console", + "description": "The Console service allows you to interact with console relevant informations.", + "x-globalAttributes": [] }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "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 255 characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>" - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "elements", "required"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key}": { - "patch": { - "summary": "Update enum attribute", - "operationId": "databasesUpdateEnumAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeEnum", - "schema": { - "$ref": "#/definitions/attributeEnum" - } - } + { + "name": "migrations", + "description": "The Migrations service allows you to migrate third-party data to your Appwrite project.", + "x-globalAttributes": [] }, - "x-appwrite": { - "method": "updateEnumAttribute", - "weight": 95, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-enum-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-enum-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } + { + "name": "messaging", + "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.).", + "x-globalAttributes": [] + } + ], + "definitions": { + "any": { + "description": "Any", + "type": "object", + "additionalProperties": true }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "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 255 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>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null - } - }, - "required": ["elements", "required", "default"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/float": { - "post": { - "summary": "Create float attribute", - "operationId": "databasesCreateFloatAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "AttributeFloat", - "schema": { - "$ref": "#/definitions/attributeFloat" - } - } - }, - "x-appwrite": { - "method": "createFloatAttribute", - "weight": 87, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-float-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-float-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value to enforce on new documents", - "default": null, - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value to enforce on new documents", - "default": null, - "x-example": null - }, - "default": { - "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/float/{key}": { - "patch": { - "summary": "Update float attribute", - "operationId": "databasesUpdateFloatAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeFloat", - "schema": { - "$ref": "#/definitions/attributeFloat" - } - } - }, - "x-appwrite": { - "method": "updateFloatAttribute", - "weight": 99, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-float-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-float-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "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, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null - } - }, - "required": ["required", "min", "max", "default"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/integer": { - "post": { - "summary": "Create integer attribute", - "operationId": "databasesCreateIntegerAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "AttributeInteger", - "schema": { - "$ref": "#/definitions/attributeInteger" - } - } - }, - "x-appwrite": { - "method": "createIntegerAttribute", - "weight": 86, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-integer-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-integer-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value to enforce on new documents", - "default": null, - "x-example": null - }, - "max": { - "type": "integer", - "description": "Maximum value to enforce on new documents", - "default": null, - "x-example": null - }, - "default": { - "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}": { - "patch": { - "summary": "Update integer attribute", - "operationId": "databasesUpdateIntegerAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeInteger", - "schema": { - "$ref": "#/definitions/attributeInteger" - } - } - }, - "x-appwrite": { - "method": "updateIntegerAttribute", - "weight": 98, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-integer-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-integer-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "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, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null - } - }, - "required": ["required", "min", "max", "default"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/ip": { - "post": { - "summary": "Create IP address attribute", - "operationId": "databasesCreateIpAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create IP address attribute.\n", - "responses": { - "202": { - "description": "AttributeIP", - "schema": { - "$ref": "#/definitions/attributeIp" - } - } - }, - "x-appwrite": { - "method": "createIpAttribute", - "weight": 84, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-ip-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-ip-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key}": { - "patch": { - "summary": "Update IP address attribute", - "operationId": "databasesUpdateIpAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeIP", - "schema": { - "$ref": "#/definitions/attributeIp" - } - } - }, - "x-appwrite": { - "method": "updateIpAttribute", - "weight": 96, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-ip-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-ip-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "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, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null - } - }, - "required": ["required", "default"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/relationship": { - "post": { - "summary": "Create relationship attribute", - "operationId": "databasesCreateRelationshipAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).\n", - "responses": { - "202": { - "description": "AttributeRelationship", - "schema": { - "$ref": "#/definitions/attributeRelationship" - } - } - }, - "x-appwrite": { - "method": "createRelationshipAttribute", - "weight": 90, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-relationship-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-relationship-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "relatedCollectionId": { - "type": "string", - "description": "Related Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "default": null, - "x-example": "<RELATED_COLLECTION_ID>" - }, - "type": { - "type": "string", - "description": "Relation type", - "default": null, - "x-example": "oneToOne", - "enum": ["oneToOne", "manyToOne", "manyToMany", "oneToMany"], - "x-enum-name": "RelationshipType", - "x-enum-keys": [] - }, - "twoWay": { - "type": "boolean", - "description": "Is Two Way?", - "default": false, - "x-example": false - }, - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "twoWayKey": { - "type": "string", - "description": "Two Way Attribute Key.", - "default": null, - "x-example": null - }, - "onDelete": { - "type": "string", - "description": "Constraints option", - "default": "restrict", - "x-example": "cascade", - "enum": ["cascade", "restrict", "setNull"], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": ["relatedCollectionId", "type"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/string": { - "post": { - "summary": "Create string attribute", - "operationId": "databasesCreateStringAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create a string attribute.\n", - "responses": { - "202": { - "description": "AttributeString", - "schema": { - "$ref": "#/definitions/attributeString" - } - } - }, - "x-appwrite": { - "method": "createStringAttribute", - "weight": 81, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-string-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-string-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "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 - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": ["key", "size", "required"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}": { - "patch": { - "summary": "Update string attribute", - "operationId": "databasesUpdateStringAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeString", - "schema": { - "$ref": "#/definitions/attributeString" - } - } - }, - "x-appwrite": { - "method": "updateStringAttribute", - "weight": 93, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-string-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-string-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "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>", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the string attribute.", - "default": null, - "x-example": 1 - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null - } - }, - "required": ["required", "default"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/url": { - "post": { - "summary": "Create URL attribute", - "operationId": "databasesCreateUrlAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create a URL attribute.\n", - "responses": { - "202": { - "description": "AttributeURL", - "schema": { - "$ref": "#/definitions/attributeUrl" - } - } - }, - "x-appwrite": { - "method": "createUrlAttribute", - "weight": 85, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-url-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-url-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "https://example.com" - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}": { - "patch": { - "summary": "Update URL attribute", - "operationId": "databasesUpdateUrlAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeURL", - "schema": { - "$ref": "#/definitions/attributeUrl" - } - } - }, - "x-appwrite": { - "method": "updateUrlAttribute", - "weight": 97, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-url-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-url-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "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", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null - } - }, - "required": ["required", "default"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/{key}": { - "get": { - "summary": "Get attribute", - "operationId": "databasesGetAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Get attribute by ID.", - "responses": { - "200": { - "description": "AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeRelationship, 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/attributeDatetime" - }, - { - "$ref": "#/definitions/attributeRelationship" - }, - { - "$ref": "#/definitions/attributeString" - } - ] - } - } - }, - "x-appwrite": { - "method": "getAttribute", - "weight": 92, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/get-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/get-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete attribute", - "operationId": "databasesDeleteAttribute", - "consumes": ["application/json"], - "produces": [], - "tags": ["databases"], - "description": "Deletes an attribute.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteAttribute", - "weight": 103, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/delete-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/delete-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship": { - "patch": { - "summary": "Update relationship attribute", - "operationId": "databasesUpdateRelationshipAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).\n", - "responses": { - "200": { - "description": "AttributeRelationship", - "schema": { - "$ref": "#/definitions/attributeRelationship" - } - } - }, - "x-appwrite": { - "method": "updateRelationshipAttribute", - "weight": 102, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-relationship-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-relationship-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "onDelete": { - "type": "string", - "description": "Constraints option", - "default": null, - "x-example": "cascade", - "enum": ["cascade", "restrict", "setNull"], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null - } - } - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/documents": { - "get": { - "summary": "List documents", - "operationId": "databasesListDocuments", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", - "responses": { - "200": { + "documentList": { "description": "Documents List", - "schema": { - "$ref": "#/definitions/documentList" - } - } - }, - "x-appwrite": { - "method": "listDocuments", - "weight": 109, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/list-documents.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "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/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create document", - "operationId": "databasesCreateDocument", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { - "$ref": "#/definitions/document" - } - } - }, - "x-appwrite": { - "method": "createDocument", - "weight": 108, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). 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 a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of documents documents that matched your query.", + "x-example": 5, + "format": "int32" }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "default": {}, - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } + "documents": { + "type": "array", + "description": "List of documents.", + "items": { + "type": "object", + "$ref": "#\/definitions\/document" + }, + "x-example": "" } - }, - "required": ["documentId", "data"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "databasesGetDocument", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "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": 110, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/get-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" }, - "default": [], - "in": "query" - } - ] - }, - "patch": { - "summary": "Update document", - "operationId": "databasesUpdateDocument", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "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" - } - } + "required": [ + "total", + "documents" + ] }, - "x-appwrite": { - "method": "updateDocument", - "weight": 112, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/update-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", - "default": [], - "x-example": "{}" + "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" }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } + "collections": { + "type": "array", + "description": "List of collections.", + "items": { + "type": "object", + "$ref": "#\/definitions\/collection" + }, + "x-example": "" } - } - } - } - ] - }, - "delete": { - "summary": "Delete document", - "operationId": "databasesDeleteDocument", - "consumes": ["application/json"], - "produces": [], - "tags": ["databases"], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" - } + }, + "required": [ + "total", + "collections" + ] }, - "x-appwrite": { - "method": "deleteDocument", - "weight": 113, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/delete-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } + "databaseList": { + "description": "Databases List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of databases documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "databases": { + "type": "array", + "description": "List of databases.", + "items": { + "type": "object", + "$ref": "#\/definitions\/database" + }, + "x-example": "" + } + }, + "required": [ + "total", + "databases" + ] }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/indexes": { - "get": { - "summary": "List indexes", - "operationId": "databasesListIndexes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "List indexes in the collection.", - "responses": { - "200": { + "indexList": { "description": "Indexes List", - "schema": { - "$ref": "#/definitions/indexList" - } - } - }, - "x-appwrite": { - "method": "listIndexes", - "weight": 105, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/list-indexes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "databasesCreateIndex", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", - "responses": { - "202": { - "description": "Index", - "schema": { - "$ref": "#/definitions/index" - } - } - }, - "x-appwrite": { - "method": "createIndex", - "weight": 104, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/create-index.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "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": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes documents that matched your query.", + "x-example": 5, + "format": "int32" }, - "type": { - "type": "string", - "description": "Index type.", - "default": null, - "x-example": "key", - "enum": ["key", "fulltext", "unique"], - "x-enum-name": "IndexType", - "x-enum-keys": [] + "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" + ] + }, + "identityList": { + "description": "Identities List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of identities documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "identities": { + "type": "array", + "description": "List of identities.", + "items": { + "type": "object", + "$ref": "#\/definitions\/identity" + }, + "x-example": "" + } + }, + "required": [ + "total", + "identities" + ] + }, + "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" + ] + }, + "variableList": { + "description": "Variables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of variables documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "variables": { + "type": "array", + "description": "List of variables.", + "items": { + "type": "object", + "$ref": "#\/definitions\/variable" + }, + "x-example": "" + } + }, + "required": [ + "total", + "variables" + ] + }, + "localeCodeList": { + "description": "Locale codes list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of localeCodes documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "localeCodes": { + "type": "array", + "description": "List of localeCodes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/localeCode" + }, + "x-example": "" + } + }, + "required": [ + "total", + "localeCodes" + ] + }, + "providerList": { + "description": "Provider list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of providers documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "providers": { + "type": "array", + "description": "List of providers.", + "items": { + "type": "object", + "$ref": "#\/definitions\/provider" + }, + "x-example": "" + } + }, + "required": [ + "total", + "providers" + ] + }, + "messageList": { + "description": "Message list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of messages documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "messages": { + "type": "array", + "description": "List of messages.", + "items": { + "type": "object", + "$ref": "#\/definitions\/message" + }, + "x-example": "" + } + }, + "required": [ + "total", + "messages" + ] + }, + "topicList": { + "description": "Topic list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of topics documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "topics": { + "type": "array", + "description": "List of topics.", + "items": { + "type": "object", + "$ref": "#\/definitions\/topic" + }, + "x-example": "" + } + }, + "required": [ + "total", + "topics" + ] + }, + "subscriberList": { + "description": "Subscriber list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of subscribers documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "subscribers": { + "type": "array", + "description": "List of subscribers.", + "items": { + "type": "object", + "$ref": "#\/definitions\/subscriber" + }, + "x-example": "" + } + }, + "required": [ + "total", + "subscribers" + ] + }, + "targetList": { + "description": "Target list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of targets documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "targets": { + "type": "array", + "description": "List of targets.", + "items": { + "type": "object", + "$ref": "#\/definitions\/target" + }, + "x-example": "" + } + }, + "required": [ + "total", + "targets" + ] + }, + "specificationList": { + "description": "Specifications List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of specifications documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "specifications": { + "type": "array", + "description": "List of specifications.", + "items": { + "type": "object", + "$ref": "#\/definitions\/specification" + }, + "x-example": "" + } + }, + "required": [ + "total", + "specifications" + ] + }, + "database": { + "description": "Database", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Database name.", + "x-example": "My Database" + }, + "$createdAt": { + "type": "string", + "description": "Database creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Database update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "enabled": { + "type": "boolean", + "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + } + }, + "required": [ + "$id", + "name", + "$createdAt", + "$updatedAt", + "enabled" + ] + }, + "collection": { + "description": "Collection", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Collection creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Collection update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Collection name.", + "x-example": "My Collection" + }, + "enabled": { + "type": "boolean", + "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "documentSecurity": { + "type": "boolean", + "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true }, "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" - } + "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\/attributeDatetime" + }, + { + "$ref": "#\/definitions\/attributeRelationship" + }, + { + "$ref": "#\/definitions\/attributeString" + } + ] + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Collection indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/index" + }, + "x-example": {} + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "documentSecurity", + "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\/attributeDatetime" + }, + { + "$ref": "#\/definitions\/attributeRelationship" + }, + { + "$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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt", + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt", + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt", + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt", + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "attributeDatetime": { + "description": "AttributeDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "attributeRelationship": { + "description": "AttributeRelationship", + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedCollection": { + "type": "string", + "description": "The ID of the related collection.", + "x-example": "collection" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedCollection", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ] + }, + "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" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "attributes": { + "type": "array", + "description": "Index attributes.", + "items": { + "type": "string" + }, + "x-example": [] }, "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" } - }, - "required": ["key", "type", "attributes"] - } - } - ] - } - }, - "/databases/{databaseId}/collections/{collectionId}/indexes/{key}": { - "get": { - "summary": "Get index", - "operationId": "databasesGetIndex", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["databases"], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "schema": { - "$ref": "#/definitions/index" - } - } - }, - "x-appwrite": { - "method": "getIndex", - "weight": 106, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/get-index.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "databasesDeleteIndex", - "consumes": ["application/json"], - "produces": [], - "tags": ["databases"], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteIndex", - "weight": 107, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "databases/delete-index.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/databases/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).", - "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": 289, - "cookies": false, - "type": "", - "deprecated": false, - "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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" }, - "default": [], - "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" - } - ] - }, - "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](https://appwrite.io/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" - } - } + "required": [ + "key", + "type", + "status", + "error", + "attributes", + "$createdAt", + "$updatedAt" + ] }, - "x-appwrite": { - "method": "create", - "weight": 288, - "cookies": false, - "type": "", - "deprecated": false, - "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 a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + "document": { + "description": "Document", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Document ID.", + "x-example": "5e5ea5c16897e" }, - "name": { - "type": "string", - "description": "Function name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" + "$collectionId": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c15117e" }, - "runtime": { - "type": "string", - "description": "Execution runtime.", - "default": null, - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-ml-3.11", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "go-1.23", - "static-1", - "flutter-3.24" - ], - "x-enum-name": null, - "x-enum-keys": [] + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" }, - "execute": { - "type": "array", - "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "default": [], - "x-example": "[\"any\"]", - "items": { - "type": "string" - } + "$createdAt": { + "type": "string", + "description": "Document creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "events": { - "type": "array", - "description": "Events list. Maximum of 100 events are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } + "$updatedAt": { + "type": "string", + "description": "Document update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "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 - }, - "enabled": { - "type": "boolean", - "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project.", - "default": true, - "x-example": false - }, - "entrypoint": { - "type": "string", - "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", - "default": "", - "x-example": "<ENTRYPOINT>" - }, - "commands": { - "type": "string", - "description": "Build Commands.", - "default": "", - "x-example": "<COMMANDS>" - }, - "scopes": { - "type": "array", - "description": "List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "installationId": { - "type": "string", - "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", - "default": "", - "x-example": "<INSTALLATION_ID>" - }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the function.", - "default": "", - "x-example": "<PROVIDER_REPOSITORY_ID>" - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the function.", - "default": "", - "x-example": "<PROVIDER_BRANCH>" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", - "default": false, - "x-example": false - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function code in the linked repo.", - "default": "", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - }, - "templateRepository": { - "type": "string", - "description": "Repository name of the template.", - "default": "", - "x-example": "<TEMPLATE_REPOSITORY>" - }, - "templateOwner": { - "type": "string", - "description": "The name of the owner of the template.", - "default": "", - "x-example": "<TEMPLATE_OWNER>" - }, - "templateRootDirectory": { - "type": "string", - "description": "Path to function code in the template repo.", - "default": "", - "x-example": "<TEMPLATE_ROOT_DIRECTORY>" - }, - "templateVersion": { - "type": "string", - "description": "Version (tag) for the repo linked to the function template.", - "default": "", - "x-example": "<TEMPLATE_VERSION>" - }, - "specification": { - "type": "string", - "description": "Runtime specification for the function and builds.", - "default": "s-1vcpu-512mb", - "x-example": null + "$permissions": { + "type": "array", + "description": "Document permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] } - }, - "required": ["functionId", "name", "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": 290, - "cookies": false, - "type": "", - "deprecated": false, - "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/specifications": { - "get": { - "summary": "List available function runtime specifications", - "operationId": "functionsListSpecifications", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "List allowed function specifications for this instance.\n", - "responses": { - "200": { - "description": "Specifications List", - "schema": { - "$ref": "#/definitions/specificationList" - } - } - }, - "x-appwrite": { - "method": "listSpecifications", - "weight": 291, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/list-specifications.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-specifications.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": ["server", "console"], - "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": 292, - "cookies": false, - "type": "", - "deprecated": false, - "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": 295, - "cookies": false, - "type": "", - "deprecated": false, - "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>" - }, - "runtime": { - "type": "string", - "description": "Execution runtime.", - "default": "", - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-ml-3.11", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "go-1.23", - "static-1", - "flutter-3.24" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "execute": { - "type": "array", - "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "default": [], - "x-example": "[\"any\"]", - "items": { - "type": "string" - } - }, - "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 - }, - "enabled": { - "type": "boolean", - "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project.", - "default": true, - "x-example": false - }, - "entrypoint": { - "type": "string", - "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", - "default": "", - "x-example": "<ENTRYPOINT>" - }, - "commands": { - "type": "string", - "description": "Build Commands.", - "default": "", - "x-example": "<COMMANDS>" - }, - "scopes": { - "type": "array", - "description": "List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "installationId": { - "type": "string", - "description": "Appwrite Installation ID for VCS (Version Controle System) deployment.", - "default": "", - "x-example": "<INSTALLATION_ID>" - }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the function", - "default": null, - "x-example": "<PROVIDER_REPOSITORY_ID>", - "x-nullable": true - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the function", - "default": "", - "x-example": "<PROVIDER_BRANCH>" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", - "default": false, - "x-example": false - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function code in the linked repo.", - "default": "", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - }, - "specification": { - "type": "string", - "description": "Runtime specification for the function and builds.", - "default": "s-1vcpu-512mb", - "x-example": null - } - }, - "required": ["name"] - } - } - ] - }, - "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": 298, - "cookies": false, - "type": "", - "deprecated": false, - "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": 300, - "cookies": false, - "type": "", - "deprecated": false, - "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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: size, buildId, activate, entrypoint, commands, type, size", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" }, - "default": [], - "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" - } - ] - }, - "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](https://appwrite.io/docs/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", - "responses": { - "202": { - "description": "Deployment", - "schema": { - "$ref": "#/definitions/deployment" - } - } - }, - "x-appwrite": { - "method": "createDeployment", - "weight": 299, - "cookies": false, - "type": "upload", - "deprecated": false, - "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": false, - "type": "string", - "x-example": "<ENTRYPOINT>", - "in": "formData" - }, - { - "name": "commands", - "description": "Build Commands.", - "required": false, - "type": "string", - "x-example": "<COMMANDS>", - "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": "Deployment", - "schema": { - "$ref": "#/definitions/deployment" - } - } - }, - "x-appwrite": { - "method": "getDeployment", - "weight": 301, - "cookies": false, - "type": "", - "deprecated": false, - "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 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": 297, - "cookies": false, - "type": "", - "deprecated": false, - "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": 302, - "cookies": false, - "type": "", - "deprecated": false, - "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}/build": { - "post": { - "summary": "Rebuild deployment", - "operationId": "functionsCreateBuild", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "createBuild", - "weight": 303, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/create-build.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/create-build.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" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "buildId": { - "type": "string", - "description": "Build unique ID.", - "default": "", - "x-example": "<BUILD_ID>" - } - } - } - } - ] - }, - "patch": { - "summary": "Cancel deployment", - "operationId": "functionsUpdateDeploymentBuild", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", - "responses": { - "200": { - "description": "Build", - "schema": { - "$ref": "#/definitions/build" - } - } - }, - "x-appwrite": { - "method": "updateDeploymentBuild", - "weight": 304, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/update-deployment-build.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/update-deployment-build.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}/download": { - "get": { - "summary": "Download deployment", - "operationId": "functionsGetDeploymentDownload", - "consumes": ["application/json"], - "produces": ["*/*"], - "tags": ["functions"], - "description": "Get a Deployment's contents by its unique ID. This endpoint supports range requests for partial or streaming file download.", - "responses": { - "200": { - "description": "File", - "schema": { - "type": "file" - } - } - }, - "x-appwrite": { - "method": "getDeploymentDownload", - "weight": 296, - "cookies": false, - "type": "location", - "deprecated": false, - "demo": "functions/get-deployment-download.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/get-deployment-download.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": ["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" - } - ] - } - }, - "/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.", - "responses": { - "200": { - "description": "Executions List", - "schema": { - "$ref": "#/definitions/executionList" - } - } - }, - "x-appwrite": { - "method": "listExecutions", - "weight": 306, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "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" - } - ] - }, - "post": { - "summary": "Create execution", - "operationId": "functionsCreateExecution", - "consumes": ["application/json"], - "produces": ["multipart/form-data"], - "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": 305, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/create-execution.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/create-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "execution.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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": { - "body": { - "type": "string", - "description": "HTTP body of execution. Default value is empty string.", - "default": "", - "x-example": "<BODY>" - }, - "async": { - "type": "boolean", - "description": "Execute code in the background. Default value is false.", - "default": false, - "x-example": false - }, - "path": { - "type": "string", - "description": "HTTP path of execution. Path can include query params. Default value is /", - "default": "/", - "x-example": "<PATH>" - }, - "method": { - "type": "string", - "description": "HTTP method of execution. Default value is GET.", - "default": "POST", - "x-example": "GET", - "enum": ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], - "x-enum-name": "ExecutionMethod", - "x-enum-keys": [] - }, - "headers": { - "type": "object", - "description": "HTTP headers of execution. Defaults to empty.", - "default": [], - "x-example": "{}" - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "default": null, - "x-example": null - } - } - } - } - ] - } - }, - "/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": 307, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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" - } - ] - }, - "delete": { - "summary": "Delete execution", - "operationId": "functionsDeleteExecution", - "consumes": ["application/json"], - "produces": [], - "tags": ["functions"], - "description": "Delete a function execution by its unique ID.\n", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteExecution", - "weight": 308, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/delete-execution.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/delete-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "execution.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": "executionId", - "description": "Execution ID.", - "required": true, - "type": "string", - "x-example": "<EXECUTION_ID>", - "in": "path" - } - ] - } - }, - "/functions/{functionId}/variables": { - "get": { - "summary": "List variables", - "operationId": "functionsListVariables", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get a list of all variables of a specific function.", - "responses": { - "200": { - "description": "Variables List", - "schema": { - "$ref": "#/definitions/variableList" - } - } - }, - "x-appwrite": { - "method": "listVariables", - "weight": 310, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/list-variables.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-variables.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 unique ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - } - ] - }, - "post": { - "summary": "Create variable", - "operationId": "functionsCreateVariable", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", - "responses": { - "201": { - "description": "Variable", - "schema": { - "$ref": "#/definitions/variable" - } - } - }, - "x-appwrite": { - "method": "createVariable", - "weight": 309, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/create-variable.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/create-variable.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 unique ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "default": null, - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "default": null, - "x-example": "<VALUE>" - } - }, - "required": ["key", "value"] - } - } - ] - } - }, - "/functions/{functionId}/variables/{variableId}": { - "get": { - "summary": "Get variable", - "operationId": "functionsGetVariable", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get a variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "schema": { - "$ref": "#/definitions/variable" - } - } - }, - "x-appwrite": { - "method": "getVariable", - "weight": 311, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/get-variable.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/get-variable.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 unique ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update variable", - "operationId": "functionsUpdateVariable", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Update variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "schema": { - "$ref": "#/definitions/variable" - } - } - }, - "x-appwrite": { - "method": "updateVariable", - "weight": 312, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/update-variable.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/update-variable.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 unique ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "default": null, - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "default": null, - "x-example": "<VALUE>" - } - }, - "required": ["key"] - } - } - ] - }, - "delete": { - "summary": "Delete variable", - "operationId": "functionsDeleteVariable", - "consumes": ["application/json"], - "produces": [], - "tags": ["functions"], - "description": "Delete a variable by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteVariable", - "weight": 313, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "functions/delete-variable.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/delete-variable.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 unique ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - } - ] - } - }, - "/graphql": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlQuery", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["graphql"], - "description": "Execute a GraphQL mutation.", - "responses": { - "200": { - "description": "Any", - "schema": { - "$ref": "#/definitions/any" - } - } - }, - "x-appwrite": { - "method": "query", - "weight": 331, - "cookies": false, - "type": "graphql", - "deprecated": false, - "demo": "graphql/query.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/graphql/post.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", - "platforms": ["server", "client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "query": { - "type": "object", - "description": "The query or queries to execute.", - "default": {}, - "x-example": "{}" - } - }, - "required": ["query"] - } - } - ] - } - }, - "/graphql/mutation": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlMutation", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["graphql"], - "description": "Execute a GraphQL mutation.", - "responses": { - "200": { - "description": "Any", - "schema": { - "$ref": "#/definitions/any" - } - } - }, - "x-appwrite": { - "method": "mutation", - "weight": 330, - "cookies": false, - "type": "graphql", - "deprecated": false, - "demo": "graphql/mutation.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/graphql/post.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", - "platforms": ["server", "client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "query": { - "type": "object", - "description": "The query or queries to execute.", - "default": {}, - "x-example": "{}" - } - }, - "required": ["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": 125, - "cookies": false, - "type": "", - "deprecated": false, - "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": 147, - "cookies": false, - "type": "", - "deprecated": false, - "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 servers are up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "schema": { - "$ref": "#/definitions/healthStatus" - } - } - }, - "x-appwrite": { - "method": "getCache", - "weight": 128, - "cookies": false, - "type": "", - "deprecated": false, - "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/certificate": { - "get": { - "summary": "Get the SSL certificate for a domain", - "operationId": "healthGetCertificate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the SSL certificate for a domain", - "responses": { - "200": { - "description": "Health Certificate", - "schema": { - "$ref": "#/definitions/healthCertificate" - } - } - }, - "x-appwrite": { - "method": "getCertificate", - "weight": 134, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-certificate.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-certificate.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": [] - } - ], - "parameters": [ - { - "name": "domain", - "description": "string", - "required": false, - "type": "string", - "in": "query" - } - ] - } - }, - "/health/db": { - "get": { - "summary": "Get DB", - "operationId": "healthGetDB", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Check the Appwrite database servers are up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "schema": { - "$ref": "#/definitions/healthStatus" - } - } - }, - "x-appwrite": { - "method": "getDB", - "weight": 127, - "cookies": false, - "type": "", - "deprecated": false, - "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/pubsub": { - "get": { - "summary": "Get pubsub", - "operationId": "healthGetPubSub", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Check the Appwrite pub-sub servers are up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "schema": { - "$ref": "#/definitions/healthStatus" - } - } - }, - "x-appwrite": { - "method": "getPubSub", - "weight": 130, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-pub-sub.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-pubsub.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": { - "get": { - "summary": "Get queue", - "operationId": "healthGetQueue", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Check the Appwrite queue messaging servers are up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "schema": { - "$ref": "#/definitions/healthStatus" - } - } - }, - "x-appwrite": { - "method": "getQueue", - "weight": 129, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue.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/builds": { - "get": { - "summary": "Get builds queue", - "operationId": "healthGetQueueBuilds", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of builds that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#/definitions/healthQueue" - } - } - }, - "x-appwrite": { - "method": "getQueueBuilds", - "weight": 136, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue-builds.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-builds.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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/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": 135, - "cookies": false, - "type": "", - "deprecated": false, - "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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/health/queue/databases": { - "get": { - "summary": "Get databases queue", - "operationId": "healthGetQueueDatabases", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#/definitions/healthQueue" - } - } - }, - "x-appwrite": { - "method": "getQueueDatabases", - "weight": 137, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue-databases.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-databases.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": [] - } - ], - "parameters": [ - { - "name": "name", - "description": "Queue name for which to check the queue size", - "required": false, - "type": "string", - "x-example": "<NAME>", - "default": "database_db_main", - "in": "query" - }, - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/health/queue/deletes": { - "get": { - "summary": "Get deletes queue", - "operationId": "healthGetQueueDeletes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#/definitions/healthQueue" - } - } - }, - "x-appwrite": { - "method": "getQueueDeletes", - "weight": 138, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue-deletes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-deletes.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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/health/queue/failed/{name}": { - "get": { - "summary": "Get number of failed queue jobs", - "operationId": "healthGetFailedJobs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Returns the amount of failed jobs in a given queue.\n", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#/definitions/healthQueue" - } - } - }, - "x-appwrite": { - "method": "getFailedJobs", - "weight": 148, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-failed-jobs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-failed-queue-jobs.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": [] - } - ], - "parameters": [ - { - "name": "name", - "description": "The name of the queue", - "required": true, - "type": "string", - "x-example": "v1-database", - "enum": [ - "v1-database", - "v1-deletes", - "v1-audits", - "v1-mails", - "v1-functions", - "v1-usage", - "v1-usage-dump", - "v1-webhooks", - "v1-certificates", - "v1-builds", - "v1-messaging", - "v1-migrations" - ], - "x-enum-name": null, - "x-enum-keys": [], - "in": "path" - }, - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/health/queue/functions": { - "get": { - "summary": "Get functions queue", - "operationId": "healthGetQueueFunctions", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#/definitions/healthQueue" - } - } - }, - "x-appwrite": { - "method": "getQueueFunctions", - "weight": 142, - "cookies": false, - "type": "", - "deprecated": false, - "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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/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": 133, - "cookies": false, - "type": "", - "deprecated": false, - "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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/health/queue/mails": { - "get": { - "summary": "Get mails queue", - "operationId": "healthGetQueueMails", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of mails that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#/definitions/healthQueue" - } - } - }, - "x-appwrite": { - "method": "getQueueMails", - "weight": 139, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue-mails.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-mails.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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/health/queue/messaging": { - "get": { - "summary": "Get messaging queue", - "operationId": "healthGetQueueMessaging", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of messages that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#/definitions/healthQueue" - } - } - }, - "x-appwrite": { - "method": "getQueueMessaging", - "weight": 140, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue-messaging.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-messaging.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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/health/queue/migrations": { - "get": { - "summary": "Get migrations queue", - "operationId": "healthGetQueueMigrations", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#/definitions/healthQueue" - } - } - }, - "x-appwrite": { - "method": "getQueueMigrations", - "weight": 141, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue-migrations.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-migrations.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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/health/queue/usage": { - "get": { - "summary": "Get usage queue", - "operationId": "healthGetQueueUsage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of metrics 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": 143, - "cookies": false, - "type": "", - "deprecated": false, - "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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/health/queue/usage-dump": { - "get": { - "summary": "Get usage dump queue", - "operationId": "healthGetQueueUsageDump", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of projects containing metrics that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#/definitions/healthQueue" - } - } - }, - "x-appwrite": { - "method": "getQueueUsageDump", - "weight": 144, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-queue-usage-dump.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-usage-dump.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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/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": 132, - "cookies": false, - "type": "", - "deprecated": false, - "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": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "/health/storage": { - "get": { - "summary": "Get storage", - "operationId": "healthGetStorage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Check the Appwrite storage device is up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "schema": { - "$ref": "#/definitions/healthStatus" - } - } - }, - "x-appwrite": { - "method": "getStorage", - "weight": 146, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health/get-storage.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-storage.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": 145, - "cookies": false, - "type": "", - "deprecated": false, - "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": 131, - "cookies": false, - "type": "", - "deprecated": false, - "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": 117, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "/locale/codes": { - "get": { - "summary": "List locale codes", - "operationId": "localeListCodes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["locale"], - "description": "List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).", - "responses": { - "200": { - "description": "Locale codes list", - "schema": { - "$ref": "#/definitions/localeCodeList" - } - } - }, - "x-appwrite": { - "method": "listCodes", - "weight": 118, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "locale/list-codes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/list-locale-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "/locale/continents": { - "get": { - "summary": "List continents", - "operationId": "localeListContinents", - "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": "listContinents", - "weight": 122, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "locale/list-continents.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/list-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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "/locale/countries": { - "get": { - "summary": "List countries", - "operationId": "localeListCountries", - "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": "listCountries", - "weight": 119, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "locale/list-countries.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/list-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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "/locale/countries/eu": { - "get": { - "summary": "List EU countries", - "operationId": "localeListCountriesEU", - "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": "listCountriesEU", - "weight": 120, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "locale/list-countries-e-u.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/list-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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "/locale/countries/phones": { - "get": { - "summary": "List countries phone codes", - "operationId": "localeListCountriesPhones", - "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": "listCountriesPhones", - "weight": 121, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "locale/list-countries-phones.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/list-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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "/locale/currencies": { - "get": { - "summary": "List currencies", - "operationId": "localeListCurrencies", - "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": "listCurrencies", - "weight": 123, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "locale/list-currencies.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/list-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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "/locale/languages": { - "get": { - "summary": "List languages", - "operationId": "localeListLanguages", - "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": "listLanguages", - "weight": 124, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "locale/list-languages.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/list-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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "/messaging/messages": { - "get": { - "summary": "List messages", - "operationId": "messagingListMessages", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get a list of all messages from the current Appwrite project.", - "responses": { - "200": { - "description": "Message list", - "schema": { - "$ref": "#/definitions/messageList" - } - } - }, - "x-appwrite": { - "method": "listMessages", - "weight": 384, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-messages.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-messages.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "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" - } - ] - } - }, - "/messaging/messages/email": { - "post": { - "summary": "Create email", - "operationId": "messagingCreateEmail", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new email message.", - "responses": { - "201": { - "description": "Message", - "schema": { - "$ref": "#/definitions/message" - } - } - }, - "x-appwrite": { - "method": "createEmail", - "weight": 381, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-email.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<MESSAGE_ID>" - }, - "subject": { - "type": "string", - "description": "Email Subject.", - "default": null, - "x-example": "<SUBJECT>" - }, - "content": { - "type": "string", - "description": "Email Content.", - "default": null, - "x-example": "<CONTENT>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "cc": { - "type": "array", - "description": "Array of target IDs to be added as CC.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "bcc": { - "type": "array", - "description": "Array of target IDs to be added as BCC.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "attachments": { - "type": "array", - "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": false, - "x-example": false - }, - "html": { - "type": "boolean", - "description": "Is content of type HTML", - "default": false, - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": null - } - }, - "required": ["messageId", "subject", "content"] - } - } - ] - } - }, - "/messaging/messages/email/{messageId}": { - "patch": { - "summary": "Update email", - "operationId": "messagingUpdateEmail", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "responses": { - "200": { - "description": "Message", - "schema": { - "$ref": "#/definitions/message" - } - } - }, - "x-appwrite": { - "method": "updateEmail", - "weight": 388, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-email.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "subject": { - "type": "string", - "description": "Email Subject.", - "default": null, - "x-example": "<SUBJECT>" - }, - "content": { - "type": "string", - "description": "Email Content.", - "default": null, - "x-example": "<CONTENT>" - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": null, - "x-example": false - }, - "html": { - "type": "boolean", - "description": "Is content of type HTML", - "default": null, - "x-example": false - }, - "cc": { - "type": "array", - "description": "Array of target IDs to be added as CC.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "bcc": { - "type": "array", - "description": "Array of target IDs to be added as BCC.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": null - }, - "attachments": { - "type": "array", - "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - } - } - } - } - ] - } - }, - "/messaging/messages/push": { - "post": { - "summary": "Create push notification", - "operationId": "messagingCreatePush", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new push notification.", - "responses": { - "201": { - "description": "Message", - "schema": { - "$ref": "#/definitions/message" - } - } - }, - "x-appwrite": { - "method": "createPush", - "weight": 383, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-push.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-push.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<MESSAGE_ID>" - }, - "title": { - "type": "string", - "description": "Title for push notification.", - "default": "", - "x-example": "<TITLE>" - }, - "body": { - "type": "string", - "description": "Body for push notification.", - "default": "", - "x-example": "<BODY>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "data": { - "type": "object", - "description": "Additional key-value pair data for push notification.", - "default": {}, - "x-example": "{}" - }, - "action": { - "type": "string", - "description": "Action for push notification.", - "default": "", - "x-example": "<ACTION>" - }, - "image": { - "type": "string", - "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", - "default": "", - "x-example": "[ID1:ID2]" - }, - "icon": { - "type": "string", - "description": "Icon for push notification. Available only for Android and Web Platform.", - "default": "", - "x-example": "<ICON>" - }, - "sound": { - "type": "string", - "description": "Sound for push notification. Available only for Android and iOS Platform.", - "default": "", - "x-example": "<SOUND>" - }, - "color": { - "type": "string", - "description": "Color for push notification. Available only for Android Platform.", - "default": "", - "x-example": "<COLOR>" - }, - "tag": { - "type": "string", - "description": "Tag for push notification. Available only for Android Platform.", - "default": "", - "x-example": "<TAG>" - }, - "badge": { - "type": "integer", - "description": "Badge for push notification. Available only for iOS Platform.", - "default": -1, - "x-example": null - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": false, - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": null - }, - "contentAvailable": { - "type": "boolean", - "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", - "default": false, - "x-example": false - }, - "critical": { - "type": "boolean", - "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", - "default": false, - "x-example": false - }, - "priority": { - "type": "string", - "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", - "default": "high", - "x-example": "normal", - "enum": ["normal", "high"], - "x-enum-name": "MessagePriority", - "x-enum-keys": [] - } - }, - "required": ["messageId"] - } - } - ] - } - }, - "/messaging/messages/push/{messageId}": { - "patch": { - "summary": "Update push notification", - "operationId": "messagingUpdatePush", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "responses": { - "200": { - "description": "Message", - "schema": { - "$ref": "#/definitions/message" - } - } - }, - "x-appwrite": { - "method": "updatePush", - "weight": 390, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-push.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-push.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "title": { - "type": "string", - "description": "Title for push notification.", - "default": null, - "x-example": "<TITLE>" - }, - "body": { - "type": "string", - "description": "Body for push notification.", - "default": null, - "x-example": "<BODY>" - }, - "data": { - "type": "object", - "description": "Additional Data for push notification.", - "default": {}, - "x-example": "{}" - }, - "action": { - "type": "string", - "description": "Action for push notification.", - "default": null, - "x-example": "<ACTION>" - }, - "image": { - "type": "string", - "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", - "default": null, - "x-example": "[ID1:ID2]" - }, - "icon": { - "type": "string", - "description": "Icon for push notification. Available only for Android and Web platforms.", - "default": null, - "x-example": "<ICON>" - }, - "sound": { - "type": "string", - "description": "Sound for push notification. Available only for Android and iOS platforms.", - "default": null, - "x-example": "<SOUND>" - }, - "color": { - "type": "string", - "description": "Color for push notification. Available only for Android platforms.", - "default": null, - "x-example": "<COLOR>" - }, - "tag": { - "type": "string", - "description": "Tag for push notification. Available only for Android platforms.", - "default": null, - "x-example": "<TAG>" - }, - "badge": { - "type": "integer", - "description": "Badge for push notification. Available only for iOS platforms.", - "default": null, - "x-example": null - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": null, - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": null - }, - "contentAvailable": { - "type": "boolean", - "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", - "default": null, - "x-example": false - }, - "critical": { - "type": "boolean", - "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", - "default": null, - "x-example": false - }, - "priority": { - "type": "string", - "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", - "default": null, - "x-example": "normal", - "enum": ["normal", "high"], - "x-enum-name": "MessagePriority", - "x-enum-keys": [] - } - } - } - } - ] - } - }, - "/messaging/messages/sms": { - "post": { - "summary": "Create SMS", - "operationId": "messagingCreateSms", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new SMS message.", - "responses": { - "201": { - "description": "Message", - "schema": { - "$ref": "#/definitions/message" - } - } - }, - "x-appwrite": { - "method": "createSms", - "weight": 382, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-sms.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-sms.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<MESSAGE_ID>" - }, - "content": { - "type": "string", - "description": "SMS Content.", - "default": null, - "x-example": "<CONTENT>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": false, - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": null - } - }, - "required": ["messageId", "content"] - } - } - ] - } - }, - "/messaging/messages/sms/{messageId}": { - "patch": { - "summary": "Update SMS", - "operationId": "messagingUpdateSms", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update an SMS message by its unique ID.\n", - "responses": { - "200": { - "description": "Message", - "schema": { - "$ref": "#/definitions/message" - } - } - }, - "x-appwrite": { - "method": "updateSms", - "weight": 389, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-sms.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-sms.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "content": { - "type": "string", - "description": "Email Content.", - "default": null, - "x-example": "<CONTENT>" - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": null, - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": null - } - } - } - } - ] - } - }, - "/messaging/messages/{messageId}": { - "get": { - "summary": "Get message", - "operationId": "messagingGetMessage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get a message by its unique ID.\n", - "responses": { - "200": { - "description": "Message", - "schema": { - "$ref": "#/definitions/message" - } - } - }, - "x-appwrite": { - "method": "getMessage", - "weight": 387, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/get-message.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/get-message.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete message", - "operationId": "messagingDelete", - "consumes": ["application/json"], - "produces": [], - "tags": ["messaging"], - "description": "Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "delete", - "weight": 391, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/delete.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/delete-message.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - } - ] - } - }, - "/messaging/messages/{messageId}/logs": { - "get": { - "summary": "List message logs", - "operationId": "messagingListMessageLogs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get the message activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#/definitions/logList" - } - } - }, - "x-appwrite": { - "method": "listMessageLogs", - "weight": 385, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-message-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-message-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_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/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "/messaging/messages/{messageId}/targets": { - "get": { - "summary": "List message targets", - "operationId": "messagingListTargets", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get a list of the targets associated with a message.", - "responses": { - "200": { - "description": "Target list", - "schema": { - "$ref": "#/definitions/targetList" - } - } - }, - "x-appwrite": { - "method": "listTargets", - "weight": 386, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-targets.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-message-targets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "/messaging/providers": { - "get": { - "summary": "List providers", - "operationId": "messagingListProviders", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get a list of all providers from the current Appwrite project.", - "responses": { - "200": { - "description": "Provider list", - "schema": { - "$ref": "#/definitions/providerList" - } - } - }, - "x-appwrite": { - "method": "listProviders", - "weight": 356, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-providers.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-providers.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "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" - } - ] - } - }, - "/messaging/providers/apns": { - "post": { - "summary": "Create APNS provider", - "operationId": "messagingCreateApnsProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new Apple Push Notification service provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "createApnsProvider", - "weight": 355, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-apns-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-apns-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "authKey": { - "type": "string", - "description": "APNS authentication key.", - "default": "", - "x-example": "<AUTH_KEY>" - }, - "authKeyId": { - "type": "string", - "description": "APNS authentication key ID.", - "default": "", - "x-example": "<AUTH_KEY_ID>" - }, - "teamId": { - "type": "string", - "description": "APNS team ID.", - "default": "", - "x-example": "<TEAM_ID>" - }, - "bundleId": { - "type": "string", - "description": "APNS bundle ID.", - "default": "", - "x-example": "<BUNDLE_ID>" - }, - "sandbox": { - "type": "boolean", - "description": "Use APNS sandbox environment.", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - ] - } - }, - "/messaging/providers/apns/{providerId}": { - "patch": { - "summary": "Update APNS provider", - "operationId": "messagingUpdateApnsProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a Apple Push Notification service provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "updateApnsProvider", - "weight": 368, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-apns-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-apns-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - }, - "authKey": { - "type": "string", - "description": "APNS authentication key.", - "default": "", - "x-example": "<AUTH_KEY>" - }, - "authKeyId": { - "type": "string", - "description": "APNS authentication key ID.", - "default": "", - "x-example": "<AUTH_KEY_ID>" - }, - "teamId": { - "type": "string", - "description": "APNS team ID.", - "default": "", - "x-example": "<TEAM_ID>" - }, - "bundleId": { - "type": "string", - "description": "APNS bundle ID.", - "default": "", - "x-example": "<BUNDLE_ID>" - }, - "sandbox": { - "type": "boolean", - "description": "Use APNS sandbox environment.", - "default": null, - "x-example": false - } - } - } - } - ] - } - }, - "/messaging/providers/fcm": { - "post": { - "summary": "Create FCM provider", - "operationId": "messagingCreateFcmProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new Firebase Cloud Messaging provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "createFcmProvider", - "weight": 354, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-fcm-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-fcm-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "serviceAccountJSON": { - "type": "object", - "description": "FCM service account JSON.", - "default": {}, - "x-example": "{}" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - ] - } - }, - "/messaging/providers/fcm/{providerId}": { - "patch": { - "summary": "Update FCM provider", - "operationId": "messagingUpdateFcmProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a Firebase Cloud Messaging provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "updateFcmProvider", - "weight": 367, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-fcm-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-fcm-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - }, - "serviceAccountJSON": { - "type": "object", - "description": "FCM service account JSON.", - "default": {}, - "x-example": "{}" - } - } - } - } - ] - } - }, - "/messaging/providers/mailgun": { - "post": { - "summary": "Create Mailgun provider", - "operationId": "messagingCreateMailgunProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new Mailgun provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "createMailgunProvider", - "weight": 346, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-mailgun-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-mailgun-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Mailgun API Key.", - "default": "", - "x-example": "<API_KEY>" - }, - "domain": { - "type": "string", - "description": "Mailgun Domain.", - "default": "", - "x-example": "<DOMAIN>" - }, - "isEuRegion": { - "type": "boolean", - "description": "Set as EU region.", - "default": null, - "x-example": false - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well.", - "default": "", - "x-example": "email@example.com" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - ] - } - }, - "/messaging/providers/mailgun/{providerId}": { - "patch": { - "summary": "Update Mailgun provider", - "operationId": "messagingUpdateMailgunProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a Mailgun provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "updateMailgunProvider", - "weight": 359, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-mailgun-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-mailgun-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Mailgun API Key.", - "default": "", - "x-example": "<API_KEY>" - }, - "domain": { - "type": "string", - "description": "Mailgun Domain.", - "default": "", - "x-example": "<DOMAIN>" - }, - "isEuRegion": { - "type": "boolean", - "description": "Set as EU region.", - "default": null, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "default": "", - "x-example": "<REPLY_TO_EMAIL>" - } - } - } - } - ] - } - }, - "/messaging/providers/msg91": { - "post": { - "summary": "Create Msg91 provider", - "operationId": "messagingCreateMsg91Provider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new MSG91 provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "createMsg91Provider", - "weight": 349, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-msg91provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-msg91-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "templateId": { - "type": "string", - "description": "Msg91 template ID", - "default": "", - "x-example": "<TEMPLATE_ID>" - }, - "senderId": { - "type": "string", - "description": "Msg91 sender ID.", - "default": "", - "x-example": "<SENDER_ID>" - }, - "authKey": { - "type": "string", - "description": "Msg91 auth key.", - "default": "", - "x-example": "<AUTH_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - ] - } - }, - "/messaging/providers/msg91/{providerId}": { - "patch": { - "summary": "Update Msg91 provider", - "operationId": "messagingUpdateMsg91Provider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a MSG91 provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "updateMsg91Provider", - "weight": 362, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-msg91provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-msg91-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - }, - "templateId": { - "type": "string", - "description": "Msg91 template ID.", - "default": "", - "x-example": "<TEMPLATE_ID>" - }, - "senderId": { - "type": "string", - "description": "Msg91 sender ID.", - "default": "", - "x-example": "<SENDER_ID>" - }, - "authKey": { - "type": "string", - "description": "Msg91 auth key.", - "default": "", - "x-example": "<AUTH_KEY>" - } - } - } - } - ] - } - }, - "/messaging/providers/sendgrid": { - "post": { - "summary": "Create Sendgrid provider", - "operationId": "messagingCreateSendgridProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new Sendgrid provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "createSendgridProvider", - "weight": 347, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-sendgrid-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-sendgrid-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Sendgrid API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "default": "", - "x-example": "email@example.com" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - ] - } - }, - "/messaging/providers/sendgrid/{providerId}": { - "patch": { - "summary": "Update Sendgrid provider", - "operationId": "messagingUpdateSendgridProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a Sendgrid provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "updateSendgridProvider", - "weight": 360, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-sendgrid-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-sendgrid-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - }, - "apiKey": { - "type": "string", - "description": "Sendgrid API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com" - }, - "replyToName": { - "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "default": "", - "x-example": "<REPLY_TO_EMAIL>" - } - } - } - } - ] - } - }, - "/messaging/providers/smtp": { - "post": { - "summary": "Create SMTP provider", - "operationId": "messagingCreateSmtpProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new SMTP provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "createSmtpProvider", - "weight": 348, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-smtp-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-smtp-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "host": { - "type": "string", - "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465\"`. Hosts will be tried in order.", - "default": null, - "x-example": "<HOST>" - }, - "port": { - "type": "integer", - "description": "The default SMTP server port.", - "default": 587, - "x-example": 1 - }, - "username": { - "type": "string", - "description": "Authentication username.", - "default": "", - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "Authentication password.", - "default": "", - "x-example": "<PASSWORD>" - }, - "encryption": { - "type": "string", - "description": "Encryption type. Can be omitted, 'ssl', or 'tls'", - "default": "", - "x-example": "none", - "enum": ["none", "ssl", "tls"], - "x-enum-name": "SmtpEncryption", - "x-enum-keys": [] - }, - "autoTLS": { - "type": "boolean", - "description": "Enable SMTP AutoTLS feature.", - "default": true, - "x-example": false - }, - "mailer": { - "type": "string", - "description": "The value to use for the X-Mailer header.", - "default": "", - "x-example": "<MAILER>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "default": "", - "x-example": "email@example.com" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - } - }, - "required": ["providerId", "name", "host"] - } - } - ] - } - }, - "/messaging/providers/smtp/{providerId}": { - "patch": { - "summary": "Update SMTP provider", - "operationId": "messagingUpdateSmtpProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a SMTP provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "updateSmtpProvider", - "weight": 361, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-smtp-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-smtp-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "host": { - "type": "string", - "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465\"`. Hosts will be tried in order.", - "default": "", - "x-example": "<HOST>" - }, - "port": { - "type": "integer", - "description": "SMTP port.", - "default": null, - "x-example": 1 - }, - "username": { - "type": "string", - "description": "Authentication username.", - "default": "", - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "Authentication password.", - "default": "", - "x-example": "<PASSWORD>" - }, - "encryption": { - "type": "string", - "description": "Encryption type. Can be 'ssl' or 'tls'", - "default": "", - "x-example": "none", - "enum": ["none", "ssl", "tls"], - "x-enum-name": "SmtpEncryption", - "x-enum-keys": [] - }, - "autoTLS": { - "type": "boolean", - "description": "Enable SMTP AutoTLS feature.", - "default": null, - "x-example": false - }, - "mailer": { - "type": "string", - "description": "The value to use for the X-Mailer header.", - "default": "", - "x-example": "<MAILER>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com" - }, - "replyToName": { - "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "default": "", - "x-example": "<REPLY_TO_EMAIL>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - } - } - } - } - ] - } - }, - "/messaging/providers/telesign": { - "post": { - "summary": "Create Telesign provider", - "operationId": "messagingCreateTelesignProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new Telesign provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "createTelesignProvider", - "weight": 350, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-telesign-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-telesign-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100" - }, - "customerId": { - "type": "string", - "description": "Telesign customer ID.", - "default": "", - "x-example": "<CUSTOMER_ID>" - }, - "apiKey": { - "type": "string", - "description": "Telesign API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - ] - } - }, - "/messaging/providers/telesign/{providerId}": { - "patch": { - "summary": "Update Telesign provider", - "operationId": "messagingUpdateTelesignProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a Telesign provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "updateTelesignProvider", - "weight": 363, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-telesign-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-telesign-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - }, - "customerId": { - "type": "string", - "description": "Telesign customer ID.", - "default": "", - "x-example": "<CUSTOMER_ID>" - }, - "apiKey": { - "type": "string", - "description": "Telesign API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "default": "", - "x-example": "<FROM>" - } - } - } - } - ] - } - }, - "/messaging/providers/textmagic": { - "post": { - "summary": "Create Textmagic provider", - "operationId": "messagingCreateTextmagicProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new Textmagic provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "createTextmagicProvider", - "weight": 351, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-textmagic-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-textmagic-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100" - }, - "username": { - "type": "string", - "description": "Textmagic username.", - "default": "", - "x-example": "<USERNAME>" - }, - "apiKey": { - "type": "string", - "description": "Textmagic apiKey.", - "default": "", - "x-example": "<API_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - ] - } - }, - "/messaging/providers/textmagic/{providerId}": { - "patch": { - "summary": "Update Textmagic provider", - "operationId": "messagingUpdateTextmagicProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a Textmagic provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "updateTextmagicProvider", - "weight": 364, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-textmagic-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-textmagic-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - }, - "username": { - "type": "string", - "description": "Textmagic username.", - "default": "", - "x-example": "<USERNAME>" - }, - "apiKey": { - "type": "string", - "description": "Textmagic apiKey.", - "default": "", - "x-example": "<API_KEY>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "default": "", - "x-example": "<FROM>" - } - } - } - } - ] - } - }, - "/messaging/providers/twilio": { - "post": { - "summary": "Create Twilio provider", - "operationId": "messagingCreateTwilioProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new Twilio provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "createTwilioProvider", - "weight": 352, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-twilio-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-twilio-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100" - }, - "accountSid": { - "type": "string", - "description": "Twilio account secret ID.", - "default": "", - "x-example": "<ACCOUNT_SID>" - }, - "authToken": { - "type": "string", - "description": "Twilio authentication token.", - "default": "", - "x-example": "<AUTH_TOKEN>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - ] - } - }, - "/messaging/providers/twilio/{providerId}": { - "patch": { - "summary": "Update Twilio provider", - "operationId": "messagingUpdateTwilioProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a Twilio provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "updateTwilioProvider", - "weight": 365, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-twilio-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-twilio-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - }, - "accountSid": { - "type": "string", - "description": "Twilio account secret ID.", - "default": "", - "x-example": "<ACCOUNT_SID>" - }, - "authToken": { - "type": "string", - "description": "Twilio authentication token.", - "default": "", - "x-example": "<AUTH_TOKEN>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "default": "", - "x-example": "<FROM>" - } - } - } - } - ] - } - }, - "/messaging/providers/vonage": { - "post": { - "summary": "Create Vonage provider", - "operationId": "messagingCreateVonageProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new Vonage provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "createVonageProvider", - "weight": 353, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-vonage-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-vonage-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100" - }, - "apiKey": { - "type": "string", - "description": "Vonage API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "apiSecret": { - "type": "string", - "description": "Vonage API secret.", - "default": "", - "x-example": "<API_SECRET>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - } - }, - "required": ["providerId", "name"] - } - } - ] - } - }, - "/messaging/providers/vonage/{providerId}": { - "patch": { - "summary": "Update Vonage provider", - "operationId": "messagingUpdateVonageProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a Vonage provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "updateVonageProvider", - "weight": 366, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-vonage-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-vonage-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false - }, - "apiKey": { - "type": "string", - "description": "Vonage API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "apiSecret": { - "type": "string", - "description": "Vonage API secret.", - "default": "", - "x-example": "<API_SECRET>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "default": "", - "x-example": "<FROM>" - } - } - } - } - ] - } - }, - "/messaging/providers/{providerId}": { - "get": { - "summary": "Get provider", - "operationId": "messagingGetProvider", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get a provider by its unique ID.\n", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#/definitions/provider" - } - } - }, - "x-appwrite": { - "method": "getProvider", - "weight": 358, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/get-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/get-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete provider", - "operationId": "messagingDeleteProvider", - "consumes": ["application/json"], - "produces": [], - "tags": ["messaging"], - "description": "Delete a provider by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteProvider", - "weight": 369, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/delete-provider.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/delete-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - } - ] - } - }, - "/messaging/providers/{providerId}/logs": { - "get": { - "summary": "List provider logs", - "operationId": "messagingListProviderLogs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get the provider activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#/definitions/logList" - } - } - }, - "x-appwrite": { - "method": "listProviderLogs", - "weight": 357, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-provider-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-provider-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_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/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "/messaging/subscribers/{subscriberId}/logs": { - "get": { - "summary": "List subscriber logs", - "operationId": "messagingListSubscriberLogs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get the subscriber activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#/definitions/logList" - } - } - }, - "x-appwrite": { - "method": "listSubscriberLogs", - "weight": 378, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-subscriber-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-subscriber-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "type": "string", - "x-example": "<SUBSCRIBER_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/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "/messaging/topics": { - "get": { - "summary": "List topics", - "operationId": "messagingListTopics", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get a list of all topics from the current Appwrite project.", - "responses": { - "200": { - "description": "Topic list", - "schema": { - "$ref": "#/definitions/topicList" - } - } - }, - "x-appwrite": { - "method": "listTopics", - "weight": 371, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-topics.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-topics.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "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" - } - ] - }, - "post": { - "summary": "Create topic", - "operationId": "messagingCreateTopic", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new topic.", - "responses": { - "201": { - "description": "Topic", - "schema": { - "$ref": "#/definitions/topic" - } - } - }, - "x-appwrite": { - "method": "createTopic", - "weight": 370, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-topic.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "topicId": { - "type": "string", - "description": "Topic ID. Choose a custom Topic ID or a new Topic ID.", - "default": null, - "x-example": "<TOPIC_ID>" - }, - "name": { - "type": "string", - "description": "Topic Name.", - "default": null, - "x-example": "<NAME>" - }, - "subscribe": { - "type": "array", - "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "default": ["users"], - "x-example": "[\"any\"]", - "items": { - "type": "string" - } - } - }, - "required": ["topicId", "name"] - } - } - ] - } - }, - "/messaging/topics/{topicId}": { - "get": { - "summary": "Get topic", - "operationId": "messagingGetTopic", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get a topic by its unique ID.\n", - "responses": { - "200": { - "description": "Topic", - "schema": { - "$ref": "#/definitions/topic" - } - } - }, - "x-appwrite": { - "method": "getTopic", - "weight": 373, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/get-topic.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/get-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update topic", - "operationId": "messagingUpdateTopic", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Update a topic by its unique ID.\n", - "responses": { - "200": { - "description": "Topic", - "schema": { - "$ref": "#/definitions/topic" - } - } - }, - "x-appwrite": { - "method": "updateTopic", - "weight": 374, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/update-topic.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/update-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Topic Name.", - "default": null, - "x-example": "<NAME>" - }, - "subscribe": { - "type": "array", - "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "default": null, - "x-example": "[\"any\"]", - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "delete": { - "summary": "Delete topic", - "operationId": "messagingDeleteTopic", - "consumes": ["application/json"], - "produces": [], - "tags": ["messaging"], - "description": "Delete a topic by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteTopic", - "weight": 375, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/delete-topic.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/delete-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - } - ] - } - }, - "/messaging/topics/{topicId}/logs": { - "get": { - "summary": "List topic logs", - "operationId": "messagingListTopicLogs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get the topic activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#/definitions/logList" - } - } - }, - "x-appwrite": { - "method": "listTopicLogs", - "weight": 372, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-topic-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-topic-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "type": "string", - "x-example": "<TOPIC_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/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "/messaging/topics/{topicId}/subscribers": { - "get": { - "summary": "List subscribers", - "operationId": "messagingListSubscribers", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get a list of all subscribers from the current Appwrite project.", - "responses": { - "200": { - "description": "Subscriber list", - "schema": { - "$ref": "#/definitions/subscriberList" - } - } - }, - "x-appwrite": { - "method": "listSubscribers", - "weight": 377, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/list-subscribers.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/list-subscribers.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "type": "string", - "x-example": "<TOPIC_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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "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" - } - ] - }, - "post": { - "summary": "Create subscriber", - "operationId": "messagingCreateSubscriber", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Create a new subscriber.", - "responses": { - "201": { - "description": "Subscriber", - "schema": { - "$ref": "#/definitions/subscriber" - } - } - }, - "x-appwrite": { - "method": "createSubscriber", - "weight": 376, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/create-subscriber.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/create-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", - "platforms": ["server", "client", "console", "server"], - "packaging": false, - "auth": { - "Project": [], - "JWT": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Session": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID to subscribe to.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "subscriberId": { - "type": "string", - "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", - "default": null, - "x-example": "<SUBSCRIBER_ID>" - }, - "targetId": { - "type": "string", - "description": "Target ID. The target ID to link to the specified Topic ID.", - "default": null, - "x-example": "<TARGET_ID>" - } - }, - "required": ["subscriberId", "targetId"] - } - } - ] - } - }, - "/messaging/topics/{topicId}/subscribers/{subscriberId}": { - "get": { - "summary": "Get subscriber", - "operationId": "messagingGetSubscriber", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["messaging"], - "description": "Get a subscriber by its unique ID.\n", - "responses": { - "200": { - "description": "Subscriber", - "schema": { - "$ref": "#/definitions/subscriber" - } - } - }, - "x-appwrite": { - "method": "getSubscriber", - "weight": 379, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/get-subscriber.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/get-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", - "platforms": ["console", "server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - }, - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "type": "string", - "x-example": "<SUBSCRIBER_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete subscriber", - "operationId": "messagingDeleteSubscriber", - "consumes": ["application/json"], - "produces": [], - "tags": ["messaging"], - "description": "Delete a subscriber by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteSubscriber", - "weight": 380, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "messaging/delete-subscriber.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/messaging/delete-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", - "platforms": ["server", "client", "console", "server"], - "packaging": false, - "auth": { - "Project": [], - "JWT": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Session": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - }, - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "type": "string", - "x-example": "<SUBSCRIBER_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": 203, - "cookies": false, - "type": "", - "deprecated": false, - "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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "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" - } - ] - }, - "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": 202, - "cookies": false, - "type": "", - "deprecated": false, - "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 a custom ID or generate a random ID with `ID.unique()`. Valid 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>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "fileSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", - "default": true, - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", - "default": {}, - "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" - } - }, - "compression": { - "type": "string", - "description": "Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled", - "default": "none", - "x-example": "none", - "enum": ["none", "gzip", "zstd"], - "x-enum-name": null, - "x-enum-keys": [] - }, - "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"] - } - } - ] - } - }, - "/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": 204, - "cookies": false, - "type": "", - "deprecated": false, - "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": 205, - "cookies": false, - "type": "", - "deprecated": false, - "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>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "fileSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", - "default": true, - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", - "default": {}, - "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" - } - }, - "compression": { - "type": "string", - "description": "Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled", - "default": "none", - "x-example": "none", - "enum": ["none", "gzip", "zstd"], - "x-enum-name": null, - "x-enum-keys": [] - }, - "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"] - } - } - ] - }, - "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": 206, - "cookies": false, - "type": "", - "deprecated": false, - "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.", - "responses": { - "200": { - "description": "Files List", - "schema": { - "$ref": "#/definitions/fileList" - } - } - }, - "x-appwrite": { - "method": "listFiles", - "weight": 208, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "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" - } - ] - }, - "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](https://appwrite.io/docs/server/storage#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": 207, - "cookies": false, - "type": "upload", - "deprecated": false, - "demo": "storage/create-file.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/create-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}", - "scope": "files.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).", - "required": true, - "type": "file", - "in": "formData" - }, - { - "name": "permissions", - "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "x-example": "[\"read(\"any\")\"]", - "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": 209, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/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": 214, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "storage/update-file.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/update-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "files.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/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": { - "name": { - "type": "string", - "description": "Name of the file", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission string. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "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": 215, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "storage/delete-file.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/delete-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "files.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/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": 211, - "cookies": false, - "type": "location", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/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": 210, - "cookies": false, - "type": "location", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/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", - "enum": [ - "center", - "top-left", - "top", - "top-right", - "left", - "right", - "bottom-left", - "bottom", - "bottom-right" - ], - "x-enum-name": "ImageGravity", - "x-enum-keys": [], - "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", - "enum": ["jpg", "jpeg", "gif", "png", "webp", "heic", "avif"], - "x-enum-name": "ImageFormat", - "x-enum-keys": [], - "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": 212, - "cookies": false, - "type": "location", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/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.", - "responses": { - "200": { - "description": "Teams List", - "schema": { - "$ref": "#/definitions/teamList" - } - } - }, - "x-appwrite": { - "method": "list", - "weight": 219, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "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" - } - ] - }, - "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": 218, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "teamId": { - "type": "string", - "description": "Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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](https://appwrite.io/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": 220, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update name", - "operationId": "teamsUpdateName", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Update the team's name by its unique ID.", - "responses": { - "200": { - "description": "Team", - "schema": { - "$ref": "#/definitions/team" - } - } - }, - "x-appwrite": { - "method": "updateName", - "weight": 222, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "teams/update-name.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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": 224, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - } - ] - } - }, - "/teams/{teamId}/memberships": { - "get": { - "summary": "List team memberships", - "operationId": "teamsListMemberships", - "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. Hide sensitive attributes from the response by toggling membership privacy in the Console.", - "responses": { - "200": { - "description": "Memberships List", - "schema": { - "$ref": "#/definitions/membershipList" - } - } - }, - "x-appwrite": { - "method": "listMemberships", - "weight": 226, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "teams/list-memberships.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/list-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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "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" - } - ] - }, - "post": { - "summary": "Create team membership", - "operationId": "teamsCreateMembership", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) 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) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", - "responses": { - "201": { - "description": "Membership", - "schema": { - "$ref": "#/definitions/membership" - } - } - }, - "x-appwrite": { - "method": "createMembership", - "weight": 225, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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": "", - "x-example": "email@example.com" + "additionalProperties": true, + "required": [ + "$id", + "$collectionId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, + "log": { + "description": "Log", + "type": "object", + "properties": { + "event": { + "type": "string", + "description": "Event name.", + "x-example": "account.sessions.create" }, "userId": { - "type": "string", - "description": "ID of the user to be added to a team.", - "default": "", - "x-example": "<USER_ID>" + "type": "string", + "description": "User ID.", + "x-example": "610fc2f985ee0" }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100" + "userEmail": { + "type": "string", + "description": "User Email.", + "x-example": "john@appwrite.io" }, - "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](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } + "userName": { + "type": "string", + "description": "User Name.", + "x-example": "John Doe" }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. 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" + "mode": { + "type": "string", + "description": "API mode when event triggered.", + "x-example": "admin" }, - "name": { - "type": "string", - "description": "Name of the new team member. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" + "ip": { + "type": "string", + "description": "IP session in use when the session was created.", + "x-example": "127.0.0.1" + }, + "time": { + "type": "string", + "description": "Log creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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": ["roles"] - } - } - ] - } - }, - "/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. Hide sensitive attributes from the response by toggling membership privacy in the Console.", - "responses": { - "200": { - "description": "Membership", - "schema": { - "$ref": "#/definitions/membership" - } - } - }, - "x-appwrite": { - "method": "getMembership", - "weight": 227, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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", - "operationId": "teamsUpdateMembership", - "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](https://appwrite.io/docs/permissions).\n", - "responses": { - "200": { - "description": "Membership", - "schema": { - "$ref": "#/definitions/membership" - } - } - }, - "x-appwrite": { - "method": "updateMembership", - "weight": 228, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "teams/update-membership.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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": 230, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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": 229, - "cookies": false, - "type": "", - "deprecated": false, - "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": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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"] - } - } - ] - } - }, - "/teams/{teamId}/prefs": { - "get": { - "summary": "Get team preferences", - "operationId": "teamsGetPrefs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs).", - "responses": { - "200": { - "description": "Preferences", - "schema": { - "$ref": "#/definitions/preferences" - } - } - }, - "x-appwrite": { - "method": "getPrefs", - "weight": 221, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "teams/get-prefs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/get-team-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update preferences", - "operationId": "teamsUpdatePrefs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Update the team's 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 an error if exceeded.", - "responses": { - "200": { - "description": "Preferences", - "schema": { - "$ref": "#/definitions/preferences" - } - } - }, - "x-appwrite": { - "method": "updatePrefs", - "weight": 223, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "teams/update-prefs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": ["client", "server"], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "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": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "default": {}, - "x-example": "{}" - } - }, - "required": ["prefs"] - } - } - ] - } - }, - "/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": 241, - "cookies": false, - "type": "", - "deprecated": false, - "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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" }, - "default": [], - "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" - } - ] - }, - "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": 232, - "cookies": false, - "type": "", - "deprecated": false, - "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 a custom ID or generate a random ID with `ID.unique()`. Valid 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" - }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": null, - "x-example": "+12065550100" - }, - "password": { - "type": "string", - "description": "Plain text user password. Must be at least 8 chars.", - "default": "", - "x-example": null - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": ["userId"] - } - } - ] - } - }, - "/users/argon2": { - "post": { - "summary": "Create user with Argon2 password", - "operationId": "usersCreateArgon2User", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Create a new user. Password provided must be hashed with the [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "createArgon2User", - "weight": 235, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-argon2user.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-argon2-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using Argon2.", - "default": null, - "x-example": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": ["userId", "email", "password"] - } - } - ] - } - }, - "/users/bcrypt": { - "post": { - "summary": "Create user with bcrypt password", - "operationId": "usersCreateBcryptUser", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Create a new user. Password provided must be hashed with the [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "createBcryptUser", - "weight": 233, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-bcrypt-user.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-bcrypt-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using Bcrypt.", - "default": null, - "x-example": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": ["userId", "email", "password"] - } - } - ] - } - }, - "/users/identities": { - "get": { - "summary": "List identities", - "operationId": "usersListIdentities", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Get identities for all users.", - "responses": { - "200": { - "description": "Identities List", - "schema": { - "$ref": "#/definitions/identityList" - } - } - }, - "x-appwrite": { - "method": "listIdentities", - "weight": 249, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/list-identities.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/list-identities.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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "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" - } - ] - } - }, - "/users/identities/{identityId}": { - "delete": { - "summary": "Delete identity", - "operationId": "usersDeleteIdentity", - "consumes": ["application/json"], - "produces": [], - "tags": ["users"], - "description": "Delete an identity by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteIdentity", - "weight": 272, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/delete-identity.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/delete-identity.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": "identityId", - "description": "Identity ID.", - "required": true, - "type": "string", - "x-example": "<IDENTITY_ID>", - "in": "path" - } - ] - } - }, - "/users/md5": { - "post": { - "summary": "Create user with MD5 password", - "operationId": "usersCreateMD5User", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Create a new user. Password provided must be hashed with the [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "createMD5User", - "weight": 234, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-m-d5user.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-md5-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using MD5.", - "default": null, - "x-example": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": ["userId", "email", "password"] - } - } - ] - } - }, - "/users/phpass": { - "post": { - "summary": "Create user with PHPass password", - "operationId": "usersCreatePHPassUser", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Create a new user. Password provided must be hashed with the [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "createPHPassUser", - "weight": 237, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-p-h-pass-user.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-phpass-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 a custom ID or pass the string `ID.unique()`to auto generate it. Valid 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 hashed using PHPass.", - "default": null, - "x-example": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": ["userId", "email", "password"] - } - } - ] - } - }, - "/users/scrypt": { - "post": { - "summary": "Create user with Scrypt password", - "operationId": "usersCreateScryptUser", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Create a new user. Password provided must be hashed with the [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "createScryptUser", - "weight": 238, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-scrypt-user.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-scrypt-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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 hashed using Scrypt.", - "default": null, - "x-example": "password" - }, - "passwordSalt": { - "type": "string", - "description": "Optional salt used to hash password.", - "default": null, - "x-example": "<PASSWORD_SALT>" - }, - "passwordCpu": { - "type": "integer", - "description": "Optional CPU cost used to hash password.", - "default": null, - "x-example": null - }, - "passwordMemory": { - "type": "integer", - "description": "Optional memory cost used to hash password.", - "default": null, - "x-example": null - }, - "passwordParallel": { - "type": "integer", - "description": "Optional parallelization cost used to hash password.", - "default": null, - "x-example": null - }, - "passwordLength": { - "type": "integer", - "description": "Optional hash length used to hash password.", - "default": null, - "x-example": null - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ + "required": [ + "event", "userId", - "email", - "password", - "passwordSalt", - "passwordCpu", - "passwordMemory", - "passwordParallel", - "passwordLength" - ] - } - } - ] - } - }, - "/users/scrypt-modified": { - "post": { - "summary": "Create user with Scrypt modified password", - "operationId": "usersCreateScryptModifiedUser", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Create a new user. Password provided must be hashed with the [Scrypt Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { + "userEmail", + "userName", + "mode", + "ip", + "time", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName" + ] + }, + "user": { "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "createScryptModifiedUser", - "weight": 239, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-scrypt-modified-user.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-scrypt-modified-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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>" + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com" + "$createdAt": { + "type": "string", + "description": "User creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "password": { - "type": "string", - "description": "User password hashed using Scrypt Modified.", - "default": null, - "x-example": "password" - }, - "passwordSalt": { - "type": "string", - "description": "Salt used to hash password.", - "default": null, - "x-example": "<PASSWORD_SALT>" - }, - "passwordSaltSeparator": { - "type": "string", - "description": "Salt separator used to hash password.", - "default": null, - "x-example": "<PASSWORD_SALT_SEPARATOR>" - }, - "passwordSignerKey": { - "type": "string", - "description": "Signer key used to hash password.", - "default": null, - "x-example": "<PASSWORD_SIGNER_KEY>" + "$updatedAt": { + "type": "string", + "description": "User update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password", - "passwordSalt", - "passwordSaltSeparator", - "passwordSignerKey" - ] - } - } - ] - } - }, - "/users/sha": { - "post": { - "summary": "Create user with SHA password", - "operationId": "usersCreateSHAUser", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Create a new user. Password provided must be hashed with the [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "createSHAUser", - "weight": 236, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-s-h-a-user.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-sha-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 a custom ID or generate a random ID with `ID.unique()`. Valid 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" + "type": "string", + "description": "User name.", + "x-example": "John Doe" }, "password": { - "type": "string", - "description": "User password hashed using SHA.", - "default": null, - "x-example": "password" + "type": "string", + "description": "Hashed user password.", + "x-example": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "x-nullable": true }, - "passwordVersion": { - "type": "string", - "description": "Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512/224', 'sha512/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'", - "default": "", - "x-example": "sha1", - "enum": [ - "sha1", - "sha224", - "sha256", - "sha384", - "sha512/224", - "sha512/256", - "sha512", - "sha3-224", - "sha3-256", - "sha3-384", - "sha3-512" - ], - "x-enum-name": "PasswordHash", - "x-enum-keys": [] + "hash": { + "type": "string", + "description": "Password hashing algorithm.", + "x-example": "argon2", + "x-nullable": true }, - "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": 242, - "cookies": false, - "type": "", - "deprecated": false, - "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](https://appwrite.io/docs/server/users#usersUpdateStatus) endpoint instead.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "delete", - "weight": 270, - "cookies": false, - "type": "", - "deprecated": false, - "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": 255, - "cookies": false, - "type": "", - "deprecated": false, - "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}/jwts": { - "post": { - "summary": "Create user JWT", - "operationId": "usersCreateJWT", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.", - "responses": { - "201": { - "description": "JWT", - "schema": { - "$ref": "#/definitions/jwt" - } - } - }, - "x-appwrite": { - "method": "createJWT", - "weight": 273, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-j-w-t.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-user-jwt.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": { - "sessionId": { - "type": "string", - "description": "Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session.", - "default": "", - "x-example": "<SESSION_ID>" + "hashOptions": { + "type": "object", + "description": "Password hashing algorithm configuration.", + "x-example": {}, + "items": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/algoArgon2" + }, + { + "$ref": "#\/definitions\/algoScrypt" + }, + { + "$ref": "#\/definitions\/algoScryptModified" + }, + { + "$ref": "#\/definitions\/algoBcrypt" + }, + { + "$ref": "#\/definitions\/algoPhpass" + }, + { + "$ref": "#\/definitions\/algoSha" + }, + { + "$ref": "#\/definitions\/algoMd5" + } + ] + }, + "x-nullable": true + }, + "registration": { + "type": "string", + "description": "User registration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "duration": { - "type": "integer", - "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", - "default": 900, - "x-example": 0 - } - } - } - } - ] - } - }, - "/users/{userId}/labels": { - "put": { - "summary": "Update user labels", - "operationId": "usersUpdateLabels", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Update the user labels by its unique ID. \n\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "updateLabels", - "weight": 251, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/update-labels.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-labels.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": { - "labels": { - "type": "array", - "description": "Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": ["labels"] - } - } - ] - } - }, - "/users/{userId}/logs": { - "get": { - "summary": "List user logs", - "operationId": "usersListLogs", - "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": "listLogs", - "weight": 247, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/list-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/list-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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "/users/{userId}/memberships": { - "get": { - "summary": "List user memberships", - "operationId": "usersListMemberships", - "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": "listMemberships", - "weight": 246, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/list-memberships.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/list-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}/mfa": { - "patch": { - "summary": "Update MFA", - "operationId": "usersUpdateMfa", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Enable or disable MFA on a user account.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "updateMfa", - "weight": 260, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/update-mfa.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-mfa.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": { - "mfa": { - "type": "boolean", - "description": "Enable or disable MFA.", - "default": null, - "x-example": false - } - }, - "required": ["mfa"] - } - } - ] - } - }, - "/users/{userId}/mfa/authenticators/{type}": { - "delete": { - "summary": "Delete authenticator", - "operationId": "usersDeleteMfaAuthenticator", - "consumes": ["application/json"], - "produces": [], - "tags": ["users"], - "description": "Delete an authenticator app.", - "responses": { - "204": { - "description": "No content" - } - }, - "x-appwrite": { - "method": "deleteMfaAuthenticator", - "weight": 265, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/delete-mfa-authenticator.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/delete-mfa-authenticator.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": "type", - "description": "Type of authenticator.", - "required": true, - "type": "string", - "x-example": "totp", - "enum": ["totp"], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [], - "in": "path" - } - ] - } - }, - "/users/{userId}/mfa/factors": { - "get": { - "summary": "List factors", - "operationId": "usersListMfaFactors", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "List the factors available on the account to be used as a MFA challange.", - "responses": { - "200": { - "description": "MFAFactors", - "schema": { - "$ref": "#/definitions/mfaFactors" - } - } - }, - "x-appwrite": { - "method": "listMfaFactors", - "weight": 261, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/list-mfa-factors.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/list-mfa-factors.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}/mfa/recovery-codes": { - "get": { - "summary": "Get MFA recovery codes", - "operationId": "usersGetMfaRecoveryCodes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#/definitions/mfaRecoveryCodes" - } - } - }, - "x-appwrite": { - "method": "getMfaRecoveryCodes", - "weight": 262, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/get-mfa-recovery-codes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/get-mfa-recovery-codes.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" - } - ] - }, - "put": { - "summary": "Regenerate MFA recovery codes", - "operationId": "usersUpdateMfaRecoveryCodes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#/definitions/mfaRecoveryCodes" - } - } - }, - "x-appwrite": { - "method": "updateMfaRecoveryCodes", - "weight": 264, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/update-mfa-recovery-codes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-mfa-recovery-codes.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" - } - ] - }, - "patch": { - "summary": "Create MFA recovery codes", - "operationId": "usersCreateMfaRecoveryCodes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method by client SDK.", - "responses": { - "201": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#/definitions/mfaRecoveryCodes" - } - } - }, - "x-appwrite": { - "method": "createMfaRecoveryCodes", - "weight": 263, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-mfa-recovery-codes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-mfa-recovery-codes.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}/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": 253, - "cookies": false, - "type": "", - "deprecated": false, - "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": 254, - "cookies": false, - "type": "", - "deprecated": false, - "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": null - } - }, - "required": ["password"] - } - } - ] - } - }, - "/users/{userId}/phone": { - "patch": { - "summary": "Update phone", - "operationId": "usersUpdatePhone", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Update the user phone by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } - }, - "x-appwrite": { - "method": "updatePhone", - "weight": 256, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/update-phone.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "number": { - "type": "string", - "description": "User phone number.", - "default": null, - "x-example": "+12065550100" - } - }, - "required": ["number"] - } - } - ] - } - }, - "/users/{userId}/prefs": { - "get": { - "summary": "Get user preferences", - "operationId": "usersGetPrefs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Get the user preferences by its unique ID.", - "responses": { - "200": { - "description": "Preferences", - "schema": { - "$ref": "#/definitions/preferences" - } - } - }, - "x-appwrite": { - "method": "getPrefs", - "weight": 243, - "cookies": false, - "type": "", - "deprecated": false, - "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": 258, - "cookies": false, - "type": "", - "deprecated": false, - "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": "List user sessions", - "operationId": "usersListSessions", - "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": "listSessions", - "weight": 245, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/list-sessions.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/list-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" - } - ] - }, - "post": { - "summary": "Create session", - "operationId": "usersCreateSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Creates a session for a user. Returns an immediately usable session object.\n\nIf you want to generate a token for a custom authentication flow, use the [POST /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken) endpoint.", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#/definitions/session" - } - } - }, - "x-appwrite": { - "method": "createSession", - "weight": 266, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-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. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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, - "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": 269, - "cookies": false, - "type": "", - "deprecated": false, - "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": 268, - "cookies": false, - "type": "", - "deprecated": false, - "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": 250, - "cookies": false, - "type": "", - "deprecated": false, - "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 + "type": "boolean", + "description": "User status. Pass `true` for enabled and `false` for disabled.", + "x-example": true + }, + "labels": { + "type": "array", + "description": "Labels for the user.", + "items": { + "type": "string" + }, + "x-example": [ + "vip" + ] + }, + "passwordUpdate": { + "type": "string", + "description": "Password update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "email": { + "type": "string", + "description": "User email address.", + "x-example": "john@appwrite.io" + }, + "phone": { + "type": "string", + "description": "User phone number in E.164 format.", + "x-example": "+4930901820" + }, + "emailVerification": { + "type": "boolean", + "description": "Email verification status.", + "x-example": true + }, + "phoneVerification": { + "type": "boolean", + "description": "Phone verification status.", + "x-example": true + }, + "mfa": { + "type": "boolean", + "description": "Multi factor authentication 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" + } + }, + "targets": { + "type": "array", + "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.", + "items": { + "type": "object", + "$ref": "#\/definitions\/target" + }, + "x-example": [] + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" } - }, - "required": ["status"] - } - } - ] - } - }, - "/users/{userId}/targets": { - "get": { - "summary": "List user targets", - "operationId": "usersListTargets", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "List the messaging targets that are associated with a user.", - "responses": { - "200": { - "description": "Target list", - "schema": { - "$ref": "#/definitions/targetList" - } - } - }, - "x-appwrite": { - "method": "listTargets", - "weight": 248, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/list-targets.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/list-user-targets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", - "platforms": ["server", "console"], - "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": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create user target", - "operationId": "usersCreateTarget", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Create a messaging target.", - "responses": { - "201": { - "description": "Target", - "schema": { - "$ref": "#/definitions/target" - } - } + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "registration", + "status", + "labels", + "passwordUpdate", + "email", + "phone", + "emailVerification", + "phoneVerification", + "mfa", + "prefs", + "targets", + "accessedAt" + ] }, - "x-appwrite": { - "method": "createTarget", - "weight": 240, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-target.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": ["server", "console"], - "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": { - "targetId": { - "type": "string", - "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid 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": "<TARGET_ID>" - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "default": null, - "x-example": "email", - "enum": ["email", "sms", "push"], - "x-enum-name": "MessagingProviderType", - "x-enum-keys": [] - }, - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "default": null, - "x-example": "<IDENTIFIER>" - }, - "providerId": { - "type": "string", - "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", - "default": "", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", - "default": "", - "x-example": "<NAME>" + "algoMd5": { + "description": "AlgoMD5", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "md5" } - }, - "required": ["targetId", "providerType", "identifier"] - } - } - ] - } - }, - "/users/{userId}/targets/{targetId}": { - "get": { - "summary": "Get user target", - "operationId": "usersGetTarget", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Get a user's push notification target by ID.", - "responses": { - "200": { - "description": "Target", - "schema": { - "$ref": "#/definitions/target" - } - } + }, + "required": [ + "type" + ] }, - "x-appwrite": { - "method": "getTarget", - "weight": 244, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/get-target.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/get-user-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", - "platforms": ["server", "console"], - "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": "targetId", - "description": "Target ID.", - "required": true, - "type": "string", - "x-example": "<TARGET_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update user target", - "operationId": "usersUpdateTarget", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Update a messaging target.", - "responses": { - "200": { - "description": "Target", - "schema": { - "$ref": "#/definitions/target" - } - } - }, - "x-appwrite": { - "method": "updateTarget", - "weight": 259, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/update-target.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": ["server", "console"], - "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": "targetId", - "description": "Target ID.", - "required": true, - "type": "string", - "x-example": "<TARGET_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "default": "", - "x-example": "<IDENTIFIER>" - }, - "providerId": { - "type": "string", - "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", - "default": "", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", - "default": "", - "x-example": "<NAME>" + "algoSha": { + "description": "AlgoSHA", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "sha" } - } - } - } - ] - }, - "delete": { - "summary": "Delete user target", - "operationId": "usersDeleteTarget", - "consumes": ["application/json"], - "produces": [], - "tags": ["users"], - "description": "Delete a messaging target.", - "responses": { - "204": { - "description": "No content" - } + }, + "required": [ + "type" + ] }, - "x-appwrite": { - "method": "deleteTarget", - "weight": 271, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/delete-target.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/delete-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": ["server", "console"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } + "algoPhpass": { + "description": "AlgoPHPass", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "phpass" + } + }, + "required": [ + "type" + ] }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "type": "string", - "x-example": "<TARGET_ID>", - "in": "path" - } - ] - } - }, - "/users/{userId}/tokens": { - "post": { - "summary": "Create token", - "operationId": "usersCreateToken", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT /account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process.\n", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#/definitions/token" - } - } + "algoBcrypt": { + "description": "AlgoBcrypt", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "bcrypt" + } + }, + "required": [ + "type" + ] }, - "x-appwrite": { - "method": "createToken", - "weight": 267, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/create-token.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-token.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": { + "algoScrypt": { + "description": "AlgoScrypt", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "scrypt" + }, + "costCpu": { + "type": "integer", + "description": "CPU complexity of computed hash.", + "x-example": 8, + "format": "int32" + }, + "costMemory": { + "type": "integer", + "description": "Memory complexity of computed hash.", + "x-example": 14, + "format": "int32" + }, + "costParallel": { + "type": "integer", + "description": "Parallelization of computed hash.", + "x-example": 1, + "format": "int32" + }, "length": { - "type": "integer", - "description": "Token length in characters. The default length is 6 characters", - "default": 6, - "x-example": 4 + "type": "integer", + "description": "Length used to compute hash.", + "x-example": 64, + "format": "int32" + } + }, + "required": [ + "type", + "costCpu", + "costMemory", + "costParallel", + "length" + ] + }, + "algoScryptModified": { + "description": "AlgoScryptModified", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "scryptMod" + }, + "salt": { + "type": "string", + "description": "Salt used to compute hash.", + "x-example": "UxLMreBr6tYyjQ==" + }, + "saltSeparator": { + "type": "string", + "description": "Separator used to compute hash.", + "x-example": "Bw==" + }, + "signerKey": { + "type": "string", + "description": "Key used to compute hash.", + "x-example": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } + }, + "required": [ + "type", + "salt", + "saltSeparator", + "signerKey" + ] + }, + "algoArgon2": { + "description": "AlgoArgon2", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "argon2" + }, + "memoryCost": { + "type": "integer", + "description": "Memory used to compute hash.", + "x-example": 65536, + "format": "int32" + }, + "timeCost": { + "type": "integer", + "description": "Amount of time consumed to compute hash", + "x-example": 4, + "format": "int32" + }, + "threads": { + "type": "integer", + "description": "Number of threads used to compute hash.", + "x-example": 3, + "format": "int32" + } + }, + "required": [ + "type", + "memoryCost", + "timeCost", + "threads" + ] + }, + "preferences": { + "description": "Preferences", + "type": "object", + "additionalProperties": true + }, + "session": { + "description": "Session", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Session ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Session creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Session update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5bb8c16897e" }, "expire": { - "type": "integer", - "description": "Token expiration period in seconds. The default expiration is 15 minutes.", - "default": 900, - "x-example": 60 + "type": "string", + "description": "Session expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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": "string", + "description": "The date of when the access token expires in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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 + }, + "factors": { + "type": "array", + "description": "Returns a list of active session factors.", + "items": { + "type": "string" + }, + "x-example": [ + "email" + ] + }, + "secret": { + "type": "string", + "description": "Secret used to authenticate the user. Only included if the request was made with an API key", + "x-example": "5e5bb8c16897e" + }, + "mfaUpdatedAt": { + "type": "string", + "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge.", + "x-example": "2020-10-15T06:38:00.000+00:00" } - } - } - } - ] - } - }, - "/users/{userId}/verification": { - "patch": { - "summary": "Update email verification", - "operationId": "usersUpdateEmailVerification", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Update the user email verification status by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "expire", + "provider", + "providerUid", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken", + "ip", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName", + "current", + "factors", + "secret", + "mfaUpdatedAt" + ] }, - "x-appwrite": { - "method": "updateEmailVerification", - "weight": 257, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/update-email-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-email-verification.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "emailVerification": { - "type": "boolean", - "description": "User email verification status.", - "default": null, - "x-example": false + "identity": { + "description": "Identity", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Identity ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Identity creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Identity update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5bb8c16897e" + }, + "provider": { + "type": "string", + "description": "Identity Provider.", + "x-example": "email" + }, + "providerUid": { + "type": "string", + "description": "ID of the User in the Identity Provider.", + "x-example": "5e5bb8c16897e" + }, + "providerEmail": { + "type": "string", + "description": "Email of the User in the Identity Provider.", + "x-example": "user@example.com" + }, + "providerAccessToken": { + "type": "string", + "description": "Identity Provider Access Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "providerAccessTokenExpiry": { + "type": "string", + "description": "The date of when the access token expires in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "providerRefreshToken": { + "type": "string", + "description": "Identity Provider Refresh Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" } - }, - "required": ["emailVerification"] - } - } - ] - } - }, - "/users/{userId}/verification/phone": { - "patch": { - "summary": "Update phone verification", - "operationId": "usersUpdatePhoneVerification", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Update the user phone verification status by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#/definitions/user" - } - } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "provider", + "providerUid", + "providerEmail", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken" + ] }, - "x-appwrite": { - "method": "updatePhoneVerification", - "weight": 252, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "users/update-phone-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-phone-verification.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "phoneVerification": { - "type": "boolean", - "description": "User phone verification status.", - "default": null, - "x-example": false + "token": { + "description": "Token", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "phrase": { + "type": "string", + "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.", + "x-example": "Golden Fox" } - }, - "required": ["phoneVerification"] - } - } - ] - } - } - }, - "tags": [ - { - "name": "account", - "description": "The Account service allows you to authenticate and manage a user account.", - "x-globalAttributes": [] - }, - { - "name": "avatars", - "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.", - "x-globalAttributes": [] - }, - { - "name": "databases", - "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents", - "x-globalAttributes": ["databaseId"] - }, - { - "name": "locale", - "description": "The Locale service allows you to customize your app based on your users' location.", - "x-globalAttributes": [] - }, - { - "name": "health", - "description": "The Health service allows you to both validate and monitor your Appwrite server's health.", - "x-globalAttributes": [] - }, - { - "name": "projects", - "description": "The Project service allows you to manage all the projects in your Appwrite server.", - "x-globalAttributes": [] - }, - { - "name": "project", - "description": "The Project service allows you to manage all the projects in your Appwrite server.", - "x-globalAttributes": [] - }, - { - "name": "storage", - "description": "The Storage service allows you to manage your project files.", - "x-globalAttributes": [] - }, - { - "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", - "x-globalAttributes": [] - }, - { - "name": "users", - "description": "The Users service allows you to manage your project users.", - "x-globalAttributes": [] - }, - { - "name": "functions", - "description": "The Functions Service allows you view, create and manage your Cloud Functions.", - "x-globalAttributes": [] - }, - { - "name": "proxy", - "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration.", - "x-globalAttributes": [] - }, - { - "name": "graphql", - "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL.", - "x-globalAttributes": [] - }, - { - "name": "console", - "description": "The Console service allows you to interact with console relevant informations.", - "x-globalAttributes": [] - }, - { - "name": "migrations", - "description": "The Migrations service allows you to migrate third-party data to your Appwrite project.", - "x-globalAttributes": [] - }, - { - "name": "messaging", - "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.).", - "x-globalAttributes": [] - } - ], - "definitions": { - "any": { - "description": "Any", - "type": "object", - "additionalProperties": true - }, - "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"] - }, - "databaseList": { - "description": "Databases List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of databases documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "databases": { - "type": "array", - "description": "List of databases.", - "items": { - "type": "object", - "$ref": "#/definitions/database" - }, - "x-example": "" - } - }, - "required": ["total", "databases"] - }, - "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"] - }, - "identityList": { - "description": "Identities List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of identities documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "identities": { - "type": "array", - "description": "List of identities.", - "items": { - "type": "object", - "$ref": "#/definitions/identity" - }, - "x-example": "" - } - }, - "required": ["total", "identities"] - }, - "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"] - }, - "variableList": { - "description": "Variables List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of variables documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "variables": { - "type": "array", - "description": "List of variables.", - "items": { - "type": "object", - "$ref": "#/definitions/variable" - }, - "x-example": "" - } - }, - "required": ["total", "variables"] - }, - "localeCodeList": { - "description": "Locale codes list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "localeCodes": { - "type": "array", - "description": "List of localeCodes.", - "items": { - "type": "object", - "$ref": "#/definitions/localeCode" - }, - "x-example": "" - } - }, - "required": ["total", "localeCodes"] - }, - "providerList": { - "description": "Provider list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of providers documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "providers": { - "type": "array", - "description": "List of providers.", - "items": { - "type": "object", - "$ref": "#/definitions/provider" - }, - "x-example": "" - } - }, - "required": ["total", "providers"] - }, - "messageList": { - "description": "Message list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of messages documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "messages": { - "type": "array", - "description": "List of messages.", - "items": { - "type": "object", - "$ref": "#/definitions/message" - }, - "x-example": "" - } - }, - "required": ["total", "messages"] - }, - "topicList": { - "description": "Topic list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of topics documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "topics": { - "type": "array", - "description": "List of topics.", - "items": { - "type": "object", - "$ref": "#/definitions/topic" - }, - "x-example": "" - } - }, - "required": ["total", "topics"] - }, - "subscriberList": { - "description": "Subscriber list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of subscribers documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "subscribers": { - "type": "array", - "description": "List of subscribers.", - "items": { - "type": "object", - "$ref": "#/definitions/subscriber" - }, - "x-example": "" - } - }, - "required": ["total", "subscribers"] - }, - "targetList": { - "description": "Target list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of targets documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "targets": { - "type": "array", - "description": "List of targets.", - "items": { - "type": "object", - "$ref": "#/definitions/target" - }, - "x-example": "" - } - }, - "required": ["total", "targets"] - }, - "specificationList": { - "description": "Specifications List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of specifications documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "specifications": { - "type": "array", - "description": "List of specifications.", - "items": { - "type": "object", - "$ref": "#/definitions/specification" - }, - "x-example": "" - } - }, - "required": ["total", "specifications"] - }, - "database": { - "description": "Database", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Database name.", - "x-example": "My Database" - }, - "$createdAt": { - "type": "string", - "description": "Database creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Database update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "enabled": { - "type": "boolean", - "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - } - }, - "required": ["$id", "name", "$createdAt", "$updatedAt", "enabled"] - }, - "collection": { - "description": "Collection", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Collection creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Collection update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Collection permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "items": { - "type": "string" - }, - "x-example": ["read(\"any\")"] - }, - "databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Collection name.", - "x-example": "My Collection" - }, - "enabled": { - "type": "boolean", - "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - }, - "documentSecurity": { - "type": "boolean", - "description": "Whether document-level permissions are enabled. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "x-example": true - }, - "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/attributeDatetime" - }, - { - "$ref": "#/definitions/attributeRelationship" - }, - { - "$ref": "#/definitions/attributeString" - } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "secret", + "expire", + "phrase" ] - }, - "x-example": {} }, - "indexes": { - "type": "array", - "description": "Collection indexes.", - "items": { - "type": "object", - "$ref": "#/definitions/index" - }, - "x-example": {} - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "databaseId", - "name", - "enabled", - "documentSecurity", - "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/attributeDatetime" - }, - { - "$ref": "#/definitions/attributeRelationship" - }, - { - "$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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt", - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt" - ] - }, - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt" - ] - }, - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt" - ] - }, - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt", - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt", - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt", - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ] - }, - "attributeDatetime": { - "description": "AttributeDatetime", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "birthDay" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "datetime" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "ISO 8601 format.", - "x-example": "datetime" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Only null is optional", - "x-example": "2020-10-15T06:38:00.000+00:00", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ] - }, - "attributeRelationship": { - "description": "AttributeRelationship", - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "relatedCollection": { - "type": "string", - "description": "The ID of the related collection.", - "x-example": "collection" - }, - "relationType": { - "type": "string", - "description": "The type of the relationship.", - "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" - }, - "twoWay": { - "type": "boolean", - "description": "Is the relationship two-way?", - "x-example": false - }, - "twoWayKey": { - "type": "string", - "description": "The key of the two-way relationship.", - "x-example": "string" - }, - "onDelete": { - "type": "string", - "description": "How deleting the parent document will propagate to child documents.", - "x-example": "restrict|cascade|setNull" - }, - "side": { - "type": "string", - "description": "Whether this is the parent or child side of the relationship", - "x-example": "parent|child" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "relatedCollection", - "relationType", - "twoWay", - "twoWayKey", - "onDelete", - "side" - ] - }, - "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" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an index.", - "x-example": "string" - }, - "attributes": { - "type": "array", - "description": "Index attributes.", - "items": { - "type": "string" - }, - "x-example": [] - }, - "orders": { - "type": "array", - "description": "Index orders.", - "items": { - "type": "string" - }, - "x-example": [], - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Index creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Index update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "attributes", - "$createdAt", - "$updatedAt" - ] - }, - "document": { - "description": "Document", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Document ID.", - "x-example": "5e5ea5c16897e" - }, - "$collectionId": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c15117e" - }, - "$databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c15117e" - }, - "$createdAt": { - "type": "string", - "description": "Document creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Document update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Document permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "items": { - "type": "string" - }, - "x-example": ["read(\"any\")"] - } - }, - "additionalProperties": true, - "required": [ - "$id", - "$collectionId", - "$databaseId", - "$createdAt", - "$updatedAt", - "$permissions" - ] - }, - "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": "string", - "description": "Log creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "osCode": { - "type": "string", - "description": "Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).", - "x-example": "Mac" - }, - "osName": { - "type": "string", - "description": "Operating system name.", - "x-example": "Mac" - }, - "osVersion": { - "type": "string", - "description": "Operating system version.", - "x-example": "Mac" - }, - "clientType": { - "type": "string", - "description": "Client type.", - "x-example": "browser" - }, - "clientCode": { - "type": "string", - "description": "Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).", - "x-example": "CM" - }, - "clientName": { - "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" - }, - "clientVersion": { - "type": "string", - "description": "Client version.", - "x-example": "84.0" - }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" - }, - "clientEngineVersion": { - "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" - }, - "deviceName": { - "type": "string", - "description": "Device name.", - "x-example": "smartphone" - }, - "deviceBrand": { - "type": "string", - "description": "Device brand name.", - "x-example": "Google" - }, - "deviceModel": { - "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": [ - "event", - "userId", - "userEmail", - "userName", - "mode", - "ip", - "time", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName" - ] - }, - "user": { - "description": "User", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "User creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "User update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "User name.", - "x-example": "John Doe" - }, - "password": { - "type": "string", - "description": "Hashed user password.", - "x-example": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L/4LdgrVRXxE", - "x-nullable": true - }, - "hash": { - "type": "string", - "description": "Password hashing algorithm.", - "x-example": "argon2", - "x-nullable": true - }, - "hashOptions": { - "type": "object", - "description": "Password hashing algorithm configuration.", - "x-example": {}, - "items": { - "x-oneOf": [ - { - "$ref": "#/definitions/algoArgon2" - }, - { - "$ref": "#/definitions/algoScrypt" - }, - { - "$ref": "#/definitions/algoScryptModified" - }, - { - "$ref": "#/definitions/algoBcrypt" - }, - { - "$ref": "#/definitions/algoPhpass" - }, - { - "$ref": "#/definitions/algoSha" - }, - { - "$ref": "#/definitions/algoMd5" - } - ] - }, - "x-nullable": true - }, - "registration": { - "type": "string", - "description": "User registration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "status": { - "type": "boolean", - "description": "User status. Pass `true` for enabled and `false` for disabled.", - "x-example": true - }, - "labels": { - "type": "array", - "description": "Labels for the user.", - "items": { - "type": "string" - }, - "x-example": ["vip"] - }, - "passwordUpdate": { - "type": "string", - "description": "Password update time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "email": { - "type": "string", - "description": "User email address.", - "x-example": "john@appwrite.io" - }, - "phone": { - "type": "string", - "description": "User phone number in E.164 format.", - "x-example": "+4930901820" - }, - "emailVerification": { - "type": "boolean", - "description": "Email verification status.", - "x-example": true - }, - "phoneVerification": { - "type": "boolean", - "description": "Phone verification status.", - "x-example": true - }, - "mfa": { - "type": "boolean", - "description": "Multi factor authentication 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" - } - }, - "targets": { - "type": "array", - "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.", - "items": { - "type": "object", - "$ref": "#/definitions/target" - }, - "x-example": [] - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "registration", - "status", - "labels", - "passwordUpdate", - "email", - "phone", - "emailVerification", - "phoneVerification", - "mfa", - "prefs", - "targets", - "accessedAt" - ] - }, - "algoMd5": { - "description": "AlgoMD5", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "md5" - } - }, - "required": ["type"] - }, - "algoSha": { - "description": "AlgoSHA", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "sha" - } - }, - "required": ["type"] - }, - "algoPhpass": { - "description": "AlgoPHPass", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "phpass" - } - }, - "required": ["type"] - }, - "algoBcrypt": { - "description": "AlgoBcrypt", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "bcrypt" - } - }, - "required": ["type"] - }, - "algoScrypt": { - "description": "AlgoScrypt", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "scrypt" - }, - "costCpu": { - "type": "integer", - "description": "CPU complexity of computed hash.", - "x-example": 8, - "format": "int32" - }, - "costMemory": { - "type": "integer", - "description": "Memory complexity of computed hash.", - "x-example": 14, - "format": "int32" - }, - "costParallel": { - "type": "integer", - "description": "Parallelization of computed hash.", - "x-example": 1, - "format": "int32" - }, - "length": { - "type": "integer", - "description": "Length used to compute hash.", - "x-example": 64, - "format": "int32" - } - }, - "required": ["type", "costCpu", "costMemory", "costParallel", "length"] - }, - "algoScryptModified": { - "description": "AlgoScryptModified", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "scryptMod" - }, - "salt": { - "type": "string", - "description": "Salt used to compute hash.", - "x-example": "UxLMreBr6tYyjQ==" - }, - "saltSeparator": { - "type": "string", - "description": "Separator used to compute hash.", - "x-example": "Bw==" - }, - "signerKey": { - "type": "string", - "description": "Key used to compute hash.", - "x-example": "XyEKE9RcTDeLEsL/RjwPDBv/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" - } - }, - "required": ["type", "salt", "saltSeparator", "signerKey"] - }, - "algoArgon2": { - "description": "AlgoArgon2", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "argon2" - }, - "memoryCost": { - "type": "integer", - "description": "Memory used to compute hash.", - "x-example": 65536, - "format": "int32" - }, - "timeCost": { - "type": "integer", - "description": "Amount of time consumed to compute hash", - "x-example": 4, - "format": "int32" - }, - "threads": { - "type": "integer", - "description": "Number of threads used to compute hash.", - "x-example": 3, - "format": "int32" - } - }, - "required": ["type", "memoryCost", "timeCost", "threads"] - }, - "preferences": { - "description": "Preferences", - "type": "object", - "additionalProperties": true - }, - "session": { - "description": "Session", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Session ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Session creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Session update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" - }, - "expire": { - "type": "string", - "description": "Session expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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": "string", - "description": "The date of when the access token expires in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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 - }, - "factors": { - "type": "array", - "description": "Returns a list of active session factors.", - "items": { - "type": "string" - }, - "x-example": ["email"] - }, - "secret": { - "type": "string", - "description": "Secret used to authenticate the user. Only included if the request was made with an API key", - "x-example": "5e5bb8c16897e" - }, - "mfaUpdatedAt": { - "type": "string", - "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "expire", - "provider", - "providerUid", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken", - "ip", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName", - "current", - "factors", - "secret", - "mfaUpdatedAt" - ] - }, - "identity": { - "description": "Identity", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Identity ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Identity creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Identity update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" - }, - "provider": { - "type": "string", - "description": "Identity Provider.", - "x-example": "email" - }, - "providerUid": { - "type": "string", - "description": "ID of the User in the Identity Provider.", - "x-example": "5e5bb8c16897e" - }, - "providerEmail": { - "type": "string", - "description": "Email of the User in the Identity Provider.", - "x-example": "user@example.com" - }, - "providerAccessToken": { - "type": "string", - "description": "Identity Provider Access Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "providerAccessTokenExpiry": { - "type": "string", - "description": "The date of when the access token expires in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerRefreshToken": { - "type": "string", - "description": "Identity Provider Refresh Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "provider", - "providerUid", - "providerEmail", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken" - ] - }, - "token": { - "description": "Token", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "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": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "phrase": { - "type": "string", - "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.", - "x-example": "Golden Fox" - } - }, - "required": ["$id", "$createdAt", "userId", "secret", "expire", "phrase"] - }, - "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 European 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" - ] - }, - "localeCode": { - "description": "LocaleCode", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)", - "x-example": "en-us" - }, - "name": { - "type": "string", - "description": "Locale name", - "x-example": "US" - } - }, - "required": ["code", "name"] - }, - "file": { - "description": "File", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "File ID.", - "x-example": "5e5ea5c16897e" - }, - "bucketId": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "File creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "File update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "File permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "items": { - "type": "string" - }, - "x-example": ["read(\"any\")"] - }, - "name": { - "type": "string", - "description": "File name.", - "x-example": "Pink.png" - }, - "signature": { - "type": "string", - "description": "File MD5 signature.", - "x-example": "5d529fd02b544198ae075bd57c1762bb" - }, - "mimeType": { - "type": "string", - "description": "File mime type.", - "x-example": "image/png" - }, - "sizeOriginal": { - "type": "integer", - "description": "File original size in bytes.", - "x-example": 17890, - "format": "int32" - }, - "chunksTotal": { - "type": "integer", - "description": "Total number of chunks available", - "x-example": 17890, - "format": "int32" - }, - "chunksUploaded": { - "type": "integer", - "description": "Total number of chunks uploaded", - "x-example": 17890, - "format": "int32" - } - }, - "required": [ - "$id", - "bucketId", - "$createdAt", - "$updatedAt", - "$permissions", - "name", - "signature", - "mimeType", - "sizeOriginal", - "chunksTotal", - "chunksUploaded" - ] - }, - "bucket": { - "description": "Bucket", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Bucket creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Bucket update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Bucket permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "items": { - "type": "string" - }, - "x-example": ["read(\"any\")"] - }, - "fileSecurity": { - "type": "boolean", - "description": "Whether file-level security is enabled. [Learn more about permissions](https://appwrite.io/docs/permissions).", - "x-example": true - }, - "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"] - }, - "compression": { - "type": "string", - "description": "Compression algorithm choosen for compression. Will be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd).", - "x-example": "gzip" - }, - "encryption": { - "type": "boolean", - "description": "Bucket is encrypted.", - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Virus scanning is enabled.", - "x-example": false - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "fileSecurity", - "name", - "enabled", - "maximumFileSize", - "allowedFileExtensions", - "compression", - "encryption", - "antivirus" - ] - }, - "team": { - "description": "Team", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Team creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Team update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "total": { - "type": "integer", - "description": "Total number of team members.", - "x-example": 7, - "format": "int32" - }, - "prefs": { - "type": "object", - "description": "Team preferences as a key-value object", - "x-example": { - "theme": "pink", - "timezone": "UTC" - }, - "items": { + "description": "JWT", "type": "object", - "$ref": "#/definitions/preferences" - } - } - }, - "required": ["$id", "$createdAt", "$updatedAt", "name", "total", "prefs"] - }, - "membership": { - "description": "Membership", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Membership ID.", - "x-example": "5e5ea5c16897e" + "properties": { + "jwt": { + "type": "string", + "description": "JWT encoded string.", + "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + }, + "required": [ + "jwt" + ] }, - "$createdAt": { - "type": "string", - "description": "Membership creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "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 European 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" + ] }, - "$updatedAt": { - "type": "string", - "description": "Membership update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "localeCode": { + "description": "LocaleCode", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes)", + "x-example": "en-us" + }, + "name": { + "type": "string", + "description": "Locale name", + "x-example": "US" + } + }, + "required": [ + "code", + "name" + ] }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" + "file": { + "description": "File", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "File ID.", + "x-example": "5e5ea5c16897e" + }, + "bucketId": { + "type": "string", + "description": "Bucket ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "File creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "File update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "File permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "name": { + "type": "string", + "description": "File name.", + "x-example": "Pink.png" + }, + "signature": { + "type": "string", + "description": "File MD5 signature.", + "x-example": "5d529fd02b544198ae075bd57c1762bb" + }, + "mimeType": { + "type": "string", + "description": "File mime type.", + "x-example": "image\/png" + }, + "sizeOriginal": { + "type": "integer", + "description": "File original size in bytes.", + "x-example": 17890, + "format": "int32" + }, + "chunksTotal": { + "type": "integer", + "description": "Total number of chunks available", + "x-example": 17890, + "format": "int32" + }, + "chunksUploaded": { + "type": "integer", + "description": "Total number of chunks uploaded", + "x-example": 17890, + "format": "int32" + } + }, + "required": [ + "$id", + "bucketId", + "$createdAt", + "$updatedAt", + "$permissions", + "name", + "signature", + "mimeType", + "sizeOriginal", + "chunksTotal", + "chunksUploaded" + ] }, - "userName": { - "type": "string", - "description": "User name. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "John Doe" + "bucket": { + "description": "Bucket", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Bucket ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Bucket creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Bucket update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Bucket permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "fileSecurity": { + "type": "boolean", + "description": "Whether file-level security is enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "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" + ] + }, + "compression": { + "type": "string", + "description": "Compression algorithm choosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", + "x-example": "gzip" + }, + "encryption": { + "type": "boolean", + "description": "Bucket is encrypted.", + "x-example": false + }, + "antivirus": { + "type": "boolean", + "description": "Virus scanning is enabled.", + "x-example": false + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "fileSecurity", + "name", + "enabled", + "maximumFileSize", + "allowedFileExtensions", + "compression", + "encryption", + "antivirus" + ] }, - "userEmail": { - "type": "string", - "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "john@appwrite.io" + "team": { + "description": "Team", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Team creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Team update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Team name.", + "x-example": "VIP" + }, + "total": { + "type": "integer", + "description": "Total number of team members.", + "x-example": 7, + "format": "int32" + }, + "prefs": { + "type": "object", + "description": "Team preferences as a key-value object", + "x-example": { + "theme": "pink", + "timezone": "UTC" + }, + "items": { + "type": "object", + "$ref": "#\/definitions\/preferences" + } + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "total", + "prefs" + ] }, - "teamId": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" + "membership": { + "description": "Membership", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Membership ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Membership creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Membership update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" + }, + "userName": { + "type": "string", + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "John Doe" + }, + "userEmail": { + "type": "string", + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", + "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": "string", + "description": "Date, the user has been invited to join the team in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "joined": { + "type": "string", + "description": "Date, the user has accepted the invitation to join the team in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "confirm": { + "type": "boolean", + "description": "User confirmation status, true if the user has joined the team or false otherwise.", + "x-example": false + }, + "mfa": { + "type": "boolean", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", + "x-example": false + }, + "roles": { + "type": "array", + "description": "User list of roles", + "items": { + "type": "string" + }, + "x-example": [ + "owner" + ] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "userName", + "userEmail", + "teamId", + "teamName", + "invited", + "joined", + "confirm", + "mfa", + "roles" + ] }, - "teamName": { - "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "invited": { - "type": "string", - "description": "Date, the user has been invited to join the team in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "joined": { - "type": "string", - "description": "Date, the user has accepted the invitation to join the team in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "confirm": { - "type": "boolean", - "description": "User confirmation status, true if the user has joined the team or false otherwise.", - "x-example": false - }, - "mfa": { - "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", - "x-example": false - }, - "roles": { - "type": "array", - "description": "User list of roles", - "items": { - "type": "string" - }, - "x-example": ["owner"] - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "userName", - "userEmail", - "teamId", - "teamName", - "invited", - "joined", - "confirm", - "mfa", - "roles" - ] - }, - "function": { - "description": "Function", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Function creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Function update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "execute": { - "type": "array", - "description": "Execution permissions.", - "items": { - "type": "string" - }, - "x-example": "users" - }, - "name": { - "type": "string", - "description": "Function name.", - "x-example": "My Function" - }, - "enabled": { - "type": "boolean", - "description": "Function enabled.", - "x-example": false - }, - "live": { - "type": "boolean", - "description": "Is the function deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the function to update it with the latest configuration.", - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project.", - "x-example": false + "function": { + "description": "Function", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Function creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Function update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "execute": { + "type": "array", + "description": "Execution permissions.", + "items": { + "type": "string" + }, + "x-example": "users" + }, + "name": { + "type": "string", + "description": "Function name.", + "x-example": "My Function" + }, + "enabled": { + "type": "boolean", + "description": "Function enabled.", + "x-example": false + }, + "live": { + "type": "boolean", + "description": "Is the function deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the function to update it with the latest configuration.", + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project.", + "x-example": false + }, + "runtime": { + "type": "string", + "description": "Function execution runtime.", + "x-example": "python-3.8" + }, + "deployment": { + "type": "string", + "description": "Function's active deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { + "type": "string" + }, + "x-example": "users.read" + }, + "vars": { + "type": "array", + "description": "Function variables.", + "items": { + "type": "object", + "$ref": "#\/definitions\/variable" + }, + "x-example": [] + }, + "events": { + "type": "array", + "description": "Function trigger events.", + "items": { + "type": "string" + }, + "x-example": "account.create" + }, + "schedule": { + "type": "string", + "description": "Function execution schedule in CRON format.", + "x-example": "5 4 * * *" + }, + "timeout": { + "type": "integer", + "description": "Function execution timeout in seconds.", + "x-example": 300, + "format": "int32" + }, + "entrypoint": { + "type": "string", + "description": "The entrypoint file used to execute the deployment.", + "x-example": "index.js" + }, + "commands": { + "type": "string", + "description": "The build command used to build the deployment.", + "x-example": "npm install" + }, + "version": { + "type": "string", + "description": "Version of Open Runtimes used for the function.", + "x-example": "v2" + }, + "installationId": { + "type": "string", + "description": "Function VCS (Version Control System) installation id.", + "x-example": "6m40at4ejk5h2u9s1hboo" + }, + "providerRepositoryId": { + "type": "string", + "description": "VCS (Version Control System) Repository ID", + "x-example": "appwrite" + }, + "providerBranch": { + "type": "string", + "description": "VCS (Version Control System) branch name", + "x-example": "main" + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function in VCS (Version Control System) repository", + "x-example": "functions\/helloWorld" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", + "x-example": false + }, + "specification": { + "type": "string", + "description": "Machine specification for builds and executions.", + "x-example": "s-1vcpu-512mb" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "execute", + "name", + "enabled", + "live", + "logging", + "runtime", + "deployment", + "scopes", + "vars", + "events", + "schedule", + "timeout", + "entrypoint", + "commands", + "version", + "installationId", + "providerRepositoryId", + "providerBranch", + "providerRootDirectory", + "providerSilentMode", + "specification" + ] }, "runtime": { - "type": "string", - "description": "Function execution runtime.", - "x-example": "python-3.8" + "description": "Runtime", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Runtime ID.", + "x-example": "python-3.8" + }, + "key": { + "type": "string", + "description": "Parent runtime key.", + "x-example": "python" + }, + "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", + "key", + "name", + "version", + "base", + "image", + "logo", + "supports" + ] }, "deployment": { - "type": "string", - "description": "Function's active deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "scopes": { - "type": "array", - "description": "Allowed permission scopes.", - "items": { - "type": "string" - }, - "x-example": "users.read" - }, - "vars": { - "type": "array", - "description": "Function variables.", - "items": { + "description": "Deployment", "type": "object", - "$ref": "#/definitions/variable" - }, - "x-example": [] + "properties": { + "$id": { + "type": "string", + "description": "Deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Deployment update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "type": { + "type": "string", + "description": "Type of deployment.", + "x-example": "vcs" + }, + "resourceId": { + "type": "string", + "description": "Resource ID.", + "x-example": "5e5ea6g16897e" + }, + "resourceType": { + "type": "string", + "description": "Resource type.", + "x-example": "functions" + }, + "entrypoint": { + "type": "string", + "description": "The entrypoint file to use to execute the deployment code.", + "x-example": "index.js" + }, + "size": { + "type": "integer", + "description": "The code size in bytes.", + "x-example": 128, + "format": "int32" + }, + "buildSize": { + "type": "integer", + "description": "The build output 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. Possible values are \"processing\", \"building\", \"waiting\", \"ready\", and \"failed\".", + "x-example": "ready" + }, + "buildLogs": { + "type": "string", + "description": "The build logs.", + "x-example": "Compiling source files..." + }, + "buildTime": { + "type": "integer", + "description": "The current build time in seconds.", + "x-example": 128, + "format": "int32" + }, + "providerRepositoryName": { + "type": "string", + "description": "The name of the vcs provider repository", + "x-example": "database" + }, + "providerRepositoryOwner": { + "type": "string", + "description": "The name of the vcs provider repository owner", + "x-example": "utopia" + }, + "providerRepositoryUrl": { + "type": "string", + "description": "The url of the vcs provider repository", + "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" + }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, + "providerCommitHash": { + "type": "string", + "description": "The commit hash of the vcs commit", + "x-example": "7c3f25d" + }, + "providerCommitAuthorUrl": { + "type": "string", + "description": "The url of vcs commit author", + "x-example": "https:\/\/github.com\/vermakhushboo" + }, + "providerCommitAuthor": { + "type": "string", + "description": "The name of vcs commit author", + "x-example": "Khushboo Verma" + }, + "providerCommitMessage": { + "type": "string", + "description": "The commit message", + "x-example": "Update index.js" + }, + "providerCommitUrl": { + "type": "string", + "description": "The url of the vcs commit", + "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" + }, + "providerBranchUrl": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "type", + "resourceId", + "resourceType", + "entrypoint", + "size", + "buildSize", + "buildId", + "activate", + "status", + "buildLogs", + "buildTime", + "providerRepositoryName", + "providerRepositoryOwner", + "providerRepositoryUrl", + "providerBranch", + "providerCommitHash", + "providerCommitAuthorUrl", + "providerCommitAuthor", + "providerCommitMessage", + "providerCommitUrl", + "providerBranchUrl" + ] }, - "events": { - "type": "array", - "description": "Function trigger events.", - "items": { - "type": "string" - }, - "x-example": "account.create" - }, - "schedule": { - "type": "string", - "description": "Function execution schedule in CRON format.", - "x-example": "5 4 * * *" - }, - "timeout": { - "type": "integer", - "description": "Function execution timeout in seconds.", - "x-example": 300, - "format": "int32" - }, - "entrypoint": { - "type": "string", - "description": "The entrypoint file used to execute the deployment.", - "x-example": "index.js" - }, - "commands": { - "type": "string", - "description": "The build command used to build the deployment.", - "x-example": "npm install" - }, - "version": { - "type": "string", - "description": "Version of Open Runtimes used for the function.", - "x-example": "v2" - }, - "installationId": { - "type": "string", - "description": "Function VCS (Version Control System) installation id.", - "x-example": "6m40at4ejk5h2u9s1hboo" - }, - "providerRepositoryId": { - "type": "string", - "description": "VCS (Version Control System) Repository ID", - "x-example": "appwrite" - }, - "providerBranch": { - "type": "string", - "description": "VCS (Version Control System) branch name", - "x-example": "main" - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function in VCS (Version Control System) repository", - "x-example": "functions/helloWorld" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", - "x-example": false - }, - "specification": { - "type": "string", - "description": "Machine specification for builds and executions.", - "x-example": "s-1vcpu-512mb" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "execute", - "name", - "enabled", - "live", - "logging", - "runtime", - "deployment", - "scopes", - "vars", - "events", - "schedule", - "timeout", - "entrypoint", - "commands", - "version", - "installationId", - "providerRepositoryId", - "providerBranch", - "providerRootDirectory", - "providerSilentMode", - "specification" - ] - }, - "runtime": { - "description": "Runtime", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Runtime ID.", - "x-example": "python-3.8" - }, - "key": { - "type": "string", - "description": "Parent runtime key.", - "x-example": "python" - }, - "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", - "key", - "name", - "version", - "base", - "image", - "logo", - "supports" - ] - }, - "deployment": { - "description": "Deployment", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Deployment update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "type": { - "type": "string", - "description": "Type of deployment.", - "x-example": "vcs" - }, - "resourceId": { - "type": "string", - "description": "Resource ID.", - "x-example": "5e5ea6g16897e" - }, - "resourceType": { - "type": "string", - "description": "Resource type.", - "x-example": "functions" - }, - "entrypoint": { - "type": "string", - "description": "The entrypoint file to use to execute the deployment code.", - "x-example": "index.js" - }, - "size": { - "type": "integer", - "description": "The code size in bytes.", - "x-example": 128, - "format": "int32" - }, - "buildSize": { - "type": "integer", - "description": "The build output 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. Possible values are \"processing\", \"building\", \"waiting\", \"ready\", and \"failed\".", - "x-example": "ready" - }, - "buildLogs": { - "type": "string", - "description": "The build logs.", - "x-example": "Compiling source files..." - }, - "buildTime": { - "type": "integer", - "description": "The current build time in seconds.", - "x-example": 128, - "format": "int32" - }, - "providerRepositoryName": { - "type": "string", - "description": "The name of the vcs provider repository", - "x-example": "database" - }, - "providerRepositoryOwner": { - "type": "string", - "description": "The name of the vcs provider repository owner", - "x-example": "utopia" - }, - "providerRepositoryUrl": { - "type": "string", - "description": "The url of the vcs provider repository", - "x-example": "https://github.com/vermakhushboo/g4-node-function" - }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, - "providerCommitHash": { - "type": "string", - "description": "The commit hash of the vcs commit", - "x-example": "7c3f25d" - }, - "providerCommitAuthorUrl": { - "type": "string", - "description": "The url of vcs commit author", - "x-example": "https://github.com/vermakhushboo" - }, - "providerCommitAuthor": { - "type": "string", - "description": "The name of vcs commit author", - "x-example": "Khushboo Verma" - }, - "providerCommitMessage": { - "type": "string", - "description": "The commit message", - "x-example": "Update index.js" - }, - "providerCommitUrl": { - "type": "string", - "description": "The url of the vcs commit", - "x-example": "https://github.com/vermakhushboo/g4-node-function/commit/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" - }, - "providerBranchUrl": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "https://github.com/vermakhushboo/appwrite/tree/0.7.x" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "type", - "resourceId", - "resourceType", - "entrypoint", - "size", - "buildSize", - "buildId", - "activate", - "status", - "buildLogs", - "buildTime", - "providerRepositoryName", - "providerRepositoryOwner", - "providerRepositoryUrl", - "providerBranch", - "providerCommitHash", - "providerCommitAuthorUrl", - "providerCommitAuthor", - "providerCommitMessage", - "providerCommitUrl", - "providerBranchUrl" - ] - }, - "execution": { - "description": "Execution", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Execution ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Execution creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Execution upate date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Execution roles.", - "items": { - "type": "string" - }, - "x-example": ["any"] - }, - "functionId": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea6g16897e" - }, - "trigger": { - "type": "string", - "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" - }, - "status": { - "type": "string", - "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" - }, - "requestMethod": { - "type": "string", - "description": "HTTP request method type.", - "x-example": "GET" - }, - "requestPath": { - "type": "string", - "description": "HTTP request path and query.", - "x-example": "/articles?id=5" - }, - "requestHeaders": { - "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", - "items": { + "execution": { + "description": "Execution", "type": "object", - "$ref": "#/definitions/headers" - }, - "x-example": [ - { - "Content-Type": "application/json" - } - ] + "properties": { + "$id": { + "type": "string", + "description": "Execution ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Execution creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Execution upate date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Execution roles.", + "items": { + "type": "string" + }, + "x-example": [ + "any" + ] + }, + "functionId": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea6g16897e" + }, + "trigger": { + "type": "string", + "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", + "x-example": "http" + }, + "status": { + "type": "string", + "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", + "x-example": "processing" + }, + "requestMethod": { + "type": "string", + "description": "HTTP request method type.", + "x-example": "GET" + }, + "requestPath": { + "type": "string", + "description": "HTTP request path and query.", + "x-example": "\/articles?id=5" + }, + "requestHeaders": { + "type": "array", + "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "items": { + "type": "object", + "$ref": "#\/definitions\/headers" + }, + "x-example": [ + { + "Content-Type": "application\/json" + } + ] + }, + "responseStatusCode": { + "type": "integer", + "description": "HTTP response status code.", + "x-example": 200, + "format": "int32" + }, + "responseBody": { + "type": "string", + "description": "HTTP response body. This will return empty unless execution is created as synchronous.", + "x-example": "" + }, + "responseHeaders": { + "type": "array", + "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "items": { + "type": "object", + "$ref": "#\/definitions\/headers" + }, + "x-example": [ + { + "Content-Type": "application\/json" + } + ] + }, + "logs": { + "type": "string", + "description": "Function logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "errors": { + "type": "string", + "description": "Function errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "duration": { + "type": "number", + "description": "Function execution duration in seconds.", + "x-example": 0.4, + "format": "double" + }, + "scheduledAt": { + "type": "string", + "description": "The scheduled time for execution. If left empty, execution will be queued immediately.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "functionId", + "trigger", + "status", + "requestMethod", + "requestPath", + "requestHeaders", + "responseStatusCode", + "responseBody", + "responseHeaders", + "logs", + "errors", + "duration" + ] }, - "responseStatusCode": { - "type": "integer", - "description": "HTTP response status code.", - "x-example": 200, - "format": "int32" - }, - "responseBody": { - "type": "string", - "description": "HTTP response body. This will return empty unless execution is created as synchronous.", - "x-example": "" - }, - "responseHeaders": { - "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", - "items": { + "build": { + "description": "Build", "type": "object", - "$ref": "#/definitions/headers" - }, - "x-example": [ - { - "Content-Type": "application/json" - } - ] + "properties": { + "$id": { + "type": "string", + "description": "Build ID.", + "x-example": "5e5ea5c16897e" + }, + "deploymentId": { + "type": "string", + "description": "The deployment that created this build.", + "x-example": "5e5ea5c16897e" + }, + "status": { + "type": "string", + "description": "The build status. There are a few different types and each one means something different. \\nFailed - The deployment build has failed. More details can usually be found in buildStderr\\nReady - The deployment build was successful and the deployment is ready to be deployed\\nProcessing - The deployment is currently waiting to have a build triggered\\nBuilding - The deployment is currently being built", + "x-example": "ready" + }, + "stdout": { + "type": "string", + "description": "The stdout of the build.", + "x-example": "" + }, + "stderr": { + "type": "string", + "description": "The stderr of the build.", + "x-example": "" + }, + "startTime": { + "type": "string", + "description": "The deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "endTime": { + "type": "string", + "description": "The time the build was finished in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "duration": { + "type": "integer", + "description": "The build duration in seconds.", + "x-example": 0, + "format": "int32" + }, + "size": { + "type": "integer", + "description": "The code size in bytes.", + "x-example": 128, + "format": "int32" + } + }, + "required": [ + "$id", + "deploymentId", + "status", + "stdout", + "stderr", + "startTime", + "endTime", + "duration", + "size" + ] }, - "logs": { - "type": "string", - "description": "Function logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" + "variable": { + "description": "Variable", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Variable ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Variable creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Variable creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "key": { + "type": "string", + "description": "Variable key.", + "x-example": "API_KEY" + }, + "value": { + "type": "string", + "description": "Variable value.", + "x-example": "myPa$$word1" + }, + "resourceType": { + "type": "string", + "description": "Service to which the variable belongs. Possible values are \"project\", \"function\"", + "x-example": "function" + }, + "resourceId": { + "type": "string", + "description": "ID of resource to which the variable belongs. If resourceType is \"project\", it is empty. If resourceType is \"function\", it is ID of the function.", + "x-example": "myAwesomeFunction" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "value", + "resourceType", + "resourceId" + ] }, - "errors": { - "type": "string", - "description": "Function errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" + "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" + ] }, - "duration": { - "type": "number", - "description": "Function execution duration in seconds.", - "x-example": 0.4, - "format": "double" + "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" + ] }, - "scheduledAt": { - "type": "string", - "description": "The scheduled time for execution. If left empty, execution will be queued immediately.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "x-nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "functionId", - "trigger", - "status", - "requestMethod", - "requestPath", - "requestHeaders", - "responseStatusCode", - "responseBody", - "responseHeaders", - "logs", - "errors", - "duration" - ] - }, - "build": { - "description": "Build", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Build ID.", - "x-example": "5e5ea5c16897e" + "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" + ] }, - "deploymentId": { - "type": "string", - "description": "The deployment that created this build.", - "x-example": "5e5ea5c16897e" - }, - "status": { - "type": "string", - "description": "The build status. There are a few different types and each one means something different. \\nFailed - The deployment build has failed. More details can usually be found in buildStderr\\nReady - The deployment build was successful and the deployment is ready to be deployed\\nProcessing - The deployment is currently waiting to have a build triggered\\nBuilding - The deployment is currently being built", - "x-example": "ready" - }, - "stdout": { - "type": "string", - "description": "The stdout of the build.", - "x-example": "" - }, - "stderr": { - "type": "string", - "description": "The stderr of the build.", - "x-example": "" - }, - "startTime": { - "type": "string", - "description": "The deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "endTime": { - "type": "string", - "description": "The time the build was finished in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "duration": { - "type": "integer", - "description": "The build duration in seconds.", - "x-example": 0, - "format": "int32" - }, - "size": { - "type": "integer", - "description": "The code size in bytes.", - "x-example": 128, - "format": "int32" - } - }, - "required": [ - "$id", - "deploymentId", - "status", - "stdout", - "stderr", - "startTime", - "endTime", - "duration", - "size" - ] - }, - "variable": { - "description": "Variable", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Variable ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Variable creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Variable creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "key": { - "type": "string", - "description": "Variable key.", - "x-example": "API_KEY" - }, - "value": { - "type": "string", - "description": "Variable value.", - "x-example": "myPa$$word1" - }, - "resourceType": { - "type": "string", - "description": "Service to which the variable belongs. Possible values are \"project\", \"function\"", - "x-example": "function" - }, - "resourceId": { - "type": "string", - "description": "ID of resource to which the variable belongs. If resourceType is \"project\", it is empty. If resourceType is \"function\", it is ID of the function.", - "x-example": "myAwesomeFunction" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "key", - "value", - "resourceType", - "resourceId" - ] - }, - "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": { - "name": { - "type": "string", - "description": "Name of the service.", - "x-example": "database" - }, - "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": ["name", "ping", "status"] - }, - "healthCertificate": { - "description": "Health Certificate", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Certificate name", - "x-example": "/CN=www.google.com" - }, - "subjectSN": { - "type": "string", - "description": "Subject SN", - "x-example": "" - }, - "issuerOrganisation": { - "type": "string", - "description": "Issuer organisation", - "x-example": "" - }, - "validFrom": { - "type": "string", - "description": "Valid from", - "x-example": "1704200998" - }, - "validTo": { - "type": "string", - "description": "Valid to", - "x-example": "1711458597" - }, - "signatureTypeSN": { - "type": "string", - "description": "Signature type SN", - "x-example": "RSA-SHA256" - } - }, - "required": [ - "name", - "subjectSN", - "issuerOrganisation", - "validFrom", - "validTo", - "signatureTypeSN" - ] - }, - "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"] - }, - "headers": { - "description": "Headers", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Header name.", - "x-example": "Content-Type" - }, - "value": { - "type": "string", - "description": "Header value.", - "x-example": "application/json" - } - }, - "required": ["name", "value"] - }, - "specification": { - "description": "Specification", - "type": "object", - "properties": { - "memory": { - "type": "integer", - "description": "Memory size in MB.", - "x-example": 512, - "format": "int32" - }, - "cpus": { - "type": "number", - "description": "Number of CPUs.", - "x-example": 1, - "format": "double" - }, - "enabled": { - "type": "boolean", - "description": "Is size enabled.", - "x-example": true - }, - "slug": { - "type": "string", - "description": "Size slug.", - "x-example": "s-1vcpu-512mb" - } - }, - "required": ["memory", "cpus", "enabled", "slug"] - }, - "mfaChallenge": { - "description": "MFA Challenge", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" - }, - "expire": { - "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": ["$id", "$createdAt", "userId", "expire"] - }, - "mfaRecoveryCodes": { - "description": "MFA Recovery Codes", - "type": "object", - "properties": { - "recoveryCodes": { - "type": "array", - "description": "Recovery codes.", - "items": { - "type": "string" - }, - "x-example": ["a3kf0-s0cl2", "s0co1-as98s"] - } - }, - "required": ["recoveryCodes"] - }, - "mfaType": { - "description": "MFAType", - "type": "object", - "properties": { - "secret": { - "type": "string", - "description": "Secret token used for TOTP factor.", - "x-example": true - }, - "uri": { - "type": "string", - "description": "URI for authenticator apps.", - "x-example": true - } - }, - "required": ["secret", "uri"] - }, - "mfaFactors": { - "description": "MFAFactors", - "type": "object", - "properties": { - "totp": { - "type": "boolean", - "description": "Can TOTP be used for MFA challenge for this account.", - "x-example": true + "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": { - "type": "boolean", - "description": "Can phone (SMS) be used for MFA challenge for this account.", - "x-example": true + "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" + ] }, - "email": { - "type": "boolean", - "description": "Can email be used for MFA challenge for this account.", - "x-example": true + "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" + ] }, - "recoveryCode": { - "type": "boolean", - "description": "Can recovery code be used for MFA challenge for this account.", - "x-example": true - } - }, - "required": ["totp", "phone", "email", "recoveryCode"] - }, - "provider": { - "description": "Provider", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Provider ID.", - "x-example": "5e5ea5c16897e" + "healthQueue": { + "description": "Health Queue", + "type": "object", + "properties": { + "size": { + "type": "integer", + "description": "Amount of actions in the queue.", + "x-example": 8, + "format": "int32" + } + }, + "required": [ + "size" + ] }, - "$createdAt": { - "type": "string", - "description": "Provider creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "healthStatus": { + "description": "Health Status", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the service.", + "x-example": "database" + }, + "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": [ + "name", + "ping", + "status" + ] }, - "$updatedAt": { - "type": "string", - "description": "Provider update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "healthCertificate": { + "description": "Health Certificate", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Certificate name", + "x-example": "\/CN=www.google.com" + }, + "subjectSN": { + "type": "string", + "description": "Subject SN", + "x-example": "" + }, + "issuerOrganisation": { + "type": "string", + "description": "Issuer organisation", + "x-example": "" + }, + "validFrom": { + "type": "string", + "description": "Valid from", + "x-example": "1704200998" + }, + "validTo": { + "type": "string", + "description": "Valid to", + "x-example": "1711458597" + }, + "signatureTypeSN": { + "type": "string", + "description": "Signature type SN", + "x-example": "RSA-SHA256" + } + }, + "required": [ + "name", + "subjectSN", + "issuerOrganisation", + "validFrom", + "validTo", + "signatureTypeSN" + ] }, - "name": { - "type": "string", - "description": "The name for the provider instance.", - "x-example": "Mailgun" + "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" + ] + }, + "headers": { + "description": "Headers", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Header name.", + "x-example": "Content-Type" + }, + "value": { + "type": "string", + "description": "Header value.", + "x-example": "application\/json" + } + }, + "required": [ + "name", + "value" + ] + }, + "specification": { + "description": "Specification", + "type": "object", + "properties": { + "memory": { + "type": "integer", + "description": "Memory size in MB.", + "x-example": 512, + "format": "int32" + }, + "cpus": { + "type": "number", + "description": "Number of CPUs.", + "x-example": 1, + "format": "double" + }, + "enabled": { + "type": "boolean", + "description": "Is size enabled.", + "x-example": true + }, + "slug": { + "type": "string", + "description": "Size slug.", + "x-example": "s-1vcpu-512mb" + } + }, + "required": [ + "memory", + "cpus", + "enabled", + "slug" + ] + }, + "mfaChallenge": { + "description": "MFA Challenge", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c168bb8" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "expire" + ] + }, + "mfaRecoveryCodes": { + "description": "MFA Recovery Codes", + "type": "object", + "properties": { + "recoveryCodes": { + "type": "array", + "description": "Recovery codes.", + "items": { + "type": "string" + }, + "x-example": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } + }, + "required": [ + "recoveryCodes" + ] + }, + "mfaType": { + "description": "MFAType", + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "Secret token used for TOTP factor.", + "x-example": true + }, + "uri": { + "type": "string", + "description": "URI for authenticator apps.", + "x-example": true + } + }, + "required": [ + "secret", + "uri" + ] + }, + "mfaFactors": { + "description": "MFAFactors", + "type": "object", + "properties": { + "totp": { + "type": "boolean", + "description": "Can TOTP be used for MFA challenge for this account.", + "x-example": true + }, + "phone": { + "type": "boolean", + "description": "Can phone (SMS) be used for MFA challenge for this account.", + "x-example": true + }, + "email": { + "type": "boolean", + "description": "Can email be used for MFA challenge for this account.", + "x-example": true + }, + "recoveryCode": { + "type": "boolean", + "description": "Can recovery code be used for MFA challenge for this account.", + "x-example": true + } + }, + "required": [ + "totp", + "phone", + "email", + "recoveryCode" + ] }, "provider": { - "type": "string", - "description": "The name of the provider service.", - "x-example": "mailgun" + "description": "Provider", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Provider ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Provider creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Provider update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "The name for the provider instance.", + "x-example": "Mailgun" + }, + "provider": { + "type": "string", + "description": "The name of the provider service.", + "x-example": "mailgun" + }, + "enabled": { + "type": "boolean", + "description": "Is provider enabled?", + "x-example": true + }, + "type": { + "type": "string", + "description": "Type of provider.", + "x-example": "sms" + }, + "credentials": { + "type": "object", + "additionalProperties": true, + "description": "Provider credentials.", + "x-example": { + "key": "123456789" + } + }, + "options": { + "type": "object", + "additionalProperties": true, + "description": "Provider options.", + "x-example": { + "from": "sender-email@mydomain" + } + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "provider", + "enabled", + "type", + "credentials" + ] }, - "enabled": { - "type": "boolean", - "description": "Is provider enabled?", - "x-example": true + "message": { + "description": "Message", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Message ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Message creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Message update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "providerType": { + "type": "string", + "description": "Message provider type.", + "x-example": "email" + }, + "topics": { + "type": "array", + "description": "Topic IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "users": { + "type": "array", + "description": "User IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "targets": { + "type": "array", + "description": "Target IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "scheduledAt": { + "type": "string", + "description": "The scheduled time for message.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + }, + "deliveredAt": { + "type": "string", + "description": "The time when the message was delivered.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + }, + "deliveryErrors": { + "type": "array", + "description": "Delivery errors if any.", + "items": { + "type": "string" + }, + "x-example": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "x-nullable": true + }, + "deliveredTotal": { + "type": "integer", + "description": "Number of recipients the message was delivered to.", + "x-example": 1, + "format": "int32" + }, + "data": { + "type": "object", + "additionalProperties": true, + "description": "Data of the message.", + "x-example": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + } + }, + "status": { + "type": "string", + "description": "Status of delivery.", + "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "providerType", + "topics", + "users", + "targets", + "deliveredTotal", + "data", + "status" + ] }, - "type": { - "type": "string", - "description": "Type of provider.", - "x-example": "sms" + "topic": { + "description": "Topic", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Topic ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Topic creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Topic update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "The name of the topic.", + "x-example": "events" + }, + "emailTotal": { + "type": "integer", + "description": "Total count of email subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "smsTotal": { + "type": "integer", + "description": "Total count of SMS subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "pushTotal": { + "type": "integer", + "description": "Total count of push subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "subscribe": { + "type": "array", + "description": "Subscribe permissions.", + "items": { + "type": "string" + }, + "x-example": "users" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "emailTotal", + "smsTotal", + "pushTotal", + "subscribe" + ] }, - "credentials": { - "type": "object", - "additionalProperties": true, - "description": "Provider credentials.", - "x-example": { - "key": "123456789" - } - }, - "options": { - "type": "object", - "additionalProperties": true, - "description": "Provider options.", - "x-example": { - "from": "sender-email@mydomain" - } - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "provider", - "enabled", - "type", - "credentials" - ] - }, - "message": { - "description": "Message", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Message ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Message creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Message update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerType": { - "type": "string", - "description": "Message provider type.", - "x-example": "email" - }, - "topics": { - "type": "array", - "description": "Topic IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": ["5e5ea5c16897e"] - }, - "users": { - "type": "array", - "description": "User IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": ["5e5ea5c16897e"] - }, - "targets": { - "type": "array", - "description": "Target IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": ["5e5ea5c16897e"] - }, - "scheduledAt": { - "type": "string", - "description": "The scheduled time for message.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "x-nullable": true - }, - "deliveredAt": { - "type": "string", - "description": "The time when the message was delivered.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "x-nullable": true - }, - "deliveryErrors": { - "type": "array", - "description": "Delivery errors if any.", - "items": { - "type": "string" - }, - "x-example": [ - "Failed to send message to target 5e5ea5c16897e: Credentials not valid." - ], - "x-nullable": true - }, - "deliveredTotal": { - "type": "integer", - "description": "Number of recipients the message was delivered to.", - "x-example": 1, - "format": "int32" - }, - "data": { - "type": "object", - "additionalProperties": true, - "description": "Data of the message.", - "x-example": { - "subject": "Welcome to Appwrite", - "content": "Hi there, welcome to Appwrite family." - } - }, - "status": { - "type": "string", - "description": "Status of delivery.", - "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "providerType", - "topics", - "users", - "targets", - "deliveredTotal", - "data", - "status" - ] - }, - "topic": { - "description": "Topic", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Topic ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Topic creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Topic update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "The name of the topic.", - "x-example": "events" - }, - "emailTotal": { - "type": "integer", - "description": "Total count of email subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" - }, - "smsTotal": { - "type": "integer", - "description": "Total count of SMS subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" - }, - "pushTotal": { - "type": "integer", - "description": "Total count of push subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" - }, - "subscribe": { - "type": "array", - "description": "Subscribe permissions.", - "items": { - "type": "string" - }, - "x-example": "users" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "emailTotal", - "smsTotal", - "pushTotal", - "subscribe" - ] - }, - "subscriber": { - "description": "Subscriber", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Subscriber ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Subscriber creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Subscriber update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "targetId": { - "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" + "subscriber": { + "description": "Subscriber", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Subscriber ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Subscriber creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Subscriber update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "targetId": { + "type": "string", + "description": "Target ID.", + "x-example": "259125845563242502" + }, + "target": { + "type": "object", + "description": "Target.", + "x-example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "items": { + "type": "object", + "$ref": "#\/definitions\/target" + } + }, + "userId": { + "type": "string", + "description": "Topic ID.", + "x-example": "5e5ea5c16897e" + }, + "userName": { + "type": "string", + "description": "User Name.", + "x-example": "Aegon Targaryen" + }, + "topicId": { + "type": "string", + "description": "Topic ID.", + "x-example": "259125845563242502" + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "targetId", + "target", + "userId", + "userName", + "topicId", + "providerType" + ] }, "target": { - "type": "object", - "description": "Target.", - "x-example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "providerId": "259125845563242502", - "name": "ageon-app-email", - "identifier": "random-mail@email.org", - "userId": "5e5ea5c16897e" - }, - "items": { + "description": "Target", "type": "object", - "$ref": "#/definitions/target" - } - }, - "userId": { - "type": "string", - "description": "Topic ID.", - "x-example": "5e5ea5c16897e" - }, - "userName": { - "type": "string", - "description": "User Name.", - "x-example": "Aegon Targaryen" - }, - "topicId": { - "type": "string", - "description": "Topic ID.", - "x-example": "259125845563242502" - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" + "properties": { + "$id": { + "type": "string", + "description": "Target ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Target creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Target update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Target Name.", + "x-example": "Apple iPhone 12" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "259125845563242502" + }, + "providerId": { + "type": "string", + "description": "Provider ID.", + "x-example": "259125845563242502", + "x-nullable": true + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" + }, + "identifier": { + "type": "string", + "description": "The target identifier.", + "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "userId", + "providerType", + "identifier", + "expired" + ] } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "targetId", - "target", - "userId", - "userName", - "topicId", - "providerType" - ] }, - "target": { - "description": "Target", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Target creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Target update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Target Name.", - "x-example": "Apple iPhone 12" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "259125845563242502" - }, - "providerId": { - "type": "string", - "description": "Provider ID.", - "x-example": "259125845563242502", - "x-nullable": true - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" - }, - "identifier": { - "type": "string", - "description": "The target identifier.", - "x-example": "token" - }, - "expired": { - "type": "boolean", - "description": "Is the target expired.", - "x-example": false - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "userId", - "providerType", - "identifier", - "expired" - ] + "externalDocs": { + "description": "Full API docs, specs and tutorials", + "url": "https:\/\/appwrite.io\/docs" } - }, - "externalDocs": { - "description": "Full API docs, specs and tutorials", - "url": "https://appwrite.io/docs" - } -} +} \ No newline at end of file